From a9d4164a2336dbfd2e11cbf96560cd6321e8467d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Wed, 3 Oct 2012 19:29:28 -0400 Subject: [PATCH 01/43] freerdp: improve scripts for complex modules with monolithic build option --- libfreerdp/CMakeLists.txt | 38 ++++++++-------- winpr/libwinpr/CMakeLists.txt | 86 ++++++++++++++--------------------- 2 files changed, 54 insertions(+), 70 deletions(-) diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 20a46bc9b..7ffee7809 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -19,28 +19,28 @@ if(WITH_MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -add_subdirectory(utils) -add_subdirectory(gdi) -add_subdirectory(rail) -add_subdirectory(cache) -add_subdirectory(codec) -add_subdirectory(crypto) -add_subdirectory(channels) -add_subdirectory(locale) -add_subdirectory(core) +set(FREERDP_MODULES + utils + gdi + rail + cache + codec + crypto + channels + locale + core) + +foreach(FREERDP_MODULE ${FREERDP_MODULES}) + add_subdirectory(${FREERDP_MODULE}) +endforeach() if(WITH_MONOLITHIC_BUILD) - add_library(freerdp - $ - $ - $ - $ - $ - $ - $ - $ - $) + foreach(FREERDP_MODULE ${FREERDP_MODULES}) + set(FREERDP_OBJECTS ${FREERDP_OBJECTS} "$") + endforeach() + + add_library(freerdp ${FREERDP_OBJECTS}) set_target_properties(freerdp PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") target_link_libraries(freerdp ${FREERDP_LIBS}) diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index 0dd4aeaf8..9a4d09885 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -25,59 +25,43 @@ if(WITH_MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -add_subdirectory(crt) -add_subdirectory(utils) -add_subdirectory(heap) -add_subdirectory(path) -add_subdirectory(io) -add_subdirectory(file) -add_subdirectory(error) -add_subdirectory(environment) -add_subdirectory(interlocked) -add_subdirectory(handle) -add_subdirectory(synch) -add_subdirectory(thread) -add_subdirectory(sysinfo) -add_subdirectory(bcrypt) -add_subdirectory(dsparse) -add_subdirectory(asn1) -add_subdirectory(rpc) -add_subdirectory(sspicli) -add_subdirectory(sspi) -add_subdirectory(registry) -add_subdirectory(library) -add_subdirectory(timezone) -add_subdirectory(winsock) -add_subdirectory(winhttp) +set(WINPR_MODULES + crt + utils + heap + path + io + file + error + environment + interlocked + handle + synch + thread + sysinfo + bcrypt + dsparse + asn1 + rpc + sspicli + sspi + registry + library + timezone + winsock) + +foreach(WINPR_MODULE ${WINPR_MODULES}) + add_subdirectory(${WINPR_MODULE}) +endforeach() if(WITH_MONOLITHIC_BUILD) - add_library(winpr - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $ - $) - - set_target_properties(winpr PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") + + foreach(WINPR_MODULE ${WINPR_MODULES}) + set(WINPR_OBJECTS ${WINPR_OBJECTS} "$") + endforeach() + + add_library(winpr ${WINPR_OBJECTS}) + set_target_properties(winpr PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") target_link_libraries(winpr ${WINPR_LIBS}) install(TARGETS winpr DESTINATION ${CMAKE_INSTALL_LIBDIR}) From b15e152011b75a9b7edea73ee9c3f7460a3e54c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Wed, 3 Oct 2012 19:50:48 -0400 Subject: [PATCH 02/43] libwinpr: use ModuleOptions.cmake automatically --- winpr/libwinpr/CMakeLists.txt | 33 +++++++----------------- winpr/libwinpr/utils/ModuleOptions.cmake | 9 +++++++ 2 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 winpr/libwinpr/utils/ModuleOptions.cmake diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index 9a4d09885..3ebf5cb2b 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -25,30 +25,15 @@ if(WITH_MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -set(WINPR_MODULES - crt - utils - heap - path - io - file - error - environment - interlocked - handle - synch - thread - sysinfo - bcrypt - dsparse - asn1 - rpc - sspicli - sspi - registry - library - timezone - winsock) +set(FILENAME "ModuleOptions.cmake") +file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") + +foreach(FILEPATH ${FILEPATHS}) + if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") + string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" WINPR_MODULE ${FILEPATH}) + set(WINPR_MODULES ${WINPR_MODULES} ${WINPR_MODULE}) + endif() +endforeach(FILEPATH) foreach(WINPR_MODULE ${WINPR_MODULES}) add_subdirectory(${WINPR_MODULE}) diff --git a/winpr/libwinpr/utils/ModuleOptions.cmake b/winpr/libwinpr/utils/ModuleOptions.cmake new file mode 100644 index 000000000..9e37ca69e --- /dev/null +++ b/winpr/libwinpr/utils/ModuleOptions.cmake @@ -0,0 +1,9 @@ + +set(MINWIN_LAYER "0") +set(MINWIN_GROUP "none") +set(MINWIN_MAJOR_VERSION "0") +set(MINWIN_MINOR_VERSION "0") +set(MINWIN_SHORT_NAME "utils") +set(MINWIN_LONG_NAME "WinPR Utils") +set(MODULE_LIBRARY_NAME "${MINWIN_SHORT_NAME}") + From e828feccb7b195f3c733b57b14b86a5a030c37d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 09:42:23 -0400 Subject: [PATCH 03/43] cmake: organize solution folders --- CMakeLists.txt | 4 +++- libfreerdp/CMakeLists.txt | 2 +- libfreerdp/cache/CMakeLists.txt | 2 +- libfreerdp/channels/CMakeLists.txt | 2 +- libfreerdp/codec/CMakeLists.txt | 2 +- libfreerdp/core/CMakeLists.txt | 2 +- libfreerdp/crypto/CMakeLists.txt | 2 +- libfreerdp/gdi/CMakeLists.txt | 2 +- libfreerdp/locale/CMakeLists.txt | 2 +- libfreerdp/rail/CMakeLists.txt | 2 +- libfreerdp/utils/CMakeLists.txt | 2 +- winpr/CMakeLists.txt | 2 +- winpr/libwinpr/crt/CMakeLists.txt | 2 +- winpr/libwinpr/heap/CMakeLists.txt | 2 +- winpr/libwinpr/interlocked/CMakeLists.txt | 2 +- winpr/libwinpr/synch/CMakeLists.txt | 2 +- 16 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5eaa9a8d..28074ce7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 2.8) + project(FreeRDP C) + set(CMAKE_COLOR_MAKEFILE ON) # Include cmake modules diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 7ffee7809..513f49398 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -47,4 +47,4 @@ if(WITH_MONOLITHIC_BUILD) install(TARGETS freerdp DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() - +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/cache/CMakeLists.txt b/libfreerdp/cache/CMakeLists.txt index 0cc624659..a3e69b75a 100644 --- a/libfreerdp/cache/CMakeLists.txt +++ b/libfreerdp/cache/CMakeLists.txt @@ -47,4 +47,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index 9861f10f6..a3777363f 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -48,4 +48,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/codec/CMakeLists.txt b/libfreerdp/codec/CMakeLists.txt index a404535d6..d0044eed1 100644 --- a/libfreerdp/codec/CMakeLists.txt +++ b/libfreerdp/codec/CMakeLists.txt @@ -99,4 +99,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/core/CMakeLists.txt b/libfreerdp/core/CMakeLists.txt index 14467460a..b05d760fd 100644 --- a/libfreerdp/core/CMakeLists.txt +++ b/libfreerdp/core/CMakeLists.txt @@ -133,4 +133,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/crypto/CMakeLists.txt b/libfreerdp/crypto/CMakeLists.txt index 33f984a63..579e43f10 100644 --- a/libfreerdp/crypto/CMakeLists.txt +++ b/libfreerdp/crypto/CMakeLists.txt @@ -67,4 +67,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/gdi/CMakeLists.txt b/libfreerdp/gdi/CMakeLists.txt index 106fc0f16..ae490cef0 100644 --- a/libfreerdp/gdi/CMakeLists.txt +++ b/libfreerdp/gdi/CMakeLists.txt @@ -59,4 +59,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/locale/CMakeLists.txt b/libfreerdp/locale/CMakeLists.txt index 52e03500e..e8a43db37 100644 --- a/libfreerdp/locale/CMakeLists.txt +++ b/libfreerdp/locale/CMakeLists.txt @@ -89,4 +89,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/rail/CMakeLists.txt b/libfreerdp/rail/CMakeLists.txt index 8f256ed37..da37af51c 100644 --- a/libfreerdp/rail/CMakeLists.txt +++ b/libfreerdp/rail/CMakeLists.txt @@ -42,4 +42,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/libfreerdp/utils/CMakeLists.txt b/libfreerdp/utils/CMakeLists.txt index f6138f099..2b70d87b8 100644 --- a/libfreerdp/utils/CMakeLists.txt +++ b/libfreerdp/utils/CMakeLists.txt @@ -86,4 +86,4 @@ else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP") +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 1330d6921..3bb687751 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 2.8) project(WinPR C) diff --git a/winpr/libwinpr/crt/CMakeLists.txt b/winpr/libwinpr/crt/CMakeLists.txt index a92a69137..53b01927f 100644 --- a/winpr/libwinpr/crt/CMakeLists.txt +++ b/winpr/libwinpr/crt/CMakeLists.txt @@ -23,7 +23,7 @@ set(${MODULE_PREFIX}_SRCS memory.c string.c) -if(MSVC) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() diff --git a/winpr/libwinpr/heap/CMakeLists.txt b/winpr/libwinpr/heap/CMakeLists.txt index ce34c92b3..fcefa4221 100644 --- a/winpr/libwinpr/heap/CMakeLists.txt +++ b/winpr/libwinpr/heap/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_HEAP") set(${MODULE_PREFIX}_SRCS heap.c) -if(MSVC) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() diff --git a/winpr/libwinpr/interlocked/CMakeLists.txt b/winpr/libwinpr/interlocked/CMakeLists.txt index b52b16432..ca95e91df 100644 --- a/winpr/libwinpr/interlocked/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_INTERLOCKED") set(${MODULE_PREFIX}_SRCS interlocked.c) -if(MSVC) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() diff --git a/winpr/libwinpr/synch/CMakeLists.txt b/winpr/libwinpr/synch/CMakeLists.txt index 9ab399b3f..d604bf08f 100644 --- a/winpr/libwinpr/synch/CMakeLists.txt +++ b/winpr/libwinpr/synch/CMakeLists.txt @@ -37,7 +37,7 @@ set(${MODULE_PREFIX}_SRCS timer.c wait.c) -if(MSVC) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() From e0693c8f4cf13a3b861314ab4a58c056ebfb73df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 16:54:16 -0400 Subject: [PATCH 04/43] cmake: refactoring of channels cmake scripts --- channels/audin/client/CMakeLists.txt | 21 ++++++---- channels/cliprdr/client/CMakeLists.txt | 21 ++++++---- channels/drdynvc/client/CMakeLists.txt | 23 ++++++----- channels/rail/client/CMakeLists.txt | 18 ++++---- channels/rdpdr/client/CMakeLists.txt | 22 ++++++---- channels/rdpsnd/client/CMakeLists.txt | 18 ++++---- .../{mac_audio => MacAudio}/CMakeLists.txt | 4 +- .../{mac_audio => MacAudio}/rdpsnd_audio_q.c | 0 channels/rdpsnd/server/CMakeLists.txt | 2 + channels/sample/client/CMakeLists.txt | 19 +++++---- channels/server/CMakeLists.txt | 6 ++- channels/tsmf/client/CMakeLists.txt | 28 +++++++------ channels/urbdrc/CMakeLists.txt | 2 - channels/urbdrc/client/CMakeLists.txt | 41 ++++++++++++------- libfreerdp/CMakeLists.txt | 27 +++++++----- server/Sample/CMakeLists.txt | 4 +- winpr/include/winpr/wtypes.h | 8 ++-- winpr/libwinpr/CMakeLists.txt | 28 ++++++++----- 18 files changed, 166 insertions(+), 126 deletions(-) rename channels/rdpsnd/client/{mac_audio => MacAudio}/CMakeLists.txt (88%) rename channels/rdpsnd/client/{mac_audio => MacAudio}/rdpsnd_audio_q.c (100%) diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index 2be9f936b..f14356f8f 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,22 +15,27 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(AUDIN_SRCS +set(MODULE_NAME "audin") +set(MODULE_PREFIX "CHANNEL_AUDIN_CLIENT") + +set(${MODULE_PREFIX}_SRCS audin_main.c audin_main.h) include_directories(..) -add_library(audin ${AUDIN_SRCS}) -set_target_properties(audin PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(audin freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(audin freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS audin DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") if(WITH_ALSA) add_subdirectory(alsa) diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index 5c30a67ef..c67038cd5 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,20 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(CLIPRDR_SRCS +set(MODULE_NAME "cliprdr") +set(MODULE_PREFIX "CHANNEL_CLIPRDR_CLIENT") + +set(${MODULE_PREFIX}_SRCS cliprdr_constants.h cliprdr_format.c cliprdr_format.h cliprdr_main.c cliprdr_main.h) -add_library(cliprdr ${CLIPRDR_SRCS}) -set_target_properties(cliprdr PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(cliprdr freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(cliprdr freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS cliprdr DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index 42f8bf1d2..0da01496e 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,22 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(DRDYNVC_SRCS +set(MODULE_NAME "drdynvc") +set(MODULE_PREFIX "CHANNEL_DRDYNVC_CLIENT") + +set(${MODULE_PREFIX}_SRCS drdynvc_main.c drdynvc_main.h drdynvc_types.h dvcman.c - dvcman.h -) + dvcman.h) -add_library(drdynvc ${DRDYNVC_SRCS}) -set_target_properties(drdynvc PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(drdynvc freerdp winpr) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(drdynvc freerdp-utils winpr-synch) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-synch) endif() -install(TARGETS drdynvc DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index 6e6a45441..e8146d7e0 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -1,8 +1,6 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador # Copyright 2011 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,20 +15,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(RAIL_SRCS +set(MODULE_NAME "rail") +set(MODULE_PREFIX "CHANNEL_RAIL_CLIENT") + +set(${MODULE_PREFIX}_SRCS rail_main.c rail_main.h rail_orders.c rail_orders.h) -add_library(rail ${RAIL_SRCS}) -set_target_properties(rail PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(rail freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(rail freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS rail DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index a3fa82e1c..f6dcdde22 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(RDPDR_SRCS +set(MODULE_NAME "rdpdr") +set(MODULE_PREFIX "CHANNEL_RDPDR_CLIENT") + +set(${MODULE_PREFIX}_SRCS rdpdr_constants.h rdpdr_types.h rdpdr_capabilities.c @@ -29,19 +30,22 @@ set(RDPDR_SRCS rdpdr_main.c rdpdr_main.h) -add_library(rdpdr ${RDPDR_SRCS}) -set_target_properties(rdpdr PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(rdpdr freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(rdpdr freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS rdpdr DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") add_subdirectory(disk) add_subdirectory(printer) + if(NOT WIN32) add_subdirectory(parallel) add_subdirectory(serial) diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 745358da0..6bc8a307f 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -17,20 +17,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(RDPSND_SRCS +set(MODULE_NAME "rdpsnd") +set(MODULE_PREFIX "CHANNEL_RDPSND_CLIENT") + +set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h) -add_library(rdpsnd ${RDPSND_SRCS}) -set_target_properties(rdpsnd PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${RDPSND_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(rdpsnd freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(rdpsnd freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS rdpsnd DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) if(WITH_ALSA) add_subdirectory(alsa) @@ -41,6 +44,5 @@ if(WITH_PULSEAUDIO) endif() if(WITH_MACAUDIO) - add_subdirectory(mac_audio) + add_subdirectory(MacAudio) endif() - diff --git a/channels/rdpsnd/client/mac_audio/CMakeLists.txt b/channels/rdpsnd/client/MacAudio/CMakeLists.txt similarity index 88% rename from channels/rdpsnd/client/mac_audio/CMakeLists.txt rename to channels/rdpsnd/client/MacAudio/CMakeLists.txt index 45b50548c..76035fed6 100644 --- a/channels/rdpsnd/client/mac_audio/CMakeLists.txt +++ b/channels/rdpsnd/client/MacAudio/CMakeLists.txt @@ -2,9 +2,7 @@ # FreeRDP cmake build script # # Copyright 2012 Laxmikant Rashinkar -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/channels/rdpsnd/client/mac_audio/rdpsnd_audio_q.c b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c similarity index 100% rename from channels/rdpsnd/client/mac_audio/rdpsnd_audio_q.c rename to channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index 2e680b46e..bbdd507b2 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "rdpsnd") set(MODULE_PREFIX "CHANNEL_RDPSND_SERVER") set(${MODULE_PREFIX}_SRCS @@ -27,3 +28,4 @@ else() set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE) endif() +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Server") diff --git a/channels/sample/client/CMakeLists.txt b/channels/sample/client/CMakeLists.txt index 1c2943c8f..e7919065f 100644 --- a/channels/sample/client/CMakeLists.txt +++ b/channels/sample/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,17 +15,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(SKEL_SRCS +set(MODULE_NAME "sample") +set(MODULE_PREFIX "CHANNEL_SAMPLE_CLIENT") + +set(${MODULE_PREFIX}_SRCS skel_main.c skel_main.h) -add_library(skel ${SKEL_SRCS}) -set_target_properties(skel PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(skel freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(skel freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS skel DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) diff --git a/channels/server/CMakeLists.txt b/channels/server/CMakeLists.txt index b8de4ee2d..793564e05 100644 --- a/channels/server/CMakeLists.txt +++ b/channels/server/CMakeLists.txt @@ -15,8 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(MODULE_NAME "freerdp-server-channels") -set(MODULE_PREFIX "FREERDP_SERVER_CHANNELS") +set(MODULE_NAME "freerdp-channels-server") +set(MODULE_PREFIX "FREERDP_CHANNELS_SERVER") foreach(_MODULE_NAME ${CHANNEL_BUILTIN_SERVER_MODULES}) string(TOUPPER "CHANNEL_${_MODULE_NAME}" _MODULE_PREFIX) @@ -35,3 +35,5 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} target_link_libraries(${MODULE_NAME} ${CHANNEL_SERVER_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server") diff --git a/channels/tsmf/client/CMakeLists.txt b/channels/tsmf/client/CMakeLists.txt index baf97c55b..f4533a305 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +16,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(TSMF_SRCS +set(MODULE_NAME "tsmf") +set(MODULE_PREFIX "CHANNEL_TSMF_CLIENT") + +set(${MODULE_PREFIX}_SRCS tsmf_audio.c tsmf_audio.h tsmf_codec.c @@ -36,25 +37,27 @@ set(TSMF_SRCS include_directories(..) -add_library(tsmf ${TSMF_SRCS}) -set_target_properties(tsmf PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(tsmf freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(tsmf freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS tsmf DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") if(WITH_FFMPEG) add_subdirectory(ffmpeg) endif() if(WITH_XRANDR) -if(GSTREAMER_FOUND) - add_subdirectory(gstreamer) -endif() + if(GSTREAMER_FOUND) + add_subdirectory(gstreamer) + endif() endif() if(WITH_ALSA) @@ -64,4 +67,3 @@ endif() if(WITH_PULSEAUDIO) add_subdirectory(pulse) endif() - diff --git a/channels/urbdrc/CMakeLists.txt b/channels/urbdrc/CMakeLists.txt index f49c8bedc..a506d0f74 100644 --- a/channels/urbdrc/CMakeLists.txt +++ b/channels/urbdrc/CMakeLists.txt @@ -20,5 +20,3 @@ add_subdirectory(libusb) if(WITH_CLIENT_CHANNELS) add_subdirectory(client) endif() - - diff --git a/channels/urbdrc/client/CMakeLists.txt b/channels/urbdrc/client/CMakeLists.txt index ce8087e8c..198ed1d28 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -16,27 +16,38 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(URBDRC_SRCS - searchman.c - searchman.h +set(MODULE_NAME "urbdrc") +set(MODULE_PREFIX "CHANNEL_URBDRC_CLIENT") + +set(${MODULE_PREFIX}_SRCS + searchman.c + searchman.h isoch_queue.c isoch_queue.h - data_transfer.c - data_transfer.h - urbdrc_main.c - urbdrc_main.h + data_transfer.c + data_transfer.h + urbdrc_main.c + urbdrc_main.h urbdrc_types.h) include_directories(..) -add_library(urbdrc ${URBDRC_SRCS}) -set_target_properties(urbdrc PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${URBDRC_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -target_link_libraries(urbdrc udev) -target_link_libraries(urbdrc dbus-glib-1) -target_link_libraries(urbdrc pthread) -target_link_libraries(urbdrc uuid) -target_link_libraries(urbdrc freerdp-utils) +set(${MODULE_PREFIX}_LIBS + dbus-glib-1 + udev + uuid) -install(TARGETS urbdrc DESTINATION ${FREERDP_PLUGIN_PATH}) +if(WITH_MONOLITHIC_BUILD) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) + target_link_libraries(${MODULE_NAME} ${MODULE_PREFIX}_LIBS) +else() + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) + target_link_libraries(${MODULE_NAME} ${MODULE_PREFIX}_LIBS) +endif() +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 513f49398..83ff2d7c8 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -15,11 +15,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "freerdp") +set(MODULE_PREFIX "FREERDP") + if(WITH_MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -set(FREERDP_MODULES +set(${MODULE_PREFIX}_SUBMODULES utils gdi rail @@ -30,21 +33,23 @@ set(FREERDP_MODULES locale core) -foreach(FREERDP_MODULE ${FREERDP_MODULES}) - add_subdirectory(${FREERDP_MODULE}) +foreach(${MODULE_PREFIX}_SUBMODULE ${FREERDP_SUBMODULES}) + add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() if(WITH_MONOLITHIC_BUILD) - foreach(FREERDP_MODULE ${FREERDP_MODULES}) - set(FREERDP_OBJECTS ${FREERDP_OBJECTS} "$") + foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_MODULES}) + set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") endforeach() - add_library(freerdp ${FREERDP_OBJECTS}) - set_target_properties(freerdp PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_OBJECTS}) - target_link_libraries(freerdp ${FREERDP_LIBS}) - install(TARGETS freerdp DESTINATION ${CMAKE_INSTALL_LIBDIR}) + set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") + + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") endif() - -set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index a7219c248..a1b510580 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -26,14 +26,14 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) if(WITH_MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp - freerdp-server) + freerdp-channels-server) else() target_link_libraries(${MODULE_NAME} freerdp-core freerdp-utils freerdp-codec freerdp-channels - freerdp-server-channels) + freerdp-channels-server) endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample") diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 3b3669123..d1cd6b42d 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -89,11 +89,11 @@ typedef unsigned __int3264 ULONG_PTR, *PULONG_PTR; typedef signed int LONG32; typedef signed __int64 LONG64; -typedef CHAR* PSTR, *LPSTR; -typedef const CHAR *LPCSTR,*PCSTR; +typedef CHAR *PSTR, *LPSTR, *LPCH; +typedef const CHAR *LPCSTR, *PCSTR, *LPCCH; -typedef WCHAR* LPWSTR, *PWSTR; -typedef const WCHAR *LPCWSTR,*PCWSTR; +typedef WCHAR *LPWSTR, *PWSTR, *LPWCH; +typedef const WCHAR *LPCWSTR, *PCWSTR, *LPCWCH; typedef CHAR *LPSTR, *LPCH; typedef WCHAR *LPWSTR, *LPWCH; diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index 3ebf5cb2b..df1c31e48 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -15,6 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "winpr") +set(MODULE_PREFIX "WINPR") + if (APPLE) # flat_namespace should be avoided, but is required for -undefined warning. Since WinPR currently has # a lot of undefined symbols in use, use this hack until they're filled out. @@ -30,25 +33,28 @@ file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") foreach(FILEPATH ${FILEPATHS}) if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}") - string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" WINPR_MODULE ${FILEPATH}) - set(WINPR_MODULES ${WINPR_MODULES} ${WINPR_MODULE}) + string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" ${MODULE_PREFIX}_SUBMODULE ${FILEPATH}) + set(${MODULE_PREFIX}_SUBMODULES ${${MODULE_PREFIX}_SUBMODULES} ${${MODULE_PREFIX}_SUBMODULE}) endif() endforeach(FILEPATH) -foreach(WINPR_MODULE ${WINPR_MODULES}) - add_subdirectory(${WINPR_MODULE}) +foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) + add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() if(WITH_MONOLITHIC_BUILD) - foreach(WINPR_MODULE ${WINPR_MODULES}) - set(WINPR_OBJECTS ${WINPR_OBJECTS} "$") + foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) + set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") endforeach() - add_library(winpr ${WINPR_OBJECTS}) - set_target_properties(winpr PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_OBJECTS}) - target_link_libraries(winpr ${WINPR_LIBS}) - install(TARGETS winpr DESTINATION ${CMAKE_INSTALL_LIBDIR}) + set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") + + target_link_libraries(${MODULE_NAME} ${WINPR_LIBS}) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/libwinpr") endif() - From bf26079d3faaa39fb027b1405bfe3a2cae5355e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 18:57:32 -0400 Subject: [PATCH 05/43] libwinpr: added tests and fix InterlockedCompareExchange64 on Windows XP --- winpr/include/winpr/interlocked.h | 5 ++- winpr/libwinpr/file/CMakeLists.txt | 4 ++ winpr/libwinpr/file/test/.gitignore | 3 ++ winpr/libwinpr/file/test/CMakeLists.txt | 28 +++++++++++++ winpr/libwinpr/file/test/TestFileCreateFile.c | 10 +++++ winpr/libwinpr/file/test/TestFileDeleteFile.c | 10 +++++ winpr/libwinpr/file/test/TestFileReadFile.c | 10 +++++ winpr/libwinpr/file/test/TestFileWriteFile.c | 10 +++++ winpr/libwinpr/interlocked/interlocked.c | 42 ++++++++++++++++++- winpr/libwinpr/interlocked/module.def | 1 + .../libwinpr/interlocked/test/CMakeLists.txt | 4 +- winpr/libwinpr/io/CMakeLists.txt | 4 ++ winpr/libwinpr/io/test/.gitignore | 3 ++ winpr/libwinpr/io/test/CMakeLists.txt | 25 +++++++++++ .../io/test/TestIoGetOverlappedResult.c | 10 +++++ winpr/libwinpr/library/CMakeLists.txt | 4 ++ winpr/libwinpr/library/test/.gitignore | 3 ++ winpr/libwinpr/library/test/CMakeLists.txt | 30 +++++++++++++ .../library/test/TestLibraryAddDllDirectory.c | 10 +++++ .../library/test/TestLibraryFreeLibrary.c | 10 +++++ .../library/test/TestLibraryGetProcAddress.c | 10 +++++ .../library/test/TestLibraryLoadLibrary.c | 10 +++++ .../test/TestLibraryRemoveDllDirectory.c | 10 +++++ .../TestLibrarySetDefaultDllDirectories.c | 10 +++++ winpr/libwinpr/path/test/CMakeLists.txt | 6 +-- 25 files changed, 261 insertions(+), 11 deletions(-) create mode 100644 winpr/libwinpr/file/test/.gitignore create mode 100644 winpr/libwinpr/file/test/CMakeLists.txt create mode 100644 winpr/libwinpr/file/test/TestFileCreateFile.c create mode 100644 winpr/libwinpr/file/test/TestFileDeleteFile.c create mode 100644 winpr/libwinpr/file/test/TestFileReadFile.c create mode 100644 winpr/libwinpr/file/test/TestFileWriteFile.c create mode 100644 winpr/libwinpr/io/test/.gitignore create mode 100644 winpr/libwinpr/io/test/CMakeLists.txt create mode 100644 winpr/libwinpr/io/test/TestIoGetOverlappedResult.c create mode 100644 winpr/libwinpr/library/test/.gitignore create mode 100644 winpr/libwinpr/library/test/CMakeLists.txt create mode 100644 winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c create mode 100644 winpr/libwinpr/library/test/TestLibraryFreeLibrary.c create mode 100644 winpr/libwinpr/library/test/TestLibraryGetProcAddress.c create mode 100644 winpr/libwinpr/library/test/TestLibraryLoadLibrary.c create mode 100644 winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c create mode 100644 winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c diff --git a/winpr/include/winpr/interlocked.h b/winpr/include/winpr/interlocked.h index d651c629e..c12461a44 100644 --- a/winpr/include/winpr/interlocked.h +++ b/winpr/include/winpr/interlocked.h @@ -135,10 +135,11 @@ WINPR_API LONG InterlockedDecrement(LONG volatile *Addend); WINPR_API LONG InterlockedExchange(LONG volatile *Target, LONG Value); WINPR_API LONG InterlockedExchangeAdd(LONG volatile *Addend, LONG Value); -WINPR_API LONG InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange, LONG Comperand); -WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand); +WINPR_API LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG Comperand); #endif /* _WIN32 */ +WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand); + #endif /* WINPR_INTERLOCKED_H */ diff --git a/winpr/libwinpr/file/CMakeLists.txt b/winpr/libwinpr/file/CMakeLists.txt index 82baa624a..5e78ba9f2 100644 --- a/winpr/libwinpr/file/CMakeLists.txt +++ b/winpr/libwinpr/file/CMakeLists.txt @@ -41,3 +41,7 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/file/test/.gitignore b/winpr/libwinpr/file/test/.gitignore new file mode 100644 index 000000000..5d04ec9e1 --- /dev/null +++ b/winpr/libwinpr/file/test/.gitignore @@ -0,0 +1,3 @@ +TestFile +TestFile.c + diff --git a/winpr/libwinpr/file/test/CMakeLists.txt b/winpr/libwinpr/file/test/CMakeLists.txt new file mode 100644 index 000000000..80371dcd1 --- /dev/null +++ b/winpr/libwinpr/file/test/CMakeLists.txt @@ -0,0 +1,28 @@ + +set(MODULE_NAME "TestFile") +set(MODULE_PREFIX "TEST_FILE") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestFileCreateFile.c + TestFileDeleteFile.c + TestFileReadFile.c + TestFileWriteFile.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +if(NOT WIN32) + target_link_libraries(${MODULE_NAME} winpr-file) +endif() + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/file/test/TestFileCreateFile.c b/winpr/libwinpr/file/test/TestFileCreateFile.c new file mode 100644 index 000000000..39b6a26c7 --- /dev/null +++ b/winpr/libwinpr/file/test/TestFileCreateFile.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestFileCreateFile(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/file/test/TestFileDeleteFile.c b/winpr/libwinpr/file/test/TestFileDeleteFile.c new file mode 100644 index 000000000..aaa341ae2 --- /dev/null +++ b/winpr/libwinpr/file/test/TestFileDeleteFile.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestFileDeleteFile(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/file/test/TestFileReadFile.c b/winpr/libwinpr/file/test/TestFileReadFile.c new file mode 100644 index 000000000..936881a4e --- /dev/null +++ b/winpr/libwinpr/file/test/TestFileReadFile.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestFileReadFile(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/file/test/TestFileWriteFile.c b/winpr/libwinpr/file/test/TestFileWriteFile.c new file mode 100644 index 000000000..a8283ee6d --- /dev/null +++ b/winpr/libwinpr/file/test/TestFileWriteFile.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestFileWriteFile(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index 30b608ee7..e1a754b2d 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -246,6 +246,45 @@ LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG #endif } +#endif /* _WIN32 */ + +#if (_WIN32_WINNT < 0x0502) + +static volatile HANDLE mutex = NULL; + +int static_mutex_lock(volatile HANDLE* static_mutex) +{ + if (*static_mutex == NULL) + { + HANDLE handle = CreateMutex(NULL, FALSE, NULL); + + if (InterlockedCompareExchangePointer((PVOID*) static_mutex, (PVOID) handle, NULL) != NULL) + CloseHandle(handle); + } + + return WaitForSingleObject(*static_mutex, INFINITE) == WAIT_FAILED; +} + +/* Not available in XP */ + +LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand) +{ + LONGLONG previousValue = 0; + + static_mutex_lock(&mutex); + + previousValue = *Destination; + + if (*Destination == Comperand) + *Destination = Exchange; + + ReleaseMutex(mutex); + + return previousValue; +} + +#else /* (_WIN32_WINNT < 0x0600) */ + LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand) { #ifdef __GNUC__ @@ -255,4 +294,5 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E #endif } -#endif +#endif /* (_WIN32_WINNT < 0x0600) */ + diff --git a/winpr/libwinpr/interlocked/module.def b/winpr/libwinpr/interlocked/module.def index a73d92a6b..20b5fd055 100644 --- a/winpr/libwinpr/interlocked/module.def +++ b/winpr/libwinpr/interlocked/module.def @@ -1,2 +1,3 @@ LIBRARY "libwinpr-interlocked" EXPORTS + InterlockedCompareExchange64 @1 diff --git a/winpr/libwinpr/interlocked/test/CMakeLists.txt b/winpr/libwinpr/interlocked/test/CMakeLists.txt index c04306ba1..072aa9e93 100644 --- a/winpr/libwinpr/interlocked/test/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/test/CMakeLists.txt @@ -14,9 +14,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -if(NOT WIN32) - target_link_libraries(${MODULE_NAME} winpr-interlocked) -endif() +target_link_libraries(${MODULE_NAME} winpr-interlocked) foreach(test ${${MODULE_PREFIX}_TESTS}) get_filename_component(TestName ${test} NAME_WE) diff --git a/winpr/libwinpr/io/CMakeLists.txt b/winpr/libwinpr/io/CMakeLists.txt index d2632ae74..598cb20a2 100644 --- a/winpr/libwinpr/io/CMakeLists.txt +++ b/winpr/libwinpr/io/CMakeLists.txt @@ -36,3 +36,7 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/io/test/.gitignore b/winpr/libwinpr/io/test/.gitignore new file mode 100644 index 000000000..db7983b28 --- /dev/null +++ b/winpr/libwinpr/io/test/.gitignore @@ -0,0 +1,3 @@ +TestIO +TestIO.c + diff --git a/winpr/libwinpr/io/test/CMakeLists.txt b/winpr/libwinpr/io/test/CMakeLists.txt new file mode 100644 index 000000000..6119501f2 --- /dev/null +++ b/winpr/libwinpr/io/test/CMakeLists.txt @@ -0,0 +1,25 @@ + +set(MODULE_NAME "TestIo") +set(MODULE_PREFIX "TEST_IO") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestIoGetOverlappedResult.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +if(NOT WIN32) + target_link_libraries(${MODULE_NAME} winpr-io) +endif() + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/io/test/TestIoGetOverlappedResult.c b/winpr/libwinpr/io/test/TestIoGetOverlappedResult.c new file mode 100644 index 000000000..044eb11cc --- /dev/null +++ b/winpr/libwinpr/io/test/TestIoGetOverlappedResult.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestIoGetOverlappedResult(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/CMakeLists.txt b/winpr/libwinpr/library/CMakeLists.txt index e8004c957..002cf9d1c 100644 --- a/winpr/libwinpr/library/CMakeLists.txt +++ b/winpr/libwinpr/library/CMakeLists.txt @@ -36,3 +36,7 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/library/test/.gitignore b/winpr/libwinpr/library/test/.gitignore new file mode 100644 index 000000000..36c502679 --- /dev/null +++ b/winpr/libwinpr/library/test/.gitignore @@ -0,0 +1,3 @@ +TestLibrary +TestLibrary.c + diff --git a/winpr/libwinpr/library/test/CMakeLists.txt b/winpr/libwinpr/library/test/CMakeLists.txt new file mode 100644 index 000000000..8e9c10423 --- /dev/null +++ b/winpr/libwinpr/library/test/CMakeLists.txt @@ -0,0 +1,30 @@ + +set(MODULE_NAME "TestLibrary") +set(MODULE_PREFIX "TEST_LIBRARY") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestLibraryAddDllDirectory.c + TestLibraryRemoveDllDirectory.c + TestLibrarySetDefaultDllDirectories.c + TestLibraryLoadLibrary.c + TestLibraryFreeLibrary.c + TestLibraryGetProcAddress.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +if(NOT WIN32) + target_link_libraries(${MODULE_NAME} winpr-library) +endif() + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c b/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c new file mode 100644 index 000000000..7f3b941e4 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibraryAddDllDirectory(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c new file mode 100644 index 000000000..1051402a6 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibraryFreeLibrary(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c new file mode 100644 index 000000000..995639445 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibraryGetProcAddress(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c new file mode 100644 index 000000000..9740cf0f8 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibraryLoadLibrary(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c b/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c new file mode 100644 index 000000000..47ecf8cba --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibraryRemoveDllDirectory(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c b/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c new file mode 100644 index 000000000..f7935ea73 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c @@ -0,0 +1,10 @@ + +#include +#include +#include +#include + +int TestLibrarySetDefaultDllDirectories(int argc, char* argv[]) +{ + return 0; +} diff --git a/winpr/libwinpr/path/test/CMakeLists.txt b/winpr/libwinpr/path/test/CMakeLists.txt index b8eb05fd0..e3a8e41d5 100644 --- a/winpr/libwinpr/path/test/CMakeLists.txt +++ b/winpr/libwinpr/path/test/CMakeLists.txt @@ -34,11 +34,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -if(WIN32) - target_link_libraries(${MODULE_NAME} Pathcch) -else() - target_link_libraries(${MODULE_NAME} winpr-path) -endif() +target_link_libraries(${MODULE_NAME} winpr-path) foreach(test ${${MODULE_PREFIX}_TESTS}) get_filename_component(TestName ${test} NAME_WE) From e680cb2bfbec1075883e30fab243fd1a46927742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 19:15:44 -0400 Subject: [PATCH 06/43] libfreerdp: fix monolithic build --- libfreerdp/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 83ff2d7c8..e1fc3b154 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -33,14 +33,14 @@ set(${MODULE_PREFIX}_SUBMODULES locale core) -foreach(${MODULE_PREFIX}_SUBMODULE ${FREERDP_SUBMODULES}) +foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() if(WITH_MONOLITHIC_BUILD) - foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_MODULES}) - set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") + foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) + set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") endforeach() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_OBJECTS}) From 94469ffa6f4f94de122b2e12953a68d5f4e099d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 19:21:09 -0400 Subject: [PATCH 07/43] wfreerdp-server: fix server interface build --- server/Windows/CMakeLists.txt | 2 +- server/Windows/cli/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index b0d680db4..4688b0fa9 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -62,7 +62,7 @@ else() freerdp-channels) endif() -target_link_libraries(wfreerdp-server ${${MODULE_PREFIX}_LIBS}) +target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) if(WITH_SERVER_INTERFACE) diff --git a/server/Windows/cli/CMakeLists.txt b/server/Windows/cli/CMakeLists.txt index f7d2ade5a..d8a0e418f 100644 --- a/server/Windows/cli/CMakeLists.txt +++ b/server/Windows/cli/CMakeLists.txt @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(MODULE_NAME "wfreerdp-server") +set(MODULE_NAME "wfreerdp-server-cli") set(MODULE_PREFIX "FREERDP_SERVER_WINDOWS_CLI") include_directories(..) From 56ea938fbfd583df6c57b5cb5db7473357a7d2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 4 Oct 2012 23:19:05 -0400 Subject: [PATCH 08/43] libwinpr: wrote more tests --- cmake/ConfigOptions.cmake | 1 + winpr/include/winpr/crt.h | 5 ++ winpr/include/winpr/tchar.h | 2 + winpr/libwinpr/library/CMakeLists.txt | 4 ++ winpr/libwinpr/library/module.def | 3 + winpr/libwinpr/library/test/CMakeLists.txt | 9 +-- .../library/test/TestLibraryA/CMakeLists.txt | 22 ++++++++ .../library/test/TestLibraryA/TestLibraryA.c | 19 +++++++ .../library/test/TestLibraryB/CMakeLists.txt | 22 ++++++++ .../library/test/TestLibraryB/TestLibraryB.c | 19 +++++++ .../library/test/TestLibraryFreeLibrary.c | 17 ++++++ .../library/test/TestLibraryGetProcAddress.c | 41 ++++++++++++++ .../library/test/TestLibraryLoadLibrary.c | 17 ++++++ winpr/libwinpr/path/path.c | 55 ++++++++++++++++++- 14 files changed, 231 insertions(+), 5 deletions(-) create mode 100644 winpr/libwinpr/library/module.def create mode 100644 winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt create mode 100644 winpr/libwinpr/library/test/TestLibraryA/TestLibraryA.c create mode 100644 winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt create mode 100644 winpr/libwinpr/library/test/TestLibraryB/TestLibraryB.c diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 908caddfd..c66f518a3 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -23,6 +23,7 @@ endif() option(WITH_CLIENT "Build client binaries" ON) option(WITH_SERVER "Build server binaries" OFF) + option(WITH_CHANNELS "Build virtual channel plugins" ON) if(WITH_CLIENT AND WITH_CHANNELS) diff --git a/winpr/include/winpr/crt.h b/winpr/include/winpr/crt.h index 8d73a6b90..045f1b7d3 100644 --- a/winpr/include/winpr/crt.h +++ b/winpr/include/winpr/crt.h @@ -33,6 +33,11 @@ #ifndef _WIN32 +#ifndef _ERRNO_T_DEFINED +#define _ERRNO_T_DEFINED +typedef int errno_t; +#endif + WINPR_API void* _aligned_malloc(size_t size, size_t alignment); WINPR_API void* _aligned_realloc(void* memblock, size_t size, size_t alignment); WINPR_API void* _aligned_recalloc(void* memblock, size_t num, size_t size, size_t alignment); diff --git a/winpr/include/winpr/tchar.h b/winpr/include/winpr/tchar.h index 2050cabf1..34fc27220 100644 --- a/winpr/include/winpr/tchar.h +++ b/winpr/include/winpr/tchar.h @@ -40,11 +40,13 @@ typedef CHAR TCHAR; #define _tcsdup _wcsdup #define _tcscmp wcscmp #define _tcscpy wcscpy +#define _stprintf_s swprintf_s #else #define _tprintf printf #define _tcsdup _strdup #define _tcscmp strcmp #define _tcscpy strcpy +#define _stprintf_s sprintf_s #endif #endif diff --git a/winpr/libwinpr/library/CMakeLists.txt b/winpr/libwinpr/library/CMakeLists.txt index 002cf9d1c..c8cbcad5c 100644 --- a/winpr/libwinpr/library/CMakeLists.txt +++ b/winpr/libwinpr/library/CMakeLists.txt @@ -21,6 +21,10 @@ set(MODULE_PREFIX "WINPR_LIBRARY") set(${MODULE_PREFIX}_SRCS library.c) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + if(WITH_MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() diff --git a/winpr/libwinpr/library/module.def b/winpr/libwinpr/library/module.def new file mode 100644 index 000000000..c4a5071c4 --- /dev/null +++ b/winpr/libwinpr/library/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-library" +EXPORTS + diff --git a/winpr/libwinpr/library/test/CMakeLists.txt b/winpr/libwinpr/library/test/CMakeLists.txt index 8e9c10423..9096ddc93 100644 --- a/winpr/libwinpr/library/test/CMakeLists.txt +++ b/winpr/libwinpr/library/test/CMakeLists.txt @@ -18,13 +18,14 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -if(NOT WIN32) - target_link_libraries(${MODULE_NAME} winpr-library) -endif() +target_link_libraries(${MODULE_NAME} winpr-library winpr-path) foreach(test ${${MODULE_PREFIX}_TESTS}) get_filename_component(TestName ${test} NAME_WE) - add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName} ${EXECUTABLE_OUTPUT_PATH}) endforeach() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") + +add_subdirectory(TestLibraryA) +add_subdirectory(TestLibraryB) diff --git a/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt b/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt new file mode 100644 index 000000000..06156482c --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt @@ -0,0 +1,22 @@ +# WinPR: Windows Portable Runtime +# libwinpr-library cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(MODULE_NAME "TestLibraryA") + +add_library(${MODULE_NAME} TestLibraryA.c) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test/Extra") diff --git a/winpr/libwinpr/library/test/TestLibraryA/TestLibraryA.c b/winpr/libwinpr/library/test/TestLibraryA/TestLibraryA.c new file mode 100644 index 000000000..39155319c --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryA/TestLibraryA.c @@ -0,0 +1,19 @@ + +#include +#include +#include +#include +#include + +WINPR_API int FunctionA(int a, int b); +WINPR_API int FunctionB(int a, int b); + +int FunctionA(int a, int b) +{ + return (a * b); /* multiply */ +} + +int FunctionB(int a, int b) +{ + return (a / b); /* divide */ +} diff --git a/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt b/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt new file mode 100644 index 000000000..16bb12e7b --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt @@ -0,0 +1,22 @@ +# WinPR: Windows Portable Runtime +# libwinpr-library cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(MODULE_NAME "TestLibraryB") + +add_library(${MODULE_NAME} TestLibraryB.c) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test/Extra") diff --git a/winpr/libwinpr/library/test/TestLibraryB/TestLibraryB.c b/winpr/libwinpr/library/test/TestLibraryB/TestLibraryB.c new file mode 100644 index 000000000..7fb963356 --- /dev/null +++ b/winpr/libwinpr/library/test/TestLibraryB/TestLibraryB.c @@ -0,0 +1,19 @@ + +#include +#include +#include +#include +#include + +WINPR_API int FunctionA(int a, int b); +WINPR_API int FunctionB(int a, int b); + +int FunctionA(int a, int b) +{ + return (a + b); /* add */ +} + +int FunctionB(int a, int b) +{ + return (a - b); /* subtract */ +} diff --git a/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c index 1051402a6..f148995cc 100644 --- a/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c +++ b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c @@ -2,9 +2,26 @@ #include #include #include +#include #include int TestLibraryFreeLibrary(int argc, char* argv[]) { + HINSTANCE library; + + library = LoadLibrary(_T("kernel32.dll")); + + if (!library) + { + printf("LoadLibrary failure\n"); + return -1; + } + + if (!FreeLibrary(library)) + { + printf("FreeLibrary failure\n"); + return -1; + } + return 0; } diff --git a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c index 995639445..5811f181e 100644 --- a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c +++ b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c @@ -2,9 +2,50 @@ #include #include #include +#include +#include #include int TestLibraryGetProcAddress(int argc, char* argv[]) { + char* str; + int length; + LPTSTR BasePath; + HINSTANCE library; + LPTSTR LibraryPath; + + str = argv[1]; + +#ifdef UNICODE + length = MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), NULL, 0); + BasePath = (WCHAR*) malloc((length + 1) * sizeof(WCHAR)); + MultiByteToWideChar(CP_UTF8, 0, str, length, (LPWSTR) BasePath, length * sizeof(WCHAR)); + BasePath[length] = 0; +#else + BasePath = _strdup(path); +#endif + + + _tprintf(_T("Base Path: %s\n"), BasePath); + + PathAllocCombine(BasePath, _T("TestLibraryA\\TestLibraryA.dll"), 0, &LibraryPath); + + //_tprintf(_T("Loading Library: %s\n"), LibraryPath); + + /* + library = LoadLibrary(LibraryPath); + + if (!library) + { + printf("LoadLibrary failure\n"); + return -1; + } + + if (!FreeLibrary(library)) + { + printf("FreeLibrary failure\n"); + return -1; + }*/ + return 0; } diff --git a/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c index 9740cf0f8..5eb3e2f85 100644 --- a/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c +++ b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c @@ -2,9 +2,26 @@ #include #include #include +#include #include int TestLibraryLoadLibrary(int argc, char* argv[]) { + HINSTANCE library; + + library = LoadLibrary(_T("kernel32.dll")); + + if (!library) + { + printf("LoadLibrary failure\n"); + return -1; + } + + if (!FreeLibrary(library)) + { + printf("FreeLibrary failure\n"); + return -1; + } + return 0; } diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index ce0a80aaa..3561aad34 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -21,7 +21,9 @@ #include "config.h" #endif +#include #include +#include #include @@ -152,7 +154,58 @@ HRESULT PathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags, HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags, PWSTR* ppszPathOut) { - return 0; + PWSTR pszPathOut; + BOOL backslashIn; + BOOL backslashMore; + int pszMoreLength; + int pszPathInLength; + int pszPathOutLength; + + if (!pszPathIn) + return S_FALSE; + + if (!pszMore) + return S_FALSE; + + pszPathInLength = lstrlenW(pszPathIn); + pszMoreLength = lstrlenW(pszMore); + + backslashIn = (pszPathIn[pszPathInLength - 1] == '\\') ? TRUE : FALSE; + backslashMore = (pszMore[0] == '\\') ? TRUE : FALSE; + + if (backslashMore) + { + if ((pszPathIn[1] == ':') && (pszPathIn[2] == '\\')) + { + size_t sizeOfBuffer; + + pszPathOutLength = 2 + pszMoreLength; + sizeOfBuffer = (pszPathOutLength + 1) * 2; + + pszPathOut = (PWSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); + _stprintf_s(pszPathOut, sizeOfBuffer, _T("%c:%s"), pszPathIn[0], pszMore); + + *ppszPathOut = pszPathOut; + + return S_OK; + } + } + else if (backslashIn && !backslashMore) + { + size_t sizeOfBuffer; + + pszPathOutLength = pszPathInLength + pszMoreLength; + sizeOfBuffer = (pszPathOutLength + 1) * 2; + + pszPathOut = (PWSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); + _stprintf_s(pszPathOut, sizeOfBuffer, _T("%s%s"), pszPathIn, pszMore); + + *ppszPathOut = pszPathOut; + + return S_OK; + } + + return S_OK; } HRESULT PathCchFindExtensionA(PCSTR pszPath, size_t cchPath, PCSTR* ppszExt) From 708499f0d257f9b9a9e9914727e72f398926cb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 00:14:44 -0400 Subject: [PATCH 09/43] libwinpr-path: implement more of the API --- winpr/include/winpr/tchar.h | 8 ++ winpr/libwinpr/path/path.c | 190 ++++++++++++++++++++++++++++++++++-- 2 files changed, 191 insertions(+), 7 deletions(-) diff --git a/winpr/include/winpr/tchar.h b/winpr/include/winpr/tchar.h index 34fc27220..0f0402026 100644 --- a/winpr/include/winpr/tchar.h +++ b/winpr/include/winpr/tchar.h @@ -40,12 +40,20 @@ typedef CHAR TCHAR; #define _tcsdup _wcsdup #define _tcscmp wcscmp #define _tcscpy wcscpy +#define _tcscat wcscat +#define _tcschr wcschr +#define _tcsrchr wcsrchr +#define _tcsstr wcsstr #define _stprintf_s swprintf_s #else #define _tprintf printf #define _tcsdup _strdup #define _tcscmp strcmp #define _tcscpy strcpy +#define _tcscat strcat +#define _tcschr strchr +#define _tcsrchr strrchr +#define _tcsstr strstr #define _stprintf_s sprintf_s #endif diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index 3561aad34..d5338e6d3 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -29,12 +29,48 @@ HRESULT PathCchAddBackslashA(PSTR pszPath, size_t cchPath) { - return 0; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + pszPathLength = lstrlenA(pszPath); + + if (pszPath[pszPathLength - 1] == '\\') + return S_FALSE; + + if (cchPath > (pszPathLength + 1)) + { + pszPath[pszPathLength] = '\\'; + pszPath[pszPathLength + 1] = '\0'; + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchAddBackslashW(PWSTR pszPath, size_t cchPath) { - return 0; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + pszPathLength = lstrlenW(pszPath); + + if (pszPath[pszPathLength - 1] == '\\') + return S_FALSE; + + if (cchPath > (pszPathLength + 1)) + { + pszPath[pszPathLength] = '\\'; + pszPath[pszPathLength + 1] = '\0'; + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchRemoveBackslashA(PSTR pszPath, size_t cchPath) @@ -49,12 +85,48 @@ HRESULT PathCchRemoveBackslashW(PWSTR pszPath, size_t cchPath) HRESULT PathCchAddBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, size_t* pcchRemaining) { - return 0; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + pszPathLength = lstrlenA(pszPath); + + if (pszPath[pszPathLength - 1] == '\\') + return S_FALSE; + + if (cchPath > (pszPathLength + 1)) + { + pszPath[pszPathLength] = '\\'; + pszPath[pszPathLength + 1] = '\0'; + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchAddBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, size_t* pcchRemaining) { - return 0; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + pszPathLength = lstrlenW(pszPath); + + if (pszPath[pszPathLength - 1] == '\\') + return S_FALSE; + + if (cchPath > (pszPathLength + 1)) + { + pszPath[pszPathLength] = '\\'; + pszPath[pszPathLength + 1] = '\0'; + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchRemoveBackslashExA(PSTR pszPath, size_t cchPath, PSTR* ppszEnd, size_t* pcchRemaining) @@ -69,12 +141,82 @@ HRESULT PathCchRemoveBackslashExW(PWSTR pszPath, size_t cchPath, PWSTR* ppszEnd, HRESULT PathCchAddExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt) { - return 0; + CHAR* pDot; + BOOL bExtDot; + CHAR* pBackslash; + size_t pszExtLength; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + if (!pszExt) + return S_FALSE; + + pszExtLength = lstrlenA(pszExt); + pszPathLength = lstrlenA(pszPath); + bExtDot = (pszExt[0] == '.') ? TRUE : FALSE; + + pDot = strrchr(pszPath, '.'); + pBackslash = strrchr(pszPath, '\\'); + + if (pDot && pBackslash) + { + if (pDot > pBackslash) + return S_FALSE; + } + + if (cchPath > pszPathLength + pszExtLength + ((bExtDot) ? 0 : 1)) + { + if (bExtDot) + sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s", pszExt); + else + sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, ".%s", pszExt); + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) { - return 0; + LPTCH pDot; + BOOL bExtDot; + LPTCH pBackslash; + size_t pszExtLength; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + if (!pszExt) + return S_FALSE; + + pszExtLength = lstrlenW(pszExt); + pszPathLength = lstrlenW(pszPath); + bExtDot = (pszExt[0] == '.') ? TRUE : FALSE; + + pDot = _tcsrchr(pszPath, '.'); + pBackslash = _tcsrchr(pszPath, '\\'); + + if (pDot && pBackslash) + { + if (pDot > pBackslash) + return S_FALSE; + } + + if (cchPath > pszPathLength + pszExtLength + ((bExtDot) ? 0 : 1)) + { + if (bExtDot) + _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), pszExt); + else + _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T(".%s"), pszExt); + + return S_OK; + } + + return S_FALSE; } HRESULT PathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore) @@ -84,7 +226,41 @@ HRESULT PathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore) HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore) { - return 0; + BOOL pathBackslash; + BOOL moreBackslash; + size_t pszMoreLength; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + if (!pszMore) + return S_FALSE; + + pszMoreLength = lstrlenW(pszMore); + pszPathLength = lstrlenW(pszPath); + + pathBackslash = (pszPath[pszPathLength - 1] == '\\') ? TRUE : FALSE; + moreBackslash = (pszMore[0] == '\\') ? TRUE : FALSE; + + if (pathBackslash && moreBackslash) + { + if ((pszPathLength + pszMoreLength - 1) < cchPath) + { + _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), &pszMore[1]); + return S_OK; + } + } + else if (pathBackslash && !moreBackslash) + { + if ((pszPathLength + pszMoreLength) < cchPath) + { + _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), pszMore); + return S_OK; + } + } + + return S_FALSE; } HRESULT PathCchAppendExA(PSTR pszPath, size_t cchPath, PCSTR pszMore, unsigned long dwFlags) From 1622a2f2717b398525069989ffad440228c68357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 11:40:33 -0400 Subject: [PATCH 10/43] libwinpr-path: make tests pass on Windows --- winpr/libwinpr/path/path.c | 183 ++++++++++++++++-- .../libwinpr/path/test/TestPathAllocCombine.c | 8 +- 2 files changed, 172 insertions(+), 19 deletions(-) diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index d5338e6d3..41c547a95 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -197,8 +197,8 @@ HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) pszPathLength = lstrlenW(pszPath); bExtDot = (pszExt[0] == '.') ? TRUE : FALSE; - pDot = _tcsrchr(pszPath, '.'); - pBackslash = _tcsrchr(pszPath, '\\'); + pDot = wcsrchr(pszPath, '.'); + pBackslash = wcsrchr(pszPath, '\\'); if (pDot && pBackslash) { @@ -209,9 +209,9 @@ HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) if (cchPath > pszPathLength + pszExtLength + ((bExtDot) ? 0 : 1)) { if (bExtDot) - _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), pszExt); + swprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, L"%s", pszExt); else - _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T(".%s"), pszExt); + swprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, L".%s", pszExt); return S_OK; } @@ -221,7 +221,49 @@ HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) HRESULT PathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore) { - return 0; + BOOL pathBackslash; + BOOL moreBackslash; + size_t pszMoreLength; + size_t pszPathLength; + + if (!pszPath) + return S_FALSE; + + if (!pszMore) + return S_FALSE; + + pszMoreLength = lstrlenA(pszMore); + pszPathLength = lstrlenA(pszPath); + + pathBackslash = (pszPath[pszPathLength - 1] == '\\') ? TRUE : FALSE; + moreBackslash = (pszMore[0] == '\\') ? TRUE : FALSE; + + if (pathBackslash && moreBackslash) + { + if ((pszPathLength + pszMoreLength - 1) < cchPath) + { + sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s", &pszMore[1]); + return S_OK; + } + } + else if ((pathBackslash && !moreBackslash) || (!pathBackslash && moreBackslash)) + { + if ((pszPathLength + pszMoreLength) < cchPath) + { + sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "%s", pszMore); + return S_OK; + } + } + else if (!pathBackslash && !moreBackslash) + { + if ((pszPathLength + pszMoreLength + 1) < cchPath) + { + sprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, "\\%s", pszMore); + return S_OK; + } + } + + return S_FALSE; } HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore) @@ -247,15 +289,23 @@ HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore) { if ((pszPathLength + pszMoreLength - 1) < cchPath) { - _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), &pszMore[1]); + swprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, L"%s", &pszMore[1]); return S_OK; } } - else if (pathBackslash && !moreBackslash) + else if ((pathBackslash && !moreBackslash) || (!pathBackslash && moreBackslash)) { if ((pszPathLength + pszMoreLength) < cchPath) { - _stprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, _T("%s"), pszMore); + swprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, L"%s", pszMore); + return S_OK; + } + } + else if (!pathBackslash && !moreBackslash) + { + if ((pszPathLength + pszMoreLength + 1) < cchPath) + { + swprintf_s(&pszPath[pszPathLength], cchPath - pszPathLength, L"\\%s", pszMore); return S_OK; } } @@ -325,7 +375,62 @@ HRESULT PathCchCombineExW(PWSTR pszPathOut, size_t cchPathOut, PCWSTR pszPathIn, HRESULT PathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags, PSTR* ppszPathOut) { - return 0; + PSTR pszPathOut; + BOOL backslashIn; + BOOL backslashMore; + int pszMoreLength; + int pszPathInLength; + int pszPathOutLength; + + if (!pszPathIn) + return S_FALSE; + + if (!pszMore) + return S_FALSE; + + pszPathInLength = lstrlenA(pszPathIn); + pszMoreLength = lstrlenA(pszMore); + + backslashIn = (pszPathIn[pszPathInLength - 1] == '\\') ? TRUE : FALSE; + backslashMore = (pszMore[0] == '\\') ? TRUE : FALSE; + + if (backslashMore) + { + if ((pszPathIn[1] == ':') && (pszPathIn[2] == '\\')) + { + size_t sizeOfBuffer; + + pszPathOutLength = 2 + pszMoreLength; + sizeOfBuffer = (pszPathOutLength + 1) * 2; + + pszPathOut = (PSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); + sprintf_s(pszPathOut, sizeOfBuffer, "%c:%s", pszPathIn[0], pszMore); + + *ppszPathOut = pszPathOut; + + return S_OK; + } + } + else + { + size_t sizeOfBuffer; + + pszPathOutLength = pszPathInLength + pszMoreLength; + sizeOfBuffer = (pszPathOutLength + 1) * 2; + + pszPathOut = (PSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); + + if (backslashIn) + sprintf_s(pszPathOut, sizeOfBuffer, "%s%s", pszPathIn, pszMore); + else + sprintf_s(pszPathOut, sizeOfBuffer, "%s\\%s", pszPathIn, pszMore); + + *ppszPathOut = pszPathOut; + + return S_OK; + } + + return S_OK; } HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags, PWSTR* ppszPathOut) @@ -359,14 +464,14 @@ HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlag sizeOfBuffer = (pszPathOutLength + 1) * 2; pszPathOut = (PWSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); - _stprintf_s(pszPathOut, sizeOfBuffer, _T("%c:%s"), pszPathIn[0], pszMore); + swprintf_s(pszPathOut, sizeOfBuffer, L"%c:%s", pszPathIn[0], pszMore); *ppszPathOut = pszPathOut; return S_OK; } } - else if (backslashIn && !backslashMore) + else { size_t sizeOfBuffer; @@ -374,7 +479,11 @@ HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlag sizeOfBuffer = (pszPathOutLength + 1) * 2; pszPathOut = (PWSTR) HeapAlloc(GetProcessHeap(), 0, sizeOfBuffer * 2); - _stprintf_s(pszPathOut, sizeOfBuffer, _T("%s%s"), pszPathIn, pszMore); + + if (backslashIn) + swprintf_s(pszPathOut, sizeOfBuffer, L"%s%s", pszPathIn, pszMore); + else + swprintf_s(pszPathOut, sizeOfBuffer, L"%s\\%s", pszPathIn, pszMore); *ppszPathOut = pszPathOut; @@ -426,12 +535,30 @@ BOOL PathCchIsRootW(PCWSTR pszPath) BOOL PathIsUNCExA(PCSTR pszPath, PCSTR* ppszServer) { - return 0; + if (!pszPath) + return FALSE; + + if ((pszPath[0] == '\\') && (pszPath[1] == '\\')) + { + *ppszServer = &pszPath[2]; + return TRUE; + } + + return FALSE; } BOOL PathIsUNCExW(PCWSTR pszPath, PCWSTR* ppszServer) { - return 0; + if (!pszPath) + return FALSE; + + if ((pszPath[0] == '\\') && (pszPath[1] == '\\')) + { + *ppszServer = &pszPath[2]; + return TRUE; + } + + return FALSE; } HRESULT PathCchSkipRootA(PCSTR pszPath, PCSTR* ppszRootEnd) @@ -461,7 +588,33 @@ HRESULT PathCchStripPrefixA(PSTR pszPath, size_t cchPath) HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath) { - return 0; + BOOL hasPrefix; + BOOL deviceNamespace; + + if (!pszPath) + return S_FALSE; + + if (cchPath < 4) + return S_FALSE; + + hasPrefix = ((pszPath[0] == '\\') && (pszPath[1] == '\\') && + (pszPath[2] == '?') && (pszPath[3] == '\\')) ? TRUE : FALSE; + + if (hasPrefix) + { + if (cchPath < 7) + return S_FALSE; + + deviceNamespace = ((pszPath[5] == ':') && (pszPath[6] == '\\')) ? TRUE : FALSE; + + if (deviceNamespace) + { + wmemmove_s(pszPath, cchPath, &pszPath[4], cchPath - 4); + return S_OK; + } + } + + return S_FALSE; } HRESULT PathCchRemoveFileSpecA(PSTR pszPath, size_t cchPath) diff --git a/winpr/libwinpr/path/test/TestPathAllocCombine.c b/winpr/libwinpr/path/test/TestPathAllocCombine.c index a2fd2b069..dcddb2dc9 100644 --- a/winpr/libwinpr/path/test/TestPathAllocCombine.c +++ b/winpr/libwinpr/path/test/TestPathAllocCombine.c @@ -29,7 +29,7 @@ int TestPathAllocCombine(int argc, char* argv[]) if (_tcscmp(PathOut, testPathOut) != 0) { - _tprintf(_T("Path Mismatch: Actual: %s, Expected: %s\n"), PathOut, testPathOut); + _tprintf(_T("Path Mismatch 1: Actual: %s, Expected: %s\n"), PathOut, testPathOut); return -1; } @@ -47,7 +47,7 @@ int TestPathAllocCombine(int argc, char* argv[]) if (_tcscmp(PathOut, testPathOutMorePathBackslash) != 0) { - _tprintf(_T("Path Mismatch: Actual: %s, Expected: %s\n"), PathOut, testPathOutMorePathBackslash); + _tprintf(_T("Path Mismatch 2: Actual: %s, Expected: %s\n"), PathOut, testPathOutMorePathBackslash); return -1; } @@ -65,7 +65,7 @@ int TestPathAllocCombine(int argc, char* argv[]) if (_tcscmp(PathOut, testPathOutMorePathBackslash) != 0) { - _tprintf(_T("Path Mismatch: Actual: %s, Expected: %s\n"), PathOut, testPathOutMorePathBackslash); + _tprintf(_T("Path Mismatch 3: Actual: %s, Expected: %s\n"), PathOut, testPathOutMorePathBackslash); return -1; } @@ -83,7 +83,7 @@ int TestPathAllocCombine(int argc, char* argv[]) if (_tcscmp(PathOut, testPathOut) != 0) { - _tprintf(_T("Path Mismatch: Actual: %s, Expected: %s\n"), PathOut, testPathOut); + _tprintf(_T("Path Mismatch 4: Actual: %s, Expected: %s\n"), PathOut, testPathOut); return -1; } From fbd2f360e969971dd196abb05da917254eeaffb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 14:45:54 -0400 Subject: [PATCH 11/43] winpr: fix compilation on Linux --- channels/rdpsnd/client/CMakeLists.txt | 3 +- channels/rdpsnd/server/CMakeLists.txt | 1 + winpr/include/winpr/crt.h | 5 ++ winpr/include/winpr/wtypes.h | 3 ++ winpr/libwinpr/crt/CMakeLists.txt | 1 + winpr/libwinpr/crt/buffer.c | 52 +++++++++++++++++++ winpr/libwinpr/interlocked/CMakeLists.txt | 2 +- winpr/libwinpr/interlocked/interlocked.c | 7 ++- winpr/libwinpr/io/test/.gitignore | 4 +- winpr/libwinpr/library/CMakeLists.txt | 7 ++- .../library/test/TestLibraryA/CMakeLists.txt | 2 + .../library/test/TestLibraryAddDllDirectory.c | 2 + .../library/test/TestLibraryB/CMakeLists.txt | 2 + .../library/test/TestLibraryFreeLibrary.c | 1 + .../library/test/TestLibraryGetProcAddress.c | 5 +- .../library/test/TestLibraryLoadLibrary.c | 1 + .../test/TestLibraryRemoveDllDirectory.c | 2 + .../TestLibrarySetDefaultDllDirectories.c | 2 + winpr/libwinpr/path/CMakeLists.txt | 2 +- winpr/libwinpr/path/path.c | 35 ++++++++++++- winpr/libwinpr/path/test/TestPathIsUNCEx.c | 2 +- winpr/libwinpr/thread/CMakeLists.txt | 4 +- 22 files changed, 128 insertions(+), 17 deletions(-) create mode 100644 winpr/libwinpr/crt/buffer.c diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 6bc8a307f..2fa44f662 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -24,7 +24,7 @@ set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h) -add_library(${MODULE_NAME} ${RDPSND_SRCS}) +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) @@ -46,3 +46,4 @@ endif() if(WITH_MACAUDIO) add_subdirectory(MacAudio) endif() + diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index bbdd507b2..351d49a97 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -29,3 +29,4 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Server") + diff --git a/winpr/include/winpr/crt.h b/winpr/include/winpr/crt.h index 045f1b7d3..ab0aa692a 100644 --- a/winpr/include/winpr/crt.h +++ b/winpr/include/winpr/crt.h @@ -50,6 +50,11 @@ WINPR_API size_t _aligned_msize(void* memblock, size_t alignment, size_t offset) WINPR_API void _aligned_free(void* memblock); +/* Buffer Manipulation */ + +WINPR_API errno_t memmove_s(void* dest, size_t numberOfElements, const void* src, size_t count); +WINPR_API errno_t wmemmove_s(WCHAR* dest, size_t numberOfElements, const WCHAR* src, size_t count); + #endif #endif /* WINPR_CRT_H */ diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 57c2f6f82..0fb299928 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -71,6 +71,9 @@ typedef short SHORT; #define CALLBACK typedef void* HANDLE, *LPHANDLE; +typedef HANDLE HINSTANCE; +typedef HANDLE HMODULE; + typedef DWORD HCALL; typedef int INT, *LPINT; typedef signed char INT8; diff --git a/winpr/libwinpr/crt/CMakeLists.txt b/winpr/libwinpr/crt/CMakeLists.txt index 53b01927f..0bf62f777 100644 --- a/winpr/libwinpr/crt/CMakeLists.txt +++ b/winpr/libwinpr/crt/CMakeLists.txt @@ -20,6 +20,7 @@ set(MODULE_PREFIX "WINPR_CRT") set(${MODULE_PREFIX}_SRCS alignment.c + buffer.c memory.c string.c) diff --git a/winpr/libwinpr/crt/buffer.c b/winpr/libwinpr/crt/buffer.c new file mode 100644 index 000000000..491d1634d --- /dev/null +++ b/winpr/libwinpr/crt/buffer.c @@ -0,0 +1,52 @@ +/** + * WinPR: Windows Portable Runtime + * Buffer Manipulation + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* Buffer Manipulation: http://msdn.microsoft.com/en-us/library/b3893xdy/ */ + +#ifndef _WIN32 + +#include + +errno_t memmove_s(void* dest, size_t numberOfElements, const void* src, size_t count) +{ + if (count > numberOfElements) + return -1; + + memmove(dest, src, count); + + return 0; +} + +errno_t wmemmove_s(WCHAR* dest, size_t numberOfElements, const WCHAR* src, size_t count) +{ + if (count * 2 > numberOfElements) + return -1; + + memmove(dest, src, count * 2); + + return 0; +} + +#endif diff --git a/winpr/libwinpr/interlocked/CMakeLists.txt b/winpr/libwinpr/interlocked/CMakeLists.txt index ca95e91df..0ec9055a0 100644 --- a/winpr/libwinpr/interlocked/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO if(WITH_MONOLITHIC_BUILD) else() - target_link_libraries(${MODULE_NAME} winpr-crt) + target_link_libraries(${MODULE_NAME} winpr-crt winpr-handle winpr-synch) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index e1a754b2d..5f1d96bd7 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -21,6 +21,9 @@ #include "config.h" #endif +#include +#include + #include /** @@ -248,7 +251,7 @@ LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Exchange, LONG #endif /* _WIN32 */ -#if (_WIN32_WINNT < 0x0502) +#if (_WIN32 && (_WIN32_WINNT < 0x0502)) static volatile HANDLE mutex = NULL; @@ -262,7 +265,7 @@ int static_mutex_lock(volatile HANDLE* static_mutex) CloseHandle(handle); } - return WaitForSingleObject(*static_mutex, INFINITE) == WAIT_FAILED; + return (WaitForSingleObject(*static_mutex, INFINITE) == WAIT_FAILED); } /* Not available in XP */ diff --git a/winpr/libwinpr/io/test/.gitignore b/winpr/libwinpr/io/test/.gitignore index db7983b28..60021fda1 100644 --- a/winpr/libwinpr/io/test/.gitignore +++ b/winpr/libwinpr/io/test/.gitignore @@ -1,3 +1,3 @@ -TestIO -TestIO.c +TestIo +TestIo.c diff --git a/winpr/libwinpr/library/CMakeLists.txt b/winpr/libwinpr/library/CMakeLists.txt index c8cbcad5c..33acc7c3f 100644 --- a/winpr/libwinpr/library/CMakeLists.txt +++ b/winpr/libwinpr/library/CMakeLists.txt @@ -34,8 +34,13 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") if(WITH_MONOLITHIC_BUILD) - + set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() + if(NOT WIN32) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} dl) + endif() + + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt b/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt index 06156482c..fc32e6ca9 100644 --- a/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt +++ b/winpr/libwinpr/library/test/TestLibraryA/CMakeLists.txt @@ -19,4 +19,6 @@ set(MODULE_NAME "TestLibraryA") add_library(${MODULE_NAME} TestLibraryA.c) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test/Extra") diff --git a/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c b/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c index 7f3b941e4..0c1c7c4f1 100644 --- a/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c +++ b/winpr/libwinpr/library/test/TestLibraryAddDllDirectory.c @@ -2,7 +2,9 @@ #include #include #include +#include #include +#include int TestLibraryAddDllDirectory(int argc, char* argv[]) { diff --git a/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt b/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt index 16bb12e7b..f5688cd60 100644 --- a/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt +++ b/winpr/libwinpr/library/test/TestLibraryB/CMakeLists.txt @@ -19,4 +19,6 @@ set(MODULE_NAME "TestLibraryB") add_library(${MODULE_NAME} TestLibraryB.c) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test/Extra") diff --git a/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c index f148995cc..db6b303ae 100644 --- a/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c +++ b/winpr/libwinpr/library/test/TestLibraryFreeLibrary.c @@ -4,6 +4,7 @@ #include #include #include +#include int TestLibraryFreeLibrary(int argc, char* argv[]) { diff --git a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c index 5811f181e..8ab2b2982 100644 --- a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c +++ b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c @@ -1,10 +1,10 @@ #include #include -#include #include #include #include +#include int TestLibraryGetProcAddress(int argc, char* argv[]) { @@ -22,10 +22,9 @@ int TestLibraryGetProcAddress(int argc, char* argv[]) MultiByteToWideChar(CP_UTF8, 0, str, length, (LPWSTR) BasePath, length * sizeof(WCHAR)); BasePath[length] = 0; #else - BasePath = _strdup(path); + BasePath = _strdup(str); #endif - _tprintf(_T("Base Path: %s\n"), BasePath); PathAllocCombine(BasePath, _T("TestLibraryA\\TestLibraryA.dll"), 0, &LibraryPath); diff --git a/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c index 5eb3e2f85..d127c0d8a 100644 --- a/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c +++ b/winpr/libwinpr/library/test/TestLibraryLoadLibrary.c @@ -4,6 +4,7 @@ #include #include #include +#include int TestLibraryLoadLibrary(int argc, char* argv[]) { diff --git a/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c b/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c index 47ecf8cba..bf7795633 100644 --- a/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c +++ b/winpr/libwinpr/library/test/TestLibraryRemoveDllDirectory.c @@ -2,7 +2,9 @@ #include #include #include +#include #include +#include int TestLibraryRemoveDllDirectory(int argc, char* argv[]) { diff --git a/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c b/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c index f7935ea73..86cd92d82 100644 --- a/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c +++ b/winpr/libwinpr/library/test/TestLibrarySetDefaultDllDirectories.c @@ -2,7 +2,9 @@ #include #include #include +#include #include +#include int TestLibrarySetDefaultDllDirectories(int argc, char* argv[]) { diff --git a/winpr/libwinpr/path/CMakeLists.txt b/winpr/libwinpr/path/CMakeLists.txt index 00080ee0a..d45318a57 100644 --- a/winpr/libwinpr/path/CMakeLists.txt +++ b/winpr/libwinpr/path/CMakeLists.txt @@ -32,7 +32,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO if(WITH_MONOLITHIC_BUILD) else() - target_link_libraries(${MODULE_NAME} winpr-heap) + target_link_libraries(${MODULE_NAME} winpr-crt winpr-heap) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/path/path.c b/winpr/libwinpr/path/path.c index 41c547a95..6e2e34ec1 100644 --- a/winpr/libwinpr/path/path.c +++ b/winpr/libwinpr/path/path.c @@ -181,6 +181,7 @@ HRESULT PathCchAddExtensionA(PSTR pszPath, size_t cchPath, PCSTR pszExt) HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) { +#ifdef _WIN32 LPTCH pDot; BOOL bExtDot; LPTCH pBackslash; @@ -215,7 +216,7 @@ HRESULT PathCchAddExtensionW(PWSTR pszPath, size_t cchPath, PCWSTR pszExt) return S_OK; } - +#endif return S_FALSE; } @@ -268,6 +269,7 @@ HRESULT PathCchAppendA(PSTR pszPath, size_t cchPath, PCSTR pszMore) HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore) { +#ifdef _WIN32 BOOL pathBackslash; BOOL moreBackslash; size_t pszMoreLength; @@ -309,6 +311,7 @@ HRESULT PathCchAppendW(PWSTR pszPath, size_t cchPath, PCWSTR pszMore) return S_OK; } } +#endif return S_FALSE; } @@ -435,6 +438,7 @@ HRESULT PathAllocCombineA(PCSTR pszPathIn, PCSTR pszMore, unsigned long dwFlags, HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlags, PWSTR* ppszPathOut) { +#ifdef _WIN32 PWSTR pszPathOut; BOOL backslashIn; BOOL backslashMore; @@ -489,6 +493,7 @@ HRESULT PathAllocCombineW(PCWSTR pszPathIn, PCWSTR pszMore, unsigned long dwFlag return S_OK; } +#endif return S_OK; } @@ -583,7 +588,33 @@ HRESULT PathCchStripToRootW(PWSTR pszPath, size_t cchPath) HRESULT PathCchStripPrefixA(PSTR pszPath, size_t cchPath) { - return 0; + BOOL hasPrefix; + BOOL deviceNamespace; + + if (!pszPath) + return S_FALSE; + + if (cchPath < 4) + return S_FALSE; + + hasPrefix = ((pszPath[0] == '\\') && (pszPath[1] == '\\') && + (pszPath[2] == '?') && (pszPath[3] == '\\')) ? TRUE : FALSE; + + if (hasPrefix) + { + if (cchPath < 7) + return S_FALSE; + + deviceNamespace = ((pszPath[5] == ':') && (pszPath[6] == '\\')) ? TRUE : FALSE; + + if (deviceNamespace) + { + memmove_s(pszPath, cchPath, &pszPath[4], cchPath - 4); + return S_OK; + } + } + + return S_FALSE; } HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath) diff --git a/winpr/libwinpr/path/test/TestPathIsUNCEx.c b/winpr/libwinpr/path/test/TestPathIsUNCEx.c index 3cea93432..40edfc86c 100644 --- a/winpr/libwinpr/path/test/TestPathIsUNCEx.c +++ b/winpr/libwinpr/path/test/TestPathIsUNCEx.c @@ -19,7 +19,7 @@ int TestPathIsUNCEx(int argc, char* argv[]) _tcscpy(Path, testPathUNC); - status = PathIsUNCEx(Path, &Server); + status = PathIsUNCEx(Path, (LPTSTR*) &Server); if (!status) { diff --git a/winpr/libwinpr/thread/CMakeLists.txt b/winpr/libwinpr/thread/CMakeLists.txt index d53f523ea..8c729f340 100644 --- a/winpr/libwinpr/thread/CMakeLists.txt +++ b/winpr/libwinpr/thread/CMakeLists.txt @@ -46,9 +46,7 @@ endif() if(WITH_MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() - if(NOT WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) - endif() + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) From cb69657b81d2db26312ea32d887a28d6822d3648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 16:01:59 -0400 Subject: [PATCH 12/43] channels: refactoring of rdpdr cmake scripts --- channels/client/CMakeLists.txt | 32 ++++ channels/client/loader.c | 20 +++ channels/rdpdr/client/parallel/CMakeLists.txt | 21 +-- channels/rdpdr/client/printer/CMakeLists.txt | 28 +-- .../rdpdr/client/smartcard/CMakeLists.txt | 24 +-- client/Windows/wfreerdp.c | 6 +- libfreerdp/channels/libchannels.c | 4 +- libfreerdp/utils/load_plugin.c | 167 +----------------- libfreerdp/utils/svc_plugin.c | 3 +- 9 files changed, 104 insertions(+), 201 deletions(-) create mode 100644 channels/client/CMakeLists.txt create mode 100644 channels/client/loader.c diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt new file mode 100644 index 000000000..f628bd0b1 --- /dev/null +++ b/channels/client/CMakeLists.txt @@ -0,0 +1,32 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(MODULE_NAME "freerdp-channels-client") +set(MODULE_PREFIX "FREERDP_CHANNELS_CLIENT") + +set(${MODULE_PREFIX}_SRCS + loader.c) + +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") + +target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Client") + diff --git a/channels/client/loader.c b/channels/client/loader.c new file mode 100644 index 000000000..b3513115f --- /dev/null +++ b/channels/client/loader.c @@ -0,0 +1,20 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Client Channel Loader + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + diff --git a/channels/rdpdr/client/parallel/CMakeLists.txt b/channels/rdpdr/client/parallel/CMakeLists.txt index 024f12995..0df901638 100644 --- a/channels/rdpdr/client/parallel/CMakeLists.txt +++ b/channels/rdpdr/client/parallel/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,19 +15,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PARALLEL_SRCS - parallel_main.c -) +set(MODULE_NAME "parallel") +set(MODULE_PREFIX "CHANNEL_PARALLEL_CLIENT") + +set(${MODULE_PREFIX}_SRCS + parallel_main.c) include_directories(..) -add_library(parallel ${PARALLEL_SRCS}) -set_target_properties(parallel PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(parallel freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(parallel freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-interlocked) endif() install(TARGETS parallel DESTINATION ${FREERDP_PLUGIN_PATH}) diff --git a/channels/rdpdr/client/printer/CMakeLists.txt b/channels/rdpdr/client/printer/CMakeLists.txt index 8dbfc7bac..36c3b59ee 100644 --- a/channels/rdpdr/client/printer/CMakeLists.txt +++ b/channels/rdpdr/client/printer/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,13 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PRINTER_SRCS +set(MODULE_NAME "printer") +set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") + +set(${MODULE_PREFIX}_SRCS printer_main.c printer_main.h) if(WITH_CUPS) - set(PRINTER_SRCS - ${PRINTER_SRCS} + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} printer_cups.c printer_cups.h) @@ -32,25 +32,25 @@ if(WITH_CUPS) endif() if(WIN32) - set(PRINTER_SRCS - ${PRINTER_SRCS} + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} printer_win.c printer_win.h) endif() include_directories(..) -add_library(printer ${PRINTER_SRCS}) -set_target_properties(printer PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(printer freerdp winpr) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(printer freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) endif() if(WITH_CUPS) - target_link_libraries(printer ${CUPS_LIBRARIES}) + target_link_libraries(${MODULE_NAME} ${CUPS_LIBRARIES}) endif() -install(TARGETS printer DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) diff --git a/channels/rdpdr/client/smartcard/CMakeLists.txt b/channels/rdpdr/client/smartcard/CMakeLists.txt index 7a8717a0a..55b985e5a 100644 --- a/channels/rdpdr/client/smartcard/CMakeLists.txt +++ b/channels/rdpdr/client/smartcard/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,23 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(SCARD_SRCS +set(MODULE_NAME "smartcard") +set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") + +set(${MODULE_PREFIX}_SRCS scard_main.c - scard_operations.c -) + scard_operations.c) include_directories(..) include_directories(${PCSC_INCLUDE_DIRS}) -add_library(scard ${SCARD_SRCS}) -set_target_properties(scard PROPERTIES PREFIX "") +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(scard freerdp winpr) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(scard freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) endif() -target_link_libraries(scard ${PCSC_LIBRARIES}) +target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES}) -install(TARGETS scard DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index 60aae23c2..f0c3a7c53 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -702,9 +702,9 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine instance->context->argv = __argv; #ifdef WITH_RDPDR - REGISTER_SVC_PLUGIN_ENTRY(rdpdr) ; - REGISTER_DEV_PLUGIN_ENTRY(disk) ; - REGISTER_DEV_PLUGIN_ENTRY(printer) ; + REGISTER_SVC_PLUGIN_ENTRY(rdpdr); + REGISTER_DEV_PLUGIN_ENTRY(disk); + REGISTER_DEV_PLUGIN_ENTRY(printer); #endif if (!CreateThread(NULL, 0, kbd_thread_func, NULL, 0, NULL)) diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 2644c4e94..1a6131cd2 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -139,6 +139,7 @@ static rdpChannels* g_init_channels; /* The list of all channel managers. */ typedef struct rdp_channels_list rdpChannelsList; + struct rdp_channels_list { rdpChannels* channels; @@ -296,7 +297,7 @@ static uint32 FREERDP_CC MyVirtualChannelInit(void** ppInitHandle, PCHANNEL_DEF if (ppInitHandle == NULL) { - DEBUG_CHANNELS("error bad pphan"); + DEBUG_CHANNELS("error bad init handle"); return CHANNEL_RC_BAD_INIT_HANDLE; } @@ -690,7 +691,6 @@ int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, c lib = channels->libs_data + channels->num_libs_data; lib->entry = (PVIRTUALCHANNELENTRY) freerdp_load_plugin(name, CHANNEL_EXPORT_FUNC_NAME); - //lib->entry = (PVIRTUALCHANNELENTRY) freerdp_load_channel_plugin(settings, name, CHANNEL_EXPORT_FUNC_NAME); if (lib->entry == NULL) { diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index 9b713bc76..5b2548b1e 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -48,108 +48,19 @@ #endif - #define MAX_STATIC_PLUGINS 50 struct static_plugin { - const char* name; - const char* entry_name; - void* entry_addr; + const char* name; + const char* entry_name; + void* entry_addr; }; typedef struct static_plugin staticPlugin; static staticPlugin g_static_plugins[MAX_STATIC_PLUGINS]; static int g_static_plugins_count; - -/** - * UNUSED - * This function opens a handle on the specified library in order to load symbols from it. - * It is just a wrapper over dlopen(), but provides some logs in case of error. - * - * The returned pointer can be used to load a symbol from the library, using the freerdp_get_library_symbol() call. - * The returned pointer should be closed using the freerdp_close_library() call. - * - * @see freerdp_get_library_symbol - * @see freerdp_close_library - * - * @param file [IN] - library name - * @return Pointer to the loaded library. NULL if an error occurs. - */ -void* freerdp_open_library(const char* file) -{ - void* library; - - library = DLOPEN(file); - - if (library == NULL) - { - printf("freerdp_load_library: failed to open %s: %s\n", file, DLERROR()); - return NULL; - } - - return library; -} - -/** - * UNUSED - * This function retrieves a pointer to the specified symbol from the given (loaded) library. - * It is a wrapper over the dlsym() function, but provides some logs in case of error. - * - * @see freerdp_open_library - * @see freerdp_close_library - * - * @param library [IN] - a valid pointer to the opened library. - * This pointer should come from a successful call to freerdp_open_library() - * @param name [IN] - name of the symbol that must be loaded - * - * @return A pointer to the loaded symbol. NULL if an error occured. - */ -void* freerdp_get_library_symbol(void* library, const char* name) -{ - void* symbol; - - symbol = DLSYM(library, name); - - if (symbol == NULL) - { - printf("freerdp_get_library_symbol: failed to load %s: %s\n", name, DLERROR()); - return NULL; - } - - return symbol; -} - -/** - * UNUSED - * This function closes a library handle that was previously opened by freerdp_open_library(). - * It is a wrapper over dlclose(), but provides logs in case of error. - * - * @see freerdp_open_library - * @see freerdp_get_library_symbol - * - * @return true if the close succeeded. false otherwise. - */ -boolean freerdp_close_library(void* library) -{ - int status; - - status = DLCLOSE(library); - -#ifdef _WIN32 - if (status != 0) -#else - if (status == 0) -#endif - { - printf("freerdp_free_library: failed to close: %s\n", DLERROR()); - return false; - } - - return true; -} - /** * This function will load the specified library, retrieve the specified symbol in it, and return a pointer to it. * It is used in freerdp_load_plugin() and freerdp_load_channel_plugin(). @@ -204,7 +115,9 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) /* first attempt to load a static plugin */ entry = freerdp_load_static_plugin(name, entry_name); - if (entry != NULL) return entry; + + if (entry != NULL) + return entry; suffixed_name = freerdp_append_shared_library_suffix((char*) name); @@ -233,71 +146,6 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) return entry; } -/** - * UNUSED - * This function was meant to be used to load channel plugins. - * It was initially called from freerdp_channels_load_plugin() but now we use the freerdp_load_plugin() function - * which is more generic. - * - */ -void* freerdp_load_channel_plugin(rdpSettings* settings, const char* name, const char* entry_name) -{ - char* path; - void* entry; - char* suffixed_name; - - suffixed_name = freerdp_append_shared_library_suffix((char*) name); - - if (!freerdp_path_contains_separator(suffixed_name)) - { - /* no explicit path given, use default path */ - - if (!settings->development_mode) - { - path = freerdp_construct_path(FREERDP_PLUGIN_PATH, suffixed_name); - } - else - { - char* dot; - char* plugin_name; - char* channels_path; - char* channel_subpath; - - dot = strrchr(suffixed_name, '.'); - plugin_name = xmalloc((dot - suffixed_name) + 1); - strncpy(plugin_name, suffixed_name, (dot - suffixed_name)); - plugin_name[(dot - suffixed_name)] = '\0'; - - channels_path = freerdp_construct_path(settings->development_path, "channels"); - channel_subpath = freerdp_construct_path(channels_path, plugin_name); - - path = freerdp_construct_path(channel_subpath, suffixed_name); - - xfree(plugin_name); - xfree(channels_path); - xfree(channel_subpath); - } - } - else - { - /* explicit path given, use it instead of default path */ - path = xstrdup(suffixed_name); - } - - entry = freerdp_load_library_symbol(path, entry_name); - - xfree(suffixed_name); - xfree(path); - - if (entry == NULL) - { - printf("freerdp_load_channel_plugin: failed to load %s/%s\n", name, entry_name); - return NULL; - } - - return entry; -} - /** * This function is used to register a static plugin so that it can be loaded later on using freerdp_load_plugin. * @@ -334,11 +182,12 @@ boolean freerdp_register_static_plugin(const char* name, const char* entry_name, * * @return Pointer to the entry function, NULL if no matching plugin could be found */ + void* freerdp_load_static_plugin(const char* name, const char* entry_name) { int i; staticPlugin* plugin; - + for (i = 0; i < g_static_plugins_count; i++) { plugin = &g_static_plugins[i]; diff --git a/libfreerdp/utils/svc_plugin.c b/libfreerdp/utils/svc_plugin.c index 7b95e4374..956f8e59a 100644 --- a/libfreerdp/utils/svc_plugin.c +++ b/libfreerdp/utils/svc_plugin.c @@ -37,6 +37,7 @@ /* The list of all plugin instances. */ typedef struct rdp_svc_plugin_list rdpSvcPluginList; + struct rdp_svc_plugin_list { rdpSvcPlugin* plugin; @@ -160,7 +161,7 @@ static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, uint3 /* According to MS-RDPBCGR 2.2.6.1, "All virtual channel traffic MUST be suspended. This flag is only valid in server-to-client virtual channel traffic. It MUST be ignored in client-to-server data." Thus it would be best practice to cease data - transmission. However, simply returing here avoids a crash. */ + transmission. However, simply returning here avoids a crash. */ return; } From e2cd73ba5424b9de9760b548b8b58e51f5e38ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 18:30:14 -0400 Subject: [PATCH 13/43] channels: moving device plugins up in the directory structure --- channels/disk/CMakeLists.txt | 21 +++++++++++++++++++ channels/disk/ChannelOptions.cmake | 14 +++++++++++++ .../disk => disk/client}/CMakeLists.txt | 10 ++++----- .../client/disk => disk/client}/dirent.h | 0 .../client/disk => disk/client}/disk_file.c | 0 .../client/disk => disk/client}/disk_file.h | 0 .../client/disk => disk/client}/disk_main.c | 8 +++---- .../client/disk => disk/client}/statvfs.c | 0 .../client/disk => disk/client}/statvfs.h | 0 channels/parallel/CMakeLists.txt | 21 +++++++++++++++++++ channels/parallel/ChannelOptions.cmake | 14 +++++++++++++ .../client}/CMakeLists.txt | 7 ++++--- .../client}/parallel_main.c | 0 channels/printer/CMakeLists.txt | 21 +++++++++++++++++++ channels/printer/ChannelOptions.cmake | 16 ++++++++++++++ .../printer => printer/client}/CMakeLists.txt | 5 +++-- .../printer => printer/client}/printer_cups.c | 0 .../printer => printer/client}/printer_cups.h | 0 .../printer => printer/client}/printer_main.c | 0 .../printer => printer/client}/printer_main.h | 0 .../printer => printer/client}/printer_win.c | 0 .../printer => printer/client}/printer_win.h | 0 channels/rdpdr/client/CMakeLists.txt | 15 ++----------- channels/rdpdr/client/rdpdr_constants.h | 1 + channels/serial/CMakeLists.txt | 21 +++++++++++++++++++ channels/serial/ChannelOptions.cmake | 14 +++++++++++++ .../serial => serial/client}/CMakeLists.txt | 20 ++++++++++-------- .../client}/serial_constants.h | 0 .../serial => serial/client}/serial_main.c | 0 .../serial => serial/client}/serial_tty.c | 0 .../serial => serial/client}/serial_tty.h | 0 channels/smartcard/CMakeLists.txt | 21 +++++++++++++++++++ channels/smartcard/ChannelOptions.cmake | 16 ++++++++++++++ .../client}/CMakeLists.txt | 5 +++-- .../client}/scard_main.c | 0 .../client}/scard_main.h | 0 .../client}/scard_operations.c | 0 winpr/libwinpr/interlocked/interlocked.c | 4 ++-- 38 files changed, 214 insertions(+), 40 deletions(-) create mode 100644 channels/disk/CMakeLists.txt create mode 100644 channels/disk/ChannelOptions.cmake rename channels/{rdpdr/client/disk => disk/client}/CMakeLists.txt (83%) rename channels/{rdpdr/client/disk => disk/client}/dirent.h (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_file.c (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_file.h (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_main.c (99%) rename channels/{rdpdr/client/disk => disk/client}/statvfs.c (100%) rename channels/{rdpdr/client/disk => disk/client}/statvfs.h (100%) create mode 100644 channels/parallel/CMakeLists.txt create mode 100644 channels/parallel/ChannelOptions.cmake rename channels/{rdpdr/client/parallel => parallel/client}/CMakeLists.txt (86%) rename channels/{rdpdr/client/parallel => parallel/client}/parallel_main.c (100%) create mode 100644 channels/printer/CMakeLists.txt create mode 100644 channels/printer/ChannelOptions.cmake rename channels/{rdpdr/client/printer => printer/client}/CMakeLists.txt (94%) rename channels/{rdpdr/client/printer => printer/client}/printer_cups.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_cups.h (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_main.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_main.h (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_win.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_win.h (100%) create mode 100644 channels/serial/CMakeLists.txt create mode 100644 channels/serial/ChannelOptions.cmake rename channels/{rdpdr/client/serial => serial/client}/CMakeLists.txt (64%) rename channels/{rdpdr/client/serial => serial/client}/serial_constants.h (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_main.c (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_tty.c (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_tty.h (100%) create mode 100644 channels/smartcard/CMakeLists.txt create mode 100644 channels/smartcard/ChannelOptions.cmake rename channels/{rdpdr/client/smartcard => smartcard/client}/CMakeLists.txt (93%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_main.c (100%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_main.h (100%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_operations.c (100%) diff --git a/channels/disk/CMakeLists.txt b/channels/disk/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/disk/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/disk/ChannelOptions.cmake b/channels/disk/ChannelOptions.cmake new file mode 100644 index 000000000..08ae24735 --- /dev/null +++ b/channels/disk/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "disk") +set(CHANNEL_LONG_NAME "Disk Redirection Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/disk/CMakeLists.txt b/channels/disk/client/CMakeLists.txt similarity index 83% rename from channels/rdpdr/client/disk/CMakeLists.txt rename to channels/disk/client/CMakeLists.txt index eca9ea0bd..e9f503d0b 100644 --- a/channels/rdpdr/client/disk/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +16,7 @@ # limitations under the License. set(MODULE_NAME "disk") -set(MODULE_PREFIX "CHANNEL_DEVICE_DISK") +set(MODULE_PREFIX "CHANNEL_RDPDR_DISK_CLIENT") set(${MODULE_PREFIX}_SRCS disk_file.c @@ -32,7 +30,7 @@ if(WIN32) dirent.h) endif() -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") @@ -44,4 +42,6 @@ else() endif() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/disk/dirent.h b/channels/disk/client/dirent.h similarity index 100% rename from channels/rdpdr/client/disk/dirent.h rename to channels/disk/client/dirent.h diff --git a/channels/rdpdr/client/disk/disk_file.c b/channels/disk/client/disk_file.c similarity index 100% rename from channels/rdpdr/client/disk/disk_file.c rename to channels/disk/client/disk_file.c diff --git a/channels/rdpdr/client/disk/disk_file.h b/channels/disk/client/disk_file.h similarity index 100% rename from channels/rdpdr/client/disk/disk_file.h rename to channels/disk/client/disk_file.h diff --git a/channels/rdpdr/client/disk/disk_main.c b/channels/disk/client/disk_main.c similarity index 99% rename from channels/rdpdr/client/disk/disk_main.c rename to channels/disk/client/disk_main.c index 8e28df4c0..473bfc640 100644 --- a/channels/rdpdr/client/disk/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -120,14 +120,14 @@ static DISK_FILE* disk_get_file_by_id(DISK_DEVICE* disk, uint32 id) static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) { + char* path; + uint32 FileId; DISK_FILE* file; + uint8 Information; uint32 DesiredAccess; uint32 CreateDisposition; uint32 CreateOptions; uint32 PathLength; - char* path; - uint32 FileId; - uint8 Information; stream_read_uint32(irp->input, DesiredAccess); stream_seek(irp->input, 16); /* AllocationSize(8), FileAttributes(4), SharedAccess(4) */ @@ -155,7 +155,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) FileId = 0; Information = 0; - /* map errno to windows result*/ + /* map errno to windows result */ irp->IoStatus = disk_map_posix_err(file->err); disk_file_free(file); } diff --git a/channels/rdpdr/client/disk/statvfs.c b/channels/disk/client/statvfs.c similarity index 100% rename from channels/rdpdr/client/disk/statvfs.c rename to channels/disk/client/statvfs.c diff --git a/channels/rdpdr/client/disk/statvfs.h b/channels/disk/client/statvfs.h similarity index 100% rename from channels/rdpdr/client/disk/statvfs.h rename to channels/disk/client/statvfs.h diff --git a/channels/parallel/CMakeLists.txt b/channels/parallel/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/parallel/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/parallel/ChannelOptions.cmake b/channels/parallel/ChannelOptions.cmake new file mode 100644 index 000000000..3f6e7abaf --- /dev/null +++ b/channels/parallel/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "parallel") +set(CHANNEL_LONG_NAME "Parallel Port Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESP]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/parallel/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt similarity index 86% rename from channels/rdpdr/client/parallel/CMakeLists.txt rename to channels/parallel/client/CMakeLists.txt index 0df901638..8ef794dc2 100644 --- a/channels/rdpdr/client/parallel/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -16,12 +16,12 @@ # limitations under the License. set(MODULE_NAME "parallel") -set(MODULE_PREFIX "CHANNEL_PARALLEL_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_PARALLEL_CLIENT") set(${MODULE_PREFIX}_SRCS parallel_main.c) -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,4 +33,5 @@ else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-interlocked) endif() -install(TARGETS parallel DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/parallel/parallel_main.c b/channels/parallel/client/parallel_main.c similarity index 100% rename from channels/rdpdr/client/parallel/parallel_main.c rename to channels/parallel/client/parallel_main.c diff --git a/channels/printer/CMakeLists.txt b/channels/printer/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/printer/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/printer/ChannelOptions.cmake b/channels/printer/ChannelOptions.cmake new file mode 100644 index 000000000..16db8e2a2 --- /dev/null +++ b/channels/printer/ChannelOptions.cmake @@ -0,0 +1,16 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "printer") +set(CHANNEL_LONG_NAME "Print Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPEPC]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +elseif(WITH_CUPS) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +endif() + diff --git a/channels/rdpdr/client/printer/CMakeLists.txt b/channels/printer/client/CMakeLists.txt similarity index 94% rename from channels/rdpdr/client/printer/CMakeLists.txt rename to channels/printer/client/CMakeLists.txt index 36c3b59ee..80eaac1c1 100644 --- a/channels/rdpdr/client/printer/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -16,7 +16,7 @@ # limitations under the License. set(MODULE_NAME "printer") -set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_PRINTER_CLIENT") set(${MODULE_PREFIX}_SRCS printer_main.c @@ -37,7 +37,7 @@ if(WIN32) printer_win.h) endif() -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -54,3 +54,4 @@ if(WITH_CUPS) endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/printer/printer_cups.c b/channels/printer/client/printer_cups.c similarity index 100% rename from channels/rdpdr/client/printer/printer_cups.c rename to channels/printer/client/printer_cups.c diff --git a/channels/rdpdr/client/printer/printer_cups.h b/channels/printer/client/printer_cups.h similarity index 100% rename from channels/rdpdr/client/printer/printer_cups.h rename to channels/printer/client/printer_cups.h diff --git a/channels/rdpdr/client/printer/printer_main.c b/channels/printer/client/printer_main.c similarity index 100% rename from channels/rdpdr/client/printer/printer_main.c rename to channels/printer/client/printer_main.c diff --git a/channels/rdpdr/client/printer/printer_main.h b/channels/printer/client/printer_main.h similarity index 100% rename from channels/rdpdr/client/printer/printer_main.h rename to channels/printer/client/printer_main.h diff --git a/channels/rdpdr/client/printer/printer_win.c b/channels/printer/client/printer_win.c similarity index 100% rename from channels/rdpdr/client/printer/printer_win.c rename to channels/printer/client/printer_win.c diff --git a/channels/rdpdr/client/printer/printer_win.h b/channels/printer/client/printer_win.h similarity index 100% rename from channels/rdpdr/client/printer/printer_win.h rename to channels/printer/client/printer_win.h diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index f6dcdde22..bbff041b4 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -34,23 +34,12 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(${MODULE_NAME} freerdp) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(${MODULE_NAME} freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") -add_subdirectory(disk) -add_subdirectory(printer) - -if(NOT WIN32) - add_subdirectory(parallel) - add_subdirectory(serial) -endif() - -if(WITH_PCSC) - add_subdirectory(smartcard) -endif() diff --git a/channels/rdpdr/client/rdpdr_constants.h b/channels/rdpdr/client/rdpdr_constants.h index ceb2f6cfe..a76737bbc 100644 --- a/channels/rdpdr/client/rdpdr_constants.h +++ b/channels/rdpdr/client/rdpdr_constants.h @@ -457,3 +457,4 @@ enum FILE_FS_INFORMATION_CLASS }; #endif /* __RDPDR_CONSTANTS_H */ + diff --git a/channels/serial/CMakeLists.txt b/channels/serial/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/serial/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/serial/ChannelOptions.cmake b/channels/serial/ChannelOptions.cmake new file mode 100644 index 000000000..232f123db --- /dev/null +++ b/channels/serial/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "serial") +set(CHANNEL_LONG_NAME "Serial Port Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESP]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/serial/CMakeLists.txt b/channels/serial/client/CMakeLists.txt similarity index 64% rename from channels/rdpdr/client/serial/CMakeLists.txt rename to channels/serial/client/CMakeLists.txt index 4b3ac4492..6bfb3b033 100644 --- a/channels/rdpdr/client/serial/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,21 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(serial_SRCS +set(MODULE_NAME "serial") +set(MODULE_PREFIX "CHANNEL_DEVICE_SERIAL_CLIENT") + +set(${MODULE_PREFIX}_SRCS serial_tty.c serial_tty.h serial_constants.h serial_main.c) -include_directories(..) +include_directories(../../rdpdr/client) -add_library(serial ${serial_SRCS}) +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(serial PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(serial freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(serial freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS serial DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/serial/serial_constants.h b/channels/serial/client/serial_constants.h similarity index 100% rename from channels/rdpdr/client/serial/serial_constants.h rename to channels/serial/client/serial_constants.h diff --git a/channels/rdpdr/client/serial/serial_main.c b/channels/serial/client/serial_main.c similarity index 100% rename from channels/rdpdr/client/serial/serial_main.c rename to channels/serial/client/serial_main.c diff --git a/channels/rdpdr/client/serial/serial_tty.c b/channels/serial/client/serial_tty.c similarity index 100% rename from channels/rdpdr/client/serial/serial_tty.c rename to channels/serial/client/serial_tty.c diff --git a/channels/rdpdr/client/serial/serial_tty.h b/channels/serial/client/serial_tty.h similarity index 100% rename from channels/rdpdr/client/serial/serial_tty.h rename to channels/serial/client/serial_tty.h diff --git a/channels/smartcard/CMakeLists.txt b/channels/smartcard/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/smartcard/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/smartcard/ChannelOptions.cmake b/channels/smartcard/ChannelOptions.cmake new file mode 100644 index 000000000..e06f9e13e --- /dev/null +++ b/channels/smartcard/ChannelOptions.cmake @@ -0,0 +1,16 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "smartcard") +set(CHANNEL_LONG_NAME "Smart Card Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESC]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +elseif(WITH_PCSC) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +endif() + diff --git a/channels/rdpdr/client/smartcard/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt similarity index 93% rename from channels/rdpdr/client/smartcard/CMakeLists.txt rename to channels/smartcard/client/CMakeLists.txt index 55b985e5a..3cd2573d4 100644 --- a/channels/rdpdr/client/smartcard/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -16,13 +16,13 @@ # limitations under the License. set(MODULE_NAME "smartcard") -set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_SMARTCARD_CLIENT") set(${MODULE_PREFIX}_SRCS scard_main.c scard_operations.c) -include_directories(..) +include_directories(../../rdpdr/client) include_directories(${PCSC_INCLUDE_DIRS}) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -37,3 +37,4 @@ endif() target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/smartcard/scard_main.c b/channels/smartcard/client/scard_main.c similarity index 100% rename from channels/rdpdr/client/smartcard/scard_main.c rename to channels/smartcard/client/scard_main.c diff --git a/channels/rdpdr/client/smartcard/scard_main.h b/channels/smartcard/client/scard_main.h similarity index 100% rename from channels/rdpdr/client/smartcard/scard_main.h rename to channels/smartcard/client/scard_main.h diff --git a/channels/rdpdr/client/smartcard/scard_operations.c b/channels/smartcard/client/scard_operations.c similarity index 100% rename from channels/rdpdr/client/smartcard/scard_operations.c rename to channels/smartcard/client/scard_operations.c diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index 5f1d96bd7..7dd333711 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -286,7 +286,7 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E return previousValue; } -#else /* (_WIN32_WINNT < 0x0600) */ +#else /* (_WIN32 && (_WIN32_WINNT < 0x0502)) */ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand) { @@ -297,5 +297,5 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E #endif } -#endif /* (_WIN32_WINNT < 0x0600) */ +#endif /* (_WIN32 && (_WIN32_WINNT < 0x0502)) */ From 8f10d3aa3bf52a04048e204bd17271cd30646c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sat, 6 Oct 2012 16:55:58 -0400 Subject: [PATCH 14/43] channels/rdpdr: fix IRP creation (forgot to zero memory) --- channels/rdpdr/client/irp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/channels/rdpdr/client/irp.c b/channels/rdpdr/client/irp.c index 961d28561..9ca5180bc 100644 --- a/channels/rdpdr/client/irp.c +++ b/channels/rdpdr/client/irp.c @@ -80,6 +80,7 @@ IRP* irp_new(DEVMAN* devman, STREAM* data_in) } irp = (IRP*) _aligned_malloc(sizeof(IRP), MEMORY_ALLOCATION_ALIGNMENT); + ZeroMemory(irp, sizeof(IRP)); irp->device = device; irp->devman = devman; From bf03aff5d16e55ea092c580a8122768d87e970e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sat, 6 Oct 2012 17:49:56 -0400 Subject: [PATCH 15/43] channels: windows patches from richterger --- channels/disk/client/CMakeLists.txt | 2 +- channels/disk/client/disk_file.c | 20 +++++++++++++++----- channels/disk/client/disk_main.c | 2 ++ libfreerdp/channels/libchannels.c | 3 ++- libfreerdp/utils/unicode.c | 1 + 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index e9f503d0b..1282048a5 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -24,7 +24,7 @@ set(${MODULE_PREFIX}_SRCS disk_main.c) if(WIN32) - set(${MODULE_PREFIX}_SRCS + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} statvfs.c statvfs.h dirent.h) diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index 0bf28af66..48430a75b 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -85,17 +85,27 @@ static boolean disk_file_wildcard_match(const char* pattern, const char* filenam static void disk_file_fix_path(char* path) { - int len; int i; + int length; - len = strlen(path); - for (i = 0; i < len; i++) + length = strlen(path); + + for (i = 0; i < length; i++) { if (path[i] == '\\') path[i] = '/'; } - if (len > 0 && path[len - 1] == '/') - path[len - 1] = '\0'; + +#ifdef WIN32 + if ((length == 3) && (path[1] == ':') && (path[2] == '/')) + return; +#else + if ((length == 1) && (path[0] == '/')) + return; +#endif + + if ((length > 0) && (path[length - 1] == '/')) + path[length - 1] = '\0'; } static char* disk_file_combine_fullpath(const char* base_path, const char* path) diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index 473bfc640..d79100782 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -529,6 +529,8 @@ static void disk_process_irp_device_control(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp(DISK_DEVICE* disk, IRP* irp) { + irp->IoStatus = STATUS_SUCCESS; + switch (irp->MajorFunction) { case IRP_MJ_CREATE: diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 1a6131cd2..400709e67 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -932,7 +932,8 @@ static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instan lchannel_data->open_event_proc(lchannel_data->open_handle, CHANNEL_EVENT_WRITE_COMPLETE, item->UserData, sizeof(void*), sizeof(void*), 0); } - xfree(item); + + _aligned_free(item); } } diff --git a/libfreerdp/utils/unicode.c b/libfreerdp/utils/unicode.c index 027150b1c..530155206 100644 --- a/libfreerdp/utils/unicode.c +++ b/libfreerdp/utils/unicode.c @@ -56,6 +56,7 @@ int freerdp_UnicodeToAsciiAlloc(const WCHAR* wstr, CHAR** str, int length) *str = malloc((length * 2) + 1); WideCharToMultiByte(CP_UTF8, 0, wstr, length, *str, length, NULL, NULL); + (*str)[length] = 0; return length; } From f8b049630fb8d08df68dda814b4c13bd8f9a824a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sat, 6 Oct 2012 20:19:03 -0400 Subject: [PATCH 16/43] libwinpr-interlocked: added support for doubly-linked lists --- winpr/include/winpr/interlocked.h | 29 ++++ winpr/libwinpr/interlocked/interlocked.c | 129 +++++++++++++++--- .../libwinpr/interlocked/test/CMakeLists.txt | 4 +- .../interlocked/test/TestInterlockedDList.c | 77 +++++++++++ 4 files changed, 222 insertions(+), 17 deletions(-) create mode 100644 winpr/libwinpr/interlocked/test/TestInterlockedDList.c diff --git a/winpr/include/winpr/interlocked.h b/winpr/include/winpr/interlocked.h index c12461a44..519eb6a18 100644 --- a/winpr/include/winpr/interlocked.h +++ b/winpr/include/winpr/interlocked.h @@ -26,6 +26,11 @@ #ifndef _WIN32 +#ifndef CONTAINING_RECORD +#define CONTAINING_RECORD(address, type, field) \ + ((type *)(((ULONG_PTR) address) - (ULONG_PTR)(&(((type *) 0)->field)))) +#endif + typedef struct _LIST_ENTRY LIST_ENTRY; typedef struct _LIST_ENTRY* PLIST_ENTRY; @@ -120,6 +125,8 @@ typedef union _SLIST_HEADER #endif /* _WIN64 */ +/* Singly-Linked List */ + WINPR_API VOID InitializeSListHead(PSLIST_HEADER ListHead); WINPR_API PSLIST_ENTRY InterlockedPushEntrySList(PSLIST_HEADER ListHead, PSLIST_ENTRY ListEntry); @@ -141,5 +148,27 @@ WINPR_API LONG InterlockedCompareExchange(LONG volatile *Destination, LONG Excha WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand); +/* Doubly-Linked List */ + +#ifndef _WIN32 + +VOID InitializeListHead(PLIST_ENTRY ListHead); + +BOOL IsListEmpty(const LIST_ENTRY* ListHead); + +BOOL RemoveEntryList(PLIST_ENTRY Entry); + +VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry); +PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead); + +VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry); +PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead); +VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend); + +VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry); +PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead); + +#endif + #endif /* WINPR_INTERLOCKED_H */ diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index 7dd333711..e1741ed45 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -26,22 +26,7 @@ #include -/** - * api-ms-win-core-interlocked-l1-2-0.dll: - * - * InitializeSListHead - * InterlockedPopEntrySList - * InterlockedPushEntrySList - * InterlockedPushListSListEx - * InterlockedFlushSList - * QueryDepthSList - * InterlockedIncrement - * InterlockedDecrement - * InterlockedExchange - * InterlockedExchangeAdd - * InterlockedCompareExchange - * InterlockedCompareExchange64 - */ +/* Singly-Linked List */ #ifndef _WIN32 @@ -299,3 +284,115 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E #endif /* (_WIN32 && (_WIN32_WINNT < 0x0502)) */ +/* Doubly-Linked List */ + +/** + * Kernel-Mode Basics: Windows Linked Lists: + * http://www.osronline.com/article.cfm?article=499 + * + * Singly and Doubly Linked Lists: + * http://msdn.microsoft.com/en-us/library/windows/hardware/ff563802/ + */ + +#ifndef _WIN32 + +VOID InitializeListHead(PLIST_ENTRY ListHead) +{ + ListHead->Flink = ListHead->Blink = ListHead; +} + +BOOL IsListEmpty(const LIST_ENTRY* ListHead) +{ + return (BOOL) (ListHead->Flink == ListHead); +} + +BOOL RemoveEntryList(PLIST_ENTRY Entry) +{ + PLIST_ENTRY OldFlink; + PLIST_ENTRY OldBlink; + + OldFlink = Entry->Flink; + OldBlink = Entry->Blink; + OldFlink->Blink = OldBlink; + OldBlink->Flink = OldFlink; + + return (BOOL) (OldFlink == OldBlink); +} + +VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) +{ + PLIST_ENTRY OldFlink; + + OldFlink = ListHead->Flink; + Entry->Flink = OldFlink; + Entry->Blink = ListHead; + OldFlink->Blink = Entry; + ListHead->Flink = Entry; +} + +PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead) +{ + PLIST_ENTRY Flink; + PLIST_ENTRY Entry; + + Entry = ListHead->Flink; + Flink = Entry->Flink; + ListHead->Flink = Flink; + Flink->Blink = ListHead; + + return Entry; +} + +VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) +{ + PLIST_ENTRY OldBlink; + + OldBlink = ListHead->Blink; + Entry->Flink = ListHead; + Entry->Blink = OldBlink; + OldBlink->Flink = Entry; + ListHead->Blink = Entry; +} + +PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead) +{ + PLIST_ENTRY Blink; + PLIST_ENTRY Entry; + + Entry = ListHead->Blink; + Blink = Entry->Blink; + ListHead->Blink = Blink; + Blink->Flink = ListHead; + + return Entry; +} + +VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend) +{ + PLIST_ENTRY ListEnd = ListHead->Blink; + + ListHead->Blink->Flink = ListToAppend; + ListHead->Blink = ListToAppend->Blink; + ListToAppend->Blink->Flink = ListHead; + ListToAppend->Blink = ListEnd; +} + +VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry) +{ + Entry->Next = ListHead->Next; + ListHead->Next = Entry; +} + +PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead) +{ + PSINGLE_LIST_ENTRY FirstEntry; + + FirstEntry = ListHead->Next; + + if (FirstEntry != NULL) + ListHead->Next = FirstEntry->Next; + + return FirstEntry; +} + +#endif diff --git a/winpr/libwinpr/interlocked/test/CMakeLists.txt b/winpr/libwinpr/interlocked/test/CMakeLists.txt index 072aa9e93..c55804f94 100644 --- a/winpr/libwinpr/interlocked/test/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/test/CMakeLists.txt @@ -6,7 +6,8 @@ set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) set(${MODULE_PREFIX}_TESTS TestInterlockedAccess.c - TestInterlockedSList.c) + TestInterlockedSList.c + TestInterlockedDList.c) create_test_sourcelist(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_DRIVER} @@ -22,3 +23,4 @@ foreach(test ${${MODULE_PREFIX}_TESTS}) endforeach() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") + diff --git a/winpr/libwinpr/interlocked/test/TestInterlockedDList.c b/winpr/libwinpr/interlocked/test/TestInterlockedDList.c new file mode 100644 index 000000000..fa3a61fe6 --- /dev/null +++ b/winpr/libwinpr/interlocked/test/TestInterlockedDList.c @@ -0,0 +1,77 @@ + +#include +#include +#include +#include +#include + +typedef struct _LIST_ITEM +{ + LIST_ENTRY ItemEntry; + ULONG Signature; +} LIST_ITEM, *PLIST_ITEM; + +int TestInterlockedDList(int argc, char* argv[]) +{ + ULONG Count; + PLIST_ITEM pListItem; + PLIST_ENTRY pListHead; + PLIST_ENTRY pListEntry; + + pListHead = (PLIST_ENTRY) _aligned_malloc(sizeof(LIST_ENTRY), MEMORY_ALLOCATION_ALIGNMENT); + + if (!pListHead) + { + printf("Memory allocation failed.\n"); + return -1; + } + + InitializeListHead(pListHead); + + if (!IsListEmpty(pListHead)) + { + printf("Expected empty list\n"); + return -1; + } + + /* InsertHeadList / RemoveHeadList */ + + printf("InsertHeadList / RemoveHeadList\n"); + + for (Count = 1; Count <= 10; Count += 1) + { + pListItem = (PLIST_ITEM) _aligned_malloc(sizeof(LIST_ITEM), MEMORY_ALLOCATION_ALIGNMENT); + pListItem->Signature = Count; + InsertHeadList(pListHead, &(pListItem->ItemEntry)); + } + + for (Count = 10; Count >= 1; Count -= 1) + { + pListEntry = RemoveHeadList(pListHead); + pListItem = (PLIST_ITEM) pListEntry; + _aligned_free(pListEntry); + } + + /* InsertTailList / RemoveTailList */ + + printf("InsertTailList / RemoveTailList\n"); + + for (Count = 1; Count <= 10; Count += 1) + { + pListItem = (PLIST_ITEM) _aligned_malloc(sizeof(LIST_ITEM), MEMORY_ALLOCATION_ALIGNMENT); + pListItem->Signature = Count; + InsertTailList(pListHead, &(pListItem->ItemEntry)); + } + + for (Count = 10; Count >= 1; Count -= 1) + { + pListEntry = RemoveTailList(pListHead); + pListItem = (PLIST_ITEM) pListEntry; + _aligned_free(pListEntry); + } + + _aligned_free(pListHead); + + return 0; +} + From 3d98273185f3587d6b2a53ede176bbe8b63615f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 7 Oct 2012 10:21:54 -0400 Subject: [PATCH 17/43] channels: fix export of symbols on Windows --- CMakeLists.txt | 13 ++++++++++++- channels/cliprdr/client/CMakeLists.txt | 4 ++++ channels/cliprdr/client/module.def | 3 +++ channels/disk/client/CMakeLists.txt | 7 +++++++ channels/disk/client/disk_file.c | 19 +++++++++++++------ channels/disk/client/module.def | 3 +++ channels/parallel/client/CMakeLists.txt | 1 + channels/printer/client/CMakeLists.txt | 1 + channels/rdpdr/client/CMakeLists.txt | 4 ++++ channels/rdpdr/client/module.def | 3 +++ channels/rdpdr/client/rdpdr_main.c | 3 ++- channels/rdpdr/client/rdpdr_main.h | 1 + channels/serial/client/CMakeLists.txt | 1 + channels/smartcard/client/CMakeLists.txt | 1 + client/Windows/CMakeLists.txt | 3 +-- 15 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 channels/cliprdr/client/module.def create mode 100644 channels/disk/client/module.def create mode 100644 channels/rdpdr/client/module.def diff --git a/CMakeLists.txt b/CMakeLists.txt index 28074ce7f..3b216c556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,12 +173,23 @@ if(NOT WIN32) endif() endif() +if(WIN32) + set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_PREFIX}) + set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}) + set(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}) +endif() + # Path to put FreeRDP data set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp") set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps") # Path to put plugins -set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp") +if(WIN32) + set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}") +else() + set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp") +endif() + set(FREERDP_CLIENT_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/client") set(FREERDP_SERVER_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/server") diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index c67038cd5..9716083cd 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -25,6 +25,10 @@ set(${MODULE_PREFIX}_SRCS cliprdr_main.c cliprdr_main.h) +if(MSVC AND (NOT WITH_STATIC_PLUGINS)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/cliprdr/client/module.def b/channels/cliprdr/client/module.def new file mode 100644 index 000000000..7336368ec --- /dev/null +++ b/channels/cliprdr/client/module.def @@ -0,0 +1,3 @@ +LIBRARY "cliprdr" +EXPORTS + VirtualChannelEntry @1 diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index 1282048a5..a2c9d6b01 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -30,6 +30,10 @@ if(WIN32) dirent.h) endif() +if(MSVC AND (NOT WITH_STATIC_PLUGINS)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -45,3 +49,6 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") + + diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index 48430a75b..efcb52d2c 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -38,6 +38,8 @@ #include #include +#include + #include #include #include @@ -112,7 +114,7 @@ static char* disk_file_combine_fullpath(const char* base_path, const char* path) { char* fullpath; - fullpath = xmalloc(strlen(base_path) + strlen(path) + 1); + fullpath = (char*) malloc(strlen(base_path) + strlen(path) + 1); strcpy(fullpath, base_path); strcat(fullpath, path); disk_file_fix_path(fullpath); @@ -123,9 +125,9 @@ static char* disk_file_combine_fullpath(const char* base_path, const char* path) static boolean disk_file_remove_dir(const char* path) { DIR* dir; - struct dirent* pdirent; - struct STAT st; char* p; + struct STAT st; + struct dirent* pdirent; boolean ret = true; dir = opendir(path); @@ -143,8 +145,9 @@ static boolean disk_file_remove_dir(const char* path) continue; } - p = xmalloc(strlen(path) + strlen(pdirent->d_name) + 2); + p = (char*) malloc(strlen(path) + strlen(pdirent->d_name) + 2); sprintf(p, "%s/%s", path, pdirent->d_name); + if (STAT(p, &st) != 0) { DEBUG_WARN("stat %s failed.", p); @@ -160,8 +163,11 @@ static boolean disk_file_remove_dir(const char* path) ret = false; } else + { ret = true; - xfree(p); + } + + free(p); if (!ret) break; @@ -170,6 +176,7 @@ static boolean disk_file_remove_dir(const char* path) } closedir(dir); + if (ret) { if (rmdir(path) < 0) @@ -559,7 +566,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui xfree(file->pattern); if (path[0]) - file->pattern = strdup(strrchr(path, '\\') + 1); + file->pattern = _strdup(strrchr(path, '\\') + 1); else file->pattern = NULL; } diff --git a/channels/disk/client/module.def b/channels/disk/client/module.def new file mode 100644 index 000000000..dd2815569 --- /dev/null +++ b/channels/disk/client/module.def @@ -0,0 +1,3 @@ +LIBRARY "disk" +EXPORTS + DeviceServiceEntry @1 diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 8ef794dc2..70d08bfe8 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -35,3 +35,4 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index 80eaac1c1..b4174cf64 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -55,3 +55,4 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index bbff041b4..18856aad8 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -30,6 +30,10 @@ set(${MODULE_PREFIX}_SRCS rdpdr_main.c rdpdr_main.h) +if(MSVC AND (NOT WITH_STATIC_PLUGINS)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/rdpdr/client/module.def b/channels/rdpdr/client/module.def new file mode 100644 index 000000000..0954fbe47 --- /dev/null +++ b/channels/rdpdr/client/module.def @@ -0,0 +1,3 @@ +LIBRARY "rdpdr" +EXPORTS + VirtualChannelEntry @1 diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index e38048ae4..188999a0e 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -26,8 +26,8 @@ #include #include -#include #include +#include #include #include #include @@ -63,6 +63,7 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin) { devman_load_device_service(rdpdr->devman, data); } + data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size); } } diff --git a/channels/rdpdr/client/rdpdr_main.h b/channels/rdpdr/client/rdpdr_main.h index af867fbf5..23d58bfce 100644 --- a/channels/rdpdr/client/rdpdr_main.h +++ b/channels/rdpdr/client/rdpdr_main.h @@ -26,6 +26,7 @@ #include "rdpdr_types.h" typedef struct rdpdr_plugin rdpdrPlugin; + struct rdpdr_plugin { rdpSvcPlugin plugin; diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index 6bfb3b033..fcd3039c0 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -37,3 +37,4 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index 3cd2573d4..239bbe69f 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -38,3 +38,4 @@ target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index 8f3a921e5..ae8f5b298 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -39,7 +39,7 @@ add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) if(WITH_MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) - if(WITH_RDPDR) + if(WITH_RDPDR AND WITH_STATIC_PLUGINS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rdpdr disk printer) endif() else() @@ -55,4 +55,3 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows") - From 7891e0a765a954a4166ea10d49096c4028f60c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 7 Oct 2012 16:13:30 -0400 Subject: [PATCH 18/43] winpr: stubbed pipe module, added some test stubs --- winpr/include/winpr/interlocked.h | 4 -- winpr/include/winpr/pipe.h | 33 +++++++++++++ winpr/libwinpr/asn1/CMakeLists.txt | 8 ++++ winpr/libwinpr/asn1/module.def | 3 ++ winpr/libwinpr/asn1/test/.gitignore | 2 + winpr/libwinpr/asn1/test/CMakeLists.txt | 34 ++++++++++++++ winpr/libwinpr/asn1/test/TestAsn1BerDec.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1BerEnc.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Compare.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Decode.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Decoder.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1DerDec.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1DerEnc.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Encode.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Encoder.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Integer.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1Module.c | 11 +++++ winpr/libwinpr/asn1/test/TestAsn1String.c | 11 +++++ winpr/libwinpr/handle/CMakeLists.txt | 4 ++ winpr/libwinpr/handle/module.def | 3 ++ winpr/libwinpr/interlocked/interlocked.c | 3 -- winpr/libwinpr/interlocked/module.def | 10 ++++ .../library/test/TestLibraryGetProcAddress.c | 2 +- winpr/libwinpr/pipe/CMakeLists.txt | 47 +++++++++++++++++++ winpr/libwinpr/pipe/ModuleOptions.cmake | 9 ++++ winpr/libwinpr/pipe/module.def | 3 ++ winpr/libwinpr/pipe/pipe.c | 35 ++++++++++++++ winpr/libwinpr/pipe/test/.gitignore | 3 ++ winpr/libwinpr/pipe/test/CMakeLists.txt | 23 +++++++++ winpr/libwinpr/pipe/test/TestPipeCreatePipe.c | 12 +++++ .../sspi/test/TestEnumerateSecurityPackages.c | 2 +- winpr/libwinpr/thread/CMakeLists.txt | 4 ++ winpr/libwinpr/thread/module.def | 3 ++ 33 files changed, 370 insertions(+), 9 deletions(-) create mode 100644 winpr/include/winpr/pipe.h create mode 100644 winpr/libwinpr/asn1/module.def create mode 100644 winpr/libwinpr/asn1/test/.gitignore create mode 100644 winpr/libwinpr/asn1/test/CMakeLists.txt create mode 100644 winpr/libwinpr/asn1/test/TestAsn1BerDec.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1BerEnc.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Compare.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Decode.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Decoder.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1DerDec.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1DerEnc.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Encode.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Encoder.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Integer.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1Module.c create mode 100644 winpr/libwinpr/asn1/test/TestAsn1String.c create mode 100644 winpr/libwinpr/handle/module.def create mode 100644 winpr/libwinpr/pipe/CMakeLists.txt create mode 100644 winpr/libwinpr/pipe/ModuleOptions.cmake create mode 100644 winpr/libwinpr/pipe/module.def create mode 100644 winpr/libwinpr/pipe/pipe.c create mode 100644 winpr/libwinpr/pipe/test/.gitignore create mode 100644 winpr/libwinpr/pipe/test/CMakeLists.txt create mode 100644 winpr/libwinpr/pipe/test/TestPipeCreatePipe.c create mode 100644 winpr/libwinpr/thread/module.def diff --git a/winpr/include/winpr/interlocked.h b/winpr/include/winpr/interlocked.h index 519eb6a18..6beb3f015 100644 --- a/winpr/include/winpr/interlocked.h +++ b/winpr/include/winpr/interlocked.h @@ -150,8 +150,6 @@ WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, /* Doubly-Linked List */ -#ifndef _WIN32 - VOID InitializeListHead(PLIST_ENTRY ListHead); BOOL IsListEmpty(const LIST_ENTRY* ListHead); @@ -168,7 +166,5 @@ VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend); VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry); PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead); -#endif - #endif /* WINPR_INTERLOCKED_H */ diff --git a/winpr/include/winpr/pipe.h b/winpr/include/winpr/pipe.h new file mode 100644 index 000000000..675065317 --- /dev/null +++ b/winpr/include/winpr/pipe.h @@ -0,0 +1,33 @@ +/** + * WinPR: Windows Portable Runtime + * Pipe Functions + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WINPR_PIPE_H +#define WINPR_PIPE_H + +#include +#include +#include + +#ifndef _WIN32 + +WINPR_API BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize); + +#endif + +#endif /* WINPR_PIPE_H */ diff --git a/winpr/libwinpr/asn1/CMakeLists.txt b/winpr/libwinpr/asn1/CMakeLists.txt index 5cbef153a..0698bfc6e 100644 --- a/winpr/libwinpr/asn1/CMakeLists.txt +++ b/winpr/libwinpr/asn1/CMakeLists.txt @@ -21,6 +21,10 @@ set(MODULE_PREFIX "WINPR_ASN1") set(${MODULE_PREFIX}_SRCS asn1.c) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + if(WITH_MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() @@ -36,3 +40,7 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/asn1/module.def b/winpr/libwinpr/asn1/module.def new file mode 100644 index 000000000..eba1a913a --- /dev/null +++ b/winpr/libwinpr/asn1/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-asn1" +EXPORTS + diff --git a/winpr/libwinpr/asn1/test/.gitignore b/winpr/libwinpr/asn1/test/.gitignore new file mode 100644 index 000000000..e2363391e --- /dev/null +++ b/winpr/libwinpr/asn1/test/.gitignore @@ -0,0 +1,2 @@ +TestAsn1 +TestAsn1.c diff --git a/winpr/libwinpr/asn1/test/CMakeLists.txt b/winpr/libwinpr/asn1/test/CMakeLists.txt new file mode 100644 index 000000000..3ff2010b5 --- /dev/null +++ b/winpr/libwinpr/asn1/test/CMakeLists.txt @@ -0,0 +1,34 @@ + +set(MODULE_NAME "TestAsn1") +set(MODULE_PREFIX "TEST_ASN1") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestAsn1Module.c + TestAsn1Encoder.c + TestAsn1Decoder.c + TestAsn1Encode.c + TestAsn1Decode.c + TestAsn1String.c + TestAsn1Integer.c + TestAsn1Compare.c + TestAsn1BerEnc.c + TestAsn1BerDec.c + TestAsn1DerEnc.c + TestAsn1DerDec.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +target_link_libraries(${MODULE_NAME} winpr-asn1) + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/asn1/test/TestAsn1BerDec.c b/winpr/libwinpr/asn1/test/TestAsn1BerDec.c new file mode 100644 index 000000000..d096b3120 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1BerDec.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1BerDec(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1BerEnc.c b/winpr/libwinpr/asn1/test/TestAsn1BerEnc.c new file mode 100644 index 000000000..66568e5e6 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1BerEnc.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1BerEnc(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Compare.c b/winpr/libwinpr/asn1/test/TestAsn1Compare.c new file mode 100644 index 000000000..407e631a0 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Compare.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Compare(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Decode.c b/winpr/libwinpr/asn1/test/TestAsn1Decode.c new file mode 100644 index 000000000..6e604f3d8 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Decode.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Decode(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Decoder.c b/winpr/libwinpr/asn1/test/TestAsn1Decoder.c new file mode 100644 index 000000000..a8ff7bc21 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Decoder.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Decoder(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1DerDec.c b/winpr/libwinpr/asn1/test/TestAsn1DerDec.c new file mode 100644 index 000000000..07ef10749 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1DerDec.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1DerDec(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1DerEnc.c b/winpr/libwinpr/asn1/test/TestAsn1DerEnc.c new file mode 100644 index 000000000..bfbd872b7 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1DerEnc.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1DerEnc(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Encode.c b/winpr/libwinpr/asn1/test/TestAsn1Encode.c new file mode 100644 index 000000000..9a1e478ea --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Encode.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Encode(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Encoder.c b/winpr/libwinpr/asn1/test/TestAsn1Encoder.c new file mode 100644 index 000000000..6d262cb6a --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Encoder.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Encoder(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Integer.c b/winpr/libwinpr/asn1/test/TestAsn1Integer.c new file mode 100644 index 000000000..ffa83cbea --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Integer.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Integer(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1Module.c b/winpr/libwinpr/asn1/test/TestAsn1Module.c new file mode 100644 index 000000000..3e9d1d400 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1Module.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1Module(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/asn1/test/TestAsn1String.c b/winpr/libwinpr/asn1/test/TestAsn1String.c new file mode 100644 index 000000000..c5b057797 --- /dev/null +++ b/winpr/libwinpr/asn1/test/TestAsn1String.c @@ -0,0 +1,11 @@ + +#include +#include +#include +#include + +int TestAsn1String(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/handle/CMakeLists.txt b/winpr/libwinpr/handle/CMakeLists.txt index 69acd270f..eb0a9db34 100644 --- a/winpr/libwinpr/handle/CMakeLists.txt +++ b/winpr/libwinpr/handle/CMakeLists.txt @@ -22,6 +22,10 @@ set(${MODULE_PREFIX}_SRCS handle.c table.c) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + if(WITH_MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() diff --git a/winpr/libwinpr/handle/module.def b/winpr/libwinpr/handle/module.def new file mode 100644 index 000000000..5e4d32f95 --- /dev/null +++ b/winpr/libwinpr/handle/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-handle" +EXPORTS + diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index e1741ed45..2fc887fa4 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -294,8 +294,6 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E * http://msdn.microsoft.com/en-us/library/windows/hardware/ff563802/ */ -#ifndef _WIN32 - VOID InitializeListHead(PLIST_ENTRY ListHead) { ListHead->Flink = ListHead->Blink = ListHead; @@ -395,4 +393,3 @@ PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead) return FirstEntry; } -#endif diff --git a/winpr/libwinpr/interlocked/module.def b/winpr/libwinpr/interlocked/module.def index 20b5fd055..160c9de80 100644 --- a/winpr/libwinpr/interlocked/module.def +++ b/winpr/libwinpr/interlocked/module.def @@ -1,3 +1,13 @@ LIBRARY "libwinpr-interlocked" EXPORTS InterlockedCompareExchange64 @1 + InitializeListHead @2 + IsListEmpty @3 + RemoveEntryList @4 + InsertHeadList @5 + RemoveHeadList @6 + InsertTailList @7 + RemoveTailList @8 + AppendTailList @9 + PushEntryList @10 + PopEntryList @11 diff --git a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c index 8ab2b2982..afabdc709 100644 --- a/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c +++ b/winpr/libwinpr/library/test/TestLibraryGetProcAddress.c @@ -11,7 +11,7 @@ int TestLibraryGetProcAddress(int argc, char* argv[]) char* str; int length; LPTSTR BasePath; - HINSTANCE library; + //HINSTANCE library; LPTSTR LibraryPath; str = argv[1]; diff --git a/winpr/libwinpr/pipe/CMakeLists.txt b/winpr/libwinpr/pipe/CMakeLists.txt new file mode 100644 index 000000000..42ba8f3d3 --- /dev/null +++ b/winpr/libwinpr/pipe/CMakeLists.txt @@ -0,0 +1,47 @@ +# WinPR: Windows Portable Runtime +# libwinpr-pipe cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(MODULE_NAME "winpr-pipe") +set(MODULE_PREFIX "WINPR_PIPE") + +set(${MODULE_PREFIX}_SRCS + pipe.c) + +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + +if(WITH_MONOLITHIC_BUILD) + add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) +else() + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +endif() + +set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") + +if(WITH_MONOLITHIC_BUILD) + +else() + target_link_libraries(${MODULE_NAME} winpr-crt) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/pipe/ModuleOptions.cmake b/winpr/libwinpr/pipe/ModuleOptions.cmake new file mode 100644 index 000000000..557e6a149 --- /dev/null +++ b/winpr/libwinpr/pipe/ModuleOptions.cmake @@ -0,0 +1,9 @@ + +set(MINWIN_LAYER "1") +set(MINWIN_GROUP "core") +set(MINWIN_MAJOR_VERSION "2") +set(MINWIN_MINOR_VERSION "0") +set(MINWIN_SHORT_NAME "namedpipe") +set(MINWIN_LONG_NAME "Named Pipe Functions") +set(MODULE_LIBRARY_NAME "api-ms-win-${MINWIN_GROUP}-${MINWIN_SHORT_NAME}-l${MINWIN_LAYER}-${MINWIN_MAJOR_VERSION}-${MINWIN_MINOR_VERSION}") + diff --git a/winpr/libwinpr/pipe/module.def b/winpr/libwinpr/pipe/module.def new file mode 100644 index 000000000..8c4cc1eac --- /dev/null +++ b/winpr/libwinpr/pipe/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-pipe" +EXPORTS + diff --git a/winpr/libwinpr/pipe/pipe.c b/winpr/libwinpr/pipe/pipe.c new file mode 100644 index 000000000..4e857730f --- /dev/null +++ b/winpr/libwinpr/pipe/pipe.c @@ -0,0 +1,35 @@ +/** + * WinPR: Windows Portable Runtime + * Pipe Functions + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +#ifndef _WIN32 + +BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize) +{ + return TRUE; +} + +#endif diff --git a/winpr/libwinpr/pipe/test/.gitignore b/winpr/libwinpr/pipe/test/.gitignore new file mode 100644 index 000000000..5ecbf1e1e --- /dev/null +++ b/winpr/libwinpr/pipe/test/.gitignore @@ -0,0 +1,3 @@ +TestPipe +TestPipe.c + diff --git a/winpr/libwinpr/pipe/test/CMakeLists.txt b/winpr/libwinpr/pipe/test/CMakeLists.txt new file mode 100644 index 000000000..9122159ad --- /dev/null +++ b/winpr/libwinpr/pipe/test/CMakeLists.txt @@ -0,0 +1,23 @@ + +set(MODULE_NAME "TestPipe") +set(MODULE_PREFIX "TEST_PIPE") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestPipeCreatePipe.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +target_link_libraries(${MODULE_NAME} winpr-pipe) + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c b/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c new file mode 100644 index 000000000..4d596ed2a --- /dev/null +++ b/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c @@ -0,0 +1,12 @@ + +#include +#include +#include +#include +#include + +int TestPipeCreatePipe(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/sspi/test/TestEnumerateSecurityPackages.c b/winpr/libwinpr/sspi/test/TestEnumerateSecurityPackages.c index cab3884c6..8cca3e3cc 100644 --- a/winpr/libwinpr/sspi/test/TestEnumerateSecurityPackages.c +++ b/winpr/libwinpr/sspi/test/TestEnumerateSecurityPackages.c @@ -23,7 +23,7 @@ int TestEnumerateSecurityPackages(int argc, char* argv[]) printf("\nEnumerateSecurityPackages (%d):\n", (unsigned int)cPackages); - for (index = 0; index < cPackages; index++) + for (index = 0; index < (int) cPackages; index++) { printf("\"%s\", \"%s\"\n", pPackageInfo[index].Name, pPackageInfo[index].Comment); } diff --git a/winpr/libwinpr/thread/CMakeLists.txt b/winpr/libwinpr/thread/CMakeLists.txt index 8c729f340..66a354c50 100644 --- a/winpr/libwinpr/thread/CMakeLists.txt +++ b/winpr/libwinpr/thread/CMakeLists.txt @@ -27,6 +27,10 @@ set(${MODULE_PREFIX}_SRCS thread.c tls.c) +if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + if(WITH_MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() diff --git a/winpr/libwinpr/thread/module.def b/winpr/libwinpr/thread/module.def new file mode 100644 index 000000000..688109ba6 --- /dev/null +++ b/winpr/libwinpr/thread/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-thread" +EXPORTS + From 8d7495dba46be67227677c24645d0be3562bc5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 7 Oct 2012 17:54:19 -0400 Subject: [PATCH 19/43] libwinpr: add tests for CreatePipe --- winpr/libwinpr/pipe/test/TestPipeCreatePipe.c | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c b/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c index 4d596ed2a..ecf9b36fb 100644 --- a/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c +++ b/winpr/libwinpr/pipe/test/TestPipeCreatePipe.c @@ -5,8 +5,66 @@ #include #include +#define BUFFER_SIZE 16 + int TestPipeCreatePipe(int argc, char* argv[]) { + BOOL status; + DWORD dwRead; + DWORD dwWrite; + HANDLE hReadPipe; + HANDLE hWritePipe; + BYTE readBuffer[BUFFER_SIZE]; + BYTE writeBuffer[BUFFER_SIZE]; + + status = CreatePipe(&hReadPipe, &hWritePipe, NULL, BUFFER_SIZE * 2); + + if (!status) + { + _tprintf(_T("CreatePipe failed\n")); + return -1; + } + + FillMemory(writeBuffer, sizeof(writeBuffer), 0xAA); + status = WriteFile(hWritePipe, &writeBuffer, sizeof(writeBuffer), &dwWrite, NULL); + + if (!status) + { + _tprintf(_T("WriteFile failed\n")); + return -1; + } + + if (dwWrite != sizeof(writeBuffer)) + { + _tprintf(_T("WriteFile: unexpected number of bytes written: Actual: %d, Expected: %d\n"), + dwWrite, sizeof(writeBuffer)); + return -1; + } + + ZeroMemory(readBuffer, sizeof(readBuffer)); + status = ReadFile(hReadPipe, &readBuffer, sizeof(readBuffer), &dwRead, NULL); + + if (!status) + { + _tprintf(_T("ReadFile failed\n")); + return -1; + } + + if (dwRead != sizeof(readBuffer)) + { + _tprintf(_T("ReadFile: unexpected number of bytes read: Actual: %d, Expected: %d\n"), + dwWrite, sizeof(readBuffer)); + return -1; + } + + if (memcmp(readBuffer, writeBuffer, BUFFER_SIZE) != 0) + { + _tprintf(_T("ReadFile: read buffer is different from write buffer\n")); + return -1; + } + + CloseHandle(hReadPipe); + CloseHandle(hWritePipe); + return 0; } - From 9aa1217c4e8040d78ce64fc78068ef2a5ef17c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 7 Oct 2012 20:25:50 -0400 Subject: [PATCH 20/43] libwinpr-pipe: implement anonymous pipes --- winpr/include/winpr/handle.h | 2 + winpr/include/winpr/pipe.h | 1 + winpr/include/winpr/wtypes.h | 2 +- winpr/libwinpr/file/file.c | 50 +++++++++++++++++++++- winpr/libwinpr/handle/CMakeLists.txt | 14 +++++- winpr/libwinpr/handle/handle.c | 15 +++++++ winpr/libwinpr/path/test/TestPathIsUNCEx.c | 2 +- winpr/libwinpr/pipe/CMakeLists.txt | 2 +- winpr/libwinpr/pipe/pipe.c | 26 +++++++++++ winpr/libwinpr/synch/CMakeLists.txt | 5 +-- 10 files changed, 109 insertions(+), 10 deletions(-) diff --git a/winpr/include/winpr/handle.h b/winpr/include/winpr/handle.h index 3ae0bc5cb..f479a4a63 100644 --- a/winpr/include/winpr/handle.h +++ b/winpr/include/winpr/handle.h @@ -33,6 +33,8 @@ #define HANDLE_TYPE_MUTEX 3 #define HANDLE_TYPE_SEMAPHORE 4 #define HANDLE_TYPE_TIMER 5 +#define HANDLE_TYPE_NAMED_PIPE 6 +#define HANDLE_TYPE_ANONYMOUS_PIPE 7 WINPR_API HANDLE winpr_Handle_Insert(ULONG Type, PVOID Object); WINPR_API BOOL winpr_Handle_Remove(HANDLE handle); diff --git a/winpr/include/winpr/pipe.h b/winpr/include/winpr/pipe.h index 675065317..24ef3e779 100644 --- a/winpr/include/winpr/pipe.h +++ b/winpr/include/winpr/pipe.h @@ -20,6 +20,7 @@ #ifndef WINPR_PIPE_H #define WINPR_PIPE_H +#include #include #include #include diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 0fb299928..65868531c 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -70,7 +70,7 @@ typedef short SHORT; #define CONST const #define CALLBACK -typedef void* HANDLE, *LPHANDLE; +typedef void* HANDLE, *PHANDLE, *LPHANDLE; typedef HANDLE HINSTANCE; typedef HANDLE HMODULE; diff --git a/winpr/libwinpr/file/file.c b/winpr/libwinpr/file/file.c index 9ae9c831b..08f562d33 100644 --- a/winpr/libwinpr/file/file.c +++ b/winpr/libwinpr/file/file.c @@ -21,8 +21,14 @@ #include "config.h" #endif +#include + #include +#ifdef HAVE_UNISTD_H +#include +#endif + /** * api-ms-win-core-file-l1-2-0.dll: * @@ -134,7 +140,27 @@ BOOL DeleteFileW(LPCWSTR lpFileName) BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) { - return TRUE; + ULONG Type; + PVOID Object; + + if (!winpr_Handle_GetInfo(hFile, &Type, &Object)) + return FALSE; + + if (Type == HANDLE_TYPE_ANONYMOUS_PIPE) + { + int status; + int read_fd; + + read_fd = (int) ((ULONG_PTR) Object); + + status = read(read_fd, lpBuffer, nNumberOfBytesToRead); + + *lpNumberOfBytesRead = status; + + return TRUE; + } + + return FALSE; } BOOL ReadFileEx(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, @@ -152,7 +178,27 @@ BOOL ReadFileScatter(HANDLE hFile, FILE_SEGMENT_ELEMENT aSegmentArray[], BOOL WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped) { - return TRUE; + ULONG Type; + PVOID Object; + + if (!winpr_Handle_GetInfo(hFile, &Type, &Object)) + return FALSE; + + if (Type == HANDLE_TYPE_ANONYMOUS_PIPE) + { + int status; + int write_fd; + + write_fd = (int) ((ULONG_PTR) Object); + + status = write(write_fd, lpBuffer, nNumberOfBytesToWrite); + + *lpNumberOfBytesWritten = status; + + return TRUE; + } + + return FALSE; } BOOL WriteFileEx(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, diff --git a/winpr/libwinpr/handle/CMakeLists.txt b/winpr/libwinpr/handle/CMakeLists.txt index eb0a9db34..207d4885e 100644 --- a/winpr/libwinpr/handle/CMakeLists.txt +++ b/winpr/libwinpr/handle/CMakeLists.txt @@ -18,6 +18,9 @@ set(MODULE_NAME "winpr-handle") set(MODULE_PREFIX "WINPR_HANDLE") +set(CMAKE_THREAD_PREFER_PTHREAD) +find_required_package(Threads) + set(${MODULE_PREFIX}_SRCS handle.c table.c) @@ -34,9 +37,18 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +set(${MODULE_PREFIX}_LIBS + ${CMAKE_THREAD_LIBS_INIT} + ${CMAKE_DL_LIBS}) + +if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) + set(WINPR_SYNCH_LIBS ${WINPR_SYNCH_LIBS} rt) +endif() +if(WITH_MONOLITHIC_BUILD) + set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/handle/handle.c b/winpr/libwinpr/handle/handle.c index 4e0d9e840..13c59e601 100644 --- a/winpr/libwinpr/handle/handle.c +++ b/winpr/libwinpr/handle/handle.c @@ -85,6 +85,21 @@ BOOL CloseHandle(HANDLE hObject) return TRUE; } + else if (Type == HANDLE_TYPE_ANONYMOUS_PIPE) + { + int pipe_fd; + + pipe_fd = (int) ((ULONG_PTR) Object); + + if (pipe_fd != -1) + { + close(pipe_fd); + } + + winpr_Handle_Remove(Object); + + return TRUE; + } return FALSE; } diff --git a/winpr/libwinpr/path/test/TestPathIsUNCEx.c b/winpr/libwinpr/path/test/TestPathIsUNCEx.c index 40edfc86c..3cea93432 100644 --- a/winpr/libwinpr/path/test/TestPathIsUNCEx.c +++ b/winpr/libwinpr/path/test/TestPathIsUNCEx.c @@ -19,7 +19,7 @@ int TestPathIsUNCEx(int argc, char* argv[]) _tcscpy(Path, testPathUNC); - status = PathIsUNCEx(Path, (LPTSTR*) &Server); + status = PathIsUNCEx(Path, &Server); if (!status) { diff --git a/winpr/libwinpr/pipe/CMakeLists.txt b/winpr/libwinpr/pipe/CMakeLists.txt index 42ba8f3d3..45e824a24 100644 --- a/winpr/libwinpr/pipe/CMakeLists.txt +++ b/winpr/libwinpr/pipe/CMakeLists.txt @@ -36,7 +36,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO if(WITH_MONOLITHIC_BUILD) else() - target_link_libraries(${MODULE_NAME} winpr-crt) + target_link_libraries(${MODULE_NAME} winpr-crt winpr-file winpr-handle) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/winpr/libwinpr/pipe/pipe.c b/winpr/libwinpr/pipe/pipe.c index 4e857730f..14d784beb 100644 --- a/winpr/libwinpr/pipe/pipe.c +++ b/winpr/libwinpr/pipe/pipe.c @@ -22,13 +22,39 @@ #endif #include +#include #include +#ifdef HAVE_UNISTD_H +#include +#endif + #ifndef _WIN32 BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize) { + void* ptr; + HANDLE handle; + int pipe_fd[2]; + + pipe_fd[0] = -1; + pipe_fd[1] = -1; + + if (pipe(pipe_fd) < 0) + { + printf("CreatePipe: failed to create pipe\n"); + return FALSE; + } + + ptr = (void*) ((ULONG_PTR) pipe_fd[0]); + handle = winpr_Handle_Insert(HANDLE_TYPE_ANONYMOUS_PIPE, ptr); + *((ULONG_PTR*) hReadPipe) = (ULONG_PTR) handle; + + ptr = (void*) ((ULONG_PTR) pipe_fd[1]); + handle = winpr_Handle_Insert(HANDLE_TYPE_ANONYMOUS_PIPE, ptr); + *((ULONG_PTR*) hWritePipe) = (ULONG_PTR) handle; + return TRUE; } diff --git a/winpr/libwinpr/synch/CMakeLists.txt b/winpr/libwinpr/synch/CMakeLists.txt index d604bf08f..78f5de5af 100644 --- a/winpr/libwinpr/synch/CMakeLists.txt +++ b/winpr/libwinpr/synch/CMakeLists.txt @@ -60,10 +60,7 @@ endif() if(WITH_MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() - if(NOT WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) - endif() - + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() From 64316212828b679465f6a74f0bfe4505da8d59b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sun, 7 Oct 2012 22:53:24 -0400 Subject: [PATCH 21/43] channels: added generation of static channel entry table --- channels/CMakeLists.txt | 9 ++++++ channels/client/.gitignore | 2 ++ channels/client/CMakeLists.txt | 27 +++++++++++++++++ channels/client/loader.c | 45 ++++++++++++++++++++++++++++ channels/client/tables.c.in | 31 +++++++++++++++++++ channels/client/tables.h | 42 ++++++++++++++++++++++++++ channels/disk/CMakeLists.txt | 8 +++++ channels/disk/client/CMakeLists.txt | 11 ++++++- channels/disk/client/disk_main.c | 6 ++-- channels/rdpdr/CMakeLists.txt | 8 +++++ channels/rdpdr/client/CMakeLists.txt | 25 +++++++++++----- channels/rdpdr/client/rdpdr_main.c | 32 ++++++++++++++++++-- 12 files changed, 231 insertions(+), 15 deletions(-) create mode 100644 channels/client/.gitignore create mode 100644 channels/client/tables.c.in create mode 100644 channels/client/tables.h diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index 09cba743f..eb83700af 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +if(WITH_STATIC_PLUGINS) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() + set(FILENAME "ChannelOptions.cmake") file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") @@ -30,6 +34,11 @@ foreach(FILEPATH ${FILEPATHS}) endif() endforeach(FILEPATH) +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + if(WITH_SERVER_CHANNELS) add_subdirectory(server) endif() + diff --git a/channels/client/.gitignore b/channels/client/.gitignore new file mode 100644 index 000000000..aa03c94be --- /dev/null +++ b/channels/client/.gitignore @@ -0,0 +1,2 @@ +tables.c + diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt index f628bd0b1..67e3e4ab9 100644 --- a/channels/client/CMakeLists.txt +++ b/channels/client/CMakeLists.txt @@ -19,8 +19,35 @@ set(MODULE_NAME "freerdp-channels-client") set(MODULE_PREFIX "FREERDP_CHANNELS_CLIENT") set(${MODULE_PREFIX}_SRCS + tables.c + tables.h loader.c) +foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES}) + + set(STATIC_MODULE_NAME ${${STATIC_MODULE}_CLIENT_NAME}) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${STATIC_MODULE_NAME}) + + if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry") + set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}") + set(ENTRY_POINT_IMPORT "extern int ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS pEntryPoints);") + set(VIRTUAL_CHANNEL_ENTRY_IMPORTS "${VIRTUAL_CHANNEL_ENTRY_IMPORTS}\n${VIRTUAL_CHANNEL_ENTRY_IMPORTS}${ENTRY_POINT_IMPORT}") + set(VIRTUAL_CHANNEL_ENTRY_TABLE "${VIRTUAL_CHANNEL_ENTRY_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },") + endif() + + if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "DeviceServiceEntry") + set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}") + set(ENTRY_POINT_IMPORT "extern int ${ENTRY_POINT_NAME}(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints);") + set(DEVICE_SERVICE_ENTRY_IMPORTS "${DEVICE_SERVICE_ENTRY_IMPORTS}\n${DEVICE_SERVICE_ENTRY_IMPORTS}${ENTRY_POINT_IMPORT}") + set(DEVICE_SERVICE_ENTRY_TABLE "${DEVICE_SERVICE_ENTRY_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },") + endif() +endforeach() + +set(VIRTUAL_CHANNEL_ENTRY_TABLE "${VIRTUAL_CHANNEL_ENTRY_TABLE}\n\t{ \"\", NULL }") +set(DEVICE_SERVICE_ENTRY_TABLE "${DEVICE_SERVICE_ENTRY_TABLE}\n\t{ \"\", NULL }") + +configure_file(tables.c.in tables.c) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") diff --git a/channels/client/loader.c b/channels/client/loader.c index b3513115f..884864b92 100644 --- a/channels/client/loader.c +++ b/channels/client/loader.c @@ -17,4 +17,49 @@ * limitations under the License. */ +#include "tables.h" +#include +#include +#include + +extern const VIRTUAL_CHANNEL_ENTRY VIRTUAL_CHANNEL_TABLE[]; +extern const DEVICE_SERVICE_ENTRY DEVICE_SERVICE_TABLE[]; + +void* freerdp_channels_find_static_entry(const char* name, const char* entry) +{ + if (strcmp(entry, "VirtualChannelEntry") == 0) + { + VIRTUAL_CHANNEL_ENTRY* pEntry; + + pEntry = (VIRTUAL_CHANNEL_ENTRY*) &VIRTUAL_CHANNEL_TABLE[0]; + + while (pEntry != NULL) + { + if (strcmp(pEntry->name, name) == 0) + { + return (void*) pEntry->entry; + } + + return NULL; + } + } + else if (strcmp(entry, "DeviceServiceEntry") == 0) + { + DEVICE_SERVICE_ENTRY* pEntry; + + pEntry = (DEVICE_SERVICE_ENTRY*) &DEVICE_SERVICE_TABLE[0]; + + while (pEntry != NULL) + { + if (strcmp(pEntry->name, name) == 0) + { + return (void*) pEntry->entry; + } + + return NULL; + } + } + + return NULL; +} diff --git a/channels/client/tables.c.in b/channels/client/tables.c.in new file mode 100644 index 000000000..087dc827e --- /dev/null +++ b/channels/client/tables.c.in @@ -0,0 +1,31 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Static Entry Point Tables + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "tables.h" +${VIRTUAL_CHANNEL_ENTRY_IMPORTS} +${DEVICE_SERVICE_ENTRY_IMPORTS} + +const VIRTUAL_CHANNEL_ENTRY VIRTUAL_CHANNEL_TABLE[] = +{${VIRTUAL_CHANNEL_ENTRY_TABLE} +}; + +const DEVICE_SERVICE_ENTRY DEVICE_SERVICE_TABLE[] = +{${DEVICE_SERVICE_ENTRY_TABLE} +}; + diff --git a/channels/client/tables.h b/channels/client/tables.h new file mode 100644 index 000000000..3851748e4 --- /dev/null +++ b/channels/client/tables.h @@ -0,0 +1,42 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Static Entry Point Tables + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#ifndef PDEVICE_SERVICE_ENTRY_POINTS +#define PDEVICE_SERVICE_ENTRY_POINTS void* +#endif + +typedef int (*VIRTUAL_CHANNEL_ENTRY_FN)(PCHANNEL_ENTRY_POINTS pEntryPoints); +typedef int (*DEVICE_SERVICE_ENTRY_FN)(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints); + +struct _VIRTUAL_CHANNEL_ENTRY +{ + const char* name; + const VIRTUAL_CHANNEL_ENTRY_FN entry; +}; +typedef struct _VIRTUAL_CHANNEL_ENTRY VIRTUAL_CHANNEL_ENTRY; + +struct _DEVICE_SERVICE_ENTRY +{ + const char* name; + const DEVICE_SERVICE_ENTRY_FN entry; +}; +typedef struct _DEVICE_SERVICE_ENTRY DEVICE_SERVICE_ENTRY; + diff --git a/channels/disk/CMakeLists.txt b/channels/disk/CMakeLists.txt index 676de4e85..e9b0c0846 100644 --- a/channels/disk/CMakeLists.txt +++ b/channels/disk/CMakeLists.txt @@ -15,7 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "disk") +set(MODULE_PREFIX "CHANNEL_RDPDR_DISK") + if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index a2c9d6b01..586c89462 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -36,7 +36,16 @@ endif() include_directories(../../rdpdr/client) -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "DeviceServiceEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index d79100782..b996c6d6b 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -695,10 +695,10 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na } #ifdef WITH_STATIC_PLUGINS -int disk_entry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) -#else -int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) +#define DeviceServiceEntry disk_DeviceServiceEntry #endif + +const int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) { char* name; char* path; diff --git a/channels/rdpdr/CMakeLists.txt b/channels/rdpdr/CMakeLists.txt index 676de4e85..1d8adcfc8 100644 --- a/channels/rdpdr/CMakeLists.txt +++ b/channels/rdpdr/CMakeLists.txt @@ -15,7 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "rdpdr") +set(MODULE_PREFIX "CHANNEL_RDPDR") + if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index 18856aad8..c9969b253 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -19,22 +19,31 @@ set(MODULE_NAME "rdpdr") set(MODULE_PREFIX "CHANNEL_RDPDR_CLIENT") set(${MODULE_PREFIX}_SRCS - rdpdr_constants.h - rdpdr_types.h - rdpdr_capabilities.c - rdpdr_capabilities.h - devman.c - devman.h irp.c irp.h + devman.c + devman.h rdpdr_main.c - rdpdr_main.h) + rdpdr_main.h + rdpdr_types.h + rdpdr_constants.h + rdpdr_capabilities.c + rdpdr_capabilities.h) if(MSVC AND (NOT WITH_STATIC_PLUGINS)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 188999a0e..eaf92b526 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -26,6 +26,8 @@ #include #include +#include + #include #include #include @@ -313,6 +315,30 @@ static void rdpdr_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -DEFINE_SVC_PLUGIN(rdpdr, "rdpdr", - CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP | - CHANNEL_OPTION_COMPRESS_RDP) +#ifdef WITH_STATIC_PLUGINS +#define VirtualChannelEntry rdpdr_VirtualChannelEntry +#endif + +const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) +{ + rdpdrPlugin* _p; + + _p = (rdpdrPlugin*) malloc(sizeof(rdpdrPlugin)); + ZeroMemory(_p, sizeof(rdpdrPlugin)); + + _p->plugin.channel_def.options = + CHANNEL_OPTION_INITIALIZED | + CHANNEL_OPTION_ENCRYPT_RDP | + CHANNEL_OPTION_COMPRESS_RDP; + + strcpy(_p->plugin.channel_def.name, "rdpdr"); + + _p->plugin.connect_callback = rdpdr_process_connect; + _p->plugin.receive_callback = rdpdr_process_receive; + _p->plugin.event_callback = rdpdr_process_event; + _p->plugin.terminate_callback = rdpdr_process_terminate; + + svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints); + + return 1; +} From 829723582e929e75bb5c69ecd308eca04ac3fb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 16:12:03 -0400 Subject: [PATCH 22/43] sfreerdp-server: cleanup sample server code --- channels/server/CMakeLists.txt | 1 + server/Sample/CMakeLists.txt | 8 +- server/Sample/sf_audin.c | 76 +++++++++++++ server/Sample/sf_audin.h | 32 ++++++ server/Sample/sf_rdpsnd.c | 62 +++++++++++ server/Sample/sf_rdpsnd.h | 32 ++++++ server/Sample/{tfreerdp.c => sfreerdp.c} | 131 ++++++++--------------- server/Sample/sfreerdp.h | 57 ++++++++++ 8 files changed, 310 insertions(+), 89 deletions(-) create mode 100644 server/Sample/sf_audin.c create mode 100644 server/Sample/sf_audin.h create mode 100644 server/Sample/sf_rdpsnd.c create mode 100644 server/Sample/sf_rdpsnd.h rename server/Sample/{tfreerdp.c => sfreerdp.c} (87%) create mode 100644 server/Sample/sfreerdp.h diff --git a/channels/server/CMakeLists.txt b/channels/server/CMakeLists.txt index 793564e05..bfc2b2177 100644 --- a/channels/server/CMakeLists.txt +++ b/channels/server/CMakeLists.txt @@ -37,3 +37,4 @@ target_link_libraries(${MODULE_NAME} ${CHANNEL_SERVER_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server") + diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index a1b510580..3608c3f61 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -19,7 +19,12 @@ set(MODULE_NAME "sfreerdp-server") set(MODULE_PREFIX "FREERDP_SERVER_SAMPLE") set(${MODULE_PREFIX}_SRCS - tfreerdp.c) + sfreerdp.c + sfreerdp.h + sf_audin.c + sf_audin.h + sf_rdpsnd.c + sf_rdpsnd.h) add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -37,3 +42,4 @@ else() endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample") + diff --git a/server/Sample/sf_audin.c b/server/Sample/sf_audin.c new file mode 100644 index 000000000..807af2a4e --- /dev/null +++ b/server/Sample/sf_audin.c @@ -0,0 +1,76 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * FreeRDP Sample Server (Audio Input) + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "sfreerdp.h" + +#include "sf_audin.h" + +static const rdpsndFormat test_audio_formats[] = +{ + { 0x11, 2, 22050, 1024, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 2 channels */ + { 0x11, 1, 22050, 512, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 1 channels */ + { 0x01, 2, 22050, 4, 16, 0, NULL }, /* PCM, 22050 Hz, 2 channels, 16 bits */ + { 0x01, 1, 22050, 2, 16, 0, NULL }, /* PCM, 22050 Hz, 1 channels, 16 bits */ + { 0x01, 2, 44100, 4, 16, 0, NULL }, /* PCM, 44100 Hz, 2 channels, 16 bits */ + { 0x01, 1, 44100, 2, 16, 0, NULL }, /* PCM, 44100 Hz, 1 channels, 16 bits */ + { 0x01, 2, 11025, 4, 16, 0, NULL }, /* PCM, 11025 Hz, 2 channels, 16 bits */ + { 0x01, 1, 11025, 2, 16, 0, NULL }, /* PCM, 11025 Hz, 1 channels, 16 bits */ + { 0x01, 2, 8000, 4, 16, 0, NULL }, /* PCM, 8000 Hz, 2 channels, 16 bits */ + { 0x01, 1, 8000, 2, 16, 0, NULL } /* PCM, 8000 Hz, 1 channels, 16 bits */ +}; + +static void sf_peer_audin_opening(audin_server_context* context) +{ + printf("AUDIN opening.\n"); + /* Simply choose the first format supported by the client. */ + context->SelectFormat(context, 0); +} + +static void sf_peer_audin_open_result(audin_server_context* context, uint32 result) +{ + printf("AUDIN open result %d.\n", result); +} + +static void sf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes) +{ + printf("AUDIN receive %d frames.\n", nframes); +} + +void sf_peer_audin_init(testPeerContext* context) +{ + context->audin = audin_server_context_new(context->vcm); + context->audin->data = context; + + context->audin->server_formats = test_audio_formats; + context->audin->num_server_formats = + sizeof(test_audio_formats) / sizeof(test_audio_formats[0]); + + context->audin->dst_format.wFormatTag = 1; + context->audin->dst_format.nChannels = 2; + context->audin->dst_format.nSamplesPerSec = 44100; + context->audin->dst_format.wBitsPerSample = 16; + + context->audin->Opening = sf_peer_audin_opening; + context->audin->OpenResult = sf_peer_audin_open_result; + context->audin->ReceiveSamples = sf_peer_audin_receive_samples; +} diff --git a/server/Sample/sf_audin.h b/server/Sample/sf_audin.h new file mode 100644 index 000000000..51ec4b31a --- /dev/null +++ b/server/Sample/sf_audin.h @@ -0,0 +1,32 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * FreeRDP Sample Server (Audio Input) + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SF_AUDIN_H +#define SF_AUDIN_H + +#include +#include +#include + +#include "sfreerdp.h" + +void sf_peer_audin_init(testPeerContext* context); + +#endif /* WF_AUDIN_H */ + diff --git a/server/Sample/sf_rdpsnd.c b/server/Sample/sf_rdpsnd.c new file mode 100644 index 000000000..3508edca2 --- /dev/null +++ b/server/Sample/sf_rdpsnd.c @@ -0,0 +1,62 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * FreeRDP Sample Server (Audio Output) + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include "sf_rdpsnd.h" + +static const rdpsndFormat test_audio_formats[] = +{ + { 0x11, 2, 22050, 1024, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 2 channels */ + { 0x11, 1, 22050, 512, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 1 channels */ + { 0x01, 2, 22050, 4, 16, 0, NULL }, /* PCM, 22050 Hz, 2 channels, 16 bits */ + { 0x01, 1, 22050, 2, 16, 0, NULL }, /* PCM, 22050 Hz, 1 channels, 16 bits */ + { 0x01, 2, 44100, 4, 16, 0, NULL }, /* PCM, 44100 Hz, 2 channels, 16 bits */ + { 0x01, 1, 44100, 2, 16, 0, NULL }, /* PCM, 44100 Hz, 1 channels, 16 bits */ + { 0x01, 2, 11025, 4, 16, 0, NULL }, /* PCM, 11025 Hz, 2 channels, 16 bits */ + { 0x01, 1, 11025, 2, 16, 0, NULL }, /* PCM, 11025 Hz, 1 channels, 16 bits */ + { 0x01, 2, 8000, 4, 16, 0, NULL }, /* PCM, 8000 Hz, 2 channels, 16 bits */ + { 0x01, 1, 8000, 2, 16, 0, NULL } /* PCM, 8000 Hz, 1 channels, 16 bits */ +}; + +static void sf_peer_rdpsnd_activated(rdpsnd_server_context* context) +{ + printf("RDPSND Activated\n"); +} + +void sf_peer_rdpsnd_init(testPeerContext* context) +{ + context->rdpsnd = rdpsnd_server_context_new(context->vcm); + context->rdpsnd->data = context; + + context->rdpsnd->server_formats = test_audio_formats; + context->rdpsnd->num_server_formats = + sizeof(test_audio_formats) / sizeof(test_audio_formats[0]); + + context->rdpsnd->src_format.wFormatTag = 1; + context->rdpsnd->src_format.nChannels = 2; + context->rdpsnd->src_format.nSamplesPerSec = 44100; + context->rdpsnd->src_format.wBitsPerSample = 16; + + context->rdpsnd->Activated = sf_peer_rdpsnd_activated; +} diff --git a/server/Sample/sf_rdpsnd.h b/server/Sample/sf_rdpsnd.h new file mode 100644 index 000000000..98a3d6515 --- /dev/null +++ b/server/Sample/sf_rdpsnd.h @@ -0,0 +1,32 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * FreeRDP Sample Server (Audio Output) + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SF_RDPSND_H +#define SF_RDPSND_H + +#include +#include +#include + +#include "sfreerdp.h" + +void sf_peer_rdpsnd_init(testPeerContext* context); + +#endif /* SF_RDPSND_H */ + diff --git a/server/Sample/tfreerdp.c b/server/Sample/sfreerdp.c similarity index 87% rename from server/Sample/tfreerdp.c rename to server/Sample/sfreerdp.c index d3052ccc7..6187face3 100644 --- a/server/Sample/tfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -33,12 +33,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include + +#include "sf_audin.h" +#include "sf_rdpsnd.h" + +#include "sfreerdp.h" static char* test_pcap_file = NULL; static boolean test_dump_rfx_realtime = true; @@ -49,43 +49,6 @@ static const unsigned int test_quantization_values[] = 6, 6, 6, 6, 7, 7, 8, 8, 8, 9 }; -static const rdpsndFormat test_audio_formats[] = -{ - { 0x11, 2, 22050, 1024, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 2 channels */ - { 0x11, 1, 22050, 512, 4, 0, NULL }, /* IMA ADPCM, 22050 Hz, 1 channels */ - { 0x01, 2, 22050, 4, 16, 0, NULL }, /* PCM, 22050 Hz, 2 channels, 16 bits */ - { 0x01, 1, 22050, 2, 16, 0, NULL }, /* PCM, 22050 Hz, 1 channels, 16 bits */ - { 0x01, 2, 44100, 4, 16, 0, NULL }, /* PCM, 44100 Hz, 2 channels, 16 bits */ - { 0x01, 1, 44100, 2, 16, 0, NULL }, /* PCM, 44100 Hz, 1 channels, 16 bits */ - { 0x01, 2, 11025, 4, 16, 0, NULL }, /* PCM, 11025 Hz, 2 channels, 16 bits */ - { 0x01, 1, 11025, 2, 16, 0, NULL }, /* PCM, 11025 Hz, 1 channels, 16 bits */ - { 0x01, 2, 8000, 4, 16, 0, NULL }, /* PCM, 8000 Hz, 2 channels, 16 bits */ - { 0x01, 1, 8000, 2, 16, 0, NULL } /* PCM, 8000 Hz, 1 channels, 16 bits */ -}; - -struct test_peer_context -{ - rdpContext _p; - - RFX_CONTEXT* rfx_context; - NSC_CONTEXT* nsc_context; - STREAM* s; - uint8* icon_data; - uint8* bg_data; - int icon_width; - int icon_height; - int icon_x; - int icon_y; - boolean activated; - WTSVirtualChannelManager* vcm; - void* debug_channel; - freerdp_thread* debug_channel_thread; - audin_server_context* audin; - boolean audin_open; - uint32 frame_id; -}; -typedef struct test_peer_context testPeerContext; - void test_peer_context_new(freerdp_peer* client, testPeerContext* context) { context->rfx_context = rfx_context_new(); @@ -114,19 +77,23 @@ void test_peer_context_free(freerdp_peer* client, testPeerContext* context) freerdp_thread_stop(context->debug_channel_thread); freerdp_thread_free(context->debug_channel_thread); } + stream_free(context->s); xfree(context->icon_data); xfree(context->bg_data); + rfx_context_free(context->rfx_context); nsc_context_free(context->nsc_context); + if (context->debug_channel) - { WTSVirtualChannelClose(context->debug_channel); - } + if (context->audin) - { audin_server_context_free(context->audin); - } + + if (context->rdpsnd) + rdpsnd_server_context_free(context->rdpsnd); + WTSDestroyVirtualChannelManager(context->vcm); } } @@ -172,13 +139,13 @@ static void test_peer_end_frame(freerdp_peer* client) static void test_peer_draw_background(freerdp_peer* client) { - testPeerContext* context = (testPeerContext*) client->context; - rdpUpdate* update = client->update; - SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; + int size; STREAM* s; RFX_RECT rect; uint8* rgb_data; - int size; + rdpUpdate* update = client->update; + SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; + testPeerContext* context = (testPeerContext*) client->context; if (!client->settings->rfx_codec && !client->settings->ns_codec) return; @@ -270,16 +237,18 @@ static void test_peer_load_icon(freerdp_peer* client) static void test_peer_draw_icon(freerdp_peer* client, int x, int y) { - testPeerContext* context = (testPeerContext*) client->context; + STREAM* s; + RFX_RECT rect; rdpUpdate* update = client->update; SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; - RFX_RECT rect; - STREAM* s; + testPeerContext* context = (testPeerContext*) client->context; if (client->update->dump_rfx) return; + if (!context) return; + if (context->icon_width < 1 || !context->activated) return; @@ -319,6 +288,7 @@ static void test_peer_draw_icon(freerdp_peer* client, int x, int y) } s = test_peer_stream_init(context); + if (client->settings->rfx_codec) { rfx_compose_message(context->rfx_context, s, @@ -447,16 +417,20 @@ static void* tf_debug_channel_thread_func(void* arg) while (1) { freerdp_thread_wait(thread); + if (freerdp_thread_is_stopped(thread)) break; stream_set_pos(s, 0); + if (WTSVirtualChannelRead(context->debug_channel, 0, stream_get_head(s), stream_get_size(s), &bytes_returned) == false) { if (bytes_returned == 0) break; + stream_check_size(s, bytes_returned); + if (WTSVirtualChannelRead(context->debug_channel, 0, stream_get_head(s), stream_get_size(s), &bytes_returned) == false) { @@ -464,6 +438,7 @@ static void* tf_debug_channel_thread_func(void* arg) break; } } + stream_set_pos(s, bytes_returned); printf("got %d bytes\n", bytes_returned); @@ -475,23 +450,6 @@ static void* tf_debug_channel_thread_func(void* arg) return 0; } -static void tf_peer_audin_opening(audin_server_context* context) -{ - printf("AUDIN opening.\n"); - /* Simply choose the first format supported by the client. */ - context->SelectFormat(context, 0); -} - -static void tf_peer_audin_open_result(audin_server_context* context, uint32 result) -{ - printf("AUDIN open result %d.\n", result); -} - -static void tf_peer_audin_receive_samples(audin_server_context* context, const void* buf, int nframes) -{ - printf("AUDIN recieve %d frames.\n", nframes); -} - boolean tf_peer_post_connect(freerdp_peer* client) { int i; @@ -503,8 +461,10 @@ boolean tf_peer_post_connect(freerdp_peer* client) * The server may start sending graphics output and receiving keyboard/mouse input after this * callback returns. */ + printf("Client %s is activated (osMajorType %d osMinorType %d)", client->local ? "(local)" : client->hostname, - client->settings->os_major_type, client->settings->os_minor_type); + client->settings->os_major_type, client->settings->os_minor_type); + if (client->settings->autologon) { printf(" and wants to login automatically as %s\\%s", @@ -529,6 +489,7 @@ boolean tf_peer_post_connect(freerdp_peer* client) if (strncmp(client->settings->channels[i].name, "rdpdbg", 6) == 0) { context->debug_channel = WTSVirtualChannelOpenEx(context->vcm, "rdpdbg", 0); + if (context->debug_channel != NULL) { printf("Open channel rdpdbg.\n"); @@ -540,21 +501,11 @@ boolean tf_peer_post_connect(freerdp_peer* client) } } - context->audin = audin_server_context_new(context->vcm); - context->audin->data = context; - context->audin->server_formats = test_audio_formats; - context->audin->num_server_formats = ARRAY_SIZE(test_audio_formats); - - context->audin->dst_format.wFormatTag = 1; /* Final output format, PCM only */ - context->audin->dst_format.nChannels = 2; - context->audin->dst_format.nSamplesPerSec = 44100; - context->audin->dst_format.wBitsPerSample = 16; - - context->audin->Opening = tf_peer_audin_opening; - context->audin->OpenResult = tf_peer_audin_open_result; - context->audin->ReceiveSamples = tf_peer_audin_receive_samples; + sf_peer_audin_init(context); /* Audio Input */ + sf_peer_rdpsnd_init(context); /* Audio Output */ /* Return false here would stop the execution of the peer mainloop. */ + return true; } @@ -591,7 +542,7 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) printf("Client sent a keyboard event (flags:0x%X code:0x%X)\n", flags, code); - if ((flags & 0x4000) && code == 0x1F) /* 's' key */ + if ((flags & 0x4000) && code == 0x22) /* 'g' key */ { if (client->settings->width != 800) { @@ -630,6 +581,10 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) context->audin_open = false; } } + else if ((flags & 0x4000) && code == 0x1F) /* 's' key */ + { + + } } void tf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) @@ -639,14 +594,14 @@ void tf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) void tf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) { - printf("Client sent a mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); + //printf("Client sent a mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); test_peer_draw_icon(input->context->peer, x + 10, y); } void tf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) { - printf("Client sent an extended mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); + //printf("Client sent an extended mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); } static void tf_peer_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* areas) diff --git a/server/Sample/sfreerdp.h b/server/Sample/sfreerdp.h new file mode 100644 index 000000000..35994d9fc --- /dev/null +++ b/server/Sample/sfreerdp.h @@ -0,0 +1,57 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * FreeRDP Sample Server + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SFREERDP_SERVER_H +#define SFREERDP_SERVER_H + +#include +#include +#include +#include +#include +#include +#include +#include + +struct test_peer_context +{ + rdpContext _p; + + RFX_CONTEXT* rfx_context; + NSC_CONTEXT* nsc_context; + STREAM* s; + uint8* icon_data; + uint8* bg_data; + int icon_width; + int icon_height; + int icon_x; + int icon_y; + boolean activated; + WTSVirtualChannelManager* vcm; + void* debug_channel; + freerdp_thread* debug_channel_thread; + audin_server_context* audin; + boolean audin_open; + uint32 frame_id; + rdpsnd_server_context* rdpsnd; +}; +typedef struct test_peer_context testPeerContext; + +#endif /* SFREERDP_SERVER_H */ + From 84f88883e9cf3d32b01d7485f276ff4b238f559c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 16:29:40 -0400 Subject: [PATCH 23/43] sfreerdp-server: get rdpsnd channel to initialize --- channels/audin/server/audin.c | 1 + channels/rdpsnd/server/rdpsnd.c | 29 ++++++++++++++++++++--------- server/Sample/sf_rdpsnd.c | 6 +++++- server/Sample/sf_rdpsnd.h | 2 +- server/Sample/sfreerdp.c | 8 +++++++- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 3f51f0a2b..ae2f2bb05 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -373,6 +373,7 @@ static boolean audin_server_open(audin_server_context* context) if (audin->audin_channel_thread == NULL) { audin->audin_channel = WTSVirtualChannelOpenEx(context->vcm, "AUDIO_INPUT", WTS_CHANNEL_OPTION_DYNAMIC); + if (audin->audin_channel == NULL) return false; diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index 61a080a20..cfe273f0d 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -91,12 +91,15 @@ static boolean rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) stream_write_uint16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */ stream_write_uint16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */ stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */ + stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec * rdpsnd->context.server_formats[i].nChannels * rdpsnd->context.server_formats[i].wBitsPerSample / 8); /* nAvgBytesPerSec */ + stream_write_uint16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */ stream_write_uint16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */ stream_write_uint16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */ + if (rdpsnd->context.server_formats[i].cbSize > 0) { stream_write(s, rdpsnd->context.server_formats[i].data, rdpsnd->context.server_formats[i].cbSize); @@ -296,19 +299,20 @@ static void rdpsnd_server_select_format(rdpsnd_server_context* context, int clie static boolean rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) { - STREAM* s = rdpsnd->rdpsnd_pdu; - rdpsndFormat* format; - int tbytes_per_frame; - uint8* src; int size; + boolean r; + uint8* src; int frames; int fill_size; - boolean r; + rdpsndFormat* format; + int tbytes_per_frame; + STREAM* s = rdpsnd->rdpsnd_pdu; format = &rdpsnd->context.client_formats[rdpsnd->context.selected_client_format]; tbytes_per_frame = format->nChannels * rdpsnd->src_bytes_per_sample; - if (format->nSamplesPerSec == rdpsnd->context.src_format.nSamplesPerSec && format->nChannels == rdpsnd->context.src_format.nChannels) + if ((format->nSamplesPerSec == rdpsnd->context.src_format.nSamplesPerSec) && + (format->nChannels == rdpsnd->context.src_format.nChannels)) { src = rdpsnd->out_buffer; frames = rdpsnd->out_pending_frames; @@ -366,6 +370,7 @@ static boolean rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) stream_check_size(s, size + fill_size); stream_write_uint32(s, 0); /* bPad */ stream_write(s, src + 4, size - 4); + if (fill_size > 0) stream_write_zero(s, fill_size); @@ -390,9 +395,9 @@ static boolean rdpsnd_server_send_samples(rdpsnd_server_context* context, const { cframes = MIN(nframes, rdpsnd->out_frames - rdpsnd->out_pending_frames); cframesize = cframes * rdpsnd->src_bytes_per_frame; - memcpy(rdpsnd->out_buffer + (rdpsnd->out_pending_frames * rdpsnd->src_bytes_per_frame), - buf, cframesize); - buf = (uint8*)buf + cframesize; + + memcpy(rdpsnd->out_buffer + (rdpsnd->out_pending_frames * rdpsnd->src_bytes_per_frame), buf, cframesize); + buf = (uint8*) buf + cframesize; nframes -= cframes; rdpsnd->out_pending_frames += cframes; @@ -466,15 +471,21 @@ void rdpsnd_server_context_free(rdpsnd_server_context* context) freerdp_thread_stop(rdpsnd->rdpsnd_channel_thread); freerdp_thread_free(rdpsnd->rdpsnd_channel_thread); } + if (rdpsnd->rdpsnd_channel) WTSVirtualChannelClose(rdpsnd->rdpsnd_channel); + if (rdpsnd->rdpsnd_pdu) stream_free(rdpsnd->rdpsnd_pdu); + if (rdpsnd->out_buffer) xfree(rdpsnd->out_buffer); + if (rdpsnd->dsp_context) freerdp_dsp_context_free(rdpsnd->dsp_context); + if (rdpsnd->context.client_formats) xfree(rdpsnd->context.client_formats); + xfree(rdpsnd); } diff --git a/server/Sample/sf_rdpsnd.c b/server/Sample/sf_rdpsnd.c index 3508edca2..6775dd3ba 100644 --- a/server/Sample/sf_rdpsnd.c +++ b/server/Sample/sf_rdpsnd.c @@ -44,7 +44,7 @@ static void sf_peer_rdpsnd_activated(rdpsnd_server_context* context) printf("RDPSND Activated\n"); } -void sf_peer_rdpsnd_init(testPeerContext* context) +boolean sf_peer_rdpsnd_init(testPeerContext* context) { context->rdpsnd = rdpsnd_server_context_new(context->vcm); context->rdpsnd->data = context; @@ -59,4 +59,8 @@ void sf_peer_rdpsnd_init(testPeerContext* context) context->rdpsnd->src_format.wBitsPerSample = 16; context->rdpsnd->Activated = sf_peer_rdpsnd_activated; + + context->rdpsnd->Initialize(context->rdpsnd); + + return true; } diff --git a/server/Sample/sf_rdpsnd.h b/server/Sample/sf_rdpsnd.h index 98a3d6515..f9ebef8a5 100644 --- a/server/Sample/sf_rdpsnd.h +++ b/server/Sample/sf_rdpsnd.h @@ -26,7 +26,7 @@ #include "sfreerdp.h" -void sf_peer_rdpsnd_init(testPeerContext* context); +boolean sf_peer_rdpsnd_init(testPeerContext* context); #endif /* SF_RDPSND_H */ diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 6187face3..820c0187f 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -482,6 +482,7 @@ boolean tf_peer_post_connect(freerdp_peer* client) test_peer_load_icon(client); /* Iterate all channel names requested by the client and activate those supported by the server */ + for (i = 0; i < client->settings->num_channels; i++) { if (client->settings->channels[i].joined) @@ -498,11 +499,16 @@ boolean tf_peer_post_connect(freerdp_peer* client) tf_debug_channel_thread_func, context); } } + else if (strncmp(client->settings->channels[i].name, "rdpsnd", 6) == 0) + { + sf_peer_rdpsnd_init(context); /* Audio Output */ + } } } + /* Dynamic Virtual Channels */ + sf_peer_audin_init(context); /* Audio Input */ - sf_peer_rdpsnd_init(context); /* Audio Output */ /* Return false here would stop the execution of the peer mainloop. */ From 93f88d1c48872d9e727146c3db0e36def6dd11f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 19:54:11 -0400 Subject: [PATCH 24/43] channels: added support for loading plugins from a static entry table --- channels/client/CMakeLists.txt | 2 +- channels/client/{loader.c => channels.c} | 73 +++++++++++++++--------- channels/rdpsnd/CMakeLists.txt | 5 ++ channels/rdpsnd/client/CMakeLists.txt | 17 ++++-- channels/rdpsnd/client/rdpsnd_main.c | 30 +++++++++- client/X11/CMakeLists.txt | 4 ++ client/X11/xfreerdp.c | 27 +++++++-- include/CMakeLists.txt | 5 +- include/freerdp/channels/channels.h | 2 + include/freerdp/client/channels.h | 30 ++++++++++ libfreerdp/channels/CMakeLists.txt | 4 ++ libfreerdp/channels/libchannels.c | 43 ++++++++------ 12 files changed, 184 insertions(+), 58 deletions(-) rename channels/client/{loader.c => channels.c} (53%) create mode 100644 include/freerdp/client/channels.h diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt index 67e3e4ab9..30f746848 100644 --- a/channels/client/CMakeLists.txt +++ b/channels/client/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "FREERDP_CHANNELS_CLIENT") set(${MODULE_PREFIX}_SRCS tables.c tables.h - loader.c) + channels.c) foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES}) diff --git a/channels/client/loader.c b/channels/client/channels.c similarity index 53% rename from channels/client/loader.c rename to channels/client/channels.c index 884864b92..dca5ba2d3 100644 --- a/channels/client/loader.c +++ b/channels/client/channels.c @@ -1,6 +1,6 @@ /** * FreeRDP: A Remote Desktop Protocol Implementation - * Client Channel Loader + * Client Channels * * Copyright 2012 Marc-Andre Moreau * @@ -23,43 +23,62 @@ #include #include +#include + extern const VIRTUAL_CHANNEL_ENTRY VIRTUAL_CHANNEL_TABLE[]; extern const DEVICE_SERVICE_ENTRY DEVICE_SERVICE_TABLE[]; +void* freerdp_channels_find_static_virtual_channel_entry(const char* name) +{ + int index = 0; + VIRTUAL_CHANNEL_ENTRY* pEntry; + + pEntry = (VIRTUAL_CHANNEL_ENTRY*) &VIRTUAL_CHANNEL_TABLE[index++]; + + while (pEntry->entry != NULL) + { + if (strcmp(pEntry->name, name) == 0) + { + return (void*) pEntry->entry; + } + + pEntry = (VIRTUAL_CHANNEL_ENTRY*) &VIRTUAL_CHANNEL_TABLE[index++]; + } + + return NULL; +} + +void* freerdp_channels_find_static_device_service_entry(const char* name) +{ + int index = 0; + DEVICE_SERVICE_ENTRY* pEntry; + + pEntry = (DEVICE_SERVICE_ENTRY*) &DEVICE_SERVICE_TABLE[index++]; + + while (pEntry->entry != NULL) + { + if (strcmp(pEntry->name, name) == 0) + { + return (void*) pEntry->entry; + } + + pEntry = (DEVICE_SERVICE_ENTRY*) &DEVICE_SERVICE_TABLE[index++]; + } + + return NULL; +} + void* freerdp_channels_find_static_entry(const char* name, const char* entry) { if (strcmp(entry, "VirtualChannelEntry") == 0) { - VIRTUAL_CHANNEL_ENTRY* pEntry; - - pEntry = (VIRTUAL_CHANNEL_ENTRY*) &VIRTUAL_CHANNEL_TABLE[0]; - - while (pEntry != NULL) - { - if (strcmp(pEntry->name, name) == 0) - { - return (void*) pEntry->entry; - } - - return NULL; - } + return freerdp_channels_find_static_virtual_channel_entry(name); } else if (strcmp(entry, "DeviceServiceEntry") == 0) { - DEVICE_SERVICE_ENTRY* pEntry; - - pEntry = (DEVICE_SERVICE_ENTRY*) &DEVICE_SERVICE_TABLE[0]; - - while (pEntry != NULL) - { - if (strcmp(pEntry->name, name) == 0) - { - return (void*) pEntry->entry; - } - - return NULL; - } + return freerdp_channels_find_static_device_service_entry(name); } return NULL; } + diff --git a/channels/rdpsnd/CMakeLists.txt b/channels/rdpsnd/CMakeLists.txt index 14ce938d1..cc57e41f1 100644 --- a/channels/rdpsnd/CMakeLists.txt +++ b/channels/rdpsnd/CMakeLists.txt @@ -20,6 +20,11 @@ set(MODULE_PREFIX "CHANNEL_RDPSND") if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() if(WITH_SERVER_CHANNELS) diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 2fa44f662..3842ee23a 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,7 +22,16 @@ set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h) -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) @@ -35,6 +42,8 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") + if(WITH_ALSA) add_subdirectory(alsa) endif() diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index cdee38187..2df231bc2 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -30,6 +30,8 @@ #include #include +#include + #include #include #include @@ -563,6 +565,30 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -DEFINE_SVC_PLUGIN(rdpsnd, "rdpsnd", - CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP) +#ifdef WITH_STATIC_PLUGINS +#define VirtualChannelEntry rdpsnd_VirtualChannelEntry +#endif + +const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) +{ + rdpsndPlugin* _p; + + _p = (rdpsndPlugin*) malloc(sizeof(rdpsndPlugin)); + ZeroMemory(_p, sizeof(rdpsndPlugin)); + + _p->plugin.channel_def.options = + CHANNEL_OPTION_INITIALIZED | + CHANNEL_OPTION_ENCRYPT_RDP; + + strcpy(_p->plugin.channel_def.name, "rdpsnd"); + + _p->plugin.connect_callback = rdpsnd_process_connect; + _p->plugin.receive_callback = rdpsnd_process_receive; + _p->plugin.event_callback = rdpsnd_process_event; + _p->plugin.terminate_callback = rdpsnd_process_terminate; + + svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints); + + return 1; +} diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 63c584f7a..08bd69f6d 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -94,6 +94,10 @@ endif() include_directories(${CMAKE_SOURCE_DIR}/resources) +if(WITH_STATIC_PLUGINS) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) +endif() + if(WITH_MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) else() diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index a4adfd93f..f63fb4cdc 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -58,6 +58,10 @@ #include #include +#ifdef WITH_STATIC_PLUGINS +#include +#endif + #include #include "xf_gdi.h" @@ -944,14 +948,27 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v */ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data) { + void* entry; rdpChannels* channels = (rdpChannels*) user_data; - printf("loading plugin %s\n", name); + entry = NULL; + +#ifdef WITH_STATIC_PLUGINS + entry = freerdp_channels_find_static_virtual_channel_entry(name); + + if (entry) + { + if (freerdp_channels_client_load(channels, settings, entry, plugin_data) == 0) + { + printf("loading channel %s (static)\n", name); + return 1; + } + } +#endif + + printf("loading channel %s (plugin)\n", name); freerdp_channels_load_plugin(channels, settings, name, plugin_data); - // FIXME we should check the return code for freerdp_channels_load_plugin() - // and report any error to the caller. freerdp_parse_args() actually expect to get - // an error code when there is a loading error. - // Is it as easy as "return freerdp_channels_load_plugin()" ? + return 1; } diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index ae8acdede..390b28bda 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -21,14 +21,15 @@ file(GLOB FREERDP_HEADERS "freerdp/*.h") install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp) install(DIRECTORY freerdp/cache DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/channels DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/codec DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/crypto DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/gdi DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/locale DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/plugins DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/rail DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/server DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/utils DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/client DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/server DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") +install(DIRECTORY freerdp/channels DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") diff --git a/include/freerdp/channels/channels.h b/include/freerdp/channels/channels.h index 8bc3a3974..3d6a245de 100644 --- a/include/freerdp/channels/channels.h +++ b/include/freerdp/channels/channels.h @@ -33,6 +33,8 @@ FREERDP_API int freerdp_channels_global_init(void); FREERDP_API int freerdp_channels_global_uninit(void); FREERDP_API rdpChannels* freerdp_channels_new(void); FREERDP_API void freerdp_channels_free(rdpChannels* channels); +FREERDP_API int freerdp_channels_client_load(rdpChannels* channels, rdpSettings* settings, + void* entry, void* data); FREERDP_API int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, const char* name, void* data); FREERDP_API int freerdp_channels_pre_connect(rdpChannels* channels, freerdp* instance); diff --git a/include/freerdp/client/channels.h b/include/freerdp/client/channels.h new file mode 100644 index 000000000..1d699f229 --- /dev/null +++ b/include/freerdp/client/channels.h @@ -0,0 +1,30 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Client Channels + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FREERDP_CHANNELS_CLIENT +#define FREERDP_CHANNELS_CLIENT + +#include + +void* freerdp_channels_find_static_virtual_channel_entry(const char* name); +void* freerdp_channels_find_static_device_service_entry(const char* name); +void* freerdp_channels_find_static_entry(const char* name, const char* entry); + +#endif /* FREERDP_CHANNELS_CLIENT */ + diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index a3777363f..29c5af9b9 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -32,6 +32,10 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") +if(WITH_STATIC_PLUGINS) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) +endif() + if(WITH_MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 400709e67..6fccfb80c 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -671,18 +671,12 @@ void freerdp_channels_free(rdpChannels* channels) xfree(channels); } -/** - * this is called when processing the command line parameters - * called only from main thread - */ -int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, const char* name, void* data) +int freerdp_channels_client_load(rdpChannels* channels, rdpSettings* settings, void* entry, void* data) { - int ok; + int status; struct lib_data* lib; CHANNEL_ENTRY_POINTS_EX ep; - DEBUG_CHANNELS("%s", name); - if (channels->num_libs_data + 1 >= CHANNEL_MAX_COUNT) { DEBUG_CHANNELS("too many channels"); @@ -690,13 +684,7 @@ int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, c } lib = channels->libs_data + channels->num_libs_data; - lib->entry = (PVIRTUALCHANNELENTRY) freerdp_load_plugin(name, CHANNEL_EXPORT_FUNC_NAME); - - if (lib->entry == NULL) - { - DEBUG_CHANNELS("failed to find export function"); - return 1; - } + lib->entry = (PVIRTUALCHANNELENTRY) entry; ep.cbSize = sizeof(ep); ep.protocolVersion = VIRTUAL_CHANNEL_VERSION_WIN2000; @@ -714,7 +702,7 @@ int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, c WaitForSingleObject(g_mutex_init, INFINITE); g_init_channels = channels; - ok = lib->entry((PCHANNEL_ENTRY_POINTS) &ep); + status = lib->entry((PCHANNEL_ENTRY_POINTS) &ep); g_init_channels = NULL; ReleaseMutex(g_mutex_init); @@ -723,7 +711,7 @@ int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, c channels->settings = 0; channels->can_call_init = 0; - if (!ok) + if (!status) { DEBUG_CHANNELS("export function call failed"); return 1; @@ -732,6 +720,27 @@ int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, c return 0; } +/** + * this is called when processing the command line parameters + * called only from main thread + */ +int freerdp_channels_load_plugin(rdpChannels* channels, rdpSettings* settings, const char* name, void* data) +{ + void* entry; + + DEBUG_CHANNELS("%s", name); + + entry = (PVIRTUALCHANNELENTRY) freerdp_load_plugin(name, CHANNEL_EXPORT_FUNC_NAME); + + if (entry == NULL) + { + DEBUG_CHANNELS("failed to find export function"); + return 1; + } + + return freerdp_channels_client_load(channels, settings, entry, data); +} + /** * go through and inform all the libraries that we are initialized * called only from main thread From 11aa251fcacfe088d6b538e812e432460d22fad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 20:26:11 -0400 Subject: [PATCH 25/43] channels: modify plugins to become optionally built-in --- channels/cliprdr/CMakeLists.txt | 8 ++++++ channels/cliprdr/client/CMakeLists.txt | 11 +++++++- channels/cliprdr/client/cliprdr_main.c | 36 +++++++++++++++++++++++--- channels/drdynvc/CMakeLists.txt | 8 ++++++ channels/drdynvc/client/CMakeLists.txt | 12 ++++++++- channels/drdynvc/client/drdynvc_main.c | 34 +++++++++++++++++++++--- channels/rail/CMakeLists.txt | 5 ++++ channels/rail/client/CMakeLists.txt | 12 ++++++++- channels/rail/client/rail_main.c | 35 ++++++++++++++++++++++--- channels/rdpdr/client/rdpdr_main.c | 1 + 10 files changed, 149 insertions(+), 13 deletions(-) diff --git a/channels/cliprdr/CMakeLists.txt b/channels/cliprdr/CMakeLists.txt index 676de4e85..880d5b4cb 100644 --- a/channels/cliprdr/CMakeLists.txt +++ b/channels/cliprdr/CMakeLists.txt @@ -15,7 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "cliprdr") +set(MODULE_PREFIX "CHANNEL_CLIPRDR") + if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index 9716083cd..f0046a56a 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -29,7 +29,16 @@ if(MSVC AND (NOT WITH_STATIC_PLUGINS)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index 10eb26c9b..dd1a849e3 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -25,6 +25,9 @@ #include #include #include + +#include + #include #include #include @@ -268,6 +271,33 @@ static void cliprdr_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -DEFINE_SVC_PLUGIN(cliprdr, "cliprdr", - CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP | - CHANNEL_OPTION_COMPRESS_RDP | CHANNEL_OPTION_SHOW_PROTOCOL) +#ifdef WITH_STATIC_PLUGINS +#define VirtualChannelEntry cliprdr_VirtualChannelEntry +#endif + +const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) +{ + cliprdrPlugin* _p; + + _p = (cliprdrPlugin*) malloc(sizeof(cliprdrPlugin)); + ZeroMemory(_p, sizeof(cliprdrPlugin)); + + _p->plugin.channel_def.options = + CHANNEL_OPTION_INITIALIZED | + CHANNEL_OPTION_ENCRYPT_RDP | + CHANNEL_OPTION_COMPRESS_RDP | + CHANNEL_OPTION_SHOW_PROTOCOL; + + strcpy(_p->plugin.channel_def.name, "cliprdr"); + + _p->plugin.connect_callback = cliprdr_process_connect; + _p->plugin.receive_callback = cliprdr_process_receive; + _p->plugin.event_callback = cliprdr_process_event; + _p->plugin.terminate_callback = cliprdr_process_terminate; + + svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints); + + return 1; +} + + diff --git a/channels/drdynvc/CMakeLists.txt b/channels/drdynvc/CMakeLists.txt index 676de4e85..389117586 100644 --- a/channels/drdynvc/CMakeLists.txt +++ b/channels/drdynvc/CMakeLists.txt @@ -15,7 +15,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(MODULE_NAME "drdynvc") +set(MODULE_PREFIX "CHANNEL_DRDYNVC") + if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index 0da01496e..1dd3714ec 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -25,7 +25,16 @@ set(${MODULE_PREFIX}_SRCS dvcman.c dvcman.h) -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) @@ -37,3 +46,4 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") + diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 801cc9c33..7e1c5ebb2 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -25,6 +25,8 @@ #include #include +#include + #include #include #include @@ -359,9 +361,35 @@ static void drdynvc_process_terminate(rdpSvcPlugin* plugin) if (drdynvc->channel_mgr != NULL) dvcman_free(drdynvc->channel_mgr); + xfree(drdynvc); } -DEFINE_SVC_PLUGIN(drdynvc, "drdynvc", - CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP | - CHANNEL_OPTION_COMPRESS_RDP) +#ifdef WITH_STATIC_PLUGINS +#define VirtualChannelEntry drdynvc_VirtualChannelEntry +#endif + +const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) +{ + drdynvcPlugin* _p; + + _p = (drdynvcPlugin*) malloc(sizeof(drdynvcPlugin)); + ZeroMemory(_p, sizeof(drdynvcPlugin)); + + _p->plugin.channel_def.options = + CHANNEL_OPTION_INITIALIZED | + CHANNEL_OPTION_ENCRYPT_RDP | + CHANNEL_OPTION_COMPRESS_RDP; + + strcpy(_p->plugin.channel_def.name, "drdynvc"); + + _p->plugin.connect_callback = drdynvc_process_connect; + _p->plugin.receive_callback = drdynvc_process_receive; + _p->plugin.event_callback = drdynvc_process_event; + _p->plugin.terminate_callback = drdynvc_process_terminate; + + svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints); + + return 1; +} + diff --git a/channels/rail/CMakeLists.txt b/channels/rail/CMakeLists.txt index 676de4e85..097c86d4b 100644 --- a/channels/rail/CMakeLists.txt +++ b/channels/rail/CMakeLists.txt @@ -17,5 +17,10 @@ if(WITH_CLIENT_CHANNELS) add_subdirectory(client) + if(${MODULE_PREFIX}_CLIENT_STATIC) + set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE) + endif() endif() diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index e8146d7e0..d14f53d16 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -24,7 +24,16 @@ set(${MODULE_PREFIX}_SRCS rail_orders.c rail_orders.h) -add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +if(NOT WITH_STATIC_PLUGINS) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +else() + set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) + set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) + set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + + add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) +endif() + set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) @@ -36,3 +45,4 @@ endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") + diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index 06c3b5bf0..bc1798dd6 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -27,8 +27,10 @@ #include #include -#include +#include + #include +#include #include #include #include @@ -250,7 +252,32 @@ static void rail_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event) freerdp_event_free(event); } -DEFINE_SVC_PLUGIN(rail, "rail", - CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP | - CHANNEL_OPTION_COMPRESS_RDP | CHANNEL_OPTION_SHOW_PROTOCOL) +#ifdef WITH_STATIC_PLUGINS +#define VirtualChannelEntry rail_VirtualChannelEntry +#endif + +const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) +{ + railPlugin* _p; + + _p = (railPlugin*) malloc(sizeof(railPlugin)); + ZeroMemory(_p, sizeof(railPlugin)); + + _p->plugin.channel_def.options = + CHANNEL_OPTION_INITIALIZED | + CHANNEL_OPTION_ENCRYPT_RDP | + CHANNEL_OPTION_COMPRESS_RDP | + CHANNEL_OPTION_SHOW_PROTOCOL; + + strcpy(_p->plugin.channel_def.name, "rail"); + + _p->plugin.connect_callback = rail_process_connect; + _p->plugin.receive_callback = rail_process_receive; + _p->plugin.event_callback = rail_process_event; + _p->plugin.terminate_callback = rail_process_terminate; + + svc_plugin_init((rdpSvcPlugin*) _p, pEntryPoints); + + return 1; +} diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index eaf92b526..4794fe5cb 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -44,6 +44,7 @@ #include "rdpdr_capabilities.h" #include "devman.h" #include "irp.h" + #include "rdpdr_main.h" static void rdpdr_process_connect(rdpSvcPlugin* plugin) From 837cc777cec41ae340ed42f1d37c8190c4ec765b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 20:33:58 -0400 Subject: [PATCH 26/43] channels: move include/freerdp/plugins to include/freerdp/client --- channels/cliprdr/client/cliprdr_format.c | 2 +- channels/cliprdr/client/cliprdr_main.c | 2 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 2 +- channels/tsmf/client/tsmf_media.c | 2 +- client/DirectFB/dfreerdp.c | 2 +- client/Mac/MRDPView.h | 2 +- client/Sample/freerdp.c | 5 +++-- client/Windows/wf_cliprdr.c | 2 +- client/X11/xf_cliprdr.c | 2 +- client/X11/xf_tsmf.c | 2 +- client/X11/xfreerdp.c | 2 +- cunit/test_cliprdr.c | 2 +- include/CMakeLists.txt | 1 - include/freerdp/{plugins => client}/cliprdr.h | 0 include/freerdp/{plugins => client}/tsmf.h | 0 libfreerdp/utils/event.c | 4 ++-- 16 files changed, 16 insertions(+), 16 deletions(-) rename include/freerdp/{plugins => client}/cliprdr.h (100%) rename include/freerdp/{plugins => client}/tsmf.h (100%) diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index 1d9b2865b..9d4e0a0f9 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "cliprdr_constants.h" #include "cliprdr_main.h" diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index dd1a849e3..6670b75ff 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "cliprdr_constants.h" #include "cliprdr_main.h" diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index a4dbe8113..9d22e0692 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include "tsmf_constants.h" diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 58568b958..d07c1926e 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index ae80dafd6..de8af601e 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include diff --git a/client/Mac/MRDPView.h b/client/Mac/MRDPView.h index 48a3aac4d..46c281399 100644 --- a/client/Mac/MRDPView.h +++ b/client/Mac/MRDPView.h @@ -15,7 +15,7 @@ #import "freerdp/gdi/gdi.h" #import "freerdp/graphics.h" #import "freerdp/utils/event.h" -#import "freerdp/plugins/cliprdr.h" +#import "freerdp/client/cliprdr.h" #import "freerdp/utils/args.h" #import "freerdp/rail/rail.h" #import "freerdp/rail.h" diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 76d3ca55a..6ca1d5309 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -34,13 +34,14 @@ #include #include #include + +#include #include #include #include #include -#include +#include #include -#include #include diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index ca277bc2c..09b2511fb 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "wf_cliprdr.h" diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 01a9aa844..48ae47d7f 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "xf_cliprdr.h" diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index 61e5e4382..07524072d 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include "xf_tsmf.h" diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index f63fb4cdc..83cb672f2 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #ifdef WITH_STATIC_PLUGINS diff --git a/cunit/test_cliprdr.c b/cunit/test_cliprdr.c index 26cf6f0f8..233cd9ed7 100644 --- a/cunit/test_cliprdr.c +++ b/cunit/test_cliprdr.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "test_cliprdr.h" diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 390b28bda..86fe07148 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -25,7 +25,6 @@ install(DIRECTORY freerdp/codec DESTINATION include/freerdp FILES_MATCHING PATTE install(DIRECTORY freerdp/crypto DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/gdi DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/locale DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") -install(DIRECTORY freerdp/plugins DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/rail DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/utils DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") install(DIRECTORY freerdp/client DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") diff --git a/include/freerdp/plugins/cliprdr.h b/include/freerdp/client/cliprdr.h similarity index 100% rename from include/freerdp/plugins/cliprdr.h rename to include/freerdp/client/cliprdr.h diff --git a/include/freerdp/plugins/tsmf.h b/include/freerdp/client/tsmf.h similarity index 100% rename from include/freerdp/plugins/tsmf.h rename to include/freerdp/client/tsmf.h diff --git a/libfreerdp/utils/event.c b/libfreerdp/utils/event.c index f559b3f21..95c184681 100644 --- a/libfreerdp/utils/event.c +++ b/libfreerdp/utils/event.c @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include static RDP_EVENT* freerdp_cliprdr_event_new(uint16 event_type) From e95b5b5a24dec50854f584272e97e5e2fd47bc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 21:00:07 -0400 Subject: [PATCH 27/43] channels: move rdpdr header --- channels/disk/client/CMakeLists.txt | 2 - channels/disk/client/disk_file.c | 9 +- channels/disk/client/disk_file.h | 6 +- channels/disk/client/disk_main.c | 7 +- channels/disk/client/statvfs.h | 2 +- channels/parallel/client/CMakeLists.txt | 2 - channels/parallel/client/parallel_main.c | 4 +- channels/printer/client/CMakeLists.txt | 2 - channels/printer/client/printer_cups.c | 5 +- channels/printer/client/printer_cups.h | 2 +- channels/printer/client/printer_main.c | 6 +- channels/printer/client/printer_main.h | 4 +- channels/printer/client/printer_win.c | 2 +- channels/printer/client/printer_win.h | 3 +- channels/rdpdr/client/CMakeLists.txt | 2 - channels/rdpdr/client/devman.c | 8 +- channels/rdpdr/client/devman.h | 12 +-- channels/rdpdr/client/irp.c | 9 +- channels/rdpdr/client/irp.h | 14 +-- channels/rdpdr/client/rdpdr_capabilities.c | 9 +- channels/rdpdr/client/rdpdr_capabilities.h | 12 +-- channels/rdpdr/client/rdpdr_main.c | 10 +- channels/rdpdr/client/rdpdr_main.h | 15 ++- channels/rdpdr/client/rdpdr_types.h | 94 ------------------- channels/serial/client/CMakeLists.txt | 2 - channels/serial/client/serial_main.c | 6 +- channels/serial/client/serial_tty.c | 3 +- channels/serial/client/serial_tty.h | 4 + channels/smartcard/client/CMakeLists.txt | 1 - channels/smartcard/client/scard_main.c | 4 +- channels/smartcard/client/scard_main.h | 4 +- channels/smartcard/client/scard_operations.c | 69 +++++++------- .../freerdp/channels/rdpdr.h | 82 ++++++++++++++-- 33 files changed, 184 insertions(+), 232 deletions(-) delete mode 100644 channels/rdpdr/client/rdpdr_types.h rename channels/rdpdr/client/rdpdr_constants.h => include/freerdp/channels/rdpdr.h (89%) diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index 586c89462..7ba321f94 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -34,8 +34,6 @@ if(MSVC AND (NOT WITH_STATIC_PLUGINS)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -include_directories(../../rdpdr/client) - if(NOT WITH_STATIC_PLUGINS) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) else() diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index efcb52d2c..a26a6e1bb 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -1,10 +1,10 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * File System Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau + * Copyright 2010-2012 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee - * Copyright 2012 Gerald Richter + * Copyright 2012 Gerald Richter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ #include #include #include +#include #include #ifdef HAVE_UNISTD_H @@ -52,8 +53,6 @@ #include #endif -#include "rdpdr_constants.h" -#include "rdpdr_types.h" #include "disk_file.h" static boolean disk_file_wildcard_match(const char* pattern, const char* filename) diff --git a/channels/disk/client/disk_file.h b/channels/disk/client/disk_file.h index ba55f3c7c..f97696bd2 100644 --- a/channels/disk/client/disk_file.h +++ b/channels/disk/client/disk_file.h @@ -1,10 +1,10 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * File System Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau + * Copyright 2010-2012 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee - * Copyright 2012 Gerald Richter + * Copyright 2012 Gerald Richter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index b996c6d6b..088652f4f 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * File System Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -46,8 +47,6 @@ #include #include -#include "rdpdr_constants.h" -#include "rdpdr_types.h" #include "disk_file.h" typedef struct _DISK_DEVICE DISK_DEVICE; diff --git a/channels/disk/client/statvfs.h b/channels/disk/client/statvfs.h index a38dc71dc..6912c29a4 100644 --- a/channels/disk/client/statvfs.h +++ b/channels/disk/client/statvfs.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * statvfs emulation for windows * * Copyright 2012 Gerald Richter diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 70d08bfe8..4898f10e2 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -21,8 +21,6 @@ set(MODULE_PREFIX "CHANNEL_RDPDR_PARALLEL_CLIENT") set(${MODULE_PREFIX}_SRCS parallel_main.c) -include_directories(../../rdpdr/client) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index d6c0cdb01..475fd99af 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -57,9 +57,7 @@ #include #include #include - -#include "rdpdr_constants.h" -#include "rdpdr_types.h" +#include struct _PARALLEL_DEVICE { diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index b4174cf64..5e3cac496 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -37,8 +37,6 @@ if(WIN32) printer_win.h) endif() -include_directories(../../rdpdr/client) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index 84d0a2ce8..a6a076b10 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel - CUPS driver * * Copyright 2010-2011 Vic Lee @@ -31,9 +31,8 @@ #include #include +#include -#include "rdpdr_constants.h" -#include "rdpdr_types.h" #include "printer_main.h" #include "printer_cups.h" diff --git a/channels/printer/client/printer_cups.h b/channels/printer/client/printer_cups.h index c6e1ff51a..434d64aba 100644 --- a/channels/printer/client/printer_cups.h +++ b/channels/printer/client/printer_cups.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel - CUPS driver * * Copyright 2010-2011 Vic Lee diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index bd4368a83..7686db182 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel * * Copyright 2010-2011 Vic Lee @@ -35,9 +35,7 @@ #include #include #include - -#include "rdpdr_constants.h" -#include "rdpdr_types.h" +#include #ifdef WITH_CUPS #include "printer_cups.h" diff --git a/channels/printer/client/printer_main.h b/channels/printer/client/printer_main.h index 256c4a77d..3eeb81646 100644 --- a/channels/printer/client/printer_main.h +++ b/channels/printer/client/printer_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel * * Copyright 2010-2011 Vic Lee @@ -20,7 +20,7 @@ #ifndef __PRINTER_MAIN_H #define __PRINTER_MAIN_H -#include "rdpdr_types.h" +#include /* SERVER_PRINTER_CACHE_EVENT.cachedata */ #define RDPDR_ADD_PRINTER_EVENT 0x00000001 diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index 6b00704b4..be80a19d2 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel - WIN driver * * Copyright 2012 Gerald Richter diff --git a/channels/printer/client/printer_win.h b/channels/printer/client/printer_win.h index 5b694ac40..eecbb17ba 100644 --- a/channels/printer/client/printer_win.h +++ b/channels/printer/client/printer_win.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Print Virtual Channel - win driver * * Copyright 2012 Gerald Richter @@ -20,7 +20,6 @@ #ifndef __PRINTER_WIN_H #define __PRINTER_WIN_H - rdpPrinterDriver* printer_win_get_driver(void); #ifdef WITH_DEBUG_WINPR diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index c9969b253..108973128 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -25,8 +25,6 @@ set(${MODULE_PREFIX}_SRCS devman.h rdpdr_main.c rdpdr_main.h - rdpdr_types.h - rdpdr_constants.h rdpdr_capabilities.c rdpdr_capabilities.h) diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index a9fbe1671..fec61b52e 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ #include #include -#include "rdpdr_types.h" +#include "rdpdr_main.h" #include "devman.h" DEVMAN* devman_new(rdpSvcPlugin* plugin) diff --git a/channels/rdpdr/client/devman.h b/channels/rdpdr/client/devman.h index 586034775..e9364f4d4 100644 --- a/channels/rdpdr/client/devman.h +++ b/channels/rdpdr/client/devman.h @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,12 @@ * limitations under the License. */ -#ifndef __DEVMAN_H -#define __DEVMAN_H +#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H +#define FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H DEVMAN* devman_new(rdpSvcPlugin* plugin); void devman_free(DEVMAN* devman); boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data); DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id); -#endif /* __DEVMAN_H */ +#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H */ diff --git a/channels/rdpdr/client/irp.c b/channels/rdpdr/client/irp.c index 9ca5180bc..0a3fea4e3 100644 --- a/channels/rdpdr/client/irp.c +++ b/channels/rdpdr/client/irp.c @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,7 @@ #include #include -#include "rdpdr_types.h" -#include "rdpdr_constants.h" +#include "rdpdr_main.h" #include "devman.h" #include "irp.h" diff --git a/channels/rdpdr/client/irp.h b/channels/rdpdr/client/irp.h index d33e51885..fcdeba109 100644 --- a/channels/rdpdr/client/irp.h +++ b/channels/rdpdr/client/irp.h @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,11 +18,11 @@ * limitations under the License. */ -#ifndef __IRP_H -#define __IRP_H +#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H +#define FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H -#include "rdpdr_types.h" +#include "rdpdr_main.h" IRP* irp_new(DEVMAN* devman, STREAM* data_in); -#endif /* __IRP_H */ +#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_IRP_H */ diff --git a/channels/rdpdr/client/rdpdr_capabilities.c b/channels/rdpdr/client/rdpdr_capabilities.c index 0b1b81e51..a54052cce 100644 --- a/channels/rdpdr/client/rdpdr_capabilities.c +++ b/channels/rdpdr/client/rdpdr_capabilities.c @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,7 @@ #include #include -#include "rdpdr_types.h" -#include "rdpdr_constants.h" +#include "rdpdr_main.h" #include "rdpdr_capabilities.h" /* Output device redirection capability set header */ diff --git a/channels/rdpdr/client/rdpdr_capabilities.h b/channels/rdpdr/client/rdpdr_capabilities.h index 28b83c745..16f0b1db9 100644 --- a/channels/rdpdr/client/rdpdr_capabilities.h +++ b/channels/rdpdr/client/rdpdr_capabilities.h @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,12 @@ * limitations under the License. */ -#ifndef __RDPDR_CAPABILITIES_H -#define __RDPDR_CAPABILITIES_H +#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H +#define FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H #include "rdpdr_main.h" void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in); void rdpdr_send_capability_response(rdpdrPlugin* rdpdr); -#endif /* __RDPDR_CAPABILITIES_H */ +#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_CAPABILITIES_H */ diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 4794fe5cb..9bc6e5cc6 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,15 +33,15 @@ #include #include #include +#include #include #ifdef HAVE_UNISTD_H #include #endif -#include "rdpdr_types.h" -#include "rdpdr_constants.h" #include "rdpdr_capabilities.h" + #include "devman.h" #include "irp.h" diff --git a/channels/rdpdr/client/rdpdr_main.h b/channels/rdpdr/client/rdpdr_main.h index 23d58bfce..ef93f744e 100644 --- a/channels/rdpdr/client/rdpdr_main.h +++ b/channels/rdpdr/client/rdpdr_main.h @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,12 @@ * limitations under the License. */ -#ifndef __RDPDR_MAIN_H -#define __RDPDR_MAIN_H +#ifndef FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H +#define FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H +#include #include -#include "rdpdr_types.h" - typedef struct rdpdr_plugin rdpdrPlugin; struct rdpdr_plugin @@ -39,4 +38,4 @@ struct rdpdr_plugin char computerName[256]; }; -#endif /* __RDPDR_MAIN_H */ +#endif /* FREERDP_CHANNEL_RDPDR_CLIENT_MAIN_H */ diff --git a/channels/rdpdr/client/rdpdr_types.h b/channels/rdpdr/client/rdpdr_types.h deleted file mode 100644 index 1c8ba5b47..000000000 --- a/channels/rdpdr/client/rdpdr_types.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel - * - * Copyright 2010-2011 Marc-Andre Moreau - * Copyright 2010-2011 Vic Lee - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __RDPDR_TYPES_H -#define __RDPDR_TYPES_H - -#include -#include -#include -#include - -#include -#include -#include - -typedef struct _DEVICE DEVICE; -typedef struct _IRP IRP; -typedef struct _DEVMAN DEVMAN; - -typedef void (*pcIRPRequest)(DEVICE* device, IRP* irp); -typedef void (*pcFreeDevice)(DEVICE* device); - -struct _DEVICE -{ - uint32 id; - - uint32 type; - char* name; - STREAM* data; - - pcIRPRequest IRPRequest; - pcFreeDevice Free; -}; - -typedef void (*pcIRPResponse)(IRP* irp); - -struct _IRP -{ - SLIST_ENTRY ItemEntry; - - DEVICE* device; - DEVMAN* devman; - uint32 FileId; - uint32 CompletionId; - uint32 MajorFunction; - uint32 MinorFunction; - STREAM* input; - - uint32 IoStatus; - STREAM* output; - - pcIRPResponse Complete; - pcIRPResponse Discard; -}; - -struct _DEVMAN -{ - rdpSvcPlugin* plugin; - uint32 id_sequence; /* generate unique device id */ - LIST* devices; -}; - -typedef void (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device); - -struct _DEVICE_SERVICE_ENTRY_POINTS -{ - DEVMAN* devman; - - pcRegisterDevice RegisterDevice; - RDP_PLUGIN_DATA* plugin_data; -}; -typedef struct _DEVICE_SERVICE_ENTRY_POINTS DEVICE_SERVICE_ENTRY_POINTS; -typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS; - -typedef int (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS); - -#endif /* __RDPDR_TYPES_H */ diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index fcd3039c0..5e25323cd 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -24,8 +24,6 @@ set(${MODULE_PREFIX}_SRCS serial_constants.h serial_main.c) -include_directories(../../rdpdr/client) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(serial PROPERTIES PREFIX "") diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index 0ef98333a..12ff0c9cc 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -40,18 +40,18 @@ #include #endif -#include "rdpdr_types.h" -#include "rdpdr_constants.h" -#include "devman.h" #include "serial_tty.h" #include "serial_constants.h" +#include #include #include #include #include +#include typedef struct _SERIAL_DEVICE SERIAL_DEVICE; + struct _SERIAL_DEVICE { DEVICE device; diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index 4dfa690e7..ce65fca34 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifndef _WIN32 #include @@ -46,8 +47,6 @@ #include #include -#include "rdpdr_constants.h" -#include "rdpdr_types.h" #include "serial_tty.h" #include "serial_constants.h" diff --git a/channels/serial/client/serial_tty.h b/channels/serial/client/serial_tty.h index d9b76414e..4333039e3 100644 --- a/channels/serial/client/serial_tty.h +++ b/channels/serial/client/serial_tty.h @@ -28,7 +28,11 @@ #include #endif +#include +#include + typedef struct _SERIAL_TTY SERIAL_TTY; + struct _SERIAL_TTY { uint32 id; diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index 239bbe69f..b8906eb08 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -22,7 +22,6 @@ set(${MODULE_PREFIX}_SRCS scard_main.c scard_operations.c) -include_directories(../../rdpdr/client) include_directories(${PCSC_INCLUDE_DIRS}) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index b5998fbe0..dcb266028 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -31,9 +31,7 @@ #include #include #include - -#include "rdpdr_types.h" -#include "rdpdr_constants.h" +#include #include "scard_main.h" diff --git a/channels/smartcard/client/scard_main.h b/channels/smartcard/client/scard_main.h index c8143ef31..c5d86f7d3 100644 --- a/channels/smartcard/client/scard_main.h +++ b/channels/smartcard/client/scard_main.h @@ -23,11 +23,9 @@ #include -#include "devman.h" -#include "rdpdr_types.h" - #include #include +#include #include diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index 88bdc6358..703ddb244 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Smartcard Device Service Virtual Channel * * Copyright (C) Alexi Volkov 2006 @@ -43,47 +43,45 @@ #include #include #include - -#include "rdpdr_types.h" -#include "rdpdr_constants.h" +#include #include "scard_main.h" /* [MS-RDPESC] 3.1.4 */ -#define SCARD_IOCTL_ESTABLISH_CONTEXT 0x00090014 /* EstablishContext */ -#define SCARD_IOCTL_RELEASE_CONTEXT 0x00090018 /* ReleaseContext */ -#define SCARD_IOCTL_IS_VALID_CONTEXT 0x0009001C /* IsValidContext */ -#define SCARD_IOCTL_LIST_READER_GROUPS 0x00090020 /* ListReaderGroups */ -#define SCARD_IOCTL_LIST_READERS 0x00090028 /* ListReadersA */ -#define SCARD_IOCTL_INTRODUCE_READER_GROUP 0x00090050 /* IntroduceReaderGroup */ -#define SCARD_IOCTL_FORGET_READER_GROUP 0x00090058 /* ForgetReader */ -#define SCARD_IOCTL_INTRODUCE_READER 0x00090060 /* IntroduceReader */ -#define SCARD_IOCTL_FORGET_READER 0x00090068 /* IntroduceReader */ -#define SCARD_IOCTL_ADD_READER_TO_GROUP 0x00090070 /* AddReaderToGroup */ -#define SCARD_IOCTL_REMOVE_READER_FROM_GROUP 0x00090078 /* RemoveReaderFromGroup */ -#define SCARD_IOCTL_GET_STATUS_CHANGE 0x000900A0 /* GetStatusChangeA */ -#define SCARD_IOCTL_CANCEL 0x000900A8 /* Cancel */ -#define SCARD_IOCTL_CONNECT 0x000900AC /* ConnectA */ -#define SCARD_IOCTL_RECONNECT 0x000900B4 /* Reconnect */ -#define SCARD_IOCTL_DISCONNECT 0x000900B8 /* Disconnect */ -#define SCARD_IOCTL_BEGIN_TRANSACTION 0x000900BC /* BeginTransaction */ -#define SCARD_IOCTL_END_TRANSACTION 0x000900C0 /* EndTransaction */ -#define SCARD_IOCTL_STATE 0x000900C4 /* State */ -#define SCARD_IOCTL_STATUS 0x000900C8 /* StatusA */ -#define SCARD_IOCTL_TRANSMIT 0x000900D0 /* Transmit */ -#define SCARD_IOCTL_CONTROL 0x000900D4 /* Control */ -#define SCARD_IOCTL_GETATTRIB 0x000900D8 /* GetAttrib */ -#define SCARD_IOCTL_SETATTRIB 0x000900DC /* SetAttrib */ -#define SCARD_IOCTL_ACCESS_STARTED_EVENT 0x000900E0 /* SCardAccessStartedEvent */ -#define SCARD_IOCTL_LOCATE_CARDS_BY_ATR 0x000900E8 /* LocateCardsByATR */ +#define SCARD_IOCTL_ESTABLISH_CONTEXT 0x00090014 /* EstablishContext */ +#define SCARD_IOCTL_RELEASE_CONTEXT 0x00090018 /* ReleaseContext */ +#define SCARD_IOCTL_IS_VALID_CONTEXT 0x0009001C /* IsValidContext */ +#define SCARD_IOCTL_LIST_READER_GROUPS 0x00090020 /* ListReaderGroups */ +#define SCARD_IOCTL_LIST_READERS 0x00090028 /* ListReadersA */ +#define SCARD_IOCTL_INTRODUCE_READER_GROUP 0x00090050 /* IntroduceReaderGroup */ +#define SCARD_IOCTL_FORGET_READER_GROUP 0x00090058 /* ForgetReader */ +#define SCARD_IOCTL_INTRODUCE_READER 0x00090060 /* IntroduceReader */ +#define SCARD_IOCTL_FORGET_READER 0x00090068 /* IntroduceReader */ +#define SCARD_IOCTL_ADD_READER_TO_GROUP 0x00090070 /* AddReaderToGroup */ +#define SCARD_IOCTL_REMOVE_READER_FROM_GROUP 0x00090078 /* RemoveReaderFromGroup */ +#define SCARD_IOCTL_GET_STATUS_CHANGE 0x000900A0 /* GetStatusChangeA */ +#define SCARD_IOCTL_CANCEL 0x000900A8 /* Cancel */ +#define SCARD_IOCTL_CONNECT 0x000900AC /* ConnectA */ +#define SCARD_IOCTL_RECONNECT 0x000900B4 /* Reconnect */ +#define SCARD_IOCTL_DISCONNECT 0x000900B8 /* Disconnect */ +#define SCARD_IOCTL_BEGIN_TRANSACTION 0x000900BC /* BeginTransaction */ +#define SCARD_IOCTL_END_TRANSACTION 0x000900C0 /* EndTransaction */ +#define SCARD_IOCTL_STATE 0x000900C4 /* State */ +#define SCARD_IOCTL_STATUS 0x000900C8 /* StatusA */ +#define SCARD_IOCTL_TRANSMIT 0x000900D0 /* Transmit */ +#define SCARD_IOCTL_CONTROL 0x000900D4 /* Control */ +#define SCARD_IOCTL_GETATTRIB 0x000900D8 /* GetAttrib */ +#define SCARD_IOCTL_SETATTRIB 0x000900DC /* SetAttrib */ +#define SCARD_IOCTL_ACCESS_STARTED_EVENT 0x000900E0 /* SCardAccessStartedEvent */ +#define SCARD_IOCTL_LOCATE_CARDS_BY_ATR 0x000900E8 /* LocateCardsByATR */ -#define SCARD_INPUT_LINKED 0xFFFFFFFF +#define SCARD_INPUT_LINKED 0xFFFFFFFF /* Decode Win CTL_CODE values */ -#define WIN_CTL_FUNCTION(ctl_code) ((ctl_code & 0x3FFC) >> 2) -#define WIN_CTL_DEVICE_TYPE(ctl_code) (ctl_code >> 16) +#define WIN_CTL_FUNCTION(ctl_code) ((ctl_code & 0x3FFC) >> 2) +#define WIN_CTL_DEVICE_TYPE(ctl_code) (ctl_code >> 16) -#define WIN_FILE_DEVICE_SMARTCARD 0x00000031 +#define WIN_FILE_DEVICE_SMARTCARD 0x00000031 static uint32 sc_output_string(IRP* irp, char *src, boolean wide) @@ -183,13 +181,14 @@ static void sc_output_buffer_start(IRP *irp, int length) static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, boolean wide) { - char *buffer; + char* buffer; int bufferSize; bufferSize = wide ? (2 * dataLength) : dataLength; buffer = xmalloc(bufferSize + 2); /* reserve 2 bytes for the '\0' */ stream_read(irp->input, buffer, bufferSize); + if (wide) { int i; diff --git a/channels/rdpdr/client/rdpdr_constants.h b/include/freerdp/channels/rdpdr.h similarity index 89% rename from channels/rdpdr/client/rdpdr_constants.h rename to include/freerdp/channels/rdpdr.h index a76737bbc..956595a04 100644 --- a/channels/rdpdr/client/rdpdr_constants.h +++ b/include/freerdp/channels/rdpdr.h @@ -1,9 +1,9 @@ /** - * FreeRDP: A Remote Desktop Protocol client. - * File System Virtual Channel + * FreeRDP: A Remote Desktop Protocol Implementation + * Device Redirection Virtual Channel * - * Copyright 2010-2011 Marc-Andre Moreau * Copyright 2010-2011 Vic Lee + * Copyright 2010-2012 Marc-Andre Moreau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,17 @@ * limitations under the License. */ -#ifndef __RDPDR_CONSTANTS_H -#define __RDPDR_CONSTANTS_H +#ifndef FREERDP_CHANNEL_RDPDR_H +#define FREERDP_CHANNEL_RDPDR_H + +#include +#include +#include +#include + +#include +#include +#include /* RDPDR_HEADER.Component */ enum RDPDR_CTYP @@ -456,5 +465,66 @@ enum FILE_FS_INFORMATION_CLASS FileFsMaximumInformation }; -#endif /* __RDPDR_CONSTANTS_H */ +typedef struct _DEVICE DEVICE; +typedef struct _IRP IRP; +typedef struct _DEVMAN DEVMAN; + +typedef void (*pcIRPRequest)(DEVICE* device, IRP* irp); +typedef void (*pcFreeDevice)(DEVICE* device); + +struct _DEVICE +{ + uint32 id; + + uint32 type; + char* name; + STREAM* data; + + pcIRPRequest IRPRequest; + pcFreeDevice Free; +}; + +typedef void (*pcIRPResponse)(IRP* irp); + +struct _IRP +{ + SLIST_ENTRY ItemEntry; + + DEVICE* device; + DEVMAN* devman; + uint32 FileId; + uint32 CompletionId; + uint32 MajorFunction; + uint32 MinorFunction; + STREAM* input; + + uint32 IoStatus; + STREAM* output; + + pcIRPResponse Complete; + pcIRPResponse Discard; +}; + +struct _DEVMAN +{ + rdpSvcPlugin* plugin; + uint32 id_sequence; + LIST* devices; +}; + +typedef void (*pcRegisterDevice)(DEVMAN* devman, DEVICE* device); + +struct _DEVICE_SERVICE_ENTRY_POINTS +{ + DEVMAN* devman; + + pcRegisterDevice RegisterDevice; + RDP_PLUGIN_DATA* plugin_data; +}; +typedef struct _DEVICE_SERVICE_ENTRY_POINTS DEVICE_SERVICE_ENTRY_POINTS; +typedef DEVICE_SERVICE_ENTRY_POINTS* PDEVICE_SERVICE_ENTRY_POINTS; + +typedef int (*PDEVICE_SERVICE_ENTRY)(PDEVICE_SERVICE_ENTRY_POINTS); + +#endif /* FREERDP_CHANNEL_RDPDR_H */ From ac7e1a3aea0ff6177c956baf246b2a4ce472f235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 22:48:17 -0400 Subject: [PATCH 28/43] channels: make rail, drdynvc, cliprdr and rdpsnd built-in channels --- channels/CMakeLists.txt | 6 ++---- channels/client/CMakeLists.txt | 5 +++-- channels/cliprdr/client/CMakeLists.txt | 16 +++++----------- channels/cliprdr/client/cliprdr_main.c | 3 +-- channels/drdynvc/client/CMakeLists.txt | 16 ++++++---------- channels/drdynvc/client/drdynvc_main.c | 3 +-- channels/rail/client/CMakeLists.txt | 14 ++++++-------- channels/rail/client/rail_main.c | 3 +-- channels/rdpdr/client/CMakeLists.txt | 18 +++++------------- channels/rdpdr/client/devman.c | 17 +++++++++++++++-- channels/rdpdr/client/module.def | 3 --- channels/rdpdr/client/rdpdr_main.c | 3 +-- channels/rdpsnd/client/CMakeLists.txt | 14 ++++++-------- channels/rdpsnd/client/rdpsnd_main.c | 4 +--- client/X11/CMakeLists.txt | 7 +++---- client/X11/xfreerdp.c | 11 ++--------- include/freerdp/channels/rdpsnd.h | 8 +++++--- 17 files changed, 63 insertions(+), 88 deletions(-) delete mode 100644 channels/rdpdr/client/module.def diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index eb83700af..d4b49faad 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau @@ -15,9 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -if(WITH_STATIC_PLUGINS) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) -endif() +set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(FILENAME "ChannelOptions.cmake") file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}") diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt index 30f746848..f75d9a883 100644 --- a/channels/client/CMakeLists.txt +++ b/channels/client/CMakeLists.txt @@ -31,16 +31,17 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES}) if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry") set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}") set(ENTRY_POINT_IMPORT "extern int ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS pEntryPoints);") - set(VIRTUAL_CHANNEL_ENTRY_IMPORTS "${VIRTUAL_CHANNEL_ENTRY_IMPORTS}\n${VIRTUAL_CHANNEL_ENTRY_IMPORTS}${ENTRY_POINT_IMPORT}") + set(VIRTUAL_CHANNEL_ENTRY_IMPORTS "${VIRTUAL_CHANNEL_ENTRY_IMPORTS}\n${ENTRY_POINT_IMPORT}") set(VIRTUAL_CHANNEL_ENTRY_TABLE "${VIRTUAL_CHANNEL_ENTRY_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },") endif() if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "DeviceServiceEntry") set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}") set(ENTRY_POINT_IMPORT "extern int ${ENTRY_POINT_NAME}(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints);") - set(DEVICE_SERVICE_ENTRY_IMPORTS "${DEVICE_SERVICE_ENTRY_IMPORTS}\n${DEVICE_SERVICE_ENTRY_IMPORTS}${ENTRY_POINT_IMPORT}") + set(DEVICE_SERVICE_ENTRY_IMPORTS "${DEVICE_SERVICE_ENTRY_IMPORTS}\n${ENTRY_POINT_IMPORT}") set(DEVICE_SERVICE_ENTRY_TABLE "${DEVICE_SERVICE_ENTRY_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },") endif() + endforeach() set(VIRTUAL_CHANNEL_ENTRY_TABLE "${VIRTUAL_CHANNEL_ENTRY_TABLE}\n\t{ \"\", NULL }") diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index f0046a56a..f9b59c8ce 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -25,19 +25,13 @@ set(${MODULE_PREFIX}_SRCS cliprdr_main.c cliprdr_main.h) -if(MSVC AND (NOT WITH_STATIC_PLUGINS)) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) -endif() +# cliprdr is always built-in -if(NOT WITH_STATIC_PLUGINS) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -else() - set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) - set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) - set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) +set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) +set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) +set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) - add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) -endif() +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index 6670b75ff..500116344 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -271,9 +271,8 @@ static void cliprdr_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -#ifdef WITH_STATIC_PLUGINS +/* cliprdr is always built-in */ #define VirtualChannelEntry cliprdr_VirtualChannelEntry -#endif const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) { diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index 1dd3714ec..8764e73d1 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -25,15 +25,13 @@ set(${MODULE_PREFIX}_SRCS dvcman.c dvcman.h) -if(NOT WITH_STATIC_PLUGINS) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -else() - set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) - set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) - set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) +# drdynvc is always built-in - add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) -endif() +set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) +set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) +set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") @@ -43,7 +41,5 @@ else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-synch) endif() -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 7e1c5ebb2..c8c2aece4 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -365,9 +365,8 @@ static void drdynvc_process_terminate(rdpSvcPlugin* plugin) xfree(drdynvc); } -#ifdef WITH_STATIC_PLUGINS +/* drdynvc is always built-in */ #define VirtualChannelEntry drdynvc_VirtualChannelEntry -#endif const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) { diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index d14f53d16..141b79156 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -24,15 +24,13 @@ set(${MODULE_PREFIX}_SRCS rail_orders.c rail_orders.h) -if(NOT WITH_STATIC_PLUGINS) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -else() - set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) - set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) - set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) +# rail is always built-in - add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) -endif() +set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) +set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) +set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index bc1798dd6..10e0d6a08 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -252,9 +252,8 @@ static void rail_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event) freerdp_event_free(event); } -#ifdef WITH_STATIC_PLUGINS +/* rail is always built-in */ #define VirtualChannelEntry rail_VirtualChannelEntry -#endif const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) { diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index 108973128..674391825 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -28,19 +28,13 @@ set(${MODULE_PREFIX}_SRCS rdpdr_capabilities.c rdpdr_capabilities.h) -if(MSVC AND (NOT WITH_STATIC_PLUGINS)) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) -endif() +# rdpdr is always built-in -if(NOT WITH_STATIC_PLUGINS) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -else() - set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) - set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) - set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) +set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) +set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) +set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) - add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) -endif() +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") @@ -50,7 +44,5 @@ else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) endif() -install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index fec61b52e..1ec48401d 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "rdpdr_main.h" #include "devman.h" @@ -70,10 +71,22 @@ static void devman_register_device(DEVMAN* devman, DEVICE* device) boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data) { + char* name; DEVICE_SERVICE_ENTRY_POINTS ep; - PDEVICE_SERVICE_ENTRY entry; + PDEVICE_SERVICE_ENTRY entry = NULL; - entry = freerdp_load_plugin((char*) plugin_data->data[0], "DeviceServiceEntry"); + name = (char*) plugin_data->data[0]; + entry = (PDEVICE_SERVICE_ENTRY) freerdp_channels_find_static_device_service_entry(name); + + if (!entry) + { + printf("loading device service %s (plugin)\n", name); + entry = freerdp_load_plugin(name, "DeviceServiceEntry"); + } + else + { + printf("loading device service %s (static)\n", name); + } if (entry == NULL) return false; diff --git a/channels/rdpdr/client/module.def b/channels/rdpdr/client/module.def deleted file mode 100644 index 0954fbe47..000000000 --- a/channels/rdpdr/client/module.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY "rdpdr" -EXPORTS - VirtualChannelEntry @1 diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 9bc6e5cc6..a41b980f1 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -316,9 +316,8 @@ static void rdpdr_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -#ifdef WITH_STATIC_PLUGINS +/* rdpdr is always built-in */ #define VirtualChannelEntry rdpdr_VirtualChannelEntry -#endif const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) { diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 3842ee23a..782805ba3 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -22,15 +22,13 @@ set(${MODULE_PREFIX}_SRCS rdpsnd_main.c rdpsnd_main.h) -if(NOT WITH_STATIC_PLUGINS) - add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -else() - set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) - set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) - set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) +# rdpsnd is always built-in - add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) -endif() +set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) +set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE) +set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE) + +add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 2df231bc2..26ec33389 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -565,9 +565,8 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin) xfree(plugin); } -#ifdef WITH_STATIC_PLUGINS +/* rdpsnd is always built-in */ #define VirtualChannelEntry rdpsnd_VirtualChannelEntry -#endif const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) { @@ -591,4 +590,3 @@ const int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints) return 1; } - diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 08bd69f6d..fb8b2d5ec 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP X11 Client # # Copyright 2012 Marc-Andre Moreau @@ -94,9 +94,7 @@ endif() include_directories(${CMAKE_SOURCE_DIR}/resources) -if(WITH_STATIC_PLUGINS) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) -endif() +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) if(WITH_MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) @@ -114,3 +112,4 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11") + diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 83cb672f2..c05c55190 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -56,11 +56,8 @@ #include #include #include -#include - -#ifdef WITH_STATIC_PLUGINS #include -#endif +#include #include @@ -948,12 +945,9 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v */ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data) { - void* entry; + void* entry = NULL; rdpChannels* channels = (rdpChannels*) user_data; - entry = NULL; - -#ifdef WITH_STATIC_PLUGINS entry = freerdp_channels_find_static_virtual_channel_entry(name); if (entry) @@ -964,7 +958,6 @@ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_D return 1; } } -#endif printf("loading channel %s (plugin)\n", name); freerdp_channels_load_plugin(channels, settings, name, plugin_data); diff --git a/include/freerdp/channels/rdpsnd.h b/include/freerdp/channels/rdpsnd.h index f54e2fb18..a813d20b6 100644 --- a/include/freerdp/channels/rdpsnd.h +++ b/include/freerdp/channels/rdpsnd.h @@ -17,13 +17,14 @@ * limitations under the License. */ -#ifndef __FREERDP_RDPSND_H -#define __FREERDP_RDPSND_H +#ifndef FREERDP_CHANNEL_RDPSND_H +#define FREERDP_CHANNEL_RDPSND_H #include #include typedef struct rdpsnd_format rdpsndFormat; + struct rdpsnd_format { uint16 wFormatTag; @@ -56,4 +57,5 @@ struct rdpsnd_format #define MEDIUM_QUALITY 0x0001 #define HIGH_QUALITY 0x0002 -#endif +#endif /* FREERDP_CHANNEL_RDPSND_H */ + From ce717216987cd492615a54f63fbb8cf008def5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 22:53:05 -0400 Subject: [PATCH 29/43] channels: rename WITH_STATIC_PLUGINS to STATIC_CHANNELS --- CMakeLists.txt | 2 +- channels/disk/client/CMakeLists.txt | 4 ++-- channels/disk/client/disk_main.c | 2 +- channels/printer/client/printer_main.c | 2 +- client/Windows/CMakeLists.txt | 2 +- config.h.in | 2 +- include/freerdp/utils/svc_plugin.h | 2 +- libfreerdp/channels/CMakeLists.txt | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b216c556..60d9238cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,7 @@ if(NOT DEFINED BUILD_SHARED_LIBS) endif() if(NOT BUILD_SHARED_LIBS AND WITH_MONOLITHIC_BUILD) - set(WITH_STATIC_PLUGINS ON) + set(STATIC_CHANNELS ON) endif() # Configure MSVC Runtime diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index 7ba321f94..eabcf0014 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -30,11 +30,11 @@ if(WIN32) dirent.h) endif() -if(MSVC AND (NOT WITH_STATIC_PLUGINS)) +if(MSVC AND (NOT STATIC_CHANNELS)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(NOT WITH_STATIC_PLUGINS) +if(NOT STATIC_CHANNELS) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) else() set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE) diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index 088652f4f..fee279fa9 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -693,7 +693,7 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na } } -#ifdef WITH_STATIC_PLUGINS +#ifdef STATIC_CHANNELS #define DeviceServiceEntry disk_DeviceServiceEntry #endif diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 7686db182..275c5c7a3 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -300,7 +300,7 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri freerdp_thread_start(printer_dev->thread, printer_thread_func, printer_dev); } -#ifdef WITH_STATIC_PLUGINS +#ifdef STATIC_CHANNELS int printer_entry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) #else int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index ae8f5b298..853c76169 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -39,7 +39,7 @@ add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) if(WITH_MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) - if(WITH_RDPDR AND WITH_STATIC_PLUGINS) + if(WITH_RDPDR AND STATIC_CHANNELS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rdpdr disk printer) endif() else() diff --git a/config.h.in b/config.h.in index d9c4d367a..2803b468b 100644 --- a/config.h.in +++ b/config.h.in @@ -37,7 +37,7 @@ #cmakedefine WITH_WIN8 /* Plugins */ -#cmakedefine WITH_STATIC_PLUGINS +#cmakedefine STATIC_CHANNELS #cmakedefine WITH_RDPDR diff --git a/include/freerdp/utils/svc_plugin.h b/include/freerdp/utils/svc_plugin.h index 7c2a06131..185da84b8 100644 --- a/include/freerdp/utils/svc_plugin.h +++ b/include/freerdp/utils/svc_plugin.h @@ -60,7 +60,7 @@ FREERDP_API int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event); #define DEBUG_SVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -#ifdef WITH_STATIC_PLUGINS +#ifdef STATIC_CHANNELS #define DEFINE_SVC_PLUGIN_ENTRY(_prefix) int _prefix##_entry(PCHANNEL_ENTRY_POINTS pEntryPoints) #define DEFINE_DEV_PLUGIN_ENTRY(_prefix) int _prefix##_entry(PCHANNEL_ENTRY_POINTS pEntryPoints) #define REGISTER_SVC_PLUGIN_ENTRY(_prefix) freerdp_register_static_plugin(#_prefix, "VirtualChannelEntry", _prefix##_entry) diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index 29c5af9b9..c68b0d171 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -32,7 +32,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_STATIC_PLUGINS) +if(STATIC_CHANNELS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) endif() From 40eea7c76b833e022095596312ddf305fbaaf078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 22:55:06 -0400 Subject: [PATCH 30/43] cmake: rename WITH_MONOLITHIC_BUILD to MONOLITHIC_BUILD --- CMakeLists.txt | 2 +- channels/audin/client/CMakeLists.txt | 2 +- channels/audin/client/alsa/CMakeLists.txt | 2 +- channels/audin/client/pulse/CMakeLists.txt | 2 +- channels/audin/server/CMakeLists.txt | 2 +- channels/cliprdr/client/CMakeLists.txt | 2 +- channels/disk/client/CMakeLists.txt | 2 +- channels/drdynvc/client/CMakeLists.txt | 2 +- channels/parallel/client/CMakeLists.txt | 2 +- channels/printer/client/CMakeLists.txt | 2 +- channels/rail/client/CMakeLists.txt | 2 +- channels/rdpdr/client/CMakeLists.txt | 2 +- channels/rdpsnd/client/CMakeLists.txt | 2 +- channels/rdpsnd/client/MacAudio/CMakeLists.txt | 2 +- channels/rdpsnd/client/alsa/CMakeLists.txt | 2 +- channels/rdpsnd/client/pulse/CMakeLists.txt | 2 +- channels/rdpsnd/server/CMakeLists.txt | 2 +- channels/sample/client/CMakeLists.txt | 2 +- channels/serial/client/CMakeLists.txt | 2 +- channels/smartcard/client/CMakeLists.txt | 2 +- channels/tsmf/client/CMakeLists.txt | 2 +- channels/tsmf/client/alsa/CMakeLists.txt | 2 +- channels/tsmf/client/ffmpeg/CMakeLists.txt | 2 +- channels/tsmf/client/gstreamer/CMakeLists.txt | 2 +- channels/tsmf/client/pulse/CMakeLists.txt | 2 +- channels/urbdrc/client/CMakeLists.txt | 2 +- client/DirectFB/CMakeLists.txt | 2 +- client/Sample/CMakeLists.txt | 2 +- client/Windows/CMakeLists.txt | 2 +- client/X11/CMakeLists.txt | 2 +- cmake/BuildFeatureCheck.cmake | 8 ++++---- cmake/ConfigOptions.cmake | 2 +- libfreerdp/CMakeLists.txt | 4 ++-- libfreerdp/cache/CMakeLists.txt | 4 ++-- libfreerdp/channels/CMakeLists.txt | 4 ++-- libfreerdp/codec/CMakeLists.txt | 4 ++-- libfreerdp/core/CMakeLists.txt | 6 +++--- libfreerdp/crypto/CMakeLists.txt | 6 +++--- libfreerdp/gdi/CMakeLists.txt | 4 ++-- libfreerdp/locale/CMakeLists.txt | 4 ++-- libfreerdp/rail/CMakeLists.txt | 4 ++-- libfreerdp/utils/CMakeLists.txt | 4 ++-- server/Sample/CMakeLists.txt | 2 +- server/Windows/CMakeLists.txt | 2 +- server/X11/CMakeLists.txt | 2 +- winpr/libwinpr/CMakeLists.txt | 4 ++-- winpr/libwinpr/asn1/CMakeLists.txt | 6 +++--- winpr/libwinpr/bcrypt/CMakeLists.txt | 4 ++-- winpr/libwinpr/crt/CMakeLists.txt | 6 +++--- winpr/libwinpr/dsparse/CMakeLists.txt | 4 ++-- winpr/libwinpr/environment/CMakeLists.txt | 4 ++-- winpr/libwinpr/error/CMakeLists.txt | 4 ++-- winpr/libwinpr/file/CMakeLists.txt | 4 ++-- winpr/libwinpr/handle/CMakeLists.txt | 6 +++--- winpr/libwinpr/heap/CMakeLists.txt | 6 +++--- winpr/libwinpr/interlocked/CMakeLists.txt | 6 +++--- winpr/libwinpr/io/CMakeLists.txt | 4 ++-- winpr/libwinpr/library/CMakeLists.txt | 6 +++--- winpr/libwinpr/path/CMakeLists.txt | 4 ++-- winpr/libwinpr/pipe/CMakeLists.txt | 6 +++--- winpr/libwinpr/registry/CMakeLists.txt | 4 ++-- winpr/libwinpr/rpc/CMakeLists.txt | 4 ++-- winpr/libwinpr/sspi/CMakeLists.txt | 6 +++--- winpr/libwinpr/sspicli/CMakeLists.txt | 4 ++-- winpr/libwinpr/synch/CMakeLists.txt | 6 +++--- winpr/libwinpr/sysinfo/CMakeLists.txt | 4 ++-- winpr/libwinpr/thread/CMakeLists.txt | 6 +++--- winpr/libwinpr/timezone/CMakeLists.txt | 4 ++-- winpr/libwinpr/utils/CMakeLists.txt | 4 ++-- winpr/libwinpr/winhttp/CMakeLists.txt | 4 ++-- winpr/libwinpr/winsock/CMakeLists.txt | 4 ++-- winpr/tools/hash/CMakeLists.txt | 2 +- 72 files changed, 123 insertions(+), 123 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60d9238cf..a796890e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ if(NOT DEFINED BUILD_SHARED_LIBS) set(BUILD_SHARED_LIBS ON) endif() -if(NOT BUILD_SHARED_LIBS AND WITH_MONOLITHIC_BUILD) +if(NOT BUILD_SHARED_LIBS AND MONOLITHIC_BUILD) set(STATIC_CHANNELS ON) endif() diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index f14356f8f..b97b6e27a 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(..) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/audin/client/alsa/CMakeLists.txt b/channels/audin/client/alsa/CMakeLists.txt index e7a0df6a2..4ce57b4b5 100644 --- a/channels/audin/client/alsa/CMakeLists.txt +++ b/channels/audin/client/alsa/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories(${ALSA_INCLUDE_DIRS}) add_library(audin_alsa ${AUDIN_ALSA_SRCS}) set_target_properties(audin_alsa PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(audin_alsa freerdp) else() target_link_libraries(audin_alsa freerdp-utils) diff --git a/channels/audin/client/pulse/CMakeLists.txt b/channels/audin/client/pulse/CMakeLists.txt index bb81b0b99..cef63c119 100644 --- a/channels/audin/client/pulse/CMakeLists.txt +++ b/channels/audin/client/pulse/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${PULSEAUDIO_INCLUDE_DIR}) add_library(audin_pulse ${AUDIN_PULSE_SRCS}) set_target_properties(audin_pulse PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(audin_pulse freerdp) else() target_link_libraries(audin_pulse freerdp-utils) diff --git a/channels/audin/server/CMakeLists.txt b/channels/audin/server/CMakeLists.txt index d728b7009..1dcc7eef9 100644 --- a/channels/audin/server/CMakeLists.txt +++ b/channels/audin/server/CMakeLists.txt @@ -21,7 +21,7 @@ set(${MODULE_PREFIX}_SRCS audin.c PARENT_SCOPE) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS freerdp PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS freerdp-utils freerdp-channels PARENT_SCOPE) diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index f9b59c8ce..be26629b1 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -35,7 +35,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index eabcf0014..a8bb78b25 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -46,7 +46,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS freerdp winpr) else() set(${MODULE_PREFIX}_LIBS freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index 8764e73d1..ea538d579 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -35,7 +35,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp winpr) else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-synch) diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 4898f10e2..0f2af9e65 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -25,7 +25,7 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-interlocked) diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index 5e3cac496..6ed2f42ca 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -41,7 +41,7 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp winpr) else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index 141b79156..79ce01806 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -34,7 +34,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index 674391825..edda80dfb 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -38,7 +38,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp winpr) else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index 782805ba3..de6ff796f 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -32,7 +32,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/rdpsnd/client/MacAudio/CMakeLists.txt b/channels/rdpsnd/client/MacAudio/CMakeLists.txt index 76035fed6..7963962e5 100644 --- a/channels/rdpsnd/client/MacAudio/CMakeLists.txt +++ b/channels/rdpsnd/client/MacAudio/CMakeLists.txt @@ -25,7 +25,7 @@ include_directories(${MACAUDIO_INCLUDE_DIRS}) add_library(rdpsnd_macaudio ${RDPSND_MACAUDIO_SRCS}) set_target_properties(rdpsnd_macaudio PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(rdpsnd_macaudio freerdp) else() target_link_libraries(rdpsnd_macaudio freerdp-utils) diff --git a/channels/rdpsnd/client/alsa/CMakeLists.txt b/channels/rdpsnd/client/alsa/CMakeLists.txt index 1dbe268cf..28a470047 100644 --- a/channels/rdpsnd/client/alsa/CMakeLists.txt +++ b/channels/rdpsnd/client/alsa/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${ALSA_INCLUDE_DIRS}) add_library(rdpsnd_alsa ${RDPSND_ALSA_SRCS}) set_target_properties(rdpsnd_alsa PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(rdpsnd_alsa freerdp) else() target_link_libraries(rdpsnd_alsa freerdp-utils) diff --git a/channels/rdpsnd/client/pulse/CMakeLists.txt b/channels/rdpsnd/client/pulse/CMakeLists.txt index 5ff96249f..317f7877f 100644 --- a/channels/rdpsnd/client/pulse/CMakeLists.txt +++ b/channels/rdpsnd/client/pulse/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories(${PULSEAUDIO_INCLUDE_DIR}) add_library(rdpsnd_pulse ${RDPSND_PULSE_SRCS}) set_target_properties(rdpsnd_pulse PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(rdpsnd_pulse freerdp) else() target_link_libraries(rdpsnd_pulse freerdp-utils) diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index 351d49a97..a99e259fc 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -22,7 +22,7 @@ set(${MODULE_PREFIX}_SRCS rdpsnd.c PARENT_SCOPE) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS freerdp PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE) diff --git a/channels/sample/client/CMakeLists.txt b/channels/sample/client/CMakeLists.txt index e7919065f..b761bd16c 100644 --- a/channels/sample/client/CMakeLists.txt +++ b/channels/sample/client/CMakeLists.txt @@ -25,7 +25,7 @@ set(${MODULE_PREFIX}_SRCS add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index 5e25323cd..c9c51aa9f 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -27,7 +27,7 @@ set(${MODULE_PREFIX}_SRCS add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(serial PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index b8906eb08..7c6dc23f1 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${PCSC_INCLUDE_DIRS}) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp winpr) else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) diff --git a/channels/tsmf/client/CMakeLists.txt b/channels/tsmf/client/CMakeLists.txt index f4533a305..4632aad68 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -40,7 +40,7 @@ include_directories(..) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) else() target_link_libraries(${MODULE_NAME} freerdp-utils) diff --git a/channels/tsmf/client/alsa/CMakeLists.txt b/channels/tsmf/client/alsa/CMakeLists.txt index 4b984e4bf..578a8ea6f 100644 --- a/channels/tsmf/client/alsa/CMakeLists.txt +++ b/channels/tsmf/client/alsa/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${ALSA_INCLUDE_DIRS}) add_library(tsmf_alsa ${TSMF_ALSA_SRCS}) set_target_properties(tsmf_alsa PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(tsmf_alsa freerdp) else() target_link_libraries(tsmf_alsa freerdp-utils) diff --git a/channels/tsmf/client/ffmpeg/CMakeLists.txt b/channels/tsmf/client/ffmpeg/CMakeLists.txt index 290237b5c..fd3796688 100644 --- a/channels/tsmf/client/ffmpeg/CMakeLists.txt +++ b/channels/tsmf/client/ffmpeg/CMakeLists.txt @@ -34,7 +34,7 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(tsmf_ffmpeg freerdp) else() target_link_libraries(tsmf_ffmpeg freerdp-utils) diff --git a/channels/tsmf/client/gstreamer/CMakeLists.txt b/channels/tsmf/client/gstreamer/CMakeLists.txt index f1a72abbf..75411111d 100644 --- a/channels/tsmf/client/gstreamer/CMakeLists.txt +++ b/channels/tsmf/client/gstreamer/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${GSTREAMER_INCLUDE_DIRS}) add_library(tsmf_gstreamer ${TSMF_GSTREAMER_SRCS}) set_target_properties(tsmf_gstreamer PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(tsmf_gstreamer freerdp) else() target_link_libraries(tsmf_gstreamer freerdp-utils) diff --git a/channels/tsmf/client/pulse/CMakeLists.txt b/channels/tsmf/client/pulse/CMakeLists.txt index ef488cd13..ffffdbe12 100644 --- a/channels/tsmf/client/pulse/CMakeLists.txt +++ b/channels/tsmf/client/pulse/CMakeLists.txt @@ -26,7 +26,7 @@ include_directories(${PULSEAUDIO_INCLUDE_DIR}) add_library(tsmf_pulse ${TSMF_PULSE_SRCS}) set_target_properties(tsmf_pulse PROPERTIES PREFIX "") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(tsmf_pulse ${PULSEAUDIO_LIBRARY} freerdp) else() target_link_libraries(tsmf_pulse ${PULSEAUDIO_LIBRARY} freerdp-utils) diff --git a/channels/urbdrc/client/CMakeLists.txt b/channels/urbdrc/client/CMakeLists.txt index 198ed1d28..9bfd56ff9 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -40,7 +40,7 @@ set(${MODULE_PREFIX}_LIBS udev uuid) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) target_link_libraries(${MODULE_NAME} ${MODULE_PREFIX}_LIBS) else() diff --git a/client/DirectFB/CMakeLists.txt b/client/DirectFB/CMakeLists.txt index 287176422..9e004c67f 100644 --- a/client/DirectFB/CMakeLists.txt +++ b/client/DirectFB/CMakeLists.txt @@ -32,7 +32,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${DIRECTFB_LIBRARIES}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/client/Sample/CMakeLists.txt b/client/Sample/CMakeLists.txt index bebd12694..876511a5f 100644 --- a/client/Sample/CMakeLists.txt +++ b/client/Sample/CMakeLists.txt @@ -25,7 +25,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index 853c76169..4d8308827 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -36,7 +36,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) if(WITH_RDPDR AND STATIC_CHANNELS) diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index fb8b2d5ec..26d0512ae 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -96,7 +96,7 @@ include_directories(${CMAKE_SOURCE_DIR}/resources) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/cmake/BuildFeatureCheck.cmake b/cmake/BuildFeatureCheck.cmake index 1be71e7a9..bf71da637 100644 --- a/cmake/BuildFeatureCheck.cmake +++ b/cmake/BuildFeatureCheck.cmake @@ -16,12 +16,12 @@ # limitations under the License. #============================================================================= -# If WITH_MONOLITHIC_BUILD is used with cmake < 2.8.8 build fails -if (WITH_MONOLITHIC_BUILD) +# If MONOLITHIC_BUILD is used with cmake < 2.8.8 build fails +if (MONOLITHIC_BUILD) if(${CMAKE_VERSION} VERSION_LESS 2.8.8) - message(FATAL_ERROR "CMAKE version >= 2.8.8 required for WITH_MONOLITHIC_BUILD") + message(FATAL_ERROR "CMAKE version >= 2.8.8 required for MONOLITHIC_BUILD") endif() -endif(WITH_MONOLITHIC_BUILD) +endif(MONOLITHIC_BUILD) # GetGitRevisionDescription requires FindGit which was added in version 2.8.2 # build won't fail but GIT_REVISION is set to n/a diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index c66f518a3..9a73be55a 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -18,7 +18,7 @@ endif() option(BUILD_TESTING "Build unit tests" OFF) if(${CMAKE_VERSION} VERSION_GREATER 2.8.8) - option(WITH_MONOLITHIC_BUILD "Use monolithic build" OFF) + option(MONOLITHIC_BUILD "Use monolithic build" OFF) endif() option(WITH_CLIENT "Build client binaries" ON) diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index e1fc3b154..22c296868 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -18,7 +18,7 @@ set(MODULE_NAME "freerdp") set(MODULE_PREFIX "FREERDP") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() @@ -37,7 +37,7 @@ foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") diff --git a/libfreerdp/cache/CMakeLists.txt b/libfreerdp/cache/CMakeLists.txt index a3e69b75a..18b678175 100644 --- a/libfreerdp/cache/CMakeLists.txt +++ b/libfreerdp/cache/CMakeLists.txt @@ -28,7 +28,7 @@ set(${MODULE_PREFIX}_SRCS glyph.c cache.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -36,7 +36,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index c68b0d171..01a8a9fa6 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -24,7 +24,7 @@ set(${MODULE_PREFIX}_SRCS wtsvc.c wtsvc.h) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -36,7 +36,7 @@ if(STATIC_CHANNELS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() diff --git a/libfreerdp/codec/CMakeLists.txt b/libfreerdp/codec/CMakeLists.txt index d0044eed1..c94e4ed5d 100644 --- a/libfreerdp/codec/CMakeLists.txt +++ b/libfreerdp/codec/CMakeLists.txt @@ -78,7 +78,7 @@ if(WITH_JPEG) set(FREERDP_JPEG_LIBS jpeg) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -89,7 +89,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} set(${MODULE_PREFIX}_LIBS ${FREERDP_JPEG_LIBS}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/libfreerdp/core/CMakeLists.txt b/libfreerdp/core/CMakeLists.txt index b05d760fd..10dbfbb1b 100644 --- a/libfreerdp/core/CMakeLists.txt +++ b/libfreerdp/core/CMakeLists.txt @@ -92,7 +92,7 @@ set(${MODULE_PREFIX}_SRCS peer.c peer.h) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -100,7 +100,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS winpr) else() set(${MODULE_PREFIX}_LIBS @@ -120,7 +120,7 @@ endif() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/libfreerdp/crypto/CMakeLists.txt b/libfreerdp/crypto/CMakeLists.txt index 579e43f10..2ee9dd96a 100644 --- a/libfreerdp/crypto/CMakeLists.txt +++ b/libfreerdp/crypto/CMakeLists.txt @@ -28,7 +28,7 @@ set(${MODULE_PREFIX}_SRCS crypto.c tls.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -42,7 +42,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} set(${MODULE_PREFIX}_LIBS ${OPENSSL_LIBRARIES}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-sspi) @@ -58,7 +58,7 @@ else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) diff --git a/libfreerdp/gdi/CMakeLists.txt b/libfreerdp/gdi/CMakeLists.txt index ae490cef0..18ebf8fca 100644 --- a/libfreerdp/gdi/CMakeLists.txt +++ b/libfreerdp/gdi/CMakeLists.txt @@ -39,7 +39,7 @@ set(${MODULE_PREFIX}_SRCS gdi.c gdi.h) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -47,7 +47,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} diff --git a/libfreerdp/locale/CMakeLists.txt b/libfreerdp/locale/CMakeLists.txt index e8a43db37..2fc8cfc57 100644 --- a/libfreerdp/locale/CMakeLists.txt +++ b/libfreerdp/locale/CMakeLists.txt @@ -72,7 +72,7 @@ if(NOT WIN32) endif() endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -80,7 +80,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) diff --git a/libfreerdp/rail/CMakeLists.txt b/libfreerdp/rail/CMakeLists.txt index da37af51c..1cd8db412 100644 --- a/libfreerdp/rail/CMakeLists.txt +++ b/libfreerdp/rail/CMakeLists.txt @@ -25,7 +25,7 @@ set(${MODULE_PREFIX}_SRCS rail.c librail.h) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(FREERDP_RAIL_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) diff --git a/libfreerdp/utils/CMakeLists.txt b/libfreerdp/utils/CMakeLists.txt index 2b70d87b8..4fd8676f0 100644 --- a/libfreerdp/utils/CMakeLists.txt +++ b/libfreerdp/utils/CMakeLists.txt @@ -52,7 +52,7 @@ if(NOT WIN32) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} msusb.c) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -72,7 +72,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index 3608c3f61..6f3b5341b 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -28,7 +28,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp freerdp-channels-server) diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index 4688b0fa9..b8138b49a 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -51,7 +51,7 @@ if(WITH_WIN8) set(${MODULE_PREFIX}_LIBS d3d11 dxgi dxguid) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) else() diff --git a/server/X11/CMakeLists.txt b/server/X11/CMakeLists.txt index a2fe3f03e..932c742d5 100644 --- a/server/X11/CMakeLists.txt +++ b/server/X11/CMakeLists.txt @@ -63,7 +63,7 @@ if(WITH_XTEST) target_link_libraries(${MODULE_NAME} ${XTEST_LIBRARIES}) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} freerdp) target_link_libraries(${MODULE_NAME} winpr) else() diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index df1c31e48..e14b18c7a 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -24,7 +24,7 @@ if (APPLE) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-flat_namespace,-undefined,warning") endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() @@ -42,7 +42,7 @@ foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) add_subdirectory(${${MODULE_PREFIX}_SUBMODULE}) endforeach() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES}) set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$") diff --git a/winpr/libwinpr/asn1/CMakeLists.txt b/winpr/libwinpr/asn1/CMakeLists.txt index 0698bfc6e..379714d22 100644 --- a/winpr/libwinpr/asn1/CMakeLists.txt +++ b/winpr/libwinpr/asn1/CMakeLists.txt @@ -21,11 +21,11 @@ set(MODULE_PREFIX "WINPR_ASN1") set(${MODULE_PREFIX}_SRCS asn1.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/bcrypt/CMakeLists.txt b/winpr/libwinpr/bcrypt/CMakeLists.txt index fc58b0b78..978a8a480 100644 --- a/winpr/libwinpr/bcrypt/CMakeLists.txt +++ b/winpr/libwinpr/bcrypt/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_BCRYPT") set(${MODULE_PREFIX}_SRCS bcrypt.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -35,7 +35,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SO set(${MODULE_PREFIX}_LIBS ${ZLIB_LIBRARIES}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() if(NOT WIN32) diff --git a/winpr/libwinpr/crt/CMakeLists.txt b/winpr/libwinpr/crt/CMakeLists.txt index 0bf62f777..4d8a5782a 100644 --- a/winpr/libwinpr/crt/CMakeLists.txt +++ b/winpr/libwinpr/crt/CMakeLists.txt @@ -24,11 +24,11 @@ set(${MODULE_PREFIX}_SRCS memory.c string.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -36,7 +36,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/dsparse/CMakeLists.txt b/winpr/libwinpr/dsparse/CMakeLists.txt index eb59108cb..a4006e1ae 100644 --- a/winpr/libwinpr/dsparse/CMakeLists.txt +++ b/winpr/libwinpr/dsparse/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_DSPARSE") set(${MODULE_PREFIX}_SRCS dsparse.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/environment/CMakeLists.txt b/winpr/libwinpr/environment/CMakeLists.txt index 207632a69..8881db0a9 100644 --- a/winpr/libwinpr/environment/CMakeLists.txt +++ b/winpr/libwinpr/environment/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_ENVIRONMENT") set(${MODULE_PREFIX}_SRCS environment.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/error/CMakeLists.txt b/winpr/libwinpr/error/CMakeLists.txt index 65790882b..b3dc37243 100644 --- a/winpr/libwinpr/error/CMakeLists.txt +++ b/winpr/libwinpr/error/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_ERROR") set(${MODULE_PREFIX}_SRCS error.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/file/CMakeLists.txt b/winpr/libwinpr/file/CMakeLists.txt index 5e78ba9f2..13b5c241b 100644 --- a/winpr/libwinpr/file/CMakeLists.txt +++ b/winpr/libwinpr/file/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_FILE") set(${MODULE_PREFIX}_SRCS file.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() if(NOT WIN32) diff --git a/winpr/libwinpr/handle/CMakeLists.txt b/winpr/libwinpr/handle/CMakeLists.txt index 207d4885e..6f33169d0 100644 --- a/winpr/libwinpr/handle/CMakeLists.txt +++ b/winpr/libwinpr/handle/CMakeLists.txt @@ -25,11 +25,11 @@ set(${MODULE_PREFIX}_SRCS handle.c table.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -45,7 +45,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) set(WINPR_SYNCH_LIBS ${WINPR_SYNCH_LIBS} rt) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/winpr/libwinpr/heap/CMakeLists.txt b/winpr/libwinpr/heap/CMakeLists.txt index fcefa4221..0997c5b13 100644 --- a/winpr/libwinpr/heap/CMakeLists.txt +++ b/winpr/libwinpr/heap/CMakeLists.txt @@ -21,11 +21,11 @@ set(MODULE_PREFIX "WINPR_HEAP") set(${MODULE_PREFIX}_SRCS heap.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/interlocked/CMakeLists.txt b/winpr/libwinpr/interlocked/CMakeLists.txt index 0ec9055a0..508804e6e 100644 --- a/winpr/libwinpr/interlocked/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/CMakeLists.txt @@ -21,11 +21,11 @@ set(MODULE_PREFIX "WINPR_INTERLOCKED") set(${MODULE_PREFIX}_SRCS interlocked.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() target_link_libraries(${MODULE_NAME} winpr-crt winpr-handle winpr-synch) diff --git a/winpr/libwinpr/io/CMakeLists.txt b/winpr/libwinpr/io/CMakeLists.txt index 598cb20a2..39794bf2f 100644 --- a/winpr/libwinpr/io/CMakeLists.txt +++ b/winpr/libwinpr/io/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_IO") set(${MODULE_PREFIX}_SRCS io.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/library/CMakeLists.txt b/winpr/libwinpr/library/CMakeLists.txt index 33acc7c3f..b9b9a23ee 100644 --- a/winpr/libwinpr/library/CMakeLists.txt +++ b/winpr/libwinpr/library/CMakeLists.txt @@ -21,11 +21,11 @@ set(MODULE_PREFIX "WINPR_LIBRARY") set(${MODULE_PREFIX}_SRCS library.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() if(NOT WIN32) diff --git a/winpr/libwinpr/path/CMakeLists.txt b/winpr/libwinpr/path/CMakeLists.txt index d45318a57..3d5ac2731 100644 --- a/winpr/libwinpr/path/CMakeLists.txt +++ b/winpr/libwinpr/path/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_PATH") set(${MODULE_PREFIX}_SRCS path.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() target_link_libraries(${MODULE_NAME} winpr-crt winpr-heap) diff --git a/winpr/libwinpr/pipe/CMakeLists.txt b/winpr/libwinpr/pipe/CMakeLists.txt index 45e824a24..034abbee6 100644 --- a/winpr/libwinpr/pipe/CMakeLists.txt +++ b/winpr/libwinpr/pipe/CMakeLists.txt @@ -21,11 +21,11 @@ set(MODULE_PREFIX "WINPR_PIPE") set(${MODULE_PREFIX}_SRCS pipe.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() target_link_libraries(${MODULE_NAME} winpr-crt winpr-file winpr-handle) diff --git a/winpr/libwinpr/registry/CMakeLists.txt b/winpr/libwinpr/registry/CMakeLists.txt index b76c1014f..3ed84b94a 100644 --- a/winpr/libwinpr/registry/CMakeLists.txt +++ b/winpr/libwinpr/registry/CMakeLists.txt @@ -23,7 +23,7 @@ set(${MODULE_PREFIX}_SRCS registry_reg.h registry.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -31,7 +31,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() target_link_libraries(${MODULE_NAME} winpr-utils) diff --git a/winpr/libwinpr/rpc/CMakeLists.txt b/winpr/libwinpr/rpc/CMakeLists.txt index ec3c3bb39..a871e748e 100644 --- a/winpr/libwinpr/rpc/CMakeLists.txt +++ b/winpr/libwinpr/rpc/CMakeLists.txt @@ -41,7 +41,7 @@ set(${MODULE_PREFIX}_SRCS ndr_union.h midl.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -61,7 +61,7 @@ else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/winpr/libwinpr/sspi/CMakeLists.txt b/winpr/libwinpr/sspi/CMakeLists.txt index 197aa4639..6e3ae9416 100644 --- a/winpr/libwinpr/sspi/CMakeLists.txt +++ b/winpr/libwinpr/sspi/CMakeLists.txt @@ -53,7 +53,7 @@ if(NOT WITH_NATIVE_SSPI) ${${MODULE_PREFIX}_SRCS}) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${WINPR_SSPI_SRCS}) else() add_library(${MODULE_NAME} ${WINPR_SSPI_SRCS}) @@ -74,7 +74,7 @@ else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) else() if (NOT WIN32) @@ -87,7 +87,7 @@ else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-utils) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/winpr/libwinpr/sspicli/CMakeLists.txt b/winpr/libwinpr/sspicli/CMakeLists.txt index 9374da3fb..ced818b91 100644 --- a/winpr/libwinpr/sspicli/CMakeLists.txt +++ b/winpr/libwinpr/sspicli/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_SSPICLI") set(${MODULE_PREFIX}_SRCS sspicli.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/synch/CMakeLists.txt b/winpr/libwinpr/synch/CMakeLists.txt index 78f5de5af..4d6bda84b 100644 --- a/winpr/libwinpr/synch/CMakeLists.txt +++ b/winpr/libwinpr/synch/CMakeLists.txt @@ -37,11 +37,11 @@ set(${MODULE_PREFIX}_SRCS timer.c wait.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -57,7 +57,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) set(WINPR_SYNCH_LIBS ${WINPR_SYNCH_LIBS} rt) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) diff --git a/winpr/libwinpr/sysinfo/CMakeLists.txt b/winpr/libwinpr/sysinfo/CMakeLists.txt index f05d6c553..8a84e8ab5 100644 --- a/winpr/libwinpr/sysinfo/CMakeLists.txt +++ b/winpr/libwinpr/sysinfo/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_SYSINFO") set(${MODULE_PREFIX}_SRCS sysinfo.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/thread/CMakeLists.txt b/winpr/libwinpr/thread/CMakeLists.txt index 66a354c50..c15fecf63 100644 --- a/winpr/libwinpr/thread/CMakeLists.txt +++ b/winpr/libwinpr/thread/CMakeLists.txt @@ -27,11 +27,11 @@ set(${MODULE_PREFIX}_SRCS thread.c tls.c) -if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) +if(MSVC AND (NOT MONOLITHIC_BUILD)) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -47,7 +47,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-handle) diff --git a/winpr/libwinpr/timezone/CMakeLists.txt b/winpr/libwinpr/timezone/CMakeLists.txt index afbbd50d7..c37638a0a 100644 --- a/winpr/libwinpr/timezone/CMakeLists.txt +++ b/winpr/libwinpr/timezone/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_TIMEZONE") set(${MODULE_PREFIX}_SRCS timezone.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/utils/CMakeLists.txt b/winpr/libwinpr/utils/CMakeLists.txt index eb327c5e5..1ca3a04bc 100644 --- a/winpr/libwinpr/utils/CMakeLists.txt +++ b/winpr/libwinpr/utils/CMakeLists.txt @@ -27,7 +27,7 @@ set(${MODULE_PREFIX}_SRCS include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${OPENSSL_INCLUDE_DIR}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -39,7 +39,7 @@ set(${MODULE_PREFIX}_LIBS ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() if (NOT WIN32) diff --git a/winpr/libwinpr/winhttp/CMakeLists.txt b/winpr/libwinpr/winhttp/CMakeLists.txt index ccdf271f5..e84912d4d 100644 --- a/winpr/libwinpr/winhttp/CMakeLists.txt +++ b/winpr/libwinpr/winhttp/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_WINHTTP") set(${MODULE_PREFIX}_SRCS winhttp.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -29,7 +29,7 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/winpr/libwinpr/winsock/CMakeLists.txt b/winpr/libwinpr/winsock/CMakeLists.txt index abdab2387..b70a25bcc 100644 --- a/winpr/libwinpr/winsock/CMakeLists.txt +++ b/winpr/libwinpr/winsock/CMakeLists.txt @@ -21,7 +21,7 @@ set(MODULE_PREFIX "WINPR_WINSOCK") set(${MODULE_PREFIX}_SRCS winsock.c) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) else() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,7 +33,7 @@ if(WIN32) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32) endif() -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/winpr/tools/hash/CMakeLists.txt b/winpr/tools/hash/CMakeLists.txt index 1e671ab0e..c8e0205c5 100644 --- a/winpr/tools/hash/CMakeLists.txt +++ b/winpr/tools/hash/CMakeLists.txt @@ -23,7 +23,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) -if(WITH_MONOLITHIC_BUILD) +if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} winpr) else() target_link_libraries(${MODULE_NAME} winpr-utils) From e60a092d81b3a232876c869fccfb804606ef8983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 23:02:04 -0400 Subject: [PATCH 31/43] freerdp: fix headers --- CMakeLists.txt | 2 +- channels/audin/CMakeLists.txt | 2 +- channels/audin/client/CMakeLists.txt | 2 +- channels/audin/client/alsa/CMakeLists.txt | 2 +- channels/audin/client/alsa/audin_alsa.c | 2 +- channels/audin/client/audin_main.c | 2 +- channels/audin/client/audin_main.h | 2 +- channels/audin/client/pulse/CMakeLists.txt | 2 +- channels/audin/client/pulse/audin_pulse.c | 2 +- channels/audin/server/CMakeLists.txt | 2 +- channels/audin/server/audin.c | 2 +- channels/client/CMakeLists.txt | 2 +- channels/cliprdr/CMakeLists.txt | 2 +- channels/cliprdr/client/CMakeLists.txt | 2 +- channels/cliprdr/client/cliprdr_constants.h | 2 +- channels/cliprdr/client/cliprdr_format.c | 2 +- channels/cliprdr/client/cliprdr_format.h | 2 +- channels/cliprdr/client/cliprdr_main.c | 2 +- channels/cliprdr/client/cliprdr_main.h | 2 +- channels/disk/CMakeLists.txt | 2 +- channels/disk/client/CMakeLists.txt | 2 +- channels/disk/client/statvfs.c | 2 +- channels/drdynvc/CMakeLists.txt | 2 +- channels/drdynvc/client/CMakeLists.txt | 2 +- channels/drdynvc/client/drdynvc_main.c | 2 +- channels/drdynvc/client/drdynvc_main.h | 2 +- channels/drdynvc/client/drdynvc_types.h | 2 +- channels/drdynvc/client/dvcman.c | 2 +- channels/drdynvc/client/dvcman.h | 2 +- channels/parallel/CMakeLists.txt | 2 +- channels/parallel/client/CMakeLists.txt | 2 +- channels/parallel/client/parallel_main.c | 2 +- channels/printer/CMakeLists.txt | 2 +- channels/printer/client/CMakeLists.txt | 2 +- channels/rail/CMakeLists.txt | 2 +- channels/rail/client/CMakeLists.txt | 2 +- channels/rail/client/rail_main.c | 2 +- channels/rail/client/rail_main.h | 2 +- channels/rail/client/rail_orders.c | 2 +- channels/rail/client/rail_orders.h | 2 +- channels/rdpdr/CMakeLists.txt | 2 +- channels/rdpdr/client/CMakeLists.txt | 2 +- channels/rdpsnd/CMakeLists.txt | 2 +- channels/rdpsnd/client/CMakeLists.txt | 2 +- channels/rdpsnd/client/MacAudio/CMakeLists.txt | 2 +- channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c | 2 +- channels/rdpsnd/client/alsa/CMakeLists.txt | 2 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 2 +- channels/rdpsnd/client/pulse/CMakeLists.txt | 2 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 2 +- channels/rdpsnd/client/rdpsnd_main.c | 2 +- channels/rdpsnd/client/rdpsnd_main.h | 2 +- channels/rdpsnd/server/CMakeLists.txt | 2 +- channels/rdpsnd/server/rdpsnd.c | 2 +- channels/sample/CMakeLists.txt | 2 +- channels/sample/client/CMakeLists.txt | 2 +- channels/sample/client/skel_main.c | 2 +- channels/sample/client/skel_main.h | 2 +- channels/serial/CMakeLists.txt | 2 +- channels/serial/client/CMakeLists.txt | 2 +- channels/serial/client/serial_constants.h | 2 +- channels/serial/client/serial_main.c | 2 +- channels/serial/client/serial_tty.c | 2 +- channels/serial/client/serial_tty.h | 2 +- channels/server/CMakeLists.txt | 2 +- channels/smartcard/CMakeLists.txt | 2 +- channels/smartcard/client/CMakeLists.txt | 2 +- channels/smartcard/client/scard_main.c | 2 +- channels/smartcard/client/scard_main.h | 2 +- channels/tsmf/CMakeLists.txt | 2 +- channels/tsmf/client/CMakeLists.txt | 2 +- channels/tsmf/client/alsa/CMakeLists.txt | 2 +- channels/tsmf/client/alsa/tsmf_alsa.c | 2 +- channels/tsmf/client/ffmpeg/CMakeLists.txt | 2 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 2 +- channels/tsmf/client/gstreamer/CMakeLists.txt | 2 +- channels/tsmf/client/gstreamer/tsmf_gstreamer.c | 2 +- channels/tsmf/client/pulse/CMakeLists.txt | 2 +- channels/tsmf/client/pulse/tsmf_pulse.c | 2 +- channels/tsmf/client/tsmf_audio.c | 2 +- channels/tsmf/client/tsmf_audio.h | 2 +- channels/tsmf/client/tsmf_codec.c | 2 +- channels/tsmf/client/tsmf_codec.h | 2 +- channels/tsmf/client/tsmf_constants.h | 2 +- channels/tsmf/client/tsmf_decoder.c | 2 +- channels/tsmf/client/tsmf_decoder.h | 2 +- channels/tsmf/client/tsmf_ifman.c | 2 +- channels/tsmf/client/tsmf_ifman.h | 2 +- channels/tsmf/client/tsmf_main.c | 2 +- channels/tsmf/client/tsmf_main.h | 2 +- channels/tsmf/client/tsmf_media.c | 2 +- channels/tsmf/client/tsmf_media.h | 2 +- channels/tsmf/client/tsmf_types.h | 2 +- channels/urbdrc/CMakeLists.txt | 2 +- channels/urbdrc/client/CMakeLists.txt | 2 +- channels/urbdrc/client/data_transfer.c | 2 +- channels/urbdrc/client/data_transfer.h | 2 +- channels/urbdrc/client/isoch_queue.c | 2 +- channels/urbdrc/client/isoch_queue.h | 2 +- channels/urbdrc/client/searchman.c | 2 +- channels/urbdrc/client/searchman.h | 2 +- channels/urbdrc/client/urbdrc_main.c | 2 +- channels/urbdrc/client/urbdrc_main.h | 2 +- channels/urbdrc/client/urbdrc_types.h | 2 +- channels/urbdrc/libusb/CMakeLists.txt | 2 +- channels/urbdrc/libusb/libusb_udevice.c | 2 +- channels/urbdrc/libusb/libusb_udevice.h | 2 +- channels/urbdrc/libusb/libusb_udevman.c | 2 +- channels/urbdrc/libusb/request_queue.c | 2 +- channels/urbdrc/libusb/request_queue.h | 2 +- client/CMakeLists.txt | 2 +- client/DirectFB/CMakeLists.txt | 2 +- client/DirectFB/df_event.c | 2 +- client/DirectFB/df_event.h | 2 +- client/DirectFB/df_graphics.c | 2 +- client/DirectFB/df_graphics.h | 2 +- client/DirectFB/dfreerdp.c | 2 +- client/DirectFB/dfreerdp.h | 2 +- client/Sample/CMakeLists.txt | 2 +- client/Sample/freerdp.c | 2 +- client/Windows/CMakeLists.txt | 2 +- client/Windows/wf_cliprdr.c | 2 +- client/Windows/wf_cliprdr.h | 2 +- client/Windows/wf_event.c | 2 +- client/Windows/wf_event.h | 2 +- client/Windows/wf_gdi.c | 2 +- client/Windows/wf_gdi.h | 2 +- client/Windows/wf_graphics.c | 2 +- client/Windows/wf_graphics.h | 2 +- client/Windows/wf_rail.c | 2 +- client/Windows/wf_rail.h | 2 +- client/Windows/wf_window.c | 2 +- client/Windows/wf_window.h | 2 +- client/Windows/wfreerdp.c | 2 +- client/Windows/wfreerdp.h | 2 +- client/X11/xf_cliprdr.c | 2 +- client/X11/xf_cliprdr.h | 2 +- client/X11/xf_event.c | 2 +- client/X11/xf_event.h | 2 +- client/X11/xf_gdi.c | 2 +- client/X11/xf_gdi.h | 2 +- client/X11/xf_graphics.c | 2 +- client/X11/xf_graphics.h | 2 +- client/X11/xf_keyboard.c | 2 +- client/X11/xf_keyboard.h | 2 +- client/X11/xf_monitor.c | 2 +- client/X11/xf_monitor.h | 2 +- client/X11/xf_rail.c | 2 +- client/X11/xf_rail.h | 2 +- client/X11/xf_tsmf.c | 2 +- client/X11/xf_tsmf.h | 2 +- client/X11/xf_window.c | 2 +- client/X11/xf_window.h | 2 +- client/X11/xfreerdp.c | 2 +- client/X11/xfreerdp.h | 2 +- cunit/CMakeLists.txt | 2 +- cunit/test_bitmap.c | 2 +- cunit/test_bitmap.h | 2 +- cunit/test_cliprdr.c | 2 +- cunit/test_cliprdr.h | 2 +- cunit/test_color.c | 2 +- cunit/test_color.h | 2 +- cunit/test_drdynvc.c | 2 +- cunit/test_drdynvc.h | 2 +- cunit/test_freerdp.c | 2 +- cunit/test_freerdp.h | 2 +- cunit/test_gcc.c | 2 +- cunit/test_gcc.h | 2 +- cunit/test_gdi.c | 2 +- cunit/test_gdi.h | 2 +- cunit/test_license.c | 2 +- cunit/test_license.h | 2 +- cunit/test_mcs.c | 2 +- cunit/test_mcs.h | 2 +- cunit/test_mppc.c | 2 +- cunit/test_mppc.h | 2 +- cunit/test_mppc_enc.c | 2 +- cunit/test_mppc_enc.h | 2 +- cunit/test_nsc.c | 2 +- cunit/test_nsc.h | 2 +- cunit/test_ntlm.c | 2 +- cunit/test_ntlm.h | 2 +- cunit/test_orders.c | 2 +- cunit/test_orders.h | 2 +- cunit/test_pcap.c | 2 +- cunit/test_pcap.h | 2 +- cunit/test_rail.c | 2 +- cunit/test_rail.h | 2 +- cunit/test_rfx.c | 2 +- cunit/test_rfx.h | 2 +- include/CMakeLists.txt | 2 +- include/freerdp/altsec.h | 2 +- include/freerdp/api.h | 2 +- include/freerdp/cache/bitmap.h | 2 +- include/freerdp/cache/brush.h | 2 +- include/freerdp/cache/cache.h | 2 +- include/freerdp/cache/glyph.h | 2 +- include/freerdp/cache/nine_grid.h | 2 +- include/freerdp/cache/offscreen.h | 2 +- include/freerdp/cache/palette.h | 2 +- include/freerdp/cache/pointer.h | 2 +- include/freerdp/channels/channels.h | 2 +- include/freerdp/channels/rdpsnd.h | 2 +- include/freerdp/channels/wtsvc.h | 2 +- include/freerdp/client/cliprdr.h | 2 +- include/freerdp/client/tsmf.h | 2 +- include/freerdp/codec/bitmap.h | 2 +- include/freerdp/codec/color.h | 2 +- include/freerdp/codec/jpeg.h | 2 +- include/freerdp/codec/mppc_dec.h | 2 +- include/freerdp/codec/mppc_enc.h | 2 +- include/freerdp/codec/nsc.h | 2 +- include/freerdp/codec/rfx.h | 2 +- include/freerdp/config.h.in | 2 +- include/freerdp/constants.h | 2 +- include/freerdp/crypto/der.h | 2 +- include/freerdp/crypto/er.h | 2 +- include/freerdp/dvc.h | 2 +- include/freerdp/extension.h | 2 +- include/freerdp/freerdp.h | 2 +- include/freerdp/gdi/16bpp.h | 2 +- include/freerdp/gdi/32bpp.h | 2 +- include/freerdp/gdi/8bpp.h | 2 +- include/freerdp/gdi/bitmap.h | 2 +- include/freerdp/gdi/brush.h | 2 +- include/freerdp/gdi/clipping.h | 2 +- include/freerdp/gdi/dc.h | 2 +- include/freerdp/gdi/drawing.h | 2 +- include/freerdp/gdi/gdi.h | 2 +- include/freerdp/gdi/line.h | 2 +- include/freerdp/gdi/palette.h | 2 +- include/freerdp/gdi/pen.h | 2 +- include/freerdp/gdi/region.h | 2 +- include/freerdp/gdi/shape.h | 2 +- include/freerdp/graphics.h | 2 +- include/freerdp/input.h | 2 +- include/freerdp/listener.h | 2 +- include/freerdp/peer.h | 2 +- include/freerdp/pointer.h | 2 +- include/freerdp/primary.h | 2 +- include/freerdp/rail.h | 2 +- include/freerdp/rail/icon.h | 2 +- include/freerdp/rail/rail.h | 2 +- include/freerdp/rail/window.h | 2 +- include/freerdp/rail/window_list.h | 2 +- include/freerdp/secondary.h | 2 +- include/freerdp/server/audin.h | 2 +- include/freerdp/server/rdpsnd.h | 2 +- include/freerdp/settings.h | 2 +- include/freerdp/svc.h | 2 +- include/freerdp/types.h | 2 +- include/freerdp/update.h | 2 +- include/freerdp/utils/args.h | 2 +- include/freerdp/utils/bitmap.h | 2 +- include/freerdp/utils/debug.h | 2 +- include/freerdp/utils/dsp.h | 2 +- include/freerdp/utils/event.h | 2 +- include/freerdp/utils/file.h | 2 +- include/freerdp/utils/hexdump.h | 2 +- include/freerdp/utils/list.h | 2 +- include/freerdp/utils/load_plugin.h | 2 +- include/freerdp/utils/memory.h | 2 +- include/freerdp/utils/msusb.h | 2 +- include/freerdp/utils/passphrase.h | 2 +- include/freerdp/utils/pcap.h | 2 +- include/freerdp/utils/print.h | 2 +- include/freerdp/utils/profiler.h | 2 +- include/freerdp/utils/rail.h | 2 +- include/freerdp/utils/signal.h | 2 +- include/freerdp/utils/sleep.h | 2 +- include/freerdp/utils/stopwatch.h | 2 +- include/freerdp/utils/stream.h | 2 +- include/freerdp/utils/string.h | 2 +- include/freerdp/utils/svc_plugin.h | 2 +- include/freerdp/utils/tcp.h | 2 +- include/freerdp/utils/thread.h | 2 +- include/freerdp/utils/time.h | 2 +- include/freerdp/utils/uds.h | 2 +- include/freerdp/utils/unicode.h | 2 +- include/freerdp/utils/wait_obj.h | 2 +- include/freerdp/window.h | 2 +- keymaps/CMakeLists.txt | 2 +- libfreerdp/CMakeLists.txt | 2 +- libfreerdp/cache/CMakeLists.txt | 2 +- libfreerdp/cache/bitmap.c | 2 +- libfreerdp/cache/brush.c | 2 +- libfreerdp/cache/cache.c | 2 +- libfreerdp/cache/glyph.c | 2 +- libfreerdp/cache/nine_grid.c | 2 +- libfreerdp/cache/offscreen.c | 2 +- libfreerdp/cache/palette.c | 2 +- libfreerdp/cache/pointer.c | 2 +- libfreerdp/channels/CMakeLists.txt | 2 +- libfreerdp/channels/libchannels.c | 2 +- libfreerdp/channels/libchannels.h | 2 +- libfreerdp/channels/wtsvc.c | 2 +- libfreerdp/channels/wtsvc.h | 2 +- libfreerdp/codec/CMakeLists.txt | 2 +- libfreerdp/codec/bitmap.c | 2 +- libfreerdp/codec/color.c | 2 +- libfreerdp/codec/include/bitmap.c | 2 +- libfreerdp/codec/jpeg.c | 2 +- libfreerdp/codec/mppc_dec.c | 2 +- libfreerdp/codec/mppc_enc.c | 2 +- libfreerdp/codec/nsc.c | 2 +- libfreerdp/codec/nsc_encode.c | 2 +- libfreerdp/codec/nsc_encode.h | 2 +- libfreerdp/codec/nsc_sse2.c | 2 +- libfreerdp/codec/nsc_sse2.h | 2 +- libfreerdp/codec/nsc_types.h | 2 +- libfreerdp/codec/rfx.c | 2 +- libfreerdp/codec/rfx_bitstream.h | 2 +- libfreerdp/codec/rfx_constants.h | 2 +- libfreerdp/codec/rfx_decode.c | 2 +- libfreerdp/codec/rfx_decode.h | 2 +- libfreerdp/codec/rfx_differential.c | 2 +- libfreerdp/codec/rfx_differential.h | 2 +- libfreerdp/codec/rfx_dwt.c | 2 +- libfreerdp/codec/rfx_dwt.h | 2 +- libfreerdp/codec/rfx_encode.c | 2 +- libfreerdp/codec/rfx_encode.h | 2 +- libfreerdp/codec/rfx_neon.c | 2 +- libfreerdp/codec/rfx_neon.h | 2 +- libfreerdp/codec/rfx_pool.c | 2 +- libfreerdp/codec/rfx_pool.h | 2 +- libfreerdp/codec/rfx_quantization.c | 2 +- libfreerdp/codec/rfx_quantization.h | 2 +- libfreerdp/codec/rfx_rlgr.c | 2 +- libfreerdp/codec/rfx_rlgr.h | 2 +- libfreerdp/codec/rfx_sse2.c | 2 +- libfreerdp/codec/rfx_sse2.h | 2 +- libfreerdp/codec/rfx_types.h | 2 +- libfreerdp/core/CMakeLists.txt | 2 +- libfreerdp/core/activation.c | 2 +- libfreerdp/core/activation.h | 2 +- libfreerdp/core/capabilities.c | 2 +- libfreerdp/core/capabilities.h | 2 +- libfreerdp/core/certificate.c | 2 +- libfreerdp/core/certificate.h | 2 +- libfreerdp/core/channel.c | 2 +- libfreerdp/core/channel.h | 2 +- libfreerdp/core/connection.c | 2 +- libfreerdp/core/connection.h | 2 +- libfreerdp/core/errinfo.c | 2 +- libfreerdp/core/errinfo.h | 2 +- libfreerdp/core/extension.c | 2 +- libfreerdp/core/extension.h | 2 +- libfreerdp/core/fastpath.c | 2 +- libfreerdp/core/fastpath.h | 2 +- libfreerdp/core/freerdp.c | 2 +- libfreerdp/core/gcc.c | 2 +- libfreerdp/core/gcc.h | 2 +- libfreerdp/core/graphics.c | 2 +- libfreerdp/core/http.c | 2 +- libfreerdp/core/http.h | 2 +- libfreerdp/core/info.c | 2 +- libfreerdp/core/info.h | 2 +- libfreerdp/core/input.c | 2 +- libfreerdp/core/input.h | 2 +- libfreerdp/core/license.c | 2 +- libfreerdp/core/license.h | 2 +- libfreerdp/core/listener.c | 2 +- libfreerdp/core/listener.h | 2 +- libfreerdp/core/mcs.c | 2 +- libfreerdp/core/mcs.h | 2 +- libfreerdp/core/nego.c | 2 +- libfreerdp/core/nego.h | 2 +- libfreerdp/core/orders.c | 2 +- libfreerdp/core/orders.h | 2 +- libfreerdp/core/peer.c | 2 +- libfreerdp/core/peer.h | 2 +- libfreerdp/core/rdp.c | 2 +- libfreerdp/core/rdp.h | 2 +- libfreerdp/core/redirection.c | 2 +- libfreerdp/core/redirection.h | 2 +- libfreerdp/core/rpc.c | 2 +- libfreerdp/core/rpc.h | 2 +- libfreerdp/core/security.c | 2 +- libfreerdp/core/security.h | 2 +- libfreerdp/core/settings.c | 2 +- libfreerdp/core/surface.c | 2 +- libfreerdp/core/surface.h | 2 +- libfreerdp/core/tcp.c | 2 +- libfreerdp/core/tcp.h | 2 +- libfreerdp/core/timezone.c | 2 +- libfreerdp/core/timezone.h | 2 +- libfreerdp/core/tpdu.c | 2 +- libfreerdp/core/tpdu.h | 2 +- libfreerdp/core/tpkt.c | 2 +- libfreerdp/core/tpkt.h | 2 +- libfreerdp/core/transport.c | 2 +- libfreerdp/core/transport.h | 2 +- libfreerdp/core/tsg.c | 2 +- libfreerdp/core/tsg.h | 2 +- libfreerdp/core/update.c | 2 +- libfreerdp/core/update.h | 2 +- libfreerdp/core/window.c | 2 +- libfreerdp/core/window.h | 2 +- libfreerdp/crypto/CMakeLists.txt | 2 +- libfreerdp/crypto/der.c | 2 +- libfreerdp/crypto/er.c | 2 +- libfreerdp/gdi/16bpp.c | 2 +- libfreerdp/gdi/32bpp.c | 2 +- libfreerdp/gdi/8bpp.c | 2 +- libfreerdp/gdi/CMakeLists.txt | 2 +- libfreerdp/gdi/bitmap.c | 2 +- libfreerdp/gdi/brush.c | 2 +- libfreerdp/gdi/clipping.c | 2 +- libfreerdp/gdi/dc.c | 2 +- libfreerdp/gdi/drawing.c | 2 +- libfreerdp/gdi/gdi.c | 2 +- libfreerdp/gdi/gdi.h | 2 +- libfreerdp/gdi/graphics.c | 2 +- libfreerdp/gdi/graphics.h | 2 +- libfreerdp/gdi/include/line.c | 2 +- libfreerdp/gdi/line.c | 2 +- libfreerdp/gdi/palette.c | 2 +- libfreerdp/gdi/pen.c | 2 +- libfreerdp/gdi/region.c | 2 +- libfreerdp/gdi/shape.c | 2 +- libfreerdp/locale/CMakeLists.txt | 2 +- libfreerdp/rail/CMakeLists.txt | 2 +- libfreerdp/rail/icon.c | 2 +- libfreerdp/rail/librail.h | 2 +- libfreerdp/rail/rail.c | 2 +- libfreerdp/rail/window.c | 2 +- libfreerdp/rail/window_list.c | 2 +- libfreerdp/utils/CMakeLists.txt | 2 +- libfreerdp/utils/args.c | 2 +- libfreerdp/utils/bitmap.c | 2 +- libfreerdp/utils/dsp.c | 2 +- libfreerdp/utils/event.c | 2 +- libfreerdp/utils/file.c | 2 +- libfreerdp/utils/hexdump.c | 2 +- libfreerdp/utils/list.c | 2 +- libfreerdp/utils/load_plugin.c | 2 +- libfreerdp/utils/memory.c | 2 +- libfreerdp/utils/msusb.c | 2 +- libfreerdp/utils/passphrase.c | 2 +- libfreerdp/utils/pcap.c | 2 +- libfreerdp/utils/profiler.c | 2 +- libfreerdp/utils/rail.c | 2 +- libfreerdp/utils/signal.c | 2 +- libfreerdp/utils/sleep.c | 2 +- libfreerdp/utils/stopwatch.c | 2 +- libfreerdp/utils/stream.c | 2 +- libfreerdp/utils/string.c | 2 +- libfreerdp/utils/svc_plugin.c | 2 +- libfreerdp/utils/tcp.c | 2 +- libfreerdp/utils/thread.c | 2 +- libfreerdp/utils/time.c | 2 +- libfreerdp/utils/uds.c | 2 +- libfreerdp/utils/unicode.c | 2 +- libfreerdp/utils/wait_obj.c | 2 +- scripts/TimeZones.cs | 2 +- scripts/WindowsZones.cs | 2 +- scripts/xkb.pl | 2 +- server/CMakeLists.txt | 2 +- server/Sample/CMakeLists.txt | 2 +- server/Sample/sfreerdp.c | 2 +- server/Windows/CMakeLists.txt | 2 +- server/Windows/cli/CMakeLists.txt | 2 +- server/Windows/cli/wfreerdp.c | 2 +- server/Windows/cli/wfreerdp.h | 2 +- server/Windows/wf_dxgi.c | 2 +- server/Windows/wf_dxgi.h | 2 +- server/Windows/wf_info.c | 2 +- server/Windows/wf_info.h | 2 +- server/Windows/wf_input.c | 2 +- server/Windows/wf_input.h | 2 +- server/Windows/wf_interface.c | 2 +- server/Windows/wf_interface.h | 2 +- server/Windows/wf_mirage.c | 2 +- server/Windows/wf_mirage.h | 2 +- server/Windows/wf_peer.c | 2 +- server/Windows/wf_peer.h | 2 +- server/Windows/wf_settings.c | 2 +- server/Windows/wf_settings.h | 2 +- server/Windows/wf_update.c | 2 +- server/Windows/wf_update.h | 2 +- server/X11/CMakeLists.txt | 2 +- server/X11/xf_encode.c | 2 +- server/X11/xf_encode.h | 2 +- server/X11/xf_event.c | 2 +- server/X11/xf_event.h | 2 +- server/X11/xf_input.c | 2 +- server/X11/xf_input.h | 2 +- server/X11/xf_peer.c | 2 +- server/X11/xf_peer.h | 2 +- server/X11/xfreerdp.c | 2 +- server/X11/xfreerdp.h | 2 +- 491 files changed, 491 insertions(+), 491 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a796890e2..24bb41129 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/audin/CMakeLists.txt b/channels/audin/CMakeLists.txt index dc9f2b019..fce6756af 100644 --- a/channels/audin/CMakeLists.txt +++ b/channels/audin/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/audin/client/CMakeLists.txt b/channels/audin/client/CMakeLists.txt index b97b6e27a..0eaa9f61c 100644 --- a/channels/audin/client/CMakeLists.txt +++ b/channels/audin/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/audin/client/alsa/CMakeLists.txt b/channels/audin/client/alsa/CMakeLists.txt index 4ce57b4b5..cb469b635 100644 --- a/channels/audin/client/alsa/CMakeLists.txt +++ b/channels/audin/client/alsa/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index cfada9a9f..0b6e40468 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Input Redirection Virtual Channel - ALSA implementation * * Copyright 2010-2011 Vic Lee diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index 71395d421..e24d2c205 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Input Redirection Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/audin/client/audin_main.h b/channels/audin/client/audin_main.h index e848acf7a..43728ef51 100644 --- a/channels/audin/client/audin_main.h +++ b/channels/audin/client/audin_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Input Redirection Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/audin/client/pulse/CMakeLists.txt b/channels/audin/client/pulse/CMakeLists.txt index cef63c119..2753ef1bf 100644 --- a/channels/audin/client/pulse/CMakeLists.txt +++ b/channels/audin/client/pulse/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 1ad2cc285..cf6c1f96e 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Input Redirection Virtual Channel - PulseAudio implementation * * Copyright 2010-2011 Vic Lee diff --git a/channels/audin/server/CMakeLists.txt b/channels/audin/server/CMakeLists.txt index 1dcc7eef9..3c93917b0 100644 --- a/channels/audin/server/CMakeLists.txt +++ b/channels/audin/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index ae2f2bb05..4bedf4776 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Audio Input Virtual Channel * * Copyright 2012 Vic Lee diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt index f75d9a883..c06d73ae0 100644 --- a/channels/client/CMakeLists.txt +++ b/channels/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/cliprdr/CMakeLists.txt b/channels/cliprdr/CMakeLists.txt index 880d5b4cb..f9d3c38e8 100644 --- a/channels/cliprdr/CMakeLists.txt +++ b/channels/cliprdr/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index be26629b1..bd465b4eb 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/cliprdr/client/cliprdr_constants.h b/channels/cliprdr/client/cliprdr_constants.h index d3544ba32..e3e141986 100644 --- a/channels/cliprdr/client/cliprdr_constants.h +++ b/channels/cliprdr/client/cliprdr_constants.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index 9d4e0a0f9..c01a5453d 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/cliprdr/client/cliprdr_format.h b/channels/cliprdr/client/cliprdr_format.h index 48040b64f..e4580a8fd 100644 --- a/channels/cliprdr/client/cliprdr_format.h +++ b/channels/cliprdr/client/cliprdr_format.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index 500116344..b12e84e76 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/cliprdr/client/cliprdr_main.h b/channels/cliprdr/client/cliprdr_main.h index bc6b35584..249ae4406 100644 --- a/channels/cliprdr/client/cliprdr_main.h +++ b/channels/cliprdr/client/cliprdr_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/disk/CMakeLists.txt b/channels/disk/CMakeLists.txt index e9b0c0846..270a87583 100644 --- a/channels/disk/CMakeLists.txt +++ b/channels/disk/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/disk/client/CMakeLists.txt b/channels/disk/client/CMakeLists.txt index a8bb78b25..c0c58429b 100644 --- a/channels/disk/client/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/disk/client/statvfs.c b/channels/disk/client/statvfs.c index 6ab29c4ea..19004b4e2 100644 --- a/channels/disk/client/statvfs.c +++ b/channels/disk/client/statvfs.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * statvfs emulation für windows * * Copyright 2012 Gerald Richter diff --git a/channels/drdynvc/CMakeLists.txt b/channels/drdynvc/CMakeLists.txt index 389117586..873fd5e11 100644 --- a/channels/drdynvc/CMakeLists.txt +++ b/channels/drdynvc/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/drdynvc/client/CMakeLists.txt b/channels/drdynvc/client/CMakeLists.txt index ea538d579..914c71fa3 100644 --- a/channels/drdynvc/client/CMakeLists.txt +++ b/channels/drdynvc/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index c8c2aece4..f5e575484 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/drdynvc/client/drdynvc_main.h b/channels/drdynvc/client/drdynvc_main.h index 519c61d19..2226c3fde 100644 --- a/channels/drdynvc/client/drdynvc_main.h +++ b/channels/drdynvc/client/drdynvc_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/drdynvc/client/drdynvc_types.h b/channels/drdynvc/client/drdynvc_types.h index 5c9ce5947..b7b629dcc 100644 --- a/channels/drdynvc/client/drdynvc_types.h +++ b/channels/drdynvc/client/drdynvc_types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/drdynvc/client/dvcman.c b/channels/drdynvc/client/dvcman.c index 1e55c028f..c584c0104 100644 --- a/channels/drdynvc/client/dvcman.c +++ b/channels/drdynvc/client/dvcman.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel Manager * * Copyright 2010-2011 Vic Lee diff --git a/channels/drdynvc/client/dvcman.h b/channels/drdynvc/client/dvcman.h index 0e0bb9ce2..6f68b5429 100644 --- a/channels/drdynvc/client/dvcman.h +++ b/channels/drdynvc/client/dvcman.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel Manager * * Copyright 2010-2011 Vic Lee diff --git a/channels/parallel/CMakeLists.txt b/channels/parallel/CMakeLists.txt index 676de4e85..65f8452a1 100644 --- a/channels/parallel/CMakeLists.txt +++ b/channels/parallel/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/parallel/client/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt index 0f2af9e65..064c23b4c 100644 --- a/channels/parallel/client/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index 475fd99af..46b92ae42 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Redirected Parallel Port Device Service * * Copyright 2010 O.S. Systems Software Ltda. diff --git a/channels/printer/CMakeLists.txt b/channels/printer/CMakeLists.txt index 676de4e85..65f8452a1 100644 --- a/channels/printer/CMakeLists.txt +++ b/channels/printer/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/printer/client/CMakeLists.txt b/channels/printer/client/CMakeLists.txt index 6ed2f42ca..34779d8df 100644 --- a/channels/printer/client/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rail/CMakeLists.txt b/channels/rail/CMakeLists.txt index 097c86d4b..f2b1dd1b8 100644 --- a/channels/rail/CMakeLists.txt +++ b/channels/rail/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rail/client/CMakeLists.txt b/channels/rail/client/CMakeLists.txt index 79ce01806..5ccf2041b 100644 --- a/channels/rail/client/CMakeLists.txt +++ b/channels/rail/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 Marc-Andre Moreau diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index 10e0d6a08..da3fee87f 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Virtual Channel Plugin * * Copyright 2011 Marc-Andre Moreau diff --git a/channels/rail/client/rail_main.h b/channels/rail/client/rail_main.h index 31c243aa0..484aa6ccb 100644 --- a/channels/rail/client/rail_main.h +++ b/channels/rail/client/rail_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Virtual Channel Plugin * * Copyright 2011 Marc-Andre Moreau diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index db99515f4..5ff45fab6 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) Orders * * Copyright 2009 Marc-Andre Moreau diff --git a/channels/rail/client/rail_orders.h b/channels/rail/client/rail_orders.h index cd4e07bb5..ffc87d6b7 100644 --- a/channels/rail/client/rail_orders.h +++ b/channels/rail/client/rail_orders.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) * * Copyright 2009 Marc-Andre Moreau diff --git a/channels/rdpdr/CMakeLists.txt b/channels/rdpdr/CMakeLists.txt index 1d8adcfc8..036e7e48c 100644 --- a/channels/rdpdr/CMakeLists.txt +++ b/channels/rdpdr/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index edda80dfb..fd45da480 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rdpsnd/CMakeLists.txt b/channels/rdpsnd/CMakeLists.txt index cc57e41f1..c5aa005cb 100644 --- a/channels/rdpsnd/CMakeLists.txt +++ b/channels/rdpsnd/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rdpsnd/client/CMakeLists.txt b/channels/rdpsnd/client/CMakeLists.txt index de6ff796f..c24c0ca64 100644 --- a/channels/rdpsnd/client/CMakeLists.txt +++ b/channels/rdpsnd/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rdpsnd/client/MacAudio/CMakeLists.txt b/channels/rdpsnd/client/MacAudio/CMakeLists.txt index 7963962e5..c5c375685 100644 --- a/channels/rdpsnd/client/MacAudio/CMakeLists.txt +++ b/channels/rdpsnd/client/MacAudio/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Laxmikant Rashinkar diff --git a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c index f089588d9..f06dacde6 100644 --- a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c +++ b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2012 Laxmikant Rashinkar diff --git a/channels/rdpsnd/client/alsa/CMakeLists.txt b/channels/rdpsnd/client/alsa/CMakeLists.txt index 28a470047..1d50df6bc 100644 --- a/channels/rdpsnd/client/alsa/CMakeLists.txt +++ b/channels/rdpsnd/client/alsa/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index de66f56fd..ac2db4329 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/rdpsnd/client/pulse/CMakeLists.txt b/channels/rdpsnd/client/pulse/CMakeLists.txt index 317f7877f..73a29cda3 100644 --- a/channels/rdpsnd/client/pulse/CMakeLists.txt +++ b/channels/rdpsnd/client/pulse/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index ee9fa1bac..456fc1130 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2011 Vic Lee diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 26ec33389..686acfc0c 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2009-2011 Jay Sorg diff --git a/channels/rdpsnd/client/rdpsnd_main.h b/channels/rdpsnd/client/rdpsnd_main.h index c8c402e1e..ace7fb8ed 100644 --- a/channels/rdpsnd/client/rdpsnd_main.h +++ b/channels/rdpsnd/client/rdpsnd_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/rdpsnd/server/CMakeLists.txt b/channels/rdpsnd/server/CMakeLists.txt index a99e259fc..c10a5b9dc 100644 --- a/channels/rdpsnd/server/CMakeLists.txt +++ b/channels/rdpsnd/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index cfe273f0d..f1578f795 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Audio Virtual Channel * * Copyright 2012 Vic Lee diff --git a/channels/sample/CMakeLists.txt b/channels/sample/CMakeLists.txt index 676de4e85..65f8452a1 100644 --- a/channels/sample/CMakeLists.txt +++ b/channels/sample/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/sample/client/CMakeLists.txt b/channels/sample/client/CMakeLists.txt index b761bd16c..f3d2c6540 100644 --- a/channels/sample/client/CMakeLists.txt +++ b/channels/sample/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/sample/client/skel_main.c b/channels/sample/client/skel_main.c index 5fbd92611..87b846f3a 100644 --- a/channels/sample/client/skel_main.c +++ b/channels/sample/client/skel_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2009-2012 Jay Sorg diff --git a/channels/sample/client/skel_main.h b/channels/sample/client/skel_main.h index 582e48a5a..2402c0acd 100644 --- a/channels/sample/client/skel_main.h +++ b/channels/sample/client/skel_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Output Virtual Channel * * Copyright 2012 Jay Sorg diff --git a/channels/serial/CMakeLists.txt b/channels/serial/CMakeLists.txt index 676de4e85..65f8452a1 100644 --- a/channels/serial/CMakeLists.txt +++ b/channels/serial/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/serial/client/CMakeLists.txt b/channels/serial/client/CMakeLists.txt index c9c51aa9f..679df16d8 100644 --- a/channels/serial/client/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/serial/client/serial_constants.h b/channels/serial/client/serial_constants.h index ac16f9a7b..a42c4f001 100644 --- a/channels/serial/client/serial_constants.h +++ b/channels/serial/client/serial_constants.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Serial Port Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index 12ff0c9cc..5e8e72e2d 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Serial Port Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index ce65fca34..051c5fd1d 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Serial Port Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/serial/client/serial_tty.h b/channels/serial/client/serial_tty.h index 4333039e3..94aabcb4f 100644 --- a/channels/serial/client/serial_tty.h +++ b/channels/serial/client/serial_tty.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Serial Port Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/server/CMakeLists.txt b/channels/server/CMakeLists.txt index bfc2b2177..dff6f542e 100644 --- a/channels/server/CMakeLists.txt +++ b/channels/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/smartcard/CMakeLists.txt b/channels/smartcard/CMakeLists.txt index 676de4e85..65f8452a1 100644 --- a/channels/smartcard/CMakeLists.txt +++ b/channels/smartcard/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/smartcard/client/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt index 7c6dc23f1..7e5a3bf38 100644 --- a/channels/smartcard/client/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index dcb266028..05cec507f 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Smartcard Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/smartcard/client/scard_main.h b/channels/smartcard/client/scard_main.h index c5d86f7d3..4d009ddae 100644 --- a/channels/smartcard/client/scard_main.h +++ b/channels/smartcard/client/scard_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Smartcard Device Service Virtual Channel * * Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/tsmf/CMakeLists.txt b/channels/tsmf/CMakeLists.txt index 7d38fd55f..42d0751fe 100644 --- a/channels/tsmf/CMakeLists.txt +++ b/channels/tsmf/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/tsmf/client/CMakeLists.txt b/channels/tsmf/client/CMakeLists.txt index 4632aad68..f3ca6a932 100644 --- a/channels/tsmf/client/CMakeLists.txt +++ b/channels/tsmf/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/tsmf/client/alsa/CMakeLists.txt b/channels/tsmf/client/alsa/CMakeLists.txt index 578a8ea6f..07ba391c8 100644 --- a/channels/tsmf/client/alsa/CMakeLists.txt +++ b/channels/tsmf/client/alsa/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index a05ff09fa..52fb9db50 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - ALSA Audio Device * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/ffmpeg/CMakeLists.txt b/channels/tsmf/client/ffmpeg/CMakeLists.txt index fd3796688..b30464d2b 100644 --- a/channels/tsmf/client/ffmpeg/CMakeLists.txt +++ b/channels/tsmf/client/ffmpeg/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index 9d22e0692..843dba3c2 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - FFmpeg Decoder * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/gstreamer/CMakeLists.txt b/channels/tsmf/client/gstreamer/CMakeLists.txt index 75411111d..9834e942c 100644 --- a/channels/tsmf/client/gstreamer/CMakeLists.txt +++ b/channels/tsmf/client/gstreamer/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script for gstreamer plugin # # (C) Copyright 2012 Hewlett-Packard Development Company, L.P. diff --git a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c index 0a5c8580c..52a7d0a49 100644 --- a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c +++ b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - GStreamer Decoder * * (C) Copyright 2012 HP Development Company, LLC diff --git a/channels/tsmf/client/pulse/CMakeLists.txt b/channels/tsmf/client/pulse/CMakeLists.txt index ffffdbe12..647e32c9b 100644 --- a/channels/tsmf/client/pulse/CMakeLists.txt +++ b/channels/tsmf/client/pulse/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index ca162ae72..a39e2538d 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - PulseAudio Device * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_audio.c b/channels/tsmf/client/tsmf_audio.c index e9f37ce92..e434fc488 100644 --- a/channels/tsmf/client/tsmf_audio.c +++ b/channels/tsmf/client/tsmf_audio.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Audio Device Manager * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_audio.h b/channels/tsmf/client/tsmf_audio.h index 1215460c5..ec8c04bcd 100644 --- a/channels/tsmf/client/tsmf_audio.h +++ b/channels/tsmf/client/tsmf_audio.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Audio Device Manager * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_codec.c b/channels/tsmf/client/tsmf_codec.c index ceb28bbcf..b6619e4ec 100644 --- a/channels/tsmf/client/tsmf_codec.c +++ b/channels/tsmf/client/tsmf_codec.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Codec * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_codec.h b/channels/tsmf/client/tsmf_codec.h index eb6bbeaf5..291aa97d4 100644 --- a/channels/tsmf/client/tsmf_codec.h +++ b/channels/tsmf/client/tsmf_codec.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Codec * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_constants.h b/channels/tsmf/client/tsmf_constants.h index a93b2dd13..107372992 100644 --- a/channels/tsmf/client/tsmf_constants.h +++ b/channels/tsmf/client/tsmf_constants.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Constants * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_decoder.c b/channels/tsmf/client/tsmf_decoder.c index 267a9f97e..f884683a3 100644 --- a/channels/tsmf/client/tsmf_decoder.c +++ b/channels/tsmf/client/tsmf_decoder.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Decoder * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_decoder.h b/channels/tsmf/client/tsmf_decoder.h index 91d3ee31f..96c7353ae 100644 --- a/channels/tsmf/client/tsmf_decoder.h +++ b/channels/tsmf/client/tsmf_decoder.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Decoder * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_ifman.c b/channels/tsmf/client/tsmf_ifman.c index 86f5101b3..8885264d9 100644 --- a/channels/tsmf/client/tsmf_ifman.c +++ b/channels/tsmf/client/tsmf_ifman.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Interface Manipulation * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_ifman.h b/channels/tsmf/client/tsmf_ifman.h index 7a68c06b7..416276427 100644 --- a/channels/tsmf/client/tsmf_ifman.h +++ b/channels/tsmf/client/tsmf_ifman.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Interface Manipulation * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index 6c266cf51..66e1c8082 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_main.h b/channels/tsmf/client/tsmf_main.h index deda1ceb6..8a4d7e33f 100644 --- a/channels/tsmf/client/tsmf_main.h +++ b/channels/tsmf/client/tsmf_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index d07c1926e..779777ecb 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Media Container * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_media.h b/channels/tsmf/client/tsmf_media.h index ae58d9132..50c00830a 100644 --- a/channels/tsmf/client/tsmf_media.h +++ b/channels/tsmf/client/tsmf_media.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Media Container * * Copyright 2010-2011 Vic Lee diff --git a/channels/tsmf/client/tsmf_types.h b/channels/tsmf/client/tsmf_types.h index 65e8b2a18..5a275523a 100644 --- a/channels/tsmf/client/tsmf_types.h +++ b/channels/tsmf/client/tsmf_types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Video Redirection Virtual Channel - Types * * Copyright 2010-2011 Vic Lee diff --git a/channels/urbdrc/CMakeLists.txt b/channels/urbdrc/CMakeLists.txt index a506d0f74..268379c3e 100644 --- a/channels/urbdrc/CMakeLists.txt +++ b/channels/urbdrc/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/channels/urbdrc/client/CMakeLists.txt b/channels/urbdrc/client/CMakeLists.txt index 9bfd56ff9..7033ca482 100644 --- a/channels/urbdrc/client/CMakeLists.txt +++ b/channels/urbdrc/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c index 541b0cc28..cf0987926 100644 --- a/channels/urbdrc/client/data_transfer.c +++ b/channels/urbdrc/client/data_transfer.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/data_transfer.h b/channels/urbdrc/client/data_transfer.h index eb6af0a93..535c053d5 100644 --- a/channels/urbdrc/client/data_transfer.h +++ b/channels/urbdrc/client/data_transfer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/isoch_queue.c b/channels/urbdrc/client/isoch_queue.c index 22a64ce09..0d124ca1d 100644 --- a/channels/urbdrc/client/isoch_queue.c +++ b/channels/urbdrc/client/isoch_queue.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/isoch_queue.h b/channels/urbdrc/client/isoch_queue.h index 94b077375..66db441f5 100644 --- a/channels/urbdrc/client/isoch_queue.h +++ b/channels/urbdrc/client/isoch_queue.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/searchman.c b/channels/urbdrc/client/searchman.c index 6b710997e..86fe1de80 100644 --- a/channels/urbdrc/client/searchman.c +++ b/channels/urbdrc/client/searchman.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/searchman.h b/channels/urbdrc/client/searchman.h index 0a690d1b8..1d293243e 100644 --- a/channels/urbdrc/client/searchman.h +++ b/channels/urbdrc/client/searchman.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index f3a051a74..c9af57f63 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/urbdrc_main.h b/channels/urbdrc/client/urbdrc_main.h index ff71869be..1de9dbd86 100644 --- a/channels/urbdrc/client/urbdrc_main.h +++ b/channels/urbdrc/client/urbdrc_main.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/client/urbdrc_types.h b/channels/urbdrc/client/urbdrc_types.h index b392b9ddd..485595004 100644 --- a/channels/urbdrc/client/urbdrc_types.h +++ b/channels/urbdrc/client/urbdrc_types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/CMakeLists.txt b/channels/urbdrc/libusb/CMakeLists.txt index cd874c1c7..18d14ec8e 100644 --- a/channels/urbdrc/libusb/CMakeLists.txt +++ b/channels/urbdrc/libusb/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP cmake build script # # Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/libusb_udevice.c b/channels/urbdrc/libusb/libusb_udevice.c index 81a7cd546..bba9a4e84 100644 --- a/channels/urbdrc/libusb/libusb_udevice.c +++ b/channels/urbdrc/libusb/libusb_udevice.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/libusb_udevice.h b/channels/urbdrc/libusb/libusb_udevice.h index e75dc18f1..0b55f893d 100644 --- a/channels/urbdrc/libusb/libusb_udevice.h +++ b/channels/urbdrc/libusb/libusb_udevice.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/libusb_udevman.c b/channels/urbdrc/libusb/libusb_udevman.c index 5e31fb66a..4b260586f 100644 --- a/channels/urbdrc/libusb/libusb_udevman.c +++ b/channels/urbdrc/libusb/libusb_udevman.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/request_queue.c b/channels/urbdrc/libusb/request_queue.c index e7f897864..787f3d8ce 100644 --- a/channels/urbdrc/libusb/request_queue.c +++ b/channels/urbdrc/libusb/request_queue.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/channels/urbdrc/libusb/request_queue.h b/channels/urbdrc/libusb/request_queue.h index 0ea275263..f13764b4f 100644 --- a/channels/urbdrc/libusb/request_queue.h +++ b/channels/urbdrc/libusb/request_queue.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 98afbbe4c..2812495b3 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Client User Interfaces # # Copyright 2012 Marc-Andre Moreau diff --git a/client/DirectFB/CMakeLists.txt b/client/DirectFB/CMakeLists.txt index 9e004c67f..30a44fe1b 100644 --- a/client/DirectFB/CMakeLists.txt +++ b/client/DirectFB/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP DirectFB Client # # Copyright 2012 Marc-Andre Moreau diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index 4c2e8f2ec..3cf133576 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/DirectFB/df_event.h b/client/DirectFB/df_event.h index ebe20cd44..e55d6c61f 100644 --- a/client/DirectFB/df_event.h +++ b/client/DirectFB/df_event.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/DirectFB/df_graphics.c b/client/DirectFB/df_graphics.c index 59ca690c9..209bf6fa2 100644 --- a/client/DirectFB/df_graphics.c +++ b/client/DirectFB/df_graphics.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/client/DirectFB/df_graphics.h b/client/DirectFB/df_graphics.h index fe2d5c8f1..8185b948b 100644 --- a/client/DirectFB/df_graphics.h +++ b/client/DirectFB/df_graphics.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index de8af601e..d787885c9 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Client * * Copyright 2011 Marc-Andre Moreau diff --git a/client/DirectFB/dfreerdp.h b/client/DirectFB/dfreerdp.h index 785693377..741dd52d8 100644 --- a/client/DirectFB/dfreerdp.h +++ b/client/DirectFB/dfreerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * DirectFB Client * * Copyright 2011 Marc-Andre Moreau diff --git a/client/Sample/CMakeLists.txt b/client/Sample/CMakeLists.txt index 876511a5f..9dcfea304 100644 --- a/client/Sample/CMakeLists.txt +++ b/client/Sample/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Sample UI cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 6ca1d5309..cdf00cfd1 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Test UI * * Copyright 2011 Marc-Andre Moreau diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index 4d8308827..f289dad00 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Windows cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index 09b2511fb..9961bcabc 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Clipboard Redirection * * Copyright 2012 Jason Champion diff --git a/client/Windows/wf_cliprdr.h b/client/Windows/wf_cliprdr.h index 99e38b63f..5e1398cf0 100644 --- a/client/Windows/wf_cliprdr.h +++ b/client/Windows/wf_cliprdr.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Clipboard Redirection * * Copyright 2012 Jason Champion diff --git a/client/Windows/wf_event.c b/client/Windows/wf_event.c index 48450a806..c4ad9bb97 100644 --- a/client/Windows/wf_event.c +++ b/client/Windows/wf_event.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Event Handling * * Copyright 2009-2011 Jay Sorg diff --git a/client/Windows/wf_event.h b/client/Windows/wf_event.h index 57ada3f9c..7128af2d8 100644 --- a/client/Windows/wf_event.h +++ b/client/Windows/wf_event.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Event Handling * * Copyright 2009-2011 Jay Sorg diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index bcbe1c6ec..ea9d6d21f 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows GDI * * Copyright 2009-2011 Jay Sorg diff --git a/client/Windows/wf_gdi.h b/client/Windows/wf_gdi.h index df35f6d99..09e301d8e 100644 --- a/client/Windows/wf_gdi.h +++ b/client/Windows/wf_gdi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows GDI * * Copyright 2009-2011 Jay Sorg diff --git a/client/Windows/wf_graphics.c b/client/Windows/wf_graphics.c index 6345392a1..e3d8ba852 100644 --- a/client/Windows/wf_graphics.c +++ b/client/Windows/wf_graphics.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Graphical Objects * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/client/Windows/wf_graphics.h b/client/Windows/wf_graphics.h index 96dfd3513..b9868bde6 100644 --- a/client/Windows/wf_graphics.h +++ b/client/Windows/wf_graphics.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Graphical Objects * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/client/Windows/wf_rail.c b/client/Windows/wf_rail.c index 4dac4a4fb..618110a70 100644 --- a/client/Windows/wf_rail.c +++ b/client/Windows/wf_rail.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows RAIL * * Copyright 2012 Jason Champion diff --git a/client/Windows/wf_rail.h b/client/Windows/wf_rail.h index 82683ef42..2441c4c17 100644 --- a/client/Windows/wf_rail.h +++ b/client/Windows/wf_rail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows RAIL * * Copyright 2012 Jason Champion diff --git a/client/Windows/wf_window.c b/client/Windows/wf_window.c index 9dfc91b6f..d15472ea4 100644 --- a/client/Windows/wf_window.c +++ b/client/Windows/wf_window.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows RAIL * * Copyright 2012 Jason Champion diff --git a/client/Windows/wf_window.h b/client/Windows/wf_window.h index aeb54f4c6..302b990d6 100644 --- a/client/Windows/wf_window.h +++ b/client/Windows/wf_window.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows RAIL * * Copyright 2012 Jason Champion diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index f0c3a7c53..9df8a0bdd 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Client * * Copyright 2009-2011 Jay Sorg diff --git a/client/Windows/wfreerdp.h b/client/Windows/wfreerdp.h index 062618019..7827b2273 100644 --- a/client/Windows/wfreerdp.h +++ b/client/Windows/wfreerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windows Client * * Copyright 2009-2011 Jay Sorg diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 48ae47d7f..2a2202145 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Clipboard Redirection * * Copyright 2010-2011 Vic Lee diff --git a/client/X11/xf_cliprdr.h b/client/X11/xf_cliprdr.h index 2678fc31d..3ad729e93 100644 --- a/client/X11/xf_cliprdr.h +++ b/client/X11/xf_cliprdr.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Clipboard Redirection * * Copyright 2010-2011 Vic Lee diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index fd3af054f..2f180e301 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_event.h b/client/X11/xf_event.h index c6938b382..b35541432 100644 --- a/client/X11/xf_event.h +++ b/client/X11/xf_event.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 462465e37..e33b35b48 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 GDI * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_gdi.h b/client/X11/xf_gdi.h index 635e5335d..2a30b8965 100644 --- a/client/X11/xf_gdi.h +++ b/client/X11/xf_gdi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 GDI * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 58c94e366..93d0624e2 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_graphics.h b/client/X11/xf_graphics.h index 14216f330..b9256a86c 100644 --- a/client/X11/xf_graphics.h +++ b/client/X11/xf_graphics.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 0840f5ef5..532930f64 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Keyboard Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_keyboard.h b/client/X11/xf_keyboard.h index 2250783b9..699e5817e 100644 --- a/client/X11/xf_keyboard.h +++ b/client/X11/xf_keyboard.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Keyboard Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index 14ce09ab5..fa9a34672 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Monitor Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_monitor.h b/client/X11/xf_monitor.h index d6b7d6dd8..ba1fd6c68 100644 --- a/client/X11/xf_monitor.h +++ b/client/X11/xf_monitor.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Monitor Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index daeef3196..73122852a 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 RAIL * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_rail.h b/client/X11/xf_rail.h index 0c66e1caa..fa8e67f8f 100644 --- a/client/X11/xf_rail.h +++ b/client/X11/xf_rail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 RAIL * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index 07524072d..ed4e93c36 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Video Redirection * * Copyright 2010-2011 Vic Lee diff --git a/client/X11/xf_tsmf.h b/client/X11/xf_tsmf.h index 09083e263..7e1ca3090 100644 --- a/client/X11/xf_tsmf.h +++ b/client/X11/xf_tsmf.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Video Redirection * * Copyright 2010-2011 Vic Lee diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 899242f2b..38431f6a0 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Windows * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h index 85083501a..b6809cd12 100644 --- a/client/X11/xf_window.h +++ b/client/X11/xf_window.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Windows * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index c05c55190..9d6125660 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Client * * Copyright 2011 Marc-Andre Moreau diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 1a2d673b4..1f813cae7 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Client * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/CMakeLists.txt b/cunit/CMakeLists.txt index b03f55240..8e2fc144e 100644 --- a/cunit/CMakeLists.txt +++ b/cunit/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # cunit cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/cunit/test_bitmap.c b/cunit/test_bitmap.c index b25a065ef..c3a4a5262 100644 --- a/cunit/test_bitmap.c +++ b/cunit/test_bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap Unit Tests * * Copyright 2011 Jay Sorg diff --git a/cunit/test_bitmap.h b/cunit/test_bitmap.h index 3705e0930..cddf24f11 100644 --- a/cunit/test_bitmap.h +++ b/cunit/test_bitmap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap Unit Tests * * Copyright 2011 Jay Sorg diff --git a/cunit/test_cliprdr.c b/cunit/test_cliprdr.c index 233cd9ed7..d92af6706 100644 --- a/cunit/test_cliprdr.c +++ b/cunit/test_cliprdr.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel Unit Tests * * Copyright 2011 Vic Lee diff --git a/cunit/test_cliprdr.h b/cunit/test_cliprdr.h index f1a5509ca..724be9ec3 100644 --- a/cunit/test_cliprdr.h +++ b/cunit/test_cliprdr.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel Unit Tests * * Copyright 2011 Vic Lee diff --git a/cunit/test_color.c b/cunit/test_color.c index d353b6b68..eb471e46c 100644 --- a/cunit/test_color.c +++ b/cunit/test_color.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Color Conversion Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_color.h b/cunit/test_color.h index 227146ec9..6b6a6a5cc 100644 --- a/cunit/test_color.h +++ b/cunit/test_color.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Color Conversion Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_drdynvc.c b/cunit/test_drdynvc.c index f46a7ac1e..fd6d60052 100644 --- a/cunit/test_drdynvc.c +++ b/cunit/test_drdynvc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel Unit Tests * * Copyright 2011 Vic Lee diff --git a/cunit/test_drdynvc.h b/cunit/test_drdynvc.h index 67e075461..7c6a1676f 100644 --- a/cunit/test_drdynvc.h +++ b/cunit/test_drdynvc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel Unit Tests * * Copyright 2011 Vic Lee diff --git a/cunit/test_freerdp.c b/cunit/test_freerdp.c index dc178de85..9c08ff6a5 100644 --- a/cunit/test_freerdp.c +++ b/cunit/test_freerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_freerdp.h b/cunit/test_freerdp.h index d9d223043..113823ffc 100644 --- a/cunit/test_freerdp.h +++ b/cunit/test_freerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_gcc.c b/cunit/test_gcc.c index 1b86d4b0e..f25d45312 100644 --- a/cunit/test_gcc.c +++ b/cunit/test_gcc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.124 Generic Conference Control (GCC) Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_gcc.h b/cunit/test_gcc.h index 2ddce03ff..3bdf99f37 100644 --- a/cunit/test_gcc.h +++ b/cunit/test_gcc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.124 Generic Conference Control (GCC) Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_gdi.c b/cunit/test_gdi.c index fe598fa71..2c0bdcad9 100644 --- a/cunit/test_gdi.c +++ b/cunit/test_gdi.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_gdi.h b/cunit/test_gdi.h index 14e0fd1cd..65187524a 100644 --- a/cunit/test_gdi.h +++ b/cunit/test_gdi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Unit Tests * * Copyright 2010 Marc-Andre Moreau diff --git a/cunit/test_license.c b/cunit/test_license.c index 997ad6c63..390fffeb5 100644 --- a/cunit/test_license.c +++ b/cunit/test_license.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Licensing Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_license.h b/cunit/test_license.h index 83e6f12bb..1c6e8027c 100644 --- a/cunit/test_license.h +++ b/cunit/test_license.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Licensing Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_mcs.c b/cunit/test_mcs.c index eac0d0580..e549f7ab9 100644 --- a/cunit/test_mcs.c +++ b/cunit/test_mcs.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.125 Multipoint Communication Service (MCS) Protocol Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_mcs.h b/cunit/test_mcs.h index 60d42956c..94307c35d 100644 --- a/cunit/test_mcs.h +++ b/cunit/test_mcs.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.125 Multipoint Communication Service (MCS) Protocol Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_mppc.c b/cunit/test_mppc.c index 177792385..321c19e58 100644 --- a/cunit/test_mppc.c +++ b/cunit/test_mppc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Microsoft Point to Point Compression (MPPC) Unit Tests * * Copyright 2011 Laxmikant Rashinkar diff --git a/cunit/test_mppc.h b/cunit/test_mppc.h index 9059dbb2f..a01b67236 100644 --- a/cunit/test_mppc.h +++ b/cunit/test_mppc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Microsoft Point to Point compression (MPPC) Unit Tests * * Copyright 2011 Laxmikant Rashinkar diff --git a/cunit/test_mppc_enc.c b/cunit/test_mppc_enc.c index de79e064e..66915aea1 100644 --- a/cunit/test_mppc_enc.c +++ b/cunit/test_mppc_enc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Microsoft Point to Point Compression (MPPC) Unit Tests * * Copyright 2012 Laxmikant Rashinkar diff --git a/cunit/test_mppc_enc.h b/cunit/test_mppc_enc.h index 90da265dc..34e6d9d8d 100644 --- a/cunit/test_mppc_enc.h +++ b/cunit/test_mppc_enc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Microsoft Point to Point compression (MPPC) Unit Tests * * Copyright 2012 Laxmikant Rashinkar diff --git a/cunit/test_nsc.c b/cunit/test_nsc.c index 97ea25eb6..ae7f4a5ae 100644 --- a/cunit/test_nsc.c +++ b/cunit/test_nsc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Library Unit Tests * * Copyright 2012 Vic Lee diff --git a/cunit/test_nsc.h b/cunit/test_nsc.h index 6f4f867dc..0d8dba90a 100644 --- a/cunit/test_nsc.h +++ b/cunit/test_nsc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Library Unit Tests * * Copyright 2012 Vic Lee diff --git a/cunit/test_ntlm.c b/cunit/test_ntlm.c index ff6d9095d..505b1805e 100644 --- a/cunit/test_ntlm.c +++ b/cunit/test_ntlm.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NTLM Security Package Unit Tests * * Copyright 2011-2012 Marc-Andre Moreau diff --git a/cunit/test_ntlm.h b/cunit/test_ntlm.h index 7ea8cae66..348f3ee29 100644 --- a/cunit/test_ntlm.h +++ b/cunit/test_ntlm.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NTLM Security Package Unit Tests * * Copyright 2011-2012 Marc-Andre Moreau diff --git a/cunit/test_orders.c b/cunit/test_orders.c index 34eb4632c..f27332878 100644 --- a/cunit/test_orders.c +++ b/cunit/test_orders.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_orders.h b/cunit/test_orders.h index eb7fb2936..861e6b4c7 100644 --- a/cunit/test_orders.h +++ b/cunit/test_orders.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_pcap.c b/cunit/test_pcap.c index 4255f04d6..b0a7d4f15 100644 --- a/cunit/test_pcap.c +++ b/cunit/test_pcap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * pcap File Format Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_pcap.h b/cunit/test_pcap.h index f506edcaa..b9d78b820 100644 --- a/cunit/test_pcap.h +++ b/cunit/test_pcap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * pcap File Format Unit Tests * * Copyright 2011 Marc-Andre Moreau diff --git a/cunit/test_rail.c b/cunit/test_rail.c index 1c363b3cc..a4e243dd0 100644 --- a/cunit/test_rail.c +++ b/cunit/test_rail.c @@ -1,5 +1,5 @@ /* - FreeRDP: A Remote Desktop Protocol client. + FreeRDP: A Remote Desktop Protocol Implementation RAIL(TS RemoteApp) Virtual Channel Unit Tests Copyright 2011 Vic Lee diff --git a/cunit/test_rail.h b/cunit/test_rail.h index a39d18e60..c56161632 100644 --- a/cunit/test_rail.h +++ b/cunit/test_rail.h @@ -1,5 +1,5 @@ /* - FreeRDP: A Remote Desktop Protocol client. + FreeRDP: A Remote Desktop Protocol Implementation RAIL(TS RemoteApp) Virtual Channel Unit Tests Copyright 2011 Roman Barabanov diff --git a/cunit/test_rfx.c b/cunit/test_rfx.c index b361cc900..3b4ad7e27 100644 --- a/cunit/test_rfx.c +++ b/cunit/test_rfx.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library Unit Tests * * Copyright 2011 Vic Lee diff --git a/cunit/test_rfx.h b/cunit/test_rfx.h index 0f95969fa..d44a94457 100644 --- a/cunit/test_rfx.h +++ b/cunit/test_rfx.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library Unit Tests * * Copyright 2011 Vic Lee diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 86fe07148..d50abfa5b 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # include headers cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/include/freerdp/altsec.h b/include/freerdp/altsec.h index 08da67539..949b520a2 100644 --- a/include/freerdp/altsec.h +++ b/include/freerdp/altsec.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Alternate Secondary Drawing Orders Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/api.h b/include/freerdp/api.h index 4bb44159a..5804715f6 100644 --- a/include/freerdp/api.h +++ b/include/freerdp/api.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Interface * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/cache/bitmap.h b/include/freerdp/cache/bitmap.h index 5455b1fc8..5d6ebe8f2 100644 --- a/include/freerdp/cache/bitmap.h +++ b/include/freerdp/cache/bitmap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap Cache V2 * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/brush.h b/include/freerdp/cache/brush.h index 8349d11b2..025f54a9f 100644 --- a/include/freerdp/cache/brush.h +++ b/include/freerdp/cache/brush.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Brush Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/cache.h b/include/freerdp/cache/cache.h index 6aa436032..5a794e9f5 100644 --- a/include/freerdp/cache/cache.h +++ b/include/freerdp/cache/cache.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Caches * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/glyph.h b/include/freerdp/cache/glyph.h index 7f0c1065a..8cfaeab63 100644 --- a/include/freerdp/cache/glyph.h +++ b/include/freerdp/cache/glyph.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Glyph Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/nine_grid.h b/include/freerdp/cache/nine_grid.h index 55d2a2b13..7786dd1cf 100644 --- a/include/freerdp/cache/nine_grid.h +++ b/include/freerdp/cache/nine_grid.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NineGrid Cache * * Copyright 2012 Marc-Andre Moreau diff --git a/include/freerdp/cache/offscreen.h b/include/freerdp/cache/offscreen.h index 286bcf102..12db818b4 100644 --- a/include/freerdp/cache/offscreen.h +++ b/include/freerdp/cache/offscreen.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Offscreen Bitmap Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/palette.h b/include/freerdp/cache/palette.h index d30e9cff4..8068b3c62 100644 --- a/include/freerdp/cache/palette.h +++ b/include/freerdp/cache/palette.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Palette (Color Table) Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/cache/pointer.h b/include/freerdp/cache/pointer.h index 5351c9b5e..b25650d68 100644 --- a/include/freerdp/cache/pointer.h +++ b/include/freerdp/cache/pointer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Pointer Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/channels/channels.h b/include/freerdp/channels/channels.h index 3d6a245de..b5b1d187a 100644 --- a/include/freerdp/channels/channels.h +++ b/include/freerdp/channels/channels.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channel Manager * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/channels/rdpsnd.h b/include/freerdp/channels/rdpsnd.h index a813d20b6..a366c07ae 100644 --- a/include/freerdp/channels/rdpsnd.h +++ b/include/freerdp/channels/rdpsnd.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Audio Virtual Channel Types * * Copyright 2012 Vic Lee diff --git a/include/freerdp/channels/wtsvc.h b/include/freerdp/channels/wtsvc.h index 8862415fc..7a155b372 100644 --- a/include/freerdp/channels/wtsvc.h +++ b/include/freerdp/channels/wtsvc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Virtual Channel Interface * * Copyright 2011-2012 Vic Lee diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h index 2890a4ba9..7714aebec 100644 --- a/include/freerdp/client/cliprdr.h +++ b/include/freerdp/client/cliprdr.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Clipboard Virtual Channel Types * * Copyright 2011 Vic Lee diff --git a/include/freerdp/client/tsmf.h b/include/freerdp/client/tsmf.h index 6df4964b3..1e3049682 100644 --- a/include/freerdp/client/tsmf.h +++ b/include/freerdp/client/tsmf.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Multimedia Redirection Virtual Channel Types * * Copyright 2011 Vic Lee diff --git a/include/freerdp/codec/bitmap.h b/include/freerdp/codec/bitmap.h index d09c495bc..bed673bdc 100644 --- a/include/freerdp/codec/bitmap.h +++ b/include/freerdp/codec/bitmap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Compressed Bitmap * * Copyright 2011 Jay Sorg diff --git a/include/freerdp/codec/color.h b/include/freerdp/codec/color.h index 14f305899..920a2f6e9 100644 --- a/include/freerdp/codec/color.h +++ b/include/freerdp/codec/color.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Color Conversion Routines * * Copyright 2010 Marc-Andre Moreau diff --git a/include/freerdp/codec/jpeg.h b/include/freerdp/codec/jpeg.h index 36540d922..e9e528348 100644 --- a/include/freerdp/codec/jpeg.h +++ b/include/freerdp/codec/jpeg.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Compressed Bitmap * * Copyright 2012 Jay Sorg diff --git a/include/freerdp/codec/mppc_dec.h b/include/freerdp/codec/mppc_dec.h index 14fae4be6..5d205b72f 100644 --- a/include/freerdp/codec/mppc_dec.h +++ b/include/freerdp/codec/mppc_dec.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Implements Microsoft Point to Point Compression (MPPC) protocol * * Copyright 2011 Laxmikant Rashinkar diff --git a/include/freerdp/codec/mppc_enc.h b/include/freerdp/codec/mppc_enc.h index e0014c010..a41a7013d 100644 --- a/include/freerdp/codec/mppc_enc.h +++ b/include/freerdp/codec/mppc_enc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Implements Microsoft Point to Point Compression (MPPC) protocol * * Copyright 2012 Laxmikant Rashinkar diff --git a/include/freerdp/codec/nsc.h b/include/freerdp/codec/nsc.h index 9912da00f..a1c8b409f 100644 --- a/include/freerdp/codec/nsc.h +++ b/include/freerdp/codec/nsc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Codec * * Copyright 2011 Samsung, Author Jiten Pathy diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index 084693be1..3a7920845 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec * * Copyright 2011 Vic Lee diff --git a/include/freerdp/config.h.in b/include/freerdp/config.h.in index 7042956aa..d9bc6b162 100644 --- a/include/freerdp/config.h.in +++ b/include/freerdp/config.h.in @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * config.h definitions for installable headers * * Copyright 2012 Marc-Andre Moreau diff --git a/include/freerdp/constants.h b/include/freerdp/constants.h index c9bcf67c7..ccf6ff1a6 100644 --- a/include/freerdp/constants.h +++ b/include/freerdp/constants.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Constants * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/crypto/der.h b/include/freerdp/crypto/der.h index 1902f93cb..725a400e2 100644 --- a/include/freerdp/crypto/der.h +++ b/include/freerdp/crypto/der.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * ASN.1 Basic Encoding Rules (DER) * * Copyright 2011 Samsung, Author Jiten Pathy diff --git a/include/freerdp/crypto/er.h b/include/freerdp/crypto/er.h index 82fd67b69..e2bb49da8 100644 --- a/include/freerdp/crypto/er.h +++ b/include/freerdp/crypto/er.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * ASN.1 Encoding Rules (BER/DER common functions) * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/dvc.h b/include/freerdp/dvc.h index 98a382ae7..2ab21f9fc 100644 --- a/include/freerdp/dvc.h +++ b/include/freerdp/dvc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Dynamic Virtual Channel Interface * * Copyright 2010-2011 Vic Lee diff --git a/include/freerdp/extension.h b/include/freerdp/extension.h index 17c845603..bf740b222 100644 --- a/include/freerdp/extension.h +++ b/include/freerdp/extension.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Extensions * * Copyright 2010-2011 Vic Lee diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 8644495b5..503b5626f 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Interface * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/gdi/16bpp.h b/include/freerdp/gdi/16bpp.h index 5e0b76777..447dcea29 100644 --- a/include/freerdp/gdi/16bpp.h +++ b/include/freerdp/gdi/16bpp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 16bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/32bpp.h b/include/freerdp/gdi/32bpp.h index a843b6172..4b9eb2c8d 100644 --- a/include/freerdp/gdi/32bpp.h +++ b/include/freerdp/gdi/32bpp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 32bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/8bpp.h b/include/freerdp/gdi/8bpp.h index cd944dcc1..329e3691b 100644 --- a/include/freerdp/gdi/8bpp.h +++ b/include/freerdp/gdi/8bpp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 8bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/bitmap.h b/include/freerdp/gdi/bitmap.h index 75a9dee0e..558e6ec95 100644 --- a/include/freerdp/gdi/bitmap.h +++ b/include/freerdp/gdi/bitmap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Bitmap Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/brush.h b/include/freerdp/gdi/brush.h index 505505906..56214911a 100644 --- a/include/freerdp/gdi/brush.h +++ b/include/freerdp/gdi/brush.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Brush Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/clipping.h b/include/freerdp/gdi/clipping.h index 88fede0a2..58fe22bce 100644 --- a/include/freerdp/gdi/clipping.h +++ b/include/freerdp/gdi/clipping.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Clipping Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/dc.h b/include/freerdp/gdi/dc.h index 83fa1152e..1da89e83e 100644 --- a/include/freerdp/gdi/dc.h +++ b/include/freerdp/gdi/dc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Device Context Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/drawing.h b/include/freerdp/gdi/drawing.h index 7447450c8..5c1e78ec6 100644 --- a/include/freerdp/gdi/drawing.h +++ b/include/freerdp/gdi/drawing.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Drawing Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index 03acd9052..39b9cd292 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Library * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/line.h b/include/freerdp/gdi/line.h index 35a19fa62..e8664c180 100644 --- a/include/freerdp/gdi/line.h +++ b/include/freerdp/gdi/line.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Line Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/palette.h b/include/freerdp/gdi/palette.h index d07a8d0b5..b7a4c8813 100644 --- a/include/freerdp/gdi/palette.h +++ b/include/freerdp/gdi/palette.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Palette Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/pen.h b/include/freerdp/gdi/pen.h index c34773402..827d6e20c 100644 --- a/include/freerdp/gdi/pen.h +++ b/include/freerdp/gdi/pen.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Pen Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/region.h b/include/freerdp/gdi/region.h index 09b2129e8..53bfc37b7 100644 --- a/include/freerdp/gdi/region.h +++ b/include/freerdp/gdi/region.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Region Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/gdi/shape.h b/include/freerdp/gdi/shape.h index 4ec28e687..427c7d8cc 100644 --- a/include/freerdp/gdi/shape.h +++ b/include/freerdp/gdi/shape.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Shape Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/include/freerdp/graphics.h b/include/freerdp/graphics.h index 578feae3b..24a98ba20 100644 --- a/include/freerdp/graphics.h +++ b/include/freerdp/graphics.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/input.h b/include/freerdp/input.h index d4cbf849e..fecf17003 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Input Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/listener.h b/include/freerdp/listener.h index e007cc620..c5b95f9cd 100644 --- a/include/freerdp/listener.h +++ b/include/freerdp/listener.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Listener * * Copyright 2011 Vic Lee diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index 635bd4e38..64c10312d 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Peer * * Copyright 2011 Vic Lee diff --git a/include/freerdp/pointer.h b/include/freerdp/pointer.h index b8170fe06..5a558a495 100644 --- a/include/freerdp/pointer.h +++ b/include/freerdp/pointer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Pointer Updates Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/primary.h b/include/freerdp/primary.h index 903b9319d..dc55f3746 100644 --- a/include/freerdp/primary.h +++ b/include/freerdp/primary.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Primary Drawing Orders Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 6ac2b4c2b..db8832bcb 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/rail/icon.h b/include/freerdp/rail/icon.h index 448434be8..0e8c0283b 100644 --- a/include/freerdp/rail/icon.h +++ b/include/freerdp/rail/icon.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Window Icon Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/rail/rail.h b/include/freerdp/rail/rail.h index 7ffe15f62..5f43d4d10 100644 --- a/include/freerdp/rail/rail.h +++ b/include/freerdp/rail/rail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/rail/window.h b/include/freerdp/rail/window.h index 7f32615b4..dd4c67211 100644 --- a/include/freerdp/rail/window.h +++ b/include/freerdp/rail/window.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Windows * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/rail/window_list.h b/include/freerdp/rail/window_list.h index 57da47c11..a61b54678 100644 --- a/include/freerdp/rail/window_list.h +++ b/include/freerdp/rail/window_list.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Window List * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/secondary.h b/include/freerdp/secondary.h index 5bf09b082..b2cce52d7 100644 --- a/include/freerdp/secondary.h +++ b/include/freerdp/secondary.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Secondary Drawing Orders Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/server/audin.h b/include/freerdp/server/audin.h index a022efbfd..07a1a36c0 100644 --- a/include/freerdp/server/audin.h +++ b/include/freerdp/server/audin.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Audio Input Virtual Channel * * Copyright 2012 Vic Lee diff --git a/include/freerdp/server/rdpsnd.h b/include/freerdp/server/rdpsnd.h index 5c9c056ef..8288fdb92 100644 --- a/include/freerdp/server/rdpsnd.h +++ b/include/freerdp/server/rdpsnd.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Audio Virtual Channel * * Copyright 2012 Vic Lee diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index 2baffa7b8..ad85c9f91 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Settings * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/svc.h b/include/freerdp/svc.h index 1c3e347cf..c0b10458b 100644 --- a/include/freerdp/svc.h +++ b/include/freerdp/svc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Static Virtual Channel Interface * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/types.h b/include/freerdp/types.h index 3b12a68c6..6d14af12f 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Type Definitions * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/update.h b/include/freerdp/update.h index 40bfc9e42..fa52bb69b 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Update Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/args.h b/include/freerdp/utils/args.h index 87155ade7..4da73759b 100644 --- a/include/freerdp/utils/args.h +++ b/include/freerdp/utils/args.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Arguments Parsing * * Copyright 2011 Vic Lee diff --git a/include/freerdp/utils/bitmap.h b/include/freerdp/utils/bitmap.h index cb09474e3..a891be785 100644 --- a/include/freerdp/utils/bitmap.h +++ b/include/freerdp/utils/bitmap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap File Format Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/debug.h b/include/freerdp/utils/debug.h index dfdbe533a..388767fed 100644 --- a/include/freerdp/utils/debug.h +++ b/include/freerdp/utils/debug.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Debug Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/dsp.h b/include/freerdp/utils/dsp.h index 835956ac8..8abd65bb6 100644 --- a/include/freerdp/utils/dsp.h +++ b/include/freerdp/utils/dsp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Digital Sound Processing * * Copyright 2010-2011 Vic Lee diff --git a/include/freerdp/utils/event.h b/include/freerdp/utils/event.h index e0650d203..d9506b6d1 100644 --- a/include/freerdp/utils/event.h +++ b/include/freerdp/utils/event.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Events * * Copyright 2011 Vic Lee diff --git a/include/freerdp/utils/file.h b/include/freerdp/utils/file.h index 7922a9d46..2d063fa0a 100644 --- a/include/freerdp/utils/file.h +++ b/include/freerdp/utils/file.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * File Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/hexdump.h b/include/freerdp/utils/hexdump.h index 4b0363b95..00dfcca9e 100644 --- a/include/freerdp/utils/hexdump.h +++ b/include/freerdp/utils/hexdump.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Hex Dump Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/list.h b/include/freerdp/utils/list.h index de53a100a..ca28e1408 100644 --- a/include/freerdp/utils/list.h +++ b/include/freerdp/utils/list.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Double-linked List Utils * * Copyright 2011 Vic Lee diff --git a/include/freerdp/utils/load_plugin.h b/include/freerdp/utils/load_plugin.h index 6ba2a292d..d1d840d15 100644 --- a/include/freerdp/utils/load_plugin.h +++ b/include/freerdp/utils/load_plugin.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Plugin Loading Utils * * Copyright 2011 Vic Lee diff --git a/include/freerdp/utils/memory.h b/include/freerdp/utils/memory.h index 0bc548fa1..18c35b56f 100644 --- a/include/freerdp/utils/memory.h +++ b/include/freerdp/utils/memory.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Memory Utils * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/utils/msusb.h b/include/freerdp/utils/msusb.h index 7948d4ece..89dc32679 100644 --- a/include/freerdp/utils/msusb.h +++ b/include/freerdp/utils/msusb.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/include/freerdp/utils/passphrase.h b/include/freerdp/utils/passphrase.h index 9dd5e15fd..2ca687a65 100644 --- a/include/freerdp/utils/passphrase.h +++ b/include/freerdp/utils/passphrase.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Passphrase Handling Utils * * Copyright 2011 Shea Levy diff --git a/include/freerdp/utils/pcap.h b/include/freerdp/utils/pcap.h index 147b1f380..b8344e68e 100644 --- a/include/freerdp/utils/pcap.h +++ b/include/freerdp/utils/pcap.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * pcap File Format Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/print.h b/include/freerdp/utils/print.h index c338412b2..8c35b62ae 100644 --- a/include/freerdp/utils/print.h +++ b/include/freerdp/utils/print.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Print Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/profiler.h b/include/freerdp/utils/profiler.h index bdeccdd1b..b7fb6983e 100644 --- a/include/freerdp/utils/profiler.h +++ b/include/freerdp/utils/profiler.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Profiler Utils * * Copyright 2011 Stephen Erisman diff --git a/include/freerdp/utils/rail.h b/include/freerdp/utils/rail.h index 0db550b4c..8e82901e6 100644 --- a/include/freerdp/utils/rail.h +++ b/include/freerdp/utils/rail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/signal.h b/include/freerdp/utils/signal.h index eb54c3f7d..5891bb00c 100644 --- a/include/freerdp/utils/signal.h +++ b/include/freerdp/utils/signal.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Signal handling * * Copyright 2011 Shea Levy diff --git a/include/freerdp/utils/sleep.h b/include/freerdp/utils/sleep.h index a3650cc1d..bb7a1fae3 100644 --- a/include/freerdp/utils/sleep.h +++ b/include/freerdp/utils/sleep.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Sleep Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/stopwatch.h b/include/freerdp/utils/stopwatch.h index 58d7be5e1..f3affedd1 100644 --- a/include/freerdp/utils/stopwatch.h +++ b/include/freerdp/utils/stopwatch.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Stopwatch Utils * * Copyright 2011 Stephen Erisman diff --git a/include/freerdp/utils/stream.h b/include/freerdp/utils/stream.h index f6944de63..e84ffb216 100644 --- a/include/freerdp/utils/stream.h +++ b/include/freerdp/utils/stream.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Stream Utils * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/utils/string.h b/include/freerdp/utils/string.h index 4a67d0ea6..2228cc3a5 100644 --- a/include/freerdp/utils/string.h +++ b/include/freerdp/utils/string.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * String Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/svc_plugin.h b/include/freerdp/utils/svc_plugin.h index 185da84b8..005c6874d 100644 --- a/include/freerdp/utils/svc_plugin.h +++ b/include/freerdp/utils/svc_plugin.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Static Virtual Channel Interface * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/utils/tcp.h b/include/freerdp/utils/tcp.h index 5626c12eb..d8aefffed 100644 --- a/include/freerdp/utils/tcp.h +++ b/include/freerdp/utils/tcp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * TCP Utils * * Copyright 2012 Marc-Andre Moreau diff --git a/include/freerdp/utils/thread.h b/include/freerdp/utils/thread.h index 16ef39e2b..d8af74021 100644 --- a/include/freerdp/utils/thread.h +++ b/include/freerdp/utils/thread.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Thread Utils * * Copyright 2011 Vic Lee diff --git a/include/freerdp/utils/time.h b/include/freerdp/utils/time.h index 2b676c9f1..32f49a113 100644 --- a/include/freerdp/utils/time.h +++ b/include/freerdp/utils/time.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Time Utils * * Copyright 2012 Marc-Andre Moreau diff --git a/include/freerdp/utils/uds.h b/include/freerdp/utils/uds.h index ea0c781b1..2a1a9d0c7 100644 --- a/include/freerdp/utils/uds.h +++ b/include/freerdp/utils/uds.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Unix Domain Socket Utils * * Copyright 2012 Vic Lee diff --git a/include/freerdp/utils/unicode.h b/include/freerdp/utils/unicode.h index 81cece1f5..3907af8d4 100644 --- a/include/freerdp/utils/unicode.h +++ b/include/freerdp/utils/unicode.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Unicode Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/include/freerdp/utils/wait_obj.h b/include/freerdp/utils/wait_obj.h index a202a25df..5bd8e3d5a 100644 --- a/include/freerdp/utils/wait_obj.h +++ b/include/freerdp/utils/wait_obj.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channel Manager * * Copyright 2009-2011 Jay Sorg diff --git a/include/freerdp/window.h b/include/freerdp/window.h index 3338e1757..0e01cc3cf 100644 --- a/include/freerdp/window.h +++ b/include/freerdp/window.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Window Alternate Secondary Drawing Orders Interface API * * Copyright 2011 Marc-Andre Moreau diff --git a/keymaps/CMakeLists.txt b/keymaps/CMakeLists.txt index 281052a53..75a6806a0 100644 --- a/keymaps/CMakeLists.txt +++ b/keymaps/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # keymaps cmake build script # # Copyright 2011 O.S. Systems Software Ltda. diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 22c296868..c6ddfc2e6 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/cache/CMakeLists.txt b/libfreerdp/cache/CMakeLists.txt index 18b678175..f0d726452 100644 --- a/libfreerdp/cache/CMakeLists.txt +++ b/libfreerdp/cache/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-cache cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 0d52c2f8d..3cebbc07f 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap Cache V2 * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/brush.c b/libfreerdp/cache/brush.c index 30cebd588..878a206cd 100644 --- a/libfreerdp/cache/brush.c +++ b/libfreerdp/cache/brush.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Brush Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/cache.c b/libfreerdp/cache/cache.c index 19a5ae337..02d20153d 100644 --- a/libfreerdp/cache/cache.c +++ b/libfreerdp/cache/cache.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Caches * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index 052afdbc3..2dff89a47 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Glyph Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/nine_grid.c b/libfreerdp/cache/nine_grid.c index 7c89d40c2..9998cfbfe 100644 --- a/libfreerdp/cache/nine_grid.c +++ b/libfreerdp/cache/nine_grid.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * NineGrid Cache * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/cache/offscreen.c b/libfreerdp/cache/offscreen.c index 132a8d5ad..60a8dda48 100644 --- a/libfreerdp/cache/offscreen.c +++ b/libfreerdp/cache/offscreen.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Offscreen Bitmap Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/palette.c b/libfreerdp/cache/palette.c index e73765cd9..9ce78a9fe 100644 --- a/libfreerdp/cache/palette.c +++ b/libfreerdp/cache/palette.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Palette (Color Table) Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/cache/pointer.c b/libfreerdp/cache/pointer.c index c396bdce8..3ecb205e7 100644 --- a/libfreerdp/cache/pointer.c +++ b/libfreerdp/cache/pointer.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Glyph Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index 01a8a9fa6..4d4a51f3a 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-channels cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 6fccfb80c..c8d0bb82f 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channel Manager * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/channels/libchannels.h b/libfreerdp/channels/libchannels.h index f34bdeed8..bc0b51804 100644 --- a/libfreerdp/channels/libchannels.h +++ b/libfreerdp/channels/libchannels.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channel Manager * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index b4f9b3e5d..9bbbca256 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Virtual Channel Interface * * Copyright 2011-2012 Vic Lee diff --git a/libfreerdp/channels/wtsvc.h b/libfreerdp/channels/wtsvc.h index f1e47f6ba..93d4c2e4c 100644 --- a/libfreerdp/channels/wtsvc.h +++ b/libfreerdp/channels/wtsvc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Server Virtual Channel Interface * * Copyright 2011-2012 Vic Lee diff --git a/libfreerdp/codec/CMakeLists.txt b/libfreerdp/codec/CMakeLists.txt index c94e4ed5d..b83d6d3b8 100644 --- a/libfreerdp/codec/CMakeLists.txt +++ b/libfreerdp/codec/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-codec cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index 31152b160..d87fa5f81 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Compressed Bitmap * * Copyright 2011 Jay Sorg diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index 82cd7adf8..ddc0f0a24 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Color Conversion Routines * * Copyright 2010 Marc-Andre Moreau diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index 23f021a1a..c9f838e1f 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RLE Compressed Bitmap Stream * * Copyright 2011 Jay Sorg diff --git a/libfreerdp/codec/jpeg.c b/libfreerdp/codec/jpeg.c index 89c7b3a00..bd590ee10 100644 --- a/libfreerdp/codec/jpeg.c +++ b/libfreerdp/codec/jpeg.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Compressed jpeg * * Copyright 2012 Jay Sorg diff --git a/libfreerdp/codec/mppc_dec.c b/libfreerdp/codec/mppc_dec.c index b1d378b77..22cc1b5ad 100644 --- a/libfreerdp/codec/mppc_dec.c +++ b/libfreerdp/codec/mppc_dec.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Implements Microsoft Point to Point Compression (MPPC) protocol * * Copyright 2011 Laxmikant Rashinkar diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index b8264fb83..a01669d6b 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Implements Microsoft Point to Point Compression (MPPC) protocol * * Copyright 2012 Laxmikant Rashinkar diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 4ce27529d..e0bfb9a82 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Codec * * Copyright 2011 Samsung, Author Jiten Pathy diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index 50a9c5bce..dde2f6a09 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Encoder * * Copyright 2012 Vic Lee diff --git a/libfreerdp/codec/nsc_encode.h b/libfreerdp/codec/nsc_encode.h index 10b1bfc02..16d13c8dc 100644 --- a/libfreerdp/codec/nsc_encode.h +++ b/libfreerdp/codec/nsc_encode.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Encoder * * Copyright 2012 Vic Lee diff --git a/libfreerdp/codec/nsc_sse2.c b/libfreerdp/codec/nsc_sse2.c index 04868b11e..5551bfc6c 100644 --- a/libfreerdp/codec/nsc_sse2.c +++ b/libfreerdp/codec/nsc_sse2.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Library - SSE2 Optimizations * * Copyright 2012 Vic Lee diff --git a/libfreerdp/codec/nsc_sse2.h b/libfreerdp/codec/nsc_sse2.h index 1c0b632b4..f665dd148 100644 --- a/libfreerdp/codec/nsc_sse2.h +++ b/libfreerdp/codec/nsc_sse2.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Library - SSE2 Optimizations * * Copyright 2012 Vic Lee diff --git a/libfreerdp/codec/nsc_types.h b/libfreerdp/codec/nsc_types.h index 3982a9bfb..9f29b720f 100644 --- a/libfreerdp/codec/nsc_types.h +++ b/libfreerdp/codec/nsc_types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * NSCodec Library * * Copyright 2011 Samsung, Author Jiten Pathy diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index b3ed3ca99..7deaaf271 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_bitstream.h b/libfreerdp/codec/rfx_bitstream.h index 29368f638..a0051e4f3 100644 --- a/libfreerdp/codec/rfx_bitstream.h +++ b/libfreerdp/codec/rfx_bitstream.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Bit Stream * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_constants.h b/libfreerdp/codec/rfx_constants.h index bf1288635..248210199 100644 --- a/libfreerdp/codec/rfx_constants.h +++ b/libfreerdp/codec/rfx_constants.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - API Header * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_decode.c b/libfreerdp/codec/rfx_decode.c index 8a8f1de43..6f18f8d96 100644 --- a/libfreerdp/codec/rfx_decode.c +++ b/libfreerdp/codec/rfx_decode.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Decode * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_decode.h b/libfreerdp/codec/rfx_decode.h index 874ad2eac..669175980 100644 --- a/libfreerdp/codec/rfx_decode.h +++ b/libfreerdp/codec/rfx_decode.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Decode * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_differential.c b/libfreerdp/codec/rfx_differential.c index ba972b6ee..2260a17ac 100644 --- a/libfreerdp/codec/rfx_differential.c +++ b/libfreerdp/codec/rfx_differential.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Differential Encoding * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_differential.h b/libfreerdp/codec/rfx_differential.h index 58b08b9c7..724e589c5 100644 --- a/libfreerdp/codec/rfx_differential.h +++ b/libfreerdp/codec/rfx_differential.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Differential Encoding * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_dwt.c b/libfreerdp/codec/rfx_dwt.c index 97df63bd7..2e92c9cb7 100644 --- a/libfreerdp/codec/rfx_dwt.c +++ b/libfreerdp/codec/rfx_dwt.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - DWT * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_dwt.h b/libfreerdp/codec/rfx_dwt.h index cfdc4bc16..aa95f6723 100644 --- a/libfreerdp/codec/rfx_dwt.h +++ b/libfreerdp/codec/rfx_dwt.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - DWT * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_encode.c b/libfreerdp/codec/rfx_encode.c index d454f1558..4ca76569b 100644 --- a/libfreerdp/codec/rfx_encode.c +++ b/libfreerdp/codec/rfx_encode.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Encode * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_encode.h b/libfreerdp/codec/rfx_encode.h index 6fa1e9596..f466c52e3 100644 --- a/libfreerdp/codec/rfx_encode.h +++ b/libfreerdp/codec/rfx_encode.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Encode * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_neon.c b/libfreerdp/codec/rfx_neon.c index 1cbd7b7b7..170671714 100644 --- a/libfreerdp/codec/rfx_neon.c +++ b/libfreerdp/codec/rfx_neon.c @@ -1,5 +1,5 @@ /* - FreeRDP: A Remote Desktop Protocol client. + FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library - NEON Optimizations Copyright 2011 Martin Fleisz diff --git a/libfreerdp/codec/rfx_neon.h b/libfreerdp/codec/rfx_neon.h index 28dbc36f1..4ec15b281 100644 --- a/libfreerdp/codec/rfx_neon.h +++ b/libfreerdp/codec/rfx_neon.h @@ -1,5 +1,5 @@ /* - FreeRDP: A Remote Desktop Protocol client. + FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library - NEON Optimizations Copyright 2011 Martin Fleisz diff --git a/libfreerdp/codec/rfx_pool.c b/libfreerdp/codec/rfx_pool.c index 47e6065b6..e97b752ec 100644 --- a/libfreerdp/codec/rfx_pool.c +++ b/libfreerdp/codec/rfx_pool.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Memory Pool * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/codec/rfx_pool.h b/libfreerdp/codec/rfx_pool.h index 4f1ff81f8..787a32627 100644 --- a/libfreerdp/codec/rfx_pool.h +++ b/libfreerdp/codec/rfx_pool.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Memory Pool * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/codec/rfx_quantization.c b/libfreerdp/codec/rfx_quantization.c index 81adb20f6..9a71db069 100644 --- a/libfreerdp/codec/rfx_quantization.c +++ b/libfreerdp/codec/rfx_quantization.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Quantization * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_quantization.h b/libfreerdp/codec/rfx_quantization.h index 9fbfa5143..ba9fccb9b 100644 --- a/libfreerdp/codec/rfx_quantization.h +++ b/libfreerdp/codec/rfx_quantization.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - Quantization * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_rlgr.c b/libfreerdp/codec/rfx_rlgr.c index 7e92c475d..c7730c4bc 100644 --- a/libfreerdp/codec/rfx_rlgr.c +++ b/libfreerdp/codec/rfx_rlgr.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - RLGR * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_rlgr.h b/libfreerdp/codec/rfx_rlgr.h index b470bd5a8..264beabbd 100644 --- a/libfreerdp/codec/rfx_rlgr.h +++ b/libfreerdp/codec/rfx_rlgr.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - RLGR * * Copyright 2011 Vic Lee diff --git a/libfreerdp/codec/rfx_sse2.c b/libfreerdp/codec/rfx_sse2.c index b9cc9fa04..bcb32ea13 100644 --- a/libfreerdp/codec/rfx_sse2.c +++ b/libfreerdp/codec/rfx_sse2.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - SSE2 Optimizations * * Copyright 2011 Stephen Erisman diff --git a/libfreerdp/codec/rfx_sse2.h b/libfreerdp/codec/rfx_sse2.h index b9a9a2a56..2fc14fd47 100644 --- a/libfreerdp/codec/rfx_sse2.h +++ b/libfreerdp/codec/rfx_sse2.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library - SSE2 Optimizations * * Copyright 2011 Stephen Erisman diff --git a/libfreerdp/codec/rfx_types.h b/libfreerdp/codec/rfx_types.h index dd3f739ef..64b72fdfe 100644 --- a/libfreerdp/codec/rfx_types.h +++ b/libfreerdp/codec/rfx_types.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX Codec Library * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/CMakeLists.txt b/libfreerdp/core/CMakeLists.txt index 10dbfbb1b..81086c11b 100644 --- a/libfreerdp/core/CMakeLists.txt +++ b/libfreerdp/core/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-core cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/core/activation.c b/libfreerdp/core/activation.c index 8551bf8fd..469a24226 100644 --- a/libfreerdp/core/activation.c +++ b/libfreerdp/core/activation.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Activation Sequence * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/activation.h b/libfreerdp/core/activation.h index 25891711a..b3e0ac091 100644 --- a/libfreerdp/core/activation.h +++ b/libfreerdp/core/activation.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Activation Sequence * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 87350044b..197b4d7a2 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Capability Sets * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/capabilities.h b/libfreerdp/core/capabilities.h index 420d69ced..e7778a6bf 100644 --- a/libfreerdp/core/capabilities.h +++ b/libfreerdp/core/capabilities.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Capability Sets * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 1f28616ff..5e815367b 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Certificate Handling * * Copyright 2011 Jiten Pathy diff --git a/libfreerdp/core/certificate.h b/libfreerdp/core/certificate.h index 8ebaa6eaf..efd897ffa 100644 --- a/libfreerdp/core/certificate.h +++ b/libfreerdp/core/certificate.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Certificate Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/channel.c b/libfreerdp/core/channel.c index 824c9768d..29816baab 100644 --- a/libfreerdp/core/channel.c +++ b/libfreerdp/core/channel.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channels * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/channel.h b/libfreerdp/core/channel.h index 3632247c4..f33c52cb1 100644 --- a/libfreerdp/core/channel.h +++ b/libfreerdp/core/channel.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channels * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index be17767a4..ea126ab9e 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Connection Sequence * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/connection.h b/libfreerdp/core/connection.h index 8d05bedb9..283a0c0d0 100644 --- a/libfreerdp/core/connection.h +++ b/libfreerdp/core/connection.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Connection Sequence * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/errinfo.c b/libfreerdp/core/errinfo.c index 423a4e6b1..9464f8c68 100644 --- a/libfreerdp/core/errinfo.c +++ b/libfreerdp/core/errinfo.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Error Info * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/errinfo.h b/libfreerdp/core/errinfo.h index d63f078c4..bd8702258 100644 --- a/libfreerdp/core/errinfo.h +++ b/libfreerdp/core/errinfo.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Error Info * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/extension.c b/libfreerdp/core/extension.c index 2d79c24e4..b0a6c48e8 100644 --- a/libfreerdp/core/extension.c +++ b/libfreerdp/core/extension.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Extension Plugin Interface * * Copyright 2010-2011 Vic Lee diff --git a/libfreerdp/core/extension.h b/libfreerdp/core/extension.h index 176888ea3..1ee35ea3d 100644 --- a/libfreerdp/core/extension.h +++ b/libfreerdp/core/extension.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Extension Plugin Interface * * Copyright 2010-2011 Vic Lee diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index b55d62545..7c9f63535 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Fast Path * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/fastpath.h b/libfreerdp/core/fastpath.h index 428ce5593..56ba81d48 100644 --- a/libfreerdp/core/fastpath.h +++ b/libfreerdp/core/fastpath.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Fast Path * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index f20276b05..2055d274f 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Core * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index 3318e53f6..4b70d317c 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.124 Generic Conference Control (GCC) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/gcc.h b/libfreerdp/core/gcc.h index 938448ad4..7f61403e1 100644 --- a/libfreerdp/core/gcc.h +++ b/libfreerdp/core/gcc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.124 Generic Conference Control (GCC) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/graphics.c b/libfreerdp/core/graphics.c index 2d7105d0d..324484777 100644 --- a/libfreerdp/core/graphics.c +++ b/libfreerdp/core/graphics.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index c628a61ce..b9c7ceda4 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Hypertext Transfer Protocol (HTTP) * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/core/http.h b/libfreerdp/core/http.h index 2b3bee83c..4fd8dd03c 100644 --- a/libfreerdp/core/http.h +++ b/libfreerdp/core/http.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Hypertext Transfer Protocol (HTTP) * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index 8e50a1c34..cb0ba8267 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Client Info * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/info.h b/libfreerdp/core/info.h index e46582bab..f7df7ae54 100644 --- a/libfreerdp/core/info.h +++ b/libfreerdp/core/info.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Client Info * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 17d9fdbb1..0c69ae54d 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Input PDUs * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/input.h b/libfreerdp/core/input.h index 41b8b6756..cf1b2a51f 100644 --- a/libfreerdp/core/input.h +++ b/libfreerdp/core/input.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Input PDUs * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 3090b048c..d22284d09 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Licensing * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/license.h b/libfreerdp/core/license.h index d3b998fdf..49102f433 100644 --- a/libfreerdp/core/license.h +++ b/libfreerdp/core/license.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Licensing * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index 36dcd3e90..b78e0bca9 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Listener * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/listener.h b/libfreerdp/core/listener.h index 78a755288..51aa569e0 100644 --- a/libfreerdp/core/listener.h +++ b/libfreerdp/core/listener.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Listener * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index 0d6a5dda2..b55bcb6e8 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.125 Multipoint Communication Service (MCS) Protocol * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/mcs.h b/libfreerdp/core/mcs.h index 04cae2607..763bd1460 100644 --- a/libfreerdp/core/mcs.h +++ b/libfreerdp/core/mcs.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * T.125 Multipoint Communication Service (MCS) Protocol * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index 6af15ad97..9b7cd70ca 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Protocol Security Negotiation * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/nego.h b/libfreerdp/core/nego.h index 8e4b665c0..20a81a244 100644 --- a/libfreerdp/core/nego.h +++ b/libfreerdp/core/nego.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Protocol Security Negotiation * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index 7256f2500..5d1af4567 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/orders.h b/libfreerdp/core/orders.h index 6c182e25a..d04c4cff6 100644 --- a/libfreerdp/core/orders.h +++ b/libfreerdp/core/orders.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Drawing Orders * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index 66b70939c..c1c0f86e2 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Peer * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/peer.h b/libfreerdp/core/peer.h index eb9ed63ec..cee607683 100644 --- a/libfreerdp/core/peer.h +++ b/libfreerdp/core/peer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Peer * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 3623c2b67..5f5d65b26 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Core * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/rdp.h b/libfreerdp/core/rdp.h index b327f8bce..50fb58a74 100644 --- a/libfreerdp/core/rdp.h +++ b/libfreerdp/core/rdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Core * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 78ff55230..6c8673ac6 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Redirection * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/redirection.h b/libfreerdp/core/redirection.h index fe084fd76..cd69aef46 100644 --- a/libfreerdp/core/redirection.h +++ b/libfreerdp/core/redirection.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Server Redirection * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index 08b8ff5c6..9124c9952 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RPC over HTTP * * Copyright 2012 Fujitsu Technology Solutions GmbH diff --git a/libfreerdp/core/rpc.h b/libfreerdp/core/rpc.h index e35bab02e..c75f8c393 100644 --- a/libfreerdp/core/rpc.h +++ b/libfreerdp/core/rpc.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RPC over HTTP * * Copyright 2012 Fujitsu Technology Solutions GmbH diff --git a/libfreerdp/core/security.c b/libfreerdp/core/security.c index b15a551d6..285bc2695 100644 --- a/libfreerdp/core/security.c +++ b/libfreerdp/core/security.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Security * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/security.h b/libfreerdp/core/security.h index 6ca12ebb6..5f7d9b87c 100644 --- a/libfreerdp/core/security.h +++ b/libfreerdp/core/security.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Security * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 9af876501..45d0be19a 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RDP Settings * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c index 0826f26e6..878e79989 100644 --- a/libfreerdp/core/surface.c +++ b/libfreerdp/core/surface.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Surface Commands * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/surface.h b/libfreerdp/core/surface.h index b087e61b9..354971e06 100644 --- a/libfreerdp/core/surface.h +++ b/libfreerdp/core/surface.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Surface Commands * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 49b6f80b5..9bd850584 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Transmission Control Protocol (TCP) * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/tcp.h b/libfreerdp/core/tcp.h index 45c32a83c..ced110d7e 100644 --- a/libfreerdp/core/tcp.h +++ b/libfreerdp/core/tcp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Transmission Control Protocol (TCP) * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index f9f86916f..0862d40e1 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Time Zone Redirection * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/core/timezone.h b/libfreerdp/core/timezone.h index 79ef076fc..8be62d4fb 100644 --- a/libfreerdp/core/timezone.h +++ b/libfreerdp/core/timezone.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Time Zone Redirection * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/core/tpdu.c b/libfreerdp/core/tpdu.c index 8a3002123..de833759e 100644 --- a/libfreerdp/core/tpdu.c +++ b/libfreerdp/core/tpdu.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X.224 Transport Protocol Data Units (TPDUs) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/tpdu.h b/libfreerdp/core/tpdu.h index c85273c9d..193f71913 100644 --- a/libfreerdp/core/tpdu.h +++ b/libfreerdp/core/tpdu.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X.224 Transport Protocol Data Units (TPDUs) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/tpkt.c b/libfreerdp/core/tpkt.c index 6f5e287aa..5e84733ef 100644 --- a/libfreerdp/core/tpkt.c +++ b/libfreerdp/core/tpkt.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Transport Packets (TPKTs) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/tpkt.h b/libfreerdp/core/tpkt.h index 331bafd92..d7f3d5c93 100644 --- a/libfreerdp/core/tpkt.h +++ b/libfreerdp/core/tpkt.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Transport Packets (TPKTs) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 1073eb95f..231041f5f 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Network Transport Layer * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/transport.h b/libfreerdp/core/transport.h index e082fc44e..8d4a85f72 100644 --- a/libfreerdp/core/transport.h +++ b/libfreerdp/core/transport.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Network Transport Layer * * Copyright 2011 Vic Lee diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index f643f24ae..560f2c6c4 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Terminal Server Gateway (TSG) * * Copyright 2012 Fujitsu Technology Solutions GmbH diff --git a/libfreerdp/core/tsg.h b/libfreerdp/core/tsg.h index 4719ab357..624ad1b47 100644 --- a/libfreerdp/core/tsg.h +++ b/libfreerdp/core/tsg.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Terminal Server Gateway (TSG) * * Copyright 2012 Fujitsu Technology Solutions GmbH diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index dbfb067ca..985b9d4d1 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Update Data PDUs * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/update.h b/libfreerdp/core/update.h index 0a69cc8f5..8af08f3d7 100644 --- a/libfreerdp/core/update.h +++ b/libfreerdp/core/update.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Update Data PDUs * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c index b80a8ce9a..996eeadfd 100644 --- a/libfreerdp/core/window.c +++ b/libfreerdp/core/window.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windowing Alternate Secondary Orders * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/core/window.h b/libfreerdp/core/window.h index 3ee0dff97..7f173ddc2 100644 --- a/libfreerdp/core/window.h +++ b/libfreerdp/core/window.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Windowing Alternate Secondary Orders * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/crypto/CMakeLists.txt b/libfreerdp/crypto/CMakeLists.txt index 2ee9dd96a..e8a920624 100644 --- a/libfreerdp/crypto/CMakeLists.txt +++ b/libfreerdp/crypto/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-crypto cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/crypto/der.c b/libfreerdp/crypto/der.c index 441496d83..f76508d92 100644 --- a/libfreerdp/crypto/der.c +++ b/libfreerdp/crypto/der.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * ASN.1 Basic Encoding Rules (DER) * * Copyright 2011 Samsung, Author Jiten Pathy diff --git a/libfreerdp/crypto/er.c b/libfreerdp/crypto/er.c index efcc6a46c..26503dba6 100644 --- a/libfreerdp/crypto/er.c +++ b/libfreerdp/crypto/er.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * ASN.1 Encoding Rules (BER/DER common functions) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/16bpp.c b/libfreerdp/gdi/16bpp.c index fee35ef76..fd4b59043 100644 --- a/libfreerdp/gdi/16bpp.c +++ b/libfreerdp/gdi/16bpp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 16bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/32bpp.c b/libfreerdp/gdi/32bpp.c index 570bb2e1c..9ed9e4386 100644 --- a/libfreerdp/gdi/32bpp.c +++ b/libfreerdp/gdi/32bpp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 32bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/8bpp.c b/libfreerdp/gdi/8bpp.c index f4fce0f9f..5c1dd543d 100644 --- a/libfreerdp/gdi/8bpp.c +++ b/libfreerdp/gdi/8bpp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI 8bpp Internal Buffer Routines * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/CMakeLists.txt b/libfreerdp/gdi/CMakeLists.txt index 18ebf8fca..0cc87069b 100644 --- a/libfreerdp/gdi/CMakeLists.txt +++ b/libfreerdp/gdi/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-gdi cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/gdi/bitmap.c b/libfreerdp/gdi/bitmap.c index d9d326c44..e2828caaa 100644 --- a/libfreerdp/gdi/bitmap.c +++ b/libfreerdp/gdi/bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Bitmap Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/brush.c b/libfreerdp/gdi/brush.c index 74f991e2f..a93312c81 100644 --- a/libfreerdp/gdi/brush.c +++ b/libfreerdp/gdi/brush.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Brush Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/clipping.c b/libfreerdp/gdi/clipping.c index 7c3b71672..e6186a14f 100644 --- a/libfreerdp/gdi/clipping.c +++ b/libfreerdp/gdi/clipping.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Clipping Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/dc.c b/libfreerdp/gdi/dc.c index 24efc4dc9..f08330820 100644 --- a/libfreerdp/gdi/dc.c +++ b/libfreerdp/gdi/dc.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Device Context Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/drawing.c b/libfreerdp/gdi/drawing.c index 2a62055f9..1ecd2c3e5 100644 --- a/libfreerdp/gdi/drawing.c +++ b/libfreerdp/gdi/drawing.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Drawing Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index c97a2005c..b506e984f 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Library * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/gdi.h b/libfreerdp/gdi/gdi.h index 99fa73683..90d2f9016 100644 --- a/libfreerdp/gdi/gdi.h +++ b/libfreerdp/gdi/gdi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Library * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index bef0c6e61..b109473af 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/graphics.h b/libfreerdp/gdi/graphics.h index 930c5e860..968c1652e 100644 --- a/libfreerdp/gdi/graphics.h +++ b/libfreerdp/gdi/graphics.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Graphical Objects * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/include/line.c b/libfreerdp/gdi/include/line.c index 389304046..d8a56b7ea 100644 --- a/libfreerdp/gdi/include/line.c +++ b/libfreerdp/gdi/include/line.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI LineTo * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/line.c b/libfreerdp/gdi/line.c index fafc73d69..aef8b9e9b 100644 --- a/libfreerdp/gdi/line.c +++ b/libfreerdp/gdi/line.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Line Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/palette.c b/libfreerdp/gdi/palette.c index 2db3f722f..08c04b3c5 100644 --- a/libfreerdp/gdi/palette.c +++ b/libfreerdp/gdi/palette.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Palette Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/pen.c b/libfreerdp/gdi/pen.c index beee3ef72..1bc9b8484 100644 --- a/libfreerdp/gdi/pen.c +++ b/libfreerdp/gdi/pen.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Pen Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/region.c b/libfreerdp/gdi/region.c index c6d59de61..496e27fbf 100644 --- a/libfreerdp/gdi/region.c +++ b/libfreerdp/gdi/region.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Region Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/gdi/shape.c b/libfreerdp/gdi/shape.c index 894b04530..08197fede 100644 --- a/libfreerdp/gdi/shape.c +++ b/libfreerdp/gdi/shape.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * GDI Shape Functions * * Copyright 2010-2011 Marc-Andre Moreau diff --git a/libfreerdp/locale/CMakeLists.txt b/libfreerdp/locale/CMakeLists.txt index 2fc8cfc57..bae6b46da 100644 --- a/libfreerdp/locale/CMakeLists.txt +++ b/libfreerdp/locale/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-locale cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/rail/CMakeLists.txt b/libfreerdp/rail/CMakeLists.txt index 1cd8db412..c89318e9b 100644 --- a/libfreerdp/rail/CMakeLists.txt +++ b/libfreerdp/rail/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-rail cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/rail/icon.c b/libfreerdp/rail/icon.c index bbca5a7ad..d44e34829 100644 --- a/libfreerdp/rail/icon.c +++ b/libfreerdp/rail/icon.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Window Icon Cache * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/rail/librail.h b/libfreerdp/rail/librail.h index 68d9c8b49..f4795caa0 100644 --- a/libfreerdp/rail/librail.h +++ b/libfreerdp/rail/librail.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/rail/rail.c b/libfreerdp/rail/rail.c index 0720ce2dd..f79f8a10b 100644 --- a/libfreerdp/rail/rail.c +++ b/libfreerdp/rail/rail.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/rail/window.c b/libfreerdp/rail/window.c index 5fae5aa7f..26dfee661 100644 --- a/libfreerdp/rail/window.c +++ b/libfreerdp/rail/window.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Windows * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/rail/window_list.c b/libfreerdp/rail/window_list.c index 027c8e4c2..b4221dfef 100644 --- a/libfreerdp/rail/window_list.c +++ b/libfreerdp/rail/window_list.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * RAIL Window List * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/CMakeLists.txt b/libfreerdp/utils/CMakeLists.txt index 4fd8676f0..ae639bbb3 100644 --- a/libfreerdp/utils/CMakeLists.txt +++ b/libfreerdp/utils/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # libfreerdp-utils cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/utils/args.c b/libfreerdp/utils/args.c index 503af4286..921e4e340 100644 --- a/libfreerdp/utils/args.c +++ b/libfreerdp/utils/args.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Arguments Parsing * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/utils/bitmap.c b/libfreerdp/utils/bitmap.c index c9aee3a64..8fa5ebccb 100644 --- a/libfreerdp/utils/bitmap.c +++ b/libfreerdp/utils/bitmap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Bitmap File Format Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/dsp.c b/libfreerdp/utils/dsp.c index c89c900cf..5a4cc3394 100644 --- a/libfreerdp/utils/dsp.c +++ b/libfreerdp/utils/dsp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Digital Sound Processing * * Copyright 2010-2011 Vic Lee diff --git a/libfreerdp/utils/event.c b/libfreerdp/utils/event.c index 95c184681..606f3ebeb 100644 --- a/libfreerdp/utils/event.c +++ b/libfreerdp/utils/event.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Events * * Copyright 2011 Vic Lee diff --git a/libfreerdp/utils/file.c b/libfreerdp/utils/file.c index fa3e47ce8..1fddca77b 100644 --- a/libfreerdp/utils/file.c +++ b/libfreerdp/utils/file.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * File Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/hexdump.c b/libfreerdp/utils/hexdump.c index 665aeb000..8e80f2615 100644 --- a/libfreerdp/utils/hexdump.c +++ b/libfreerdp/utils/hexdump.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Hex Dump Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/list.c b/libfreerdp/utils/list.c index 265753ba6..dfd9632ca 100644 --- a/libfreerdp/utils/list.c +++ b/libfreerdp/utils/list.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Double-linked List Utils * * Copyright 2011 Vic Lee diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index 5b2548b1e..827b925f2 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Plugin Loading Utils * * Copyright 2011 Vic Lee diff --git a/libfreerdp/utils/memory.c b/libfreerdp/utils/memory.c index 1a03a9fd1..8bffc9344 100644 --- a/libfreerdp/utils/memory.c +++ b/libfreerdp/utils/memory.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Memory Utils * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/utils/msusb.c b/libfreerdp/utils/msusb.c index 0c918b8ca..b1378df50 100644 --- a/libfreerdp/utils/msusb.c +++ b/libfreerdp/utils/msusb.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * RemoteFX USB Redirection * * Copyright 2012 Atrust corp. diff --git a/libfreerdp/utils/passphrase.c b/libfreerdp/utils/passphrase.c index 35c1b8a78..50d338166 100644 --- a/libfreerdp/utils/passphrase.c +++ b/libfreerdp/utils/passphrase.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Passphrase Handling Utils * * Copyright 2011 Shea Levy diff --git a/libfreerdp/utils/pcap.c b/libfreerdp/utils/pcap.c index 61bdf4089..cb1987f63 100644 --- a/libfreerdp/utils/pcap.c +++ b/libfreerdp/utils/pcap.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * pcap File Format Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/profiler.c b/libfreerdp/utils/profiler.c index b12729e93..db0f8e256 100644 --- a/libfreerdp/utils/profiler.c +++ b/libfreerdp/utils/profiler.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Profiler Utils * * Copyright 2011 Stephen Erisman diff --git a/libfreerdp/utils/rail.c b/libfreerdp/utils/rail.c index 99f41f487..d8c07e758 100644 --- a/libfreerdp/utils/rail.c +++ b/libfreerdp/utils/rail.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Remote Applications Integrated Locally (RAIL) Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/signal.c b/libfreerdp/utils/signal.c index 3ce1b277a..cc7e69365 100644 --- a/libfreerdp/utils/signal.c +++ b/libfreerdp/utils/signal.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Signal handling * * Copyright 2011 Shea Levy diff --git a/libfreerdp/utils/sleep.c b/libfreerdp/utils/sleep.c index fe7deb21e..ae24add6b 100644 --- a/libfreerdp/utils/sleep.c +++ b/libfreerdp/utils/sleep.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Sleep Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/stopwatch.c b/libfreerdp/utils/stopwatch.c index f2cad8f6d..730cf41db 100644 --- a/libfreerdp/utils/stopwatch.c +++ b/libfreerdp/utils/stopwatch.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Stopwatch Utils * * Copyright 2011 Stephen Erisman diff --git a/libfreerdp/utils/stream.c b/libfreerdp/utils/stream.c index 534aa2e8c..85dc729bb 100644 --- a/libfreerdp/utils/stream.c +++ b/libfreerdp/utils/stream.c @@ -1,5 +1,5 @@ /* - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Stream Utils * * Copyright 2011 Vic Lee diff --git a/libfreerdp/utils/string.c b/libfreerdp/utils/string.c index a8229f006..9695a2eab 100644 --- a/libfreerdp/utils/string.c +++ b/libfreerdp/utils/string.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * String Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/svc_plugin.c b/libfreerdp/utils/svc_plugin.c index 956f8e59a..904556993 100644 --- a/libfreerdp/utils/svc_plugin.c +++ b/libfreerdp/utils/svc_plugin.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Static Virtual Channel Interface * * Copyright 2009-2011 Jay Sorg diff --git a/libfreerdp/utils/tcp.c b/libfreerdp/utils/tcp.c index 5bddb45d6..9825548e8 100644 --- a/libfreerdp/utils/tcp.c +++ b/libfreerdp/utils/tcp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * TCP Utils * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/utils/thread.c b/libfreerdp/utils/thread.c index 2c1c16076..5100265a0 100644 --- a/libfreerdp/utils/thread.c +++ b/libfreerdp/utils/thread.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Thread Utils * * Copyright 2011 Vic Lee diff --git a/libfreerdp/utils/time.c b/libfreerdp/utils/time.c index 0183b58c3..09f678b73 100644 --- a/libfreerdp/utils/time.c +++ b/libfreerdp/utils/time.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Time Utils * * Copyright 2012 Marc-Andre Moreau diff --git a/libfreerdp/utils/uds.c b/libfreerdp/utils/uds.c index ff44f243c..d05f6ff32 100644 --- a/libfreerdp/utils/uds.c +++ b/libfreerdp/utils/uds.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Unix Domain Socket Utils * * Copyright 2012 Vic Lee diff --git a/libfreerdp/utils/unicode.c b/libfreerdp/utils/unicode.c index 530155206..c217c4b42 100644 --- a/libfreerdp/utils/unicode.c +++ b/libfreerdp/utils/unicode.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Unicode Utils * * Copyright 2011 Marc-Andre Moreau diff --git a/libfreerdp/utils/wait_obj.c b/libfreerdp/utils/wait_obj.c index ac4f1c021..5f9240c99 100644 --- a/libfreerdp/utils/wait_obj.c +++ b/libfreerdp/utils/wait_obj.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol client. + * FreeRDP: A Remote Desktop Protocol Implementation * Virtual Channel Manager * * Copyright 2009-2011 Jay Sorg diff --git a/scripts/TimeZones.cs b/scripts/TimeZones.cs index 36cea6050..d8b0d9edd 100644 --- a/scripts/TimeZones.cs +++ b/scripts/TimeZones.cs @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * Time Zone Redirection Table Generator * * Copyright 2012 Marc-Andre Moreau diff --git a/scripts/WindowsZones.cs b/scripts/WindowsZones.cs index d9c2464bd..834c6d3f1 100644 --- a/scripts/WindowsZones.cs +++ b/scripts/WindowsZones.cs @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * TZID to Windows TimeZone Identifier Table Generator * * Copyright 2012 Marc-Andre Moreau diff --git a/scripts/xkb.pl b/scripts/xkb.pl index 9faa5a0e4..976ee3ba5 100755 --- a/scripts/xkb.pl +++ b/scripts/xkb.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# FreeRDP: A Remote Desktop Protocol client. +# FreeRDP: A Remote Desktop Protocol Implementation # XKB database conversion script # Copyright 2009 Marc-Andre Moreau diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index e7b64a890..3897b5f25 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Servers # # Copyright 2012 Marc-Andre Moreau diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index 6f3b5341b..783c621ba 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Sample Server cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 820c0187f..14ce1085c 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Test Server * * Copyright 2011 Marc-Andre Moreau diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index b8138b49a..6c08ac469 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Windows Server cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/cli/CMakeLists.txt b/server/Windows/cli/CMakeLists.txt index d8a0e418f..fdecbbb43 100644 --- a/server/Windows/cli/CMakeLists.txt +++ b/server/Windows/cli/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP Windows Server (CLI) cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/cli/wfreerdp.c b/server/Windows/cli/wfreerdp.c index a90c50b75..b40e796de 100644 --- a/server/Windows/cli/wfreerdp.c +++ b/server/Windows/cli/wfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/cli/wfreerdp.h b/server/Windows/cli/wfreerdp.h index 68e3fad10..f3ab71cb0 100644 --- a/server/Windows/cli/wfreerdp.h +++ b/server/Windows/cli/wfreerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_dxgi.c b/server/Windows/wf_dxgi.c index 1869932f6..4a22a546f 100644 --- a/server/Windows/wf_dxgi.c +++ b/server/Windows/wf_dxgi.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Corey Clayton diff --git a/server/Windows/wf_dxgi.h b/server/Windows/wf_dxgi.h index 9f3d96f6b..c7b73b803 100644 --- a/server/Windows/wf_dxgi.h +++ b/server/Windows/wf_dxgi.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Corey Clayton diff --git a/server/Windows/wf_info.c b/server/Windows/wf_info.c index addd7e132..ba6cac3e0 100644 --- a/server/Windows/wf_info.c +++ b/server/Windows/wf_info.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Corey Clayton diff --git a/server/Windows/wf_info.h b/server/Windows/wf_info.h index c23ad872b..e207a3794 100644 --- a/server/Windows/wf_info.h +++ b/server/Windows/wf_info.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Corey Clayton diff --git a/server/Windows/wf_input.c b/server/Windows/wf_input.c index a802d2ca2..ecb0c2dba 100644 --- a/server/Windows/wf_input.c +++ b/server/Windows/wf_input.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_input.h b/server/Windows/wf_input.h index d06c2ed74..861bc8d97 100644 --- a/server/Windows/wf_input.h +++ b/server/Windows/wf_input.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_interface.c b/server/Windows/wf_interface.c index b144a5655..1ef29ef75 100644 --- a/server/Windows/wf_interface.c +++ b/server/Windows/wf_interface.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_interface.h b/server/Windows/wf_interface.h index 587d8305c..827501593 100644 --- a/server/Windows/wf_interface.h +++ b/server/Windows/wf_interface.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_mirage.c b/server/Windows/wf_mirage.c index c18b01e0f..ed516aaa3 100644 --- a/server/Windows/wf_mirage.c +++ b/server/Windows/wf_mirage.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_mirage.h b/server/Windows/wf_mirage.h index 50a6b40e8..9287695d2 100644 --- a/server/Windows/wf_mirage.h +++ b/server/Windows/wf_mirage.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_peer.c b/server/Windows/wf_peer.c index 7a18894a8..e7549f969 100644 --- a/server/Windows/wf_peer.c +++ b/server/Windows/wf_peer.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_peer.h b/server/Windows/wf_peer.h index 0fdf27631..7a5270fad 100644 --- a/server/Windows/wf_peer.h +++ b/server/Windows/wf_peer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_settings.c b/server/Windows/wf_settings.c index 5167e4f19..c5e703ffe 100644 --- a/server/Windows/wf_settings.c +++ b/server/Windows/wf_settings.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_settings.h b/server/Windows/wf_settings.h index a0f7eb935..c116fa20b 100644 --- a/server/Windows/wf_settings.h +++ b/server/Windows/wf_settings.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_update.c b/server/Windows/wf_update.c index 70d5a81ca..536c5f512 100644 --- a/server/Windows/wf_update.c +++ b/server/Windows/wf_update.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/Windows/wf_update.h b/server/Windows/wf_update.h index 3f6a4fd94..0fb9c46bd 100644 --- a/server/Windows/wf_update.h +++ b/server/Windows/wf_update.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP Windows Server * * Copyright 2012 Marc-Andre Moreau diff --git a/server/X11/CMakeLists.txt b/server/X11/CMakeLists.txt index 932c742d5..c6282174f 100644 --- a/server/X11/CMakeLists.txt +++ b/server/X11/CMakeLists.txt @@ -1,4 +1,4 @@ -# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP: A Remote Desktop Protocol Implementation # FreeRDP X11 Server cmake build script # # Copyright 2012 Marc-Andre Moreau diff --git a/server/X11/xf_encode.c b/server/X11/xf_encode.c index 5a941ceb6..afa70ed4b 100644 --- a/server/X11/xf_encode.c +++ b/server/X11/xf_encode.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 RemoteFX Encoder * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_encode.h b/server/X11/xf_encode.h index 82b68cf14..f84b3f48e 100644 --- a/server/X11/xf_encode.h +++ b/server/X11/xf_encode.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 RemoteFX Encoder * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_event.c b/server/X11/xf_event.c index 1a3780792..b31cf5456 100644 --- a/server/X11/xf_event.c +++ b/server/X11/xf_event.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Server Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_event.h b/server/X11/xf_event.h index aca80172d..1b983b940 100644 --- a/server/X11/xf_event.h +++ b/server/X11/xf_event.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Server Event Handling * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index 9d56ab224..73a799632 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Server Input * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_input.h b/server/X11/xf_input.h index 34cda06df..465a024b3 100644 --- a/server/X11/xf_input.h +++ b/server/X11/xf_input.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Server Input * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 33dd51ca6..9833ce60a 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Peer * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xf_peer.h b/server/X11/xf_peer.h index 6e15cdb92..b93c8d94a 100644 --- a/server/X11/xf_peer.h +++ b/server/X11/xf_peer.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * X11 Peer * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xfreerdp.c b/server/X11/xfreerdp.c index 379209760..c244334b1 100644 --- a/server/X11/xfreerdp.c +++ b/server/X11/xfreerdp.c @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP X11 Server * * Copyright 2011 Marc-Andre Moreau diff --git a/server/X11/xfreerdp.h b/server/X11/xfreerdp.h index 360992372..1d3844a8a 100644 --- a/server/X11/xfreerdp.h +++ b/server/X11/xfreerdp.h @@ -1,5 +1,5 @@ /** - * FreeRDP: A Remote Desktop Protocol Client + * FreeRDP: A Remote Desktop Protocol Implementation * FreeRDP X11 Server * * Copyright 2011 Marc-Andre Moreau From 9909a12af5a9578517ae6c86f21fe03bf37f1da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 23:21:26 -0400 Subject: [PATCH 32/43] libfreerdp-utils: get rid of xmalloc, xrealloc and xfree --- channels/audin/client/alsa/audin_alsa.c | 6 +- channels/audin/client/audin_main.c | 10 +-- channels/audin/client/pulse/audin_pulse.c | 4 +- channels/audin/server/audin.c | 6 +- channels/cliprdr/client/cliprdr_format.c | 16 ++--- channels/cliprdr/client/cliprdr_main.c | 2 +- channels/disk/client/disk_file.c | 16 ++--- channels/disk/client/disk_main.c | 16 ++--- channels/drdynvc/client/drdynvc_main.c | 2 +- channels/drdynvc/client/dvcman.c | 8 +-- channels/parallel/client/parallel_main.c | 10 +-- channels/printer/client/printer_cups.c | 12 ++-- channels/printer/client/printer_main.c | 12 ++-- channels/printer/client/printer_win.c | 8 +-- channels/rail/client/rail_orders.c | 15 ++-- channels/rdpdr/client/devman.c | 2 +- channels/rdpdr/client/rdpdr_main.c | 4 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 4 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 4 +- channels/rdpsnd/client/rdpsnd_main.c | 16 ++--- channels/rdpsnd/server/rdpsnd.c | 10 +-- channels/sample/client/skel_main.c | 2 +- channels/serial/client/serial_main.c | 10 +-- channels/serial/client/serial_tty.c | 6 +- channels/smartcard/client/scard_main.c | 10 +-- channels/smartcard/client/scard_operations.c | 44 ++++++------ channels/tsmf/client/alsa/tsmf_alsa.c | 4 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 12 ++-- channels/tsmf/client/pulse/tsmf_pulse.c | 4 +- channels/tsmf/client/tsmf_audio.c | 2 +- channels/tsmf/client/tsmf_decoder.c | 2 +- channels/tsmf/client/tsmf_main.c | 6 +- channels/tsmf/client/tsmf_media.c | 20 +++--- channels/urbdrc/client/urbdrc_main.c | 2 +- client/DirectFB/df_graphics.c | 2 +- client/DirectFB/dfreerdp.c | 4 +- client/Sample/freerdp.c | 2 +- client/Windows/wf_gdi.c | 16 ++--- client/Windows/wf_graphics.c | 6 +- client/Windows/wfreerdp.c | 4 +- client/X11/xf_cliprdr.c | 42 ++++++------ client/X11/xf_gdi.c | 18 ++--- client/X11/xf_graphics.c | 16 ++--- client/X11/xf_tsmf.c | 4 +- client/X11/xf_window.c | 22 +++--- client/X11/xfreerdp.c | 30 ++++---- cunit/test_cliprdr.c | 4 +- cunit/test_license.c | 2 +- cunit/test_rfx.c | 4 +- include/freerdp/utils/memory.h | 4 +- libfreerdp/cache/bitmap.c | 6 +- libfreerdp/cache/brush.c | 14 ++-- libfreerdp/cache/cache.c | 2 +- libfreerdp/cache/glyph.c | 26 +++---- libfreerdp/cache/nine_grid.c | 8 +-- libfreerdp/cache/offscreen.c | 4 +- libfreerdp/cache/palette.c | 4 +- libfreerdp/cache/pointer.c | 4 +- libfreerdp/channels/libchannels.c | 4 +- libfreerdp/channels/wtsvc.c | 20 +++--- libfreerdp/codec/bitmap.c | 16 ++--- libfreerdp/codec/color.c | 48 ++++++------- libfreerdp/codec/mppc_dec.c | 10 +-- libfreerdp/codec/mppc_enc.c | 22 +++--- libfreerdp/codec/nsc.c | 12 ++-- libfreerdp/codec/nsc_encode.c | 2 +- libfreerdp/codec/rfx.c | 20 +++--- libfreerdp/codec/rfx_pool.c | 14 ++-- libfreerdp/codec/rfx_rlgr.c | 4 +- libfreerdp/core/certificate.c | 26 +++---- libfreerdp/core/connection.c | 12 ++-- libfreerdp/core/extension.c | 2 +- libfreerdp/core/fastpath.c | 4 +- libfreerdp/core/freerdp.c | 8 +-- libfreerdp/core/gcc.c | 8 +-- libfreerdp/core/graphics.c | 24 +++---- libfreerdp/core/http.c | 72 ++++++++++---------- libfreerdp/core/info.c | 16 ++--- libfreerdp/core/input.c | 2 +- libfreerdp/core/license.c | 48 ++++++------- libfreerdp/core/listener.c | 4 +- libfreerdp/core/mcs.c | 2 +- libfreerdp/core/nego.c | 4 +- libfreerdp/core/orders.c | 36 +++++----- libfreerdp/core/peer.c | 4 +- libfreerdp/core/rdp.c | 2 +- libfreerdp/core/redirection.c | 4 +- libfreerdp/core/rpc.c | 66 +++++++++--------- libfreerdp/core/rts.c | 2 +- libfreerdp/core/settings.c | 54 +++++++-------- libfreerdp/core/tcp.c | 2 +- libfreerdp/core/timezone.c | 8 +-- libfreerdp/core/transport.c | 2 +- libfreerdp/core/tsg.c | 22 +++--- libfreerdp/core/update.c | 28 ++++---- libfreerdp/core/window.c | 20 +++--- libfreerdp/crypto/certificate.c | 24 +++---- libfreerdp/crypto/crypto.c | 50 +++++++------- libfreerdp/crypto/tls.c | 22 +++--- libfreerdp/gdi/bitmap.c | 6 +- libfreerdp/gdi/brush.c | 4 +- libfreerdp/gdi/dc.c | 10 +-- libfreerdp/gdi/gdi.c | 22 +++--- libfreerdp/gdi/graphics.c | 8 +-- libfreerdp/gdi/palette.c | 8 +-- libfreerdp/gdi/pen.c | 2 +- libfreerdp/gdi/region.c | 4 +- libfreerdp/locale/keyboard_keymap.c | 4 +- libfreerdp/locale/keyboard_layout.c | 6 +- libfreerdp/locale/keyboard_x11.c | 8 +-- libfreerdp/locale/keyboard_xkbfile.c | 10 +-- libfreerdp/locale/timezone.c | 16 ++--- libfreerdp/rail/icon.c | 6 +- libfreerdp/rail/rail.c | 4 +- libfreerdp/rail/window.c | 12 ++-- libfreerdp/rail/window_list.c | 2 +- libfreerdp/utils/args.c | 6 +- libfreerdp/utils/dsp.c | 16 ++--- libfreerdp/utils/event.c | 12 ++-- libfreerdp/utils/file.c | 10 +-- libfreerdp/utils/list.c | 6 +- libfreerdp/utils/load_plugin.c | 4 +- libfreerdp/utils/memory.c | 70 +------------------ libfreerdp/utils/pcap.c | 3 +- libfreerdp/utils/profiler.c | 5 +- libfreerdp/utils/rail.c | 19 ++++-- libfreerdp/utils/stopwatch.c | 7 +- libfreerdp/utils/stream.c | 8 +-- libfreerdp/utils/string.c | 11 +-- libfreerdp/utils/svc_plugin.c | 10 +-- libfreerdp/utils/thread.c | 2 +- libfreerdp/utils/wait_obj.c | 6 +- server/Sample/sfreerdp.c | 14 ++-- server/X11/xf_event.c | 6 +- server/X11/xf_peer.c | 2 +- 135 files changed, 802 insertions(+), 852 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index 0b6e40468..4183b6187 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -217,8 +217,8 @@ static void* audin_alsa_thread_func(void* arg) } } while (0); - xfree(buffer); - xfree(alsa->buffer); + free(buffer); + free(alsa->buffer); alsa->buffer = NULL; if (capture_handle) snd_pcm_close(capture_handle); @@ -236,7 +236,7 @@ static void audin_alsa_free(IAudinDevice* device) freerdp_thread_free(alsa->thread); freerdp_dsp_context_free(alsa->dsp_context); - xfree(alsa); + free(alsa); } static boolean audin_alsa_format_supported(IAudinDevice* device, audinFormat* format) diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index e24d2c205..c63adc90e 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -358,8 +358,8 @@ static int audin_on_close(IWTSVirtualChannelCallback* pChannelCallback) if (audin->device) IFCALL(audin->device->Close, audin->device); - xfree(callback->formats); - xfree(callback); + free(callback->formats); + free(callback); return 0; } @@ -415,8 +415,8 @@ static int audin_plugin_terminated(IWTSPlugin* pPlugin) audin->device = NULL; } - xfree(audin->listener_callback); - xfree(audin); + free(audin->listener_callback); + free(audin); return 0; } @@ -452,7 +452,7 @@ static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, R strcpy(fullname, "audin_"); strcat(fullname, name); entry = (PFREERDP_AUDIN_DEVICE_ENTRY) freerdp_load_plugin(fullname, AUDIN_DEVICE_EXPORT_FUNC_NAME); - xfree(fullname); + free(fullname); } if (entry == NULL) diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index cf6c1f96e..1ab856595 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -152,7 +152,7 @@ static void audin_pulse_free(IAudinDevice* device) pulse->mainloop = NULL; } freerdp_dsp_context_free(pulse->dsp_context); - xfree(pulse); + free(pulse); } static boolean audin_pulse_format_supported(IAudinDevice* device, audinFormat* format) @@ -350,7 +350,7 @@ static void audin_pulse_close(IAudinDevice* device) pulse->user_data = NULL; if (pulse->buffer) { - xfree(pulse->buffer); + free(pulse->buffer); pulse->buffer = NULL; pulse->buffer_frames = 0; } diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 4bedf4776..f244c9934 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -139,7 +139,7 @@ static boolean audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 { if (length < 18) { - xfree(audin->context.client_formats); + free(audin->context.client_formats); audin->context.client_formats = NULL; return false; } @@ -431,6 +431,6 @@ void audin_server_context_free(audin_server_context* context) if (audin->dsp_context) freerdp_dsp_context_free(audin->dsp_context); if (audin->context.client_formats) - xfree(audin->context.client_formats); - xfree(audin); + free(audin->context.client_formats); + free(audin); } diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index c01a5453d..119e41798 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -127,7 +127,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3 ascii = (flags & CB_ASCII_NAMES) ? true : false; - cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) xmalloc(sizeof(CLIPRDR_FORMAT_NAME) * num_formats); + cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) malloc(sizeof(CLIPRDR_FORMAT_NAME) * num_formats); cliprdr->num_format_names = num_formats; for (i = 0; i < num_formats; i++) @@ -159,7 +159,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 stream_get_mark(s, end_mark); end_mark += length; - cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) xmalloc(sizeof(CLIPRDR_FORMAT_NAME) * allocated_formats); + cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) malloc(sizeof(CLIPRDR_FORMAT_NAME) * allocated_formats); cliprdr->num_format_names = 0; while (stream_get_left(s) >= 6) @@ -170,7 +170,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 if (cliprdr->num_format_names >= allocated_formats) { allocated_formats *= 2; - cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) xrealloc(cliprdr->format_names, + cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) realloc(cliprdr->format_names, sizeof(CLIPRDR_FORMAT_NAME) * allocated_formats); } @@ -204,7 +204,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL if (dataLen > 0) { - cb_event->raw_format_data = (uint8*) xmalloc(dataLen); + cb_event->raw_format_data = (uint8*) malloc(dataLen); memcpy(cb_event->raw_format_data, stream_get_tail(s), dataLen); cb_event->raw_format_data_size = dataLen; } @@ -215,7 +215,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL cliprdr_process_short_format_names(cliprdr, s, dataLen, msgFlags); if (cliprdr->num_format_names > 0) - cb_event->formats = (uint32*) xmalloc(sizeof(uint32) * cliprdr->num_format_names); + cb_event->formats = (uint32*) malloc(sizeof(uint32) * cliprdr->num_format_names); cb_event->num_formats = 0; @@ -271,10 +271,10 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL cb_event->formats[cb_event->num_formats++] = format; if (format_name->length > 0) - xfree(format_name->name); + free(format_name->name); } - xfree(cliprdr->format_names); + free(cliprdr->format_names); cliprdr->format_names = NULL; cliprdr->num_format_names = 0; @@ -348,7 +348,7 @@ void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uin if (dataLen > 0) { cb_event->size = dataLen; - cb_event->data = (uint8*) xmalloc(dataLen); + cb_event->data = (uint8*) malloc(dataLen); memcpy(cb_event->data, stream_get_tail(s), dataLen); } diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index b12e84e76..f91cd38f4 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -268,7 +268,7 @@ static void cliprdr_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event) static void cliprdr_process_terminate(rdpSvcPlugin* plugin) { - xfree(plugin); + free(plugin); } /* cliprdr is always built-in */ diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index a26a6e1bb..e05b925f8 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -190,7 +190,7 @@ static boolean disk_file_remove_dir(const char* path) static void disk_file_set_fullpath(DISK_FILE* file, char* fullpath) { - xfree(file->fullpath); + free(file->fullpath); file->fullpath = fullpath; file->filename = strrchr(file->fullpath, '/'); @@ -341,9 +341,9 @@ void disk_file_free(DISK_FILE* file) unlink(file->fullpath); } - xfree(file->pattern); - xfree(file->fullpath); - xfree(file); + free(file->pattern); + free(file->fullpath); + free(file); } boolean disk_file_seek(DISK_FILE* file, uint64 Offset) @@ -516,7 +516,7 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(input), &s, FileNameLength / 2); fullpath = disk_file_combine_fullpath(file->basepath, s); - xfree(s); + free(s); /* TODO rename does not work on win32 */ if (rename(file->fullpath, fullpath) == 0) @@ -562,7 +562,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui if (InitialQuery != 0) { rewinddir(file->dir); - xfree(file->pattern); + free(file->pattern); if (path[0]) file->pattern = _strdup(strrchr(path, '\\') + 1); @@ -606,7 +606,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui } DEBUG_SVC(" pattern %s matched %s", file->pattern, ent_path); - xfree(ent_path); + free(ent_path); length = freerdp_AsciiToUnicodeAlloc(ent->d_name, &ent_path, 0) * 2; @@ -688,7 +688,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui break; } - xfree(ent_path); + free(ent_path); return ret; } diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index fee279fa9..9a216487a 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -186,7 +186,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) stream_write_uint32(irp->output, FileId); stream_write_uint8(irp->output, Information); - xfree(path); + free(path); irp->Complete(irp); } @@ -244,11 +244,11 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) } else { - buffer = (uint8*) xmalloc(Length); + buffer = (uint8*) malloc(Length); if (!disk_file_read(file, buffer, &Length)) { irp->IoStatus = STATUS_UNSUCCESSFUL; - xfree(buffer); + free(buffer); buffer = NULL; Length = 0; @@ -268,7 +268,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) stream_write(irp->output, buffer, Length); } - xfree(buffer); + free(buffer); irp->Complete(irp); } @@ -409,7 +409,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir stream_write_uint8(output, 0); /* SupportsObjects */ /* Reserved(1), MUST NOT be added! */ stream_write(output, outStr, length); /* VolumeLabel (Unicode) */ - xfree(outStr); + free(outStr); break; case FileFsSizeInformation: @@ -434,7 +434,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir stream_write_uint32(output, svfst.f_namemax/*510*/); /* MaximumComponentNameLength */ stream_write_uint32(output, length); /* FileSystemNameLength */ stream_write(output, outStr, length); /* FileSystemName (Unicode) */ - xfree(outStr); + free(outStr); break; case FileFsFullSizeInformation: @@ -494,7 +494,7 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp) irp->IoStatus = STATUS_NO_MORE_FILES; } - xfree(path); + free(path); irp->Complete(irp); } @@ -640,7 +640,7 @@ static void disk_free(DEVICE* device) disk_file_free(file); list_free(disk->files); - xfree(disk); + free(disk); } void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* name, char* path) diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index f5e575484..c1cca1e01 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -362,7 +362,7 @@ static void drdynvc_process_terminate(rdpSvcPlugin* plugin) if (drdynvc->channel_mgr != NULL) dvcman_free(drdynvc->channel_mgr); - xfree(drdynvc); + free(drdynvc); } /* drdynvc is always built-in */ diff --git a/channels/drdynvc/client/dvcman.c b/channels/drdynvc/client/dvcman.c index c584c0104..f87aa935c 100644 --- a/channels/drdynvc/client/dvcman.c +++ b/channels/drdynvc/client/dvcman.c @@ -251,7 +251,7 @@ static void dvcman_channel_free(DVCMAN_CHANNEL* channel) if (channel->channel_callback) channel->channel_callback->OnClose(channel->channel_callback); - xfree(channel); + free(channel); } void dvcman_free(IWTSVirtualChannelManager* pChannelMgr) @@ -270,8 +270,8 @@ void dvcman_free(IWTSVirtualChannelManager* pChannelMgr) for (i = 0; i < dvcman->num_listeners; i++) { listener = (DVCMAN_LISTENER*) dvcman->listeners[i]; - xfree(listener->channel_name); - xfree(listener); + free(listener->channel_name); + free(listener); } for (i = 0; i < dvcman->num_plugins; i++) @@ -282,7 +282,7 @@ void dvcman_free(IWTSVirtualChannelManager* pChannelMgr) pPlugin->Terminated(pPlugin); } - xfree(dvcman); + free(dvcman); } int dvcman_init(IWTSVirtualChannelManager* pChannelMgr) diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index 46b92ae42..9f5f3fd5f 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -106,7 +106,7 @@ static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp) stream_write_uint32(irp->output, parallel->id); stream_write_uint8(irp->output, 0); - xfree(path); + free(path); irp->Complete(irp); } @@ -133,14 +133,14 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) stream_read_uint32(irp->input, Length); stream_read_uint64(irp->input, Offset); - buffer = (uint8*) xmalloc(Length); + buffer = (uint8*) malloc(Length); status = read(parallel->file, irp->output->p, Length); if (status < 0) { irp->IoStatus = STATUS_UNSUCCESSFUL; - xfree(buffer); + free(buffer); buffer = NULL; Length = 0; @@ -157,7 +157,7 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) stream_check_size(irp->output, Length); stream_write(irp->output, buffer, Length); } - xfree(buffer); + free(buffer); irp->Complete(irp); } @@ -304,7 +304,7 @@ static void parallel_free(DEVICE* device) _aligned_free(parallel->pIrpList); - xfree(parallel); + free(parallel); } int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index a6a076b10..296ed78db 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -119,7 +119,7 @@ static void printer_cups_close_printjob(rdpPrintJob* printjob) DEBUG_WARN("cupsPrintFile: %s", cupsLastErrorString()); } unlink(cups_printjob->printjob_object); - xfree(cups_printjob->printjob_object); + free(cups_printjob->printjob_object); } #else @@ -131,7 +131,7 @@ static void printer_cups_close_printjob(rdpPrintJob* printjob) #endif ((rdpCupsPrinter*)printjob->printer)->printjob = NULL; - xfree(cups_printjob) ; + free(cups_printjob) ; } static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) @@ -162,7 +162,7 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) if (cups_printjob->printjob_object == NULL) { DEBUG_WARN("httpConnectEncrypt: %s", cupsLastErrorString()); - xfree(cups_printjob); + free(cups_printjob); return NULL; } @@ -174,7 +174,7 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) { DEBUG_WARN("cupsCreateJob: %s", cupsLastErrorString()); httpClose((http_t*)cups_printjob->printjob_object); - xfree(cups_printjob); + free(cups_printjob); return NULL; } cupsStartDocument((http_t*)cups_printjob->printjob_object, @@ -207,8 +207,8 @@ static void printer_cups_free_printer(rdpPrinter* printer) if (cups_printer->printjob) cups_printer->printjob->printjob.Close((rdpPrintJob*)cups_printer->printjob); - xfree(printer->name); - xfree(printer); + free(printer->name); + free(printer); } static rdpPrinter* printer_cups_new_printer(rdpCupsPrinterDriver* cups_driver, const char* name, boolean is_default) diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 275c5c7a3..2b63203c7 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -227,9 +227,9 @@ static void printer_free(DEVICE* device) if (printer_dev->printer) printer_dev->printer->Free(printer_dev->printer); - xfree(printer_dev->device.name); + free(printer_dev->device.name); - xfree(printer_dev); + free(printer_dev); } void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* printer) @@ -244,7 +244,7 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri uint8* CachedPrinterConfigData; PRINTER_DEVICE* printer_dev; - port = xmalloc(10); + port = malloc(10); snprintf(port, 10, "PRN%d", printer->id); printer_dev = xnew(PRINTER_DEVICE); @@ -287,8 +287,8 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri stream_write(printer_dev->device.data, CachedPrinterConfigData, CachedFieldsLen); } - xfree(DriverName); - xfree(PrintName); + free(DriverName); + free(PrintName); printer_dev->pIrpList = (PSLIST_HEADER) _aligned_malloc(sizeof(SLIST_HEADER), MEMORY_ALLOCATION_ALIGNMENT); InitializeSListHead(printer_dev->pIrpList); @@ -354,7 +354,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) printer_register(pEntryPoints, printer); } - xfree(printers); + free(printers); } return 0; diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index be80a19d2..a7db9c94c 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -104,7 +104,7 @@ static void printer_win_close_printjob(rdpPrintJob* printjob) DEBUG_WINPR("ClosePrinter failed");; ((rdpWinPrinter*)printjob->printer)->printjob = NULL; - xfree(win_printjob) ; + free(win_printjob) ; } static rdpPrintJob* printer_win_create_printjob(rdpPrinter* printer, uint32 id) @@ -163,8 +163,8 @@ static void printer_win_free_printer(rdpPrinter* printer) if (win_printer->printjob) win_printer->printjob->printjob.Close((rdpPrintJob*)win_printer->printjob); - xfree(printer->name); - xfree(printer); + free(printer->name); + free(printer); } static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, const char* name, const wchar_t* drivername, boolean is_default) @@ -194,7 +194,7 @@ static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, cons prninfo = (PRINTER_INFO_2*) GlobalAlloc(GPTR,needed); GetPrinter(win_printer->hPrinter, 2, (LPBYTE) prninfo, needed, &needed); - win_printer->printer.driver = xmalloc(1000); + win_printer->printer.driver = malloc(1000); wcstombs_s(&charsConverted, win_printer->printer.driver, 1000, prninfo->pDriverName, _TRUNCATE); return (rdpPrinter*)win_printer; diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index 5ff45fab6..d24178a8d 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -22,8 +22,12 @@ #include "config.h" #endif +#include +#include + +#include + #include -#include #include #include "rail_orders.h" @@ -71,7 +75,7 @@ void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_ int length = 0; if (unicode_string->string != NULL) - xfree(unicode_string->string); + free(unicode_string->string); unicode_string->string = NULL; unicode_string->length = 0; @@ -630,14 +634,15 @@ void rail_send_client_langbar_info_order(rdpRailOrder* rail_order) s = rail_pdu_init(RAIL_LANGBAR_INFO_ORDER_LENGTH); rail_write_langbar_info_order(s, &rail_order->langbar_info); rail_send_pdu(rail_order, s, RAIL_ORDER_TYPE_LANGBAR_INFO); - stream_free(s) ; + stream_free(s); } rdpRailOrder* rail_order_new() { rdpRailOrder* rail_order; - rail_order = xnew(rdpRailOrder); + rail_order = (rdpRailOrder*) malloc(sizeof(rdpRailOrder)); + ZeroMemory(rail_order, sizeof(rdpRailOrder)); if (rail_order != NULL) { @@ -652,7 +657,7 @@ void rail_order_free(rdpRailOrder* rail_order) if (rail_order != NULL) { - xfree(rail_order); + free(rail_order); } } diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index 1ec48401d..eab0feb33 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -58,7 +58,7 @@ void devman_free(DEVMAN* devman) list_free(devman->devices); - xfree(devman); + free(devman); } static void devman_register_device(DEVMAN* devman, DEVICE* device) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index a41b980f1..e398b33ca 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -118,7 +118,7 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr) stream_write(data_out, computerNameW, computerNameLenW); stream_write_uint16(data_out, 0); /* null terminator */ - xfree(computerNameW); + free(computerNameW); svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out); } @@ -313,7 +313,7 @@ static void rdpdr_process_terminate(rdpSvcPlugin* plugin) rdpdrPlugin* rdpdr = (rdpdrPlugin*) plugin; devman_free(rdpdr->devman); - xfree(plugin); + free(plugin); } /* rdpdr is always built-in */ diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index ac2db4329..26326bbba 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -257,9 +257,9 @@ static void rdpsnd_alsa_free(rdpsndDevicePlugin* device) rdpsndAlsaPlugin* alsa = (rdpsndAlsaPlugin*)device; rdpsnd_alsa_close(device); - xfree(alsa->device_name); + free(alsa->device_name); freerdp_dsp_context_free(alsa->dsp_context); - xfree(alsa); + free(alsa); } static boolean rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index 456fc1130..702f2d49c 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -357,9 +357,9 @@ static void rdpsnd_pulse_free(rdpsndDevicePlugin* device) pulse->mainloop = NULL; } - xfree(pulse->device_name); + free(pulse->device_name); freerdp_dsp_context_free(pulse->dsp_context); - xfree(pulse); + free(pulse); } static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 686acfc0c..3b2c92ec0 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -104,7 +104,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin) item = (struct data_out_item*) list_dequeue(rdpsnd->data_out_list); svc_plugin_send(plugin, item->data_out); - xfree(item); + free(item); DEBUG_SVC("processed data_out"); } @@ -135,8 +135,8 @@ static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd) uint16 i; for (i = 0; i < rdpsnd->n_supported_formats; i++) - xfree(rdpsnd->supported_formats[i].data); - xfree(rdpsnd->supported_formats); + free(rdpsnd->supported_formats[i].data); + free(rdpsnd->supported_formats); rdpsnd->supported_formats = NULL; rdpsnd->n_supported_formats = 0; @@ -224,7 +224,7 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in stream_write(data_out, format_mark, 18 + format->cbSize); if (format->cbSize > 0) { - format->data = xmalloc(format->cbSize); + format->data = malloc(format->cbSize); memcpy(format->data, data_mark, format->cbSize); } n_out_formats++; @@ -238,7 +238,7 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in } else { - xfree(out_formats); + free(out_formats); DEBUG_WARN("no formats supported"); } @@ -443,7 +443,7 @@ static boolean rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, strcpy(fullname, "rdpsnd_"); strcat(fullname, name); entry = (PFREERDP_RDPSND_DEVICE_ENTRY)freerdp_load_plugin(fullname, RDPSND_DEVICE_EXPORT_FUNC_NAME); - xfree(fullname); + free(fullname); } if (entry == NULL) { @@ -556,13 +556,13 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin) while ((item = list_dequeue(rdpsnd->data_out_list)) != NULL) { stream_free(item->data_out); - xfree(item); + free(item); } list_free(rdpsnd->data_out_list); rdpsnd_free_supported_formats(rdpsnd); - xfree(plugin); + free(plugin); } /* rdpsnd is always built-in */ diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index f1578f795..a5d73e7c5 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -133,7 +133,7 @@ static boolean rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) { if (stream_get_left(s) < 18) { - xfree(rdpsnd->context.client_formats); + free(rdpsnd->context.client_formats); rdpsnd->context.client_formats = NULL; return false; } @@ -290,7 +290,7 @@ static void rdpsnd_server_select_format(rdpsnd_server_context* context, int clie if (rdpsnd->out_buffer_size < out_buffer_size) { - rdpsnd->out_buffer = xrealloc(rdpsnd->out_buffer, out_buffer_size); + rdpsnd->out_buffer = realloc(rdpsnd->out_buffer, out_buffer_size); rdpsnd->out_buffer_size = out_buffer_size; } @@ -479,13 +479,13 @@ void rdpsnd_server_context_free(rdpsnd_server_context* context) stream_free(rdpsnd->rdpsnd_pdu); if (rdpsnd->out_buffer) - xfree(rdpsnd->out_buffer); + free(rdpsnd->out_buffer); if (rdpsnd->dsp_context) freerdp_dsp_context_free(rdpsnd->dsp_context); if (rdpsnd->context.client_formats) - xfree(rdpsnd->context.client_formats); + free(rdpsnd->context.client_formats); - xfree(rdpsnd); + free(rdpsnd); } diff --git a/channels/sample/client/skel_main.c b/channels/sample/client/skel_main.c index 87b846f3a..f9841de05 100644 --- a/channels/sample/client/skel_main.c +++ b/channels/sample/client/skel_main.c @@ -129,7 +129,7 @@ static void skel_process_terminate(rdpSvcPlugin* plugin) /* put your cleanup here */ - xfree(plugin); + free(plugin); } DEFINE_SVC_PLUGIN(skel, "skel", diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index 5e8e72e2d..fce689b7d 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -110,7 +110,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) stream_write_uint32(irp->output, FileId); stream_write_uint8(irp->output, 0); - xfree(path); + free(path); irp->Complete(irp); } @@ -162,12 +162,12 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) } else { - buffer = (uint8*) xmalloc(Length); + buffer = (uint8*) malloc(Length); if (!serial_tty_read(tty, buffer, &Length)) { irp->IoStatus = STATUS_UNSUCCESSFUL; - xfree(buffer); + free(buffer); buffer = NULL; Length = 0; @@ -187,7 +187,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) stream_write(irp->output, buffer, Length); } - xfree(buffer); + free(buffer); irp->Complete(irp); } @@ -394,7 +394,7 @@ static void serial_free(DEVICE* device) list_free(serial->pending_irps); - xfree(serial); + free(serial); } int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index 051c5fd1d..0e0f73907 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -457,9 +457,9 @@ void serial_tty_free(SERIAL_TTY* tty) close(tty->fd); } - xfree(tty->ptermios); - xfree(tty->pold_termios); - xfree(tty); + free(tty->ptermios); + free(tty->pold_termios); + free(tty); } diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index 05cec507f..aee9f6fe8 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -52,13 +52,13 @@ static void scard_free(DEVICE* dev) /* Begin TS Client defect workaround. */ while ((CompletionIdInfo = (COMPLETIONIDINFO*) list_dequeue(scard->CompletionIds)) != NULL) - xfree(CompletionIdInfo); + free(CompletionIdInfo); list_free(scard->CompletionIds); /* End TS Client defect workaround. */ - xfree(dev); + free(dev); return; } @@ -106,7 +106,7 @@ static void scard_process_irp_thread_func(struct scard_irp_thread_args* args) scard_process_irp(args->scard, args->irp); freerdp_thread_free(args->thread); - xfree(args); + free(args); } static void* scard_thread_func(void* arg) @@ -180,7 +180,7 @@ static boolean scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 Complet DEBUG_WARN("CompletionID number %u was previously marked as a duplicate. The response to the command is removed.", CompletionId); } list_remove(scard->CompletionIds, CompletionIdInfo); - xfree(CompletionIdInfo); + free(CompletionIdInfo); return duplicate; } } @@ -266,7 +266,7 @@ static void scard_irp_request(DEVICE* device, IRP* irp) * get their own thread * TODO: revise this mechanism.. maybe worker pool */ - struct scard_irp_thread_args *args = xmalloc(sizeof(struct scard_irp_thread_args)); + struct scard_irp_thread_args *args = malloc(sizeof(struct scard_irp_thread_args)); args->thread = freerdp_thread_new(); diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index 703ddb244..d43a2cafe 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -185,7 +185,7 @@ static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, boolean int bufferSize; bufferSize = wide ? (2 * dataLength) : dataLength; - buffer = xmalloc(bufferSize + 2); /* reserve 2 bytes for the '\0' */ + buffer = malloc(bufferSize + 2); /* reserve 2 bytes for the '\0' */ stream_read(irp->input, buffer, bufferSize); @@ -359,7 +359,7 @@ static uint32 handle_ListReaders(IRP* irp, boolean wide) #else rv = SCardListReaders(hContext, NULL, NULL, &dwReaders); - readerList = xmalloc(dwReaders); + readerList = malloc(dwReaders); rv = SCardListReaders(hContext, NULL, readerList, &dwReaders); #endif if (rv != SCARD_S_SUCCESS) @@ -409,7 +409,7 @@ static uint32 handle_ListReaders(IRP* irp, boolean wide) #ifdef SCARD_AUTOALLOCATE SCardFreeMemory(hContext, readerList); #else - xfree(readerList); + free(readerList); #endif return rv; @@ -517,12 +517,12 @@ static uint32 handle_GetStatusChange(IRP* irp, boolean wide) stream_write_zero(irp->output, 4); - xfree((void *)cur->szReader); + free((void *)cur->szReader); } sc_output_alignment(irp, 8); - xfree(readerStates); + free(readerStates); return rv; } @@ -587,7 +587,7 @@ static uint32 handle_Connect(IRP* irp, boolean wide) sc_output_alignment(irp, 8); - xfree(readerName); + free(readerName); return rv; } @@ -729,7 +729,7 @@ static uint32 handle_State(IRP* irp) rv = SCardStatus(hCard, (LPSTR) &readerName, &readerLen, &state, &protocol, pbAtr, &atrLen); #else readerLen = 256; - readerName = xmalloc(readerLen); + readerName = malloc(readerLen); rv = SCardStatus(hCard, (LPSTR) readerName, &readerLen, &state, &protocol, pbAtr, &atrLen); #endif @@ -763,9 +763,9 @@ static uint32 handle_State(IRP* irp) sc_output_alignment(irp, 8); #ifdef SCARD_AUTOALLOCATE - xfree(readerName); + free(readerName); #else - xfree(readerName); + free(readerName); #endif return rv; @@ -802,7 +802,7 @@ static DWORD handle_Status(IRP *irp, boolean wide) rv = SCardStatus(hCard, (LPSTR) &readerName, &readerLen, &state, &protocol, pbAtr, &atrLen); #else readerLen = 256; - readerName = xmalloc(readerLen); + readerName = malloc(readerLen); rv = SCardStatus(hCard, (LPSTR) readerName, &readerLen, &state, &protocol, pbAtr, &atrLen); #endif @@ -856,7 +856,7 @@ static DWORD handle_Status(IRP *irp, boolean wide) /* SCardFreeMemory(NULL, readerName); */ free(readerName); #else - xfree(readerName); + free(readerName); #endif return rv; @@ -909,13 +909,13 @@ static uint32 handle_Transmit(IRP* irp) /* send buffer */ stream_read_uint32(irp->input, linkedLen); - sendBuf = xmalloc(linkedLen); + sendBuf = malloc(linkedLen); stream_read(irp->input, sendBuf, linkedLen); sc_input_repos(irp, linkedLen); } if (cbRecvLength) - recvBuf = xmalloc(cbRecvLength); + recvBuf = malloc(cbRecvLength); if (map[4] & SCARD_INPUT_LINKED) { @@ -968,8 +968,8 @@ static uint32 handle_Transmit(IRP* irp) sc_output_alignment(irp, 8); - xfree(sendBuf); - xfree(recvBuf); + free(sendBuf); + free(recvBuf); return rv; } @@ -1014,7 +1014,7 @@ static uint32 handle_Control(IRP* irp) /* read real input size */ stream_read_uint32(irp->input, recvLength); - recvBuffer = xmalloc(recvLength); + recvBuffer = malloc(recvLength); if (!recvBuffer) return sc_output_return(irp, SCARD_E_NO_MEMORY); @@ -1023,7 +1023,7 @@ static uint32 handle_Control(IRP* irp) } nBytesReturned = outBufferSize; - sendBuffer = xmalloc(outBufferSize); + sendBuffer = malloc(outBufferSize); if (!sendBuffer) return sc_output_return(irp, SCARD_E_NO_MEMORY); @@ -1048,8 +1048,8 @@ static uint32 handle_Control(IRP* irp) sc_output_alignment(irp, 8); - xfree(recvBuffer); - xfree(sendBuffer); + free(recvBuffer); + free(sendBuffer); return rv; } @@ -1165,7 +1165,7 @@ static uint32 handle_GetAttrib(IRP* irp) } sc_output_alignment(irp, 8); - xfree(pbAttr); + free(pbAttr); return rv; } @@ -1212,7 +1212,7 @@ static uint32 handle_LocateCardsByATR(IRP* irp, boolean wide) stream_read_uint32(irp->input, hContext); stream_read_uint32(irp->input, atrMaskCount); - pAtrMasks = xmalloc(atrMaskCount * sizeof(SERVER_SCARD_ATRMASK)); + pAtrMasks = malloc(atrMaskCount * sizeof(SERVER_SCARD_ATRMASK)); if (!pAtrMasks) return sc_output_return(irp, SCARD_E_NO_MEMORY); @@ -1317,7 +1317,7 @@ static uint32 handle_LocateCardsByATR(IRP* irp, boolean wide) stream_write_zero(irp->output, 4); - xfree((void*) cur->szReader); + free((void*) cur->szReader); } sc_output_alignment(irp, 8); diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index 52fb9db50..a74e81d16 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -209,7 +209,7 @@ static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_ pindex += error * rbytes_per_frame; } } - xfree(data); + free(data); return true; } @@ -245,7 +245,7 @@ static void tsmf_alsa_free(ITSMFAudioDevice* audio) snd_pcm_close(alsa->out_handle); } freerdp_dsp_context_free(alsa->dsp_context); - xfree(alsa); + free(alsa); } ITSMFAudioDevice* TSMFAudioDeviceEntry(void) diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index 843dba3c2..edd985fe8 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -356,7 +356,7 @@ static boolean tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE) { mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16; - mdecoder->decoded_data = xrealloc(mdecoder->decoded_data, mdecoder->decoded_size_max); + mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max); dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); if (dst - mdecoder->decoded_data != dst_offset) { @@ -404,7 +404,7 @@ static boolean tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data if (mdecoder->decoded_size == 0) { - xfree(mdecoder->decoded_data); + free(mdecoder->decoded_data); mdecoder->decoded_data = NULL; } else if (dst_offset) @@ -425,7 +425,7 @@ static boolean tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint if (mdecoder->decoded_data) { - xfree(mdecoder->decoded_data); + free(mdecoder->decoded_data); mdecoder->decoded_data = NULL; } mdecoder->decoded_size = 0; @@ -493,16 +493,16 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder) if (mdecoder->frame) av_free(mdecoder->frame); if (mdecoder->decoded_data) - xfree(mdecoder->decoded_data); + free(mdecoder->decoded_data); if (mdecoder->codec_context) { if (mdecoder->prepared) avcodec_close(mdecoder->codec_context); if (mdecoder->codec_context->extradata) - xfree(mdecoder->codec_context->extradata); + free(mdecoder->codec_context->extradata); av_free(mdecoder->codec_context); } - xfree(decoder); + free(decoder); } static boolean initialized = false; diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index a39e2538d..d1306fcd6 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -336,7 +336,7 @@ static boolean tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data pa_threaded_mainloop_unlock(pulse->mainloop); } - xfree(data); + free(data); return true; } @@ -386,7 +386,7 @@ static void tsmf_pulse_free(ITSMFAudioDevice* audio) pa_threaded_mainloop_free(pulse->mainloop); pulse->mainloop = NULL; } - xfree(pulse); + free(pulse); } ITSMFAudioDevice* TSMFAudioDeviceEntry(void) diff --git a/channels/tsmf/client/tsmf_audio.c b/channels/tsmf/client/tsmf_audio.c index e434fc488..dfe8793f6 100644 --- a/channels/tsmf/client/tsmf_audio.c +++ b/channels/tsmf/client/tsmf_audio.c @@ -44,7 +44,7 @@ static ITSMFAudioDevice* tsmf_load_audio_device_by_name(const char* name, const strcpy(fullname, "tsmf_"); strcat(fullname, name); entry = (TSMF_AUDIO_DEVICE_ENTRY) freerdp_load_plugin(fullname, TSMF_AUDIO_DEVICE_EXPORT_FUNC_NAME); - xfree(fullname); + free(fullname); } if (entry == NULL) { diff --git a/channels/tsmf/client/tsmf_decoder.c b/channels/tsmf/client/tsmf_decoder.c index f884683a3..778420349 100644 --- a/channels/tsmf/client/tsmf_decoder.c +++ b/channels/tsmf/client/tsmf_decoder.c @@ -46,7 +46,7 @@ static ITSMFDecoder* tsmf_load_decoder_by_name(const char* name, TS_AM_MEDIA_TYP strcpy(fullname, "tsmf_"); strcat(fullname, name); entry = (TSMF_DECODER_ENTRY) freerdp_load_plugin(fullname, TSMF_DECODER_EXPORT_FUNC_NAME); - xfree(fullname); + free(fullname); } if (entry == NULL) { diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index 66e1c8082..88390930a 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -348,7 +348,7 @@ static int tsmf_on_close(IWTSVirtualChannelCallback* pChannelCallback) tsmf_stream_free(stream); } } - xfree(pChannelCallback); + free(pChannelCallback); return 0; } @@ -396,8 +396,8 @@ static int tsmf_plugin_terminated(IWTSPlugin* pPlugin) DEBUG_DVC(""); if (tsmf->listener_callback) - xfree(tsmf->listener_callback); - xfree(tsmf); + free(tsmf->listener_callback); + free(tsmf); return 0; } diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 779777ecb..206e39cd4 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -216,8 +216,8 @@ static TSMF_SAMPLE* tsmf_stream_pop_sample(TSMF_STREAM* stream, int sync) static void tsmf_sample_free(TSMF_SAMPLE* sample) { if (sample->data) - xfree(sample->data); - xfree(sample); + free(sample->data); + free(sample); } static void tsmf_sample_ack(TSMF_SAMPLE* sample) @@ -361,7 +361,7 @@ static void tsmf_sample_playback_video(TSMF_SAMPLE* sample) if (presentation->last_rects) { - xfree(presentation->last_rects); + free(presentation->last_rects); presentation->last_rects = NULL; } presentation->last_num_rects = presentation->output_num_rects; @@ -477,7 +477,7 @@ static void tsmf_sample_playback(TSMF_SAMPLE* sample) return; } - xfree(sample->data); + free(sample->data); sample->data = NULL; if (stream->major_type == TSMF_MAJOR_TYPE_VIDEO) @@ -564,7 +564,7 @@ static void tsmf_sample_playback(TSMF_SAMPLE* sample) { if (presentation->last_rects) { - xfree(presentation->last_rects); + free(presentation->last_rects); presentation->last_rects = NULL; } presentation->last_num_rects = presentation->output_num_rects; @@ -818,13 +818,13 @@ void tsmf_presentation_stop(TSMF_PRESENTATION* presentation) tsmf_presentation_restore_last_video_frame(presentation); if (presentation->last_rects) { - xfree(presentation->last_rects); + free(presentation->last_rects); presentation->last_rects = NULL; } presentation->last_num_rects = 0; if (presentation->output_rects) { - xfree(presentation->output_rects); + free(presentation->output_rects); presentation->output_rects = NULL; } presentation->output_num_rects = 0; @@ -839,7 +839,7 @@ void tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation, presentation->output_width = width; presentation->output_height = height; if (presentation->output_rects) - xfree(presentation->output_rects); + free(presentation->output_rects); presentation->output_rects = rects; presentation->output_num_rects = num_rects; } @@ -907,7 +907,7 @@ void tsmf_presentation_free(TSMF_PRESENTATION* presentation) CloseHandle(presentation->mutex); - xfree(presentation); + free(presentation); } TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, uint32 stream_id) @@ -1015,7 +1015,7 @@ void tsmf_stream_free(TSMF_STREAM* stream) freerdp_thread_free(stream->thread); - xfree(stream); + free(stream); stream = 0; } diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index c9af57f63..3617dcdae 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -1010,7 +1010,7 @@ static int urbdrc_load_udevman_plugin(IWTSPlugin* pPlugin, const char* name, RDP strcpy(fullname, name); strcat(fullname, "_udevman"); entry = (PFREERDP_URBDRC_DEVICE_ENTRY) freerdp_load_plugin(fullname, URBDRC_UDEVMAN_EXPORT_FUNC_NAME); - xfree(fullname); + free(fullname); } if (entry == NULL) diff --git a/client/DirectFB/df_graphics.c b/client/DirectFB/df_graphics.c index 209bf6fa2..d593f4e45 100644 --- a/client/DirectFB/df_graphics.c +++ b/client/DirectFB/df_graphics.c @@ -133,6 +133,6 @@ void df_register_graphics(rdpGraphics* graphics) pointer->SetDefault = df_Pointer_SetDefault; graphics_register_pointer(graphics, pointer); - xfree(pointer); + free(pointer); } diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index d787885c9..8f103291d 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -306,7 +306,7 @@ df_process_channel_event(rdpChannels* channels, freerdp* instance) static void df_free(dfInfo* dfi) { dfi->dfb->Release(dfi->dfb); - xfree(dfi); + free(dfi); } int dfreerdp_run(freerdp* instance) @@ -421,7 +421,7 @@ void* thread_func(void* param) dfreerdp_run(data->instance); - xfree(data); + free(data); pthread_detach(pthread_self()); diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index cdf00cfd1..72804bb2e 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -292,7 +292,7 @@ void* thread_func(void* param) tfreerdp_run(data->instance); - xfree(data); + free(data); pthread_detach(pthread_self()); diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index ea9d6d21f..d2a10c0dc 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -96,7 +96,7 @@ uint8* wf_glyph_convert(wfInfo* wfi, int width, int height, uint8* data) src_bytes_per_row = (width + 7) / 8; dst_bytes_per_row = src_bytes_per_row + (src_bytes_per_row % 2); - cdata = (uint8 *) xmalloc(dst_bytes_per_row * height); + cdata = (uint8 *) malloc(dst_bytes_per_row * height); src = data; for (indexy = 0; indexy < height; indexy++) @@ -376,7 +376,7 @@ void wf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) if (polyline->numPoints > 0) { - pts = (POINT*) xmalloc(sizeof(POINT) * polyline->numPoints); + pts = (POINT*) malloc(sizeof(POINT) * polyline->numPoints); for (i = 0; i < (int) polyline->numPoints; i++) { @@ -388,7 +388,7 @@ void wf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) } Polyline(wfi->drawing->hdc, pts, polyline->numPoints); - xfree(pts); + free(pts); } SelectObject(wfi->drawing->hdc, org_hpen); @@ -466,7 +466,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits wfi->image->_bitmap.width = surface_bits_command->width; wfi->image->_bitmap.height = surface_bits_command->height; wfi->image->_bitmap.bpp = surface_bits_command->bpp; - wfi->image->_bitmap.data = (uint8*) xrealloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); + wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); freerdp_image_flip(nsc_context->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32); BitBlt(wfi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, wfi->image->hdc, 0, 0, GDI_SRCCOPY); } @@ -476,7 +476,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits wfi->image->_bitmap.height = surface_bits_command->height; wfi->image->_bitmap.bpp = surface_bits_command->bpp; - wfi->image->_bitmap.data = (uint8*) xrealloc(wfi->image->_bitmap.data, + wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == true)) @@ -490,9 +490,9 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits surface_bits_command->bpp = 32; surface_bits_command->bitmapData = wfi->image->_bitmap.data; - temp_image = (uint8*) xmalloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); + temp_image = (uint8*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); freerdp_image_flip(wfi->image->_bitmap.data, temp_image, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32); - xfree(wfi->image->_bitmap.data); + free(wfi->image->_bitmap.data); wfi->image->_bitmap.data = temp_image; } else @@ -510,7 +510,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits } if (tile_bitmap != NULL) - xfree(tile_bitmap); + free(tile_bitmap); } void wf_gdi_register_update_callbacks(rdpUpdate* update) diff --git a/client/Windows/wf_graphics.c b/client/Windows/wf_graphics.c index e3d8ba852..fc2f669d2 100644 --- a/client/Windows/wf_graphics.c +++ b/client/Windows/wf_graphics.c @@ -71,7 +71,7 @@ wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data) wfBitmap* image; hdc = GetDC(NULL); - image = (wfBitmap*) xmalloc(sizeof(wfBitmap)); + image = (wfBitmap*) malloc(sizeof(wfBitmap)); image->hdc = CreateCompatibleDC(hdc); image->bitmap = wf_create_dib(wfi, width, height, bpp, data, &(image->pdata)); @@ -150,9 +150,9 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, size = width * height * (bpp / 8); if (bitmap->data == NULL) - bitmap->data = (uint8*) xmalloc(size); + bitmap->data = (uint8*) malloc(size); else - bitmap->data = (uint8*) xrealloc(bitmap->data, size); + bitmap->data = (uint8*) realloc(bitmap->data, size); if (compressed) { diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index 9df8a0bdd..1b8624465 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -303,12 +303,12 @@ boolean wf_post_connect(freerdp* instance) wfi->hdc->alpha = wfi->clrconv->alpha; wfi->hdc->invert = wfi->clrconv->invert; - wfi->hdc->hwnd = (HGDI_WND) xmalloc(sizeof(GDI_WND)); + wfi->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND)); wfi->hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0); wfi->hdc->hwnd->invalid->null = 1; wfi->hdc->hwnd->count = 32; - wfi->hdc->hwnd->cinvalid = (HGDI_RGN) xmalloc(sizeof(GDI_RGN) * wfi->hdc->hwnd->count); + wfi->hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * wfi->hdc->hwnd->count); wfi->hdc->hwnd->ninvalid = 0; wfi->image = wf_image_new(wfi, 64, 64, 32, NULL); diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 2a2202145..c02f92871 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -149,11 +149,11 @@ void xf_cliprdr_uninit(xfInfo* xfi) if (cb) { - xfree(cb->formats); - xfree(cb->data); - xfree(cb->respond); - xfree(cb->incr_data); - xfree(cb); + free(cb->formats); + free(cb->data); + free(cb->respond); + free(cb->incr_data); + free(cb); xfi->clipboard_context = NULL; } } @@ -325,7 +325,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->raw_format_data = (uint8*) xmalloc(length); + event->raw_format_data = (uint8*) malloc(length); memcpy(event->raw_format_data, format_data, length); event->raw_format_data_size = length; XFree(format_data); @@ -355,7 +355,7 @@ static void xf_cliprdr_send_supported_format_list(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->formats = (uint32*) xmalloc(sizeof(uint32) * cb->num_format_mappings); + event->formats = (uint32*) malloc(sizeof(uint32) * cb->num_format_mappings); event->num_formats = cb->num_format_mappings; for (i = 0; i < cb->num_format_mappings; i++) @@ -485,7 +485,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->formats = (uint32*) xmalloc(sizeof(uint32) * cb->num_format_mappings); + event->formats = (uint32*) malloc(sizeof(uint32) * cb->num_format_mappings); num = 0; for (i = 0; i < length; i++) { @@ -520,7 +520,7 @@ static uint8* xf_cliprdr_process_requested_raw(uint8* data, int* size) { uint8* outbuf; - outbuf = (uint8*) xmalloc(*size); + outbuf = (uint8*) malloc(*size); memcpy(outbuf, data, *size); return outbuf; } @@ -533,7 +533,7 @@ static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size) inbuf = (char*) lf2crlf(data, size); out_size = freerdp_AsciiToUnicodeAlloc(inbuf, &outbuf, 0); - xfree(inbuf); + free(inbuf); *size = (int) ((out_size + 1) * 2); @@ -633,7 +633,7 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size) memcpy(outbuf + 43, num, 10); *size = strlen((char*) outbuf) + 1; - xfree(inbuf); + free(inbuf); return outbuf; } @@ -730,7 +730,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) cb->incr_starts = true; if (cb->incr_data) { - xfree(cb->incr_data); + free(cb->incr_data); cb->incr_data = NULL; } cb->incr_data_length = 0; @@ -758,7 +758,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) { bytes_left = length * format / 8; DEBUG_X11("%d bytes", (int)bytes_left); - cb->incr_data = (uint8*) xrealloc(cb->incr_data, cb->incr_data_length + bytes_left); + cb->incr_data = (uint8*) realloc(cb->incr_data, cb->incr_data_length + bytes_left); memcpy(cb->incr_data + cb->incr_data_length, data, bytes_left); cb->incr_data_length += bytes_left; XFree(data); @@ -832,12 +832,12 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L if (cb->data) { - xfree(cb->data); + free(cb->data); cb->data = NULL; } if (cb->formats) - xfree(cb->formats); + free(cb->formats); cb->formats = event->formats; cb->num_formats = event->num_formats; @@ -870,7 +870,7 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L static void xf_cliprdr_process_text(clipboardContext* cb, uint8* data, int size) { - cb->data = (uint8*) xmalloc(size); + cb->data = (uint8*) malloc(size); memcpy(cb->data, data, size); cb->data_length = size; crlf2lf(cb->data, &cb->data_length); @@ -943,7 +943,7 @@ static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size) return; } - cb->data = (uint8*) xmalloc(size - start + 1); + cb->data = (uint8*) malloc(size - start + 1); memcpy(cb->data, data + start, end - start); cb->data_length = end - start; crlf2lf(cb->data, &cb->data_length); @@ -969,7 +969,7 @@ static void xf_cliprdr_process_cb_data_response_event(xfInfo* xfi, RDP_CB_DATA_R { if (cb->data) { - xfree(cb->data); + free(cb->data); cb->data = NULL; } switch (cb->data_format) @@ -1009,7 +1009,7 @@ static void xf_cliprdr_process_cb_data_response_event(xfInfo* xfi, RDP_CB_DATA_R XSendEvent(xfi->display, cb->respond->xselection.requestor, 0, 0, cb->respond); XFlush(xfi->display); - xfree(cb->respond); + free(cb->respond); cb->respond = NULL; } @@ -1149,7 +1149,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) */ if (cb->data) { - xfree(cb->data); + free(cb->data); cb->data = NULL; } @@ -1168,7 +1168,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) { XSendEvent(xfi->display, xevent->xselectionrequest.requestor, 0, 0, respond); XFlush(xfi->display); - xfree(respond); + free(respond); } return true; diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index e33b35b48..ecc78b363 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -227,7 +227,7 @@ Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data) XFree(image); if (cdata != data) - xfree(cdata); + free(cdata); XFreeGC(xfi->display, gc); } @@ -568,7 +568,7 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) XSetForeground(xfi->display, xfi->gc, color); npoints = polyline->numPoints + 1; - points = xmalloc(sizeof(XPoint) * npoints); + points = malloc(sizeof(XPoint) * npoints); points[0].x = polyline->xStart; points[0].y = polyline->yStart; @@ -608,7 +608,7 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) } XSetFunction(xfi->display, xfi->gc, GXcopy); - xfree(points); + free(points); } void xf_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) @@ -724,7 +724,7 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) brush_color = freerdp_color_convert_var(polygon_sc->brushColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); npoints = polygon_sc->numPoints + 1; - points = xmalloc(sizeof(XPoint) * npoints); + points = malloc(sizeof(XPoint) * npoints); points[0].x = polygon_sc->xStart; points[0].y = polygon_sc->yStart; @@ -763,7 +763,7 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) } XSetFunction(xfi->display, xfi->gc, GXcopy); - xfree(points); + free(points); } void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) @@ -782,7 +782,7 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) backColor = freerdp_color_convert_rgb(polygon_cb->backColor, ((xfContext*)context)->settings->color_depth, xfi->bpp, xfi->clrconv); npoints = polygon_cb->numPoints + 1; - points = xmalloc(sizeof(XPoint) * npoints); + points = malloc(sizeof(XPoint) * npoints); points[0].x = polygon_cb->xStart; points[0].y = polygon_cb->yStart; @@ -866,7 +866,7 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) } XSetFunction(xfi->display, xfi->gc, GXcopy); - xfree(points); + free(points); } void xf_gdi_ellipse_sc(rdpContext* context, ELLIPSE_SC_ORDER* ellipse_sc) @@ -998,7 +998,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFillStyle(xfi->display, xfi->gc, FillSolid); - xfi->bmp_codec_nsc = (uint8*) xrealloc(xfi->bmp_codec_nsc, + xfi->bmp_codec_nsc = (uint8*) realloc(xfi->bmp_codec_nsc, surface_bits_command->width * surface_bits_command->height * 4); freerdp_image_flip(nsc_context->bmpdata, xfi->bmp_codec_nsc, @@ -1026,7 +1026,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits /* Validate that the data received is large enough */ if( surface_bits_command->width * surface_bits_command->height * surface_bits_command->bpp / 8 <= surface_bits_command->bitmapDataLength ) { - xfi->bmp_codec_none = (uint8*) xrealloc(xfi->bmp_codec_none, + xfi->bmp_codec_none = (uint8*) realloc(xfi->bmp_codec_none, surface_bits_command->width * surface_bits_command->height * 4); freerdp_image_flip(surface_bits_command->bitmapData, xfi->bmp_codec_none, diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 93d0624e2..2ed873aaa 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -61,12 +61,12 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap) XFree(image); if (data != bitmap->data) - xfree(data); + free(data); } else { if (data != bitmap->data) - xfree(bitmap->data); + free(bitmap->data); bitmap->data = data; } @@ -127,9 +127,9 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, size = width * height * (bpp + 7) / 8; if (bitmap->data == NULL) - bitmap->data = (uint8*) xmalloc(size); + bitmap->data = (uint8*) malloc(size); else - bitmap->data = (uint8*) xrealloc(bitmap->data, size); + bitmap->data = (uint8*) realloc(bitmap->data, size); switch (codec_id) { @@ -222,7 +222,7 @@ void xf_Pointer_New(rdpContext* context, rdpPointer* pointer) } ((xfPointer*) pointer)->cursor = XcursorImageLoadCursor(xfi->display, &ci); - xfree(ci.pixels); + free(ci.pixels); } void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer) @@ -376,7 +376,7 @@ void xf_register_graphics(rdpGraphics* graphics) bitmap->SetSurface = xf_Bitmap_SetSurface; graphics_register_bitmap(graphics, bitmap); - xfree(bitmap); + free(bitmap); pointer = xnew(rdpPointer); pointer->size = sizeof(xfPointer); @@ -388,7 +388,7 @@ void xf_register_graphics(rdpGraphics* graphics) pointer->SetDefault = xf_Pointer_SetDefault; graphics_register_pointer(graphics, pointer); - xfree(pointer); + free(pointer); glyph = xnew(rdpGlyph); glyph->size = sizeof(xfGlyph); @@ -400,5 +400,5 @@ void xf_register_graphics(rdpGraphics* graphics) glyph->EndDraw = xf_Glyph_EndDraw; graphics_register_glyph(graphics, glyph); - xfree(glyph); + free(glyph); } diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index ed4e93c36..8ec037fb7 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -172,10 +172,10 @@ void xf_tsmf_uninit(xfInfo* xfi) } if (xv->xv_pixfmts) { - xfree(xv->xv_pixfmts); + free(xv->xv_pixfmts); xv->xv_pixfmts = NULL; } - xfree(xv); + free(xv); xfi->xv_context = NULL; } } diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 38431f6a0..d865fc510 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -173,7 +173,7 @@ boolean xf_GetCurrentDesktop(xfInfo* xfi) } xfi->current_desktop = (int) *prop; - xfree(prop); + free(prop); return true; } @@ -198,7 +198,7 @@ boolean xf_GetWorkArea(xfInfo* xfi) return false; if ((xfi->current_desktop * 4 + 3) >= nitems) { - xfree(prop); + free(prop); return false; } @@ -208,7 +208,7 @@ boolean xf_GetWorkArea(xfInfo* xfi) xfi->workArea.y = plong[xfi->current_desktop * 4 + 1]; xfi->workArea.width = plong[xfi->current_desktop * 4 + 2]; xfi->workArea.height = plong[xfi->current_desktop * 4 + 3]; - xfree(prop); + free(prop); return true; } @@ -511,13 +511,13 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, if (class_hints != NULL) { char* class; - class = xmalloc(sizeof(rail_window_class)); + class = malloc(sizeof(rail_window_class)); snprintf(class, sizeof(rail_window_class), "RAIL:%08X", id); class_hints->res_name = "RAIL"; class_hints->res_class = class; XSetClassHint(xfi->display, window->handle, class_hints); XFree(class_hints); - xfree(class); + free(class); } /* Set the input mode hint for the WM */ @@ -761,7 +761,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon) pixels = icon->entry->width * icon->entry->height; propsize = 2 + pixels; - propdata = xmalloc(propsize * sizeof(long)); + propdata = malloc(propsize * sizeof(long)); propdata[0] = icon->entry->width; propdata[1] = icon->entry->height; @@ -790,7 +790,7 @@ void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int n if (nrects == 0) return; - xrects = xmalloc(sizeof(XRectangle) * nrects); + xrects = malloc(sizeof(XRectangle) * nrects); for (i = 0; i < nrects; i++) { @@ -807,7 +807,7 @@ void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int n */ #endif - xfree(xrects); + free(xrects); } void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects) @@ -818,7 +818,7 @@ void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* re if (nrects == 0) return; - xrects = xmalloc(sizeof(XRectangle) * nrects); + xrects = malloc(sizeof(XRectangle) * nrects); for (i = 0; i < nrects; i++) { @@ -835,7 +835,7 @@ void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* re */ #endif - xfree(xrects); + free(xrects); } void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height) @@ -917,7 +917,7 @@ void xf_DestroyWindow(xfInfo* xfi, xfWindow* window) XDestroyWindow(xfi->display, window->handle); } - xfree(window); + free(window); } rdpWindow* xf_rdpWindowFromWindow(xfInfo* xfi, Window wnd) diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 9d6125660..c794704eb 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -314,17 +314,17 @@ void xf_create_window(xfInfo* xfi) } else if (xfi->instance->settings->port == 3389) { - win_title = xmalloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname)); + win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname)); sprintf(win_title, "FreeRDP: %s", xfi->instance->settings->hostname); } else { - win_title = xmalloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname) + sizeof(":00000")); + win_title = malloc(1 + sizeof("FreeRDP: ") + strlen(xfi->instance->settings->hostname) + sizeof(":00000")); sprintf(win_title, "FreeRDP: %s:%i", xfi->instance->settings->hostname, xfi->instance->settings->port); } xfi->window = xf_CreateDesktopWindow(xfi, win_title, width, height, xfi->decorations); - xfree(win_title); + free(win_title); if (xfi->fullscreen) xf_SetWindowFullscreen(xfi, xfi->window, xfi->fullscreen); @@ -758,7 +758,7 @@ boolean xf_post_connect(freerdp* instance) xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0, (char*) xfi->primary_buffer, xfi->width, xfi->height, xfi->scanline_pad, 0); - xfi->bmp_codec_none = (uint8*) xmalloc(64 * 64 * 4); + xfi->bmp_codec_none = (uint8*) malloc(64 * 64 * 4); if (xfi->sw_gdi) { @@ -805,7 +805,7 @@ boolean xf_post_connect(freerdp* instance) * @param username - unused * @param password - on return: pointer to a character string that will be filled by the password entered by the user. * Note that this character string will be allocated inside the function, and needs to be deallocated by the caller - * using xfree(), even in case this function fails. + * using free(), even in case this function fails. * @param domain - unused * @return true if a password was successfully entered. See freerdp_passphrase_read() for more details. */ @@ -813,7 +813,7 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha { // FIXME: seems this callback may be called when 'username' is not known. // But it doesn't do anything to fix it... - *password = xmalloc(password_size * sizeof(char)); + *password = malloc(password_size * sizeof(char)); if (freerdp_passphrase_read("Password: ", *password, password_size, instance->settings->from_stdin) == NULL) return false; @@ -891,9 +891,9 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v for (i = 0; layouts[i].code; i++) { printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); - xfree(layouts[i].name); + free(layouts[i].name); } - xfree(layouts); + free(layouts); layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_VARIANT); @@ -901,9 +901,9 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v for (i = 0; layouts[i].code; i++) { printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); - xfree(layouts[i].name); + free(layouts[i].name); } - xfree(layouts); + free(layouts); layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_IME); @@ -911,9 +911,9 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v for (i = 0; layouts[i].code; i++) { printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name); - xfree(layouts[i].name); + free(layouts[i].name); } - xfree(layouts); + free(layouts); exit(0); } @@ -1081,11 +1081,11 @@ void xf_free(xfInfo* xfi) { xf_window_free(xfi); - xfree(xfi->bmp_codec_none); + free(xfi->bmp_codec_none); XCloseDisplay(xfi->display); - xfree(xfi); + free(xfi); } /** Main loop for the rdp connection. @@ -1261,7 +1261,7 @@ void* thread_func(void* param) g_disconnect_reason = xfreerdp_run(data->instance); - xfree(data); + free(data); g_thread_count--; diff --git a/cunit/test_cliprdr.c b/cunit/test_cliprdr.c index d92af6706..bcf68a378 100644 --- a/cunit/test_cliprdr.c +++ b/cunit/test_cliprdr.c @@ -143,7 +143,7 @@ void test_cliprdr(void) event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, event_process_callback, NULL); format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) event; format_list_event->num_formats = 2; - format_list_event->formats = (uint32*) xmalloc(sizeof(uint32) * 2); + format_list_event->formats = (uint32*) malloc(sizeof(uint32) * 2); format_list_event->formats[0] = CB_FORMAT_TEXT; format_list_event->formats[1] = CB_FORMAT_HTML; event_processed = 0; @@ -199,7 +199,7 @@ void test_cliprdr(void) /* UI sends data response event to cliprdr */ event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_DATA_RESPONSE, event_process_callback, NULL); data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*)event; - data_response_event->data = (uint8*)xmalloc(6); + data_response_event->data = (uint8*)malloc(6); strcpy((char*)data_response_event->data, "hello"); data_response_event->size = 6; event_processed = 0; diff --git a/cunit/test_license.c b/cunit/test_license.c index 390fffeb5..bd18d5c97 100644 --- a/cunit/test_license.c +++ b/cunit/test_license.c @@ -483,7 +483,7 @@ void test_license_decrypt_platform_challenge(void) sizeof(test_licensing_encryption_key)); license->encrypted_platform_challenge->data = - (uint8*) xmalloc(sizeof(test_encrypted_platform_challenge)); + (uint8*) malloc(sizeof(test_encrypted_platform_challenge)); license->encrypted_platform_challenge->length = sizeof(test_encrypted_platform_challenge); diff --git a/cunit/test_rfx.c b/cunit/test_rfx.c index 3b4ad7e27..6720ae922 100644 --- a/cunit/test_rfx.c +++ b/cunit/test_rfx.c @@ -199,7 +199,7 @@ void test_bitstream(void) (void) b; //printf("%u ", b); } - xfree(bs); + free(bs); //printf("\n"); } @@ -221,7 +221,7 @@ void test_bitstream_enc(void) { printf("%X ", buffer[i]); }*/ - xfree(bs); + free(bs); //printf("\n"); } diff --git a/include/freerdp/utils/memory.h b/include/freerdp/utils/memory.h index 18c35b56f..b5ef007c6 100644 --- a/include/freerdp/utils/memory.h +++ b/include/freerdp/utils/memory.h @@ -25,10 +25,8 @@ #include #include -FREERDP_API void* xmalloc(size_t size); FREERDP_API void* xzalloc(size_t size); -FREERDP_API void* xrealloc(void* ptr, size_t size); -FREERDP_API void xfree(void* ptr); + FREERDP_API char* xstrdup(const char* str); FREERDP_API char* xstrtoup(const char* str); FREERDP_API wchar_t* xwcsdup(const wchar_t* wstr); diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 3cebbc07f..2c8a97e6c 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -327,13 +327,13 @@ void bitmap_cache_free(rdpBitmapCache* bitmap_cache) } } - xfree(bitmap_cache->cells[i].entries); + free(bitmap_cache->cells[i].entries); } if (bitmap_cache->bitmap != NULL) Bitmap_Free(bitmap_cache->context, bitmap_cache->bitmap); - xfree(bitmap_cache->cells); - xfree(bitmap_cache); + free(bitmap_cache->cells); + free(bitmap_cache); } } diff --git a/libfreerdp/cache/brush.c b/libfreerdp/cache/brush.c index 878a206cd..fef92e56c 100644 --- a/libfreerdp/cache/brush.c +++ b/libfreerdp/cache/brush.c @@ -129,7 +129,7 @@ void brush_cache_put(rdpBrushCache* brush, uint32 index, void* entry, uint32 bpp prevEntry = brush->monoEntries[index].entry; if (prevEntry != NULL) - xfree(prevEntry); + free(prevEntry); brush->monoEntries[index].bpp = bpp; brush->monoEntries[index].entry = entry; @@ -145,7 +145,7 @@ void brush_cache_put(rdpBrushCache* brush, uint32 index, void* entry, uint32 bpp prevEntry = brush->entries[index].entry; if (prevEntry != NULL) - xfree(prevEntry); + free(prevEntry); brush->entries[index].bpp = bpp; brush->entries[index].entry = entry; @@ -197,10 +197,10 @@ void brush_cache_free(rdpBrushCache* brush) for (i = 0; i < (int) brush->maxEntries; i++) { if (brush->entries[i].entry != NULL) - xfree(brush->entries[i].entry); + free(brush->entries[i].entry); } - xfree(brush->entries); + free(brush->entries); } if (brush->monoEntries != NULL) @@ -208,12 +208,12 @@ void brush_cache_free(rdpBrushCache* brush) for (i = 0; i < (int) brush->maxMonoEntries; i++) { if (brush->monoEntries[i].entry != NULL) - xfree(brush->monoEntries[i].entry); + free(brush->monoEntries[i].entry); } - xfree(brush->monoEntries); + free(brush->monoEntries); } - xfree(brush); + free(brush); } } diff --git a/libfreerdp/cache/cache.c b/libfreerdp/cache/cache.c index 02d20153d..f2f1a4a70 100644 --- a/libfreerdp/cache/cache.c +++ b/libfreerdp/cache/cache.c @@ -58,6 +58,6 @@ void cache_free(rdpCache* cache) offscreen_cache_free(cache->offscreen); palette_cache_free(cache->palette); nine_grid_cache_free(cache->nine_grid); - xfree(cache); + free(cache); } } diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index 2dff89a47..b074fc4d2 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -143,7 +143,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len id = data[index + 1]; size = data[index + 2]; - fragments = (uint8*) xmalloc(size); + fragments = (uint8*) malloc(size); memcpy(fragments, data, size); glyph_cache_fragment_put(glyph_cache, id, size, fragments); @@ -286,7 +286,7 @@ void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph) glyph->cb = glyph_data->cb; Glyph_New(context, glyph); glyph_cache_put(cache->glyph, fast_glyph->cacheId, fast_glyph->data[0], glyph); - xfree(fast_glyph->glyph_data); + free(fast_glyph->glyph_data); fast_glyph->glyph_data = NULL; } @@ -326,7 +326,7 @@ void update_gdi_cache_glyph(rdpContext* context, CACHE_GLYPH_ORDER* cache_glyph) glyph_cache_put(cache->glyph, cache_glyph->cacheId, glyph_data->cacheIndex, glyph); cache_glyph->glyphData[i] = NULL; - xfree(glyph_data); + free(glyph_data); } } @@ -354,7 +354,7 @@ void update_gdi_cache_glyph_v2(rdpContext* context, CACHE_GLYPH_V2_ORDER* cache_ glyph_cache_put(cache->glyph, cache_glyph_v2->cacheId, glyph_data->cacheIndex, glyph); cache_glyph_v2->glyphData[i] = NULL; - xfree(glyph_data); + free(glyph_data); } } @@ -405,8 +405,8 @@ void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGly if (prevGlyph != NULL) { Glyph_Free(glyph_cache->context, prevGlyph); - xfree(prevGlyph->aj); - xfree(prevGlyph); + free(prevGlyph->aj); + free(prevGlyph); } glyph_cache->glyphCache[id].entries[index] = glyph; @@ -438,7 +438,7 @@ void glyph_cache_fragment_put(rdpGlyphCache* glyph_cache, uint32 index, uint32 s if (prevFragment != NULL) { - xfree(prevFragment); + free(prevFragment); } } @@ -500,20 +500,20 @@ void glyph_cache_free(rdpGlyphCache* glyph_cache) if (glyph != NULL) { Glyph_Free(glyph_cache->context, glyph); - xfree(glyph->aj); - xfree(glyph); + free(glyph->aj); + free(glyph); } } - xfree(glyph_cache->glyphCache[i].entries); + free(glyph_cache->glyphCache[i].entries); } for (i = 0; i < 255; i++) { fragment = glyph_cache->fragCache.entries[i].fragment; - xfree(fragment); + free(fragment); } - xfree(glyph_cache->fragCache.entries); - xfree(glyph_cache); + free(glyph_cache->fragCache.entries); + free(glyph_cache); } } diff --git a/libfreerdp/cache/nine_grid.c b/libfreerdp/cache/nine_grid.c index 9998cfbfe..21c569085 100644 --- a/libfreerdp/cache/nine_grid.c +++ b/libfreerdp/cache/nine_grid.c @@ -87,7 +87,7 @@ void nine_grid_cache_put(rdpNineGridCache* nine_grid, uint32 index, void* entry) prevEntry = nine_grid->entries[index].entry; if (prevEntry != NULL) - xfree(prevEntry); + free(prevEntry); nine_grid->entries[index].entry = entry; } @@ -125,12 +125,12 @@ void nine_grid_cache_free(rdpNineGridCache* nine_grid) for (i = 0; i < (int) nine_grid->maxEntries; i++) { if (nine_grid->entries[i].entry != NULL) - xfree(nine_grid->entries[i].entry); + free(nine_grid->entries[i].entry); } - xfree(nine_grid->entries); + free(nine_grid->entries); } - xfree(nine_grid); + free(nine_grid); } } diff --git a/libfreerdp/cache/offscreen.c b/libfreerdp/cache/offscreen.c index 60a8dda48..5d6168f63 100644 --- a/libfreerdp/cache/offscreen.c +++ b/libfreerdp/cache/offscreen.c @@ -169,7 +169,7 @@ void offscreen_cache_free(rdpOffscreenCache* offscreen_cache) Bitmap_Free(offscreen_cache->update->context, bitmap); } - xfree(offscreen_cache->entries); - xfree(offscreen_cache); + free(offscreen_cache->entries); + free(offscreen_cache); } } diff --git a/libfreerdp/cache/palette.c b/libfreerdp/cache/palette.c index 9ce78a9fe..925ed0245 100644 --- a/libfreerdp/cache/palette.c +++ b/libfreerdp/cache/palette.c @@ -91,8 +91,8 @@ void palette_cache_free(rdpPaletteCache* palette_cache) { if (palette_cache != NULL) { - xfree(palette_cache->entries); - xfree(palette_cache); + free(palette_cache->entries); + free(palette_cache); } } diff --git a/libfreerdp/cache/pointer.c b/libfreerdp/cache/pointer.c index 3ecb205e7..dbc317606 100644 --- a/libfreerdp/cache/pointer.c +++ b/libfreerdp/cache/pointer.c @@ -187,7 +187,7 @@ void pointer_cache_free(rdpPointerCache* pointer_cache) Pointer_Free(pointer_cache->update->context, pointer); } - xfree(pointer_cache->entries); - xfree(pointer_cache); + free(pointer_cache->entries); + free(pointer_cache); } } diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index c8d0bb82f..9c5fcede1 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -663,12 +663,12 @@ void freerdp_channels_free(rdpChannels* channels) prev->next = list->next; else g_channels_list = list->next; - xfree(list); + free(list); } ReleaseMutex(g_mutex_list); - xfree(channels); + free(channels); } int freerdp_channels_client_load(rdpChannels* channels, rdpSettings* settings, void* entry, void* data) diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index 9bbbca256..9db452a09 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -47,8 +47,8 @@ typedef struct wts_data_item static void wts_data_item_free(wts_data_item* item) { - xfree(item->buffer); - xfree(item); + free(item->buffer); + free(item); } static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, uint32 ChannelId) @@ -73,7 +73,7 @@ static void wts_queue_receive_data(rdpPeerChannel* channel, const uint8* buffer, item = xnew(wts_data_item); item->length = length; - item->buffer = xmalloc(length); + item->buffer = malloc(length); memcpy(item->buffer, buffer, length); WaitForSingleObject(channel->mutex, INFINITE); @@ -429,7 +429,7 @@ void WTSDestroyVirtualChannelManager(WTSVirtualChannelManager* vcm) list_free(vcm->send_queue); CloseHandle(vcm->mutex); - xfree(vcm); + free(vcm); } } @@ -585,7 +585,7 @@ boolean WTSVirtualChannelQuery( { case WTSVirtualFileHandle: wait_obj_get_fds(channel->receive_event, fds, &fds_count); - *ppBuffer = xmalloc(sizeof(void*)); + *ppBuffer = malloc(sizeof(void*)); memcpy(*ppBuffer, &fds[0], sizeof(void*)); *pBytesReturned = sizeof(void*); result = true; @@ -615,7 +615,7 @@ boolean WTSVirtualChannelQuery( break; } } - *ppBuffer = xmalloc(sizeof(boolean)); + *ppBuffer = malloc(sizeof(boolean)); memcpy(*ppBuffer, &bval, sizeof(boolean)); *pBytesReturned = sizeof(boolean); break; @@ -629,7 +629,7 @@ boolean WTSVirtualChannelQuery( void WTSFreeMemory( /* __in */ void* pMemory) { - xfree(pMemory); + free(pMemory); } boolean WTSVirtualChannelRead( @@ -691,7 +691,7 @@ boolean WTSVirtualChannelWrite( if (channel->channel_type == RDP_PEER_CHANNEL_TYPE_SVC) { item = xnew(wts_data_item); - item->buffer = xmalloc(Length); + item->buffer = malloc(Length); item->length = Length; memcpy(item->buffer, Buffer, Length); @@ -710,7 +710,7 @@ boolean WTSVirtualChannelWrite( while (Length > 0) { item = xnew(wts_data_item); - item->buffer = xmalloc(channel->client->settings->vc_chunk_size); + item->buffer = malloc(channel->client->settings->vc_chunk_size); stream_attach(s, item->buffer, channel->client->settings->vc_chunk_size); stream_seek_uint8(s); @@ -800,7 +800,7 @@ boolean WTSVirtualChannelClose( if (channel->mutex) CloseHandle(channel->mutex); - xfree(channel); + free(channel); } return true; diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index d87fa5f81..008aa7f0d 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -445,10 +445,10 @@ boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, if (srcBpp == 16 && dstBpp == 16) { - TmpBfr = (uint8*) xmalloc(width * height * 2); + TmpBfr = (uint8*) malloc(width * height * 2); RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height); - xfree(TmpBfr); + free(TmpBfr); } else if (srcBpp == 32 && dstBpp == 32) { @@ -457,24 +457,24 @@ boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, } else if (srcBpp == 15 && dstBpp == 15) { - TmpBfr = (uint8*) xmalloc(width * height * 2); + TmpBfr = (uint8*) malloc(width * height * 2); RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height); - xfree(TmpBfr); + free(TmpBfr); } else if (srcBpp == 8 && dstBpp == 8) { - TmpBfr = (uint8*) xmalloc(width * height); + TmpBfr = (uint8*) malloc(width * height); RleDecompress8to8(srcData, size, TmpBfr, width, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width, height); - xfree(TmpBfr); + free(TmpBfr); } else if (srcBpp == 24 && dstBpp == 24) { - TmpBfr = (uint8*) xmalloc(width * height * 3); + TmpBfr = (uint8*) malloc(width * height * 3); RleDecompress24to24(srcData, size, TmpBfr, width * 3, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 3, height); - xfree(TmpBfr); + free(TmpBfr); } else { diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index ddc0f0a24..3ae5fb661 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -369,7 +369,7 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int if (dstBpp == 8) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height); + dstData = (uint8*) malloc(width * height); memcpy(dstData, srcData, width * height); return dstData; @@ -377,7 +377,7 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555)) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); dst16 = (uint16 *) dstData; for (i = width * height; i > 0; i--) @@ -396,7 +396,7 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); dst16 = (uint16 *) dstData; for (i = width * height; i > 0; i--) @@ -415,7 +415,7 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 32) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); src8 = (uint8*) srcData; dst32 = (uint32*) dstData; @@ -450,7 +450,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555)) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); memcpy(dstData, srcData, width * height * 2); @@ -459,7 +459,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in else if (dstBpp == 32) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); src16 = (uint16 *) srcData; dst32 = (uint32 *) dstData; @@ -477,7 +477,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in else if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); src16 = (uint16 *) srcData; dst16 = (uint16 *) dstData; @@ -505,7 +505,7 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); if (clrconv->rgb555) { @@ -538,7 +538,7 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in uint8 red, green, blue; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 3); + dstData = (uint8*) malloc(width * height * 3); dst8 = (uint8*) dstData; src16 = (uint16*) srcData; @@ -572,7 +572,7 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in uint8 red, green, blue; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); src16 = (uint16*) srcData; dst32 = (uint32*) dstData; @@ -600,7 +600,7 @@ uint8* freerdp_image_convert_24bpp(uint8* srcData, uint8* dstData, int width, in { uint8 *dstp; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); dstp = dstData; for (i = width * height; i > 0; i--) @@ -626,7 +626,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in uint8 red, green, blue; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); dst16 = (uint16*) dstData; src32 = (uint32*) srcData; @@ -647,7 +647,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in uint8 red, green, blue; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 3); + dstData = (uint8*) malloc(width * height * 3); dstp = dstData; for (index = 0; index < width * height; index++) @@ -681,7 +681,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in uint8 *dstp; if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); memcpy(dstData, srcData, width * height * 4); @@ -699,7 +699,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in else { if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); memcpy(dstData, srcData, width * height * 4); } @@ -740,12 +740,12 @@ void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height) if (src == dst) { /* Allocate a scanline buffer. - * (FIXME: xmalloc / xfree below should be replaced by "get/put + * (FIXME: malloc / xfree below should be replaced by "get/put * scanline buffer from a pool/Q of fixed buffers" to reuse * fixed size buffers (of max scanline size (or adaptative?) ) * -- would be much faster). */ - uint8 * tmpBfr = xmalloc(scanLineSz); + uint8 * tmpBfr = malloc(scanLineSz); int half = height / 2; /* Flip buffer in place by line permutations through the temp * scan line buffer. @@ -765,7 +765,7 @@ void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height) bottomLine -= scanLineSz; height--; } - xfree(tmpBfr); + free(tmpBfr); } /* Flip from source buffer to destination buffer. */ else @@ -788,7 +788,7 @@ uint8* freerdp_image_flip(uint8* srcData, uint8* dstData, int width, int height, scanline = width * ((bpp + 7) / 8); if (dstData == NULL) - dstData = (uint8*) xmalloc(width * height * ((bpp + 7) / 8)); + dstData = (uint8*) malloc(width * height * ((bpp + 7) / 8)); freerdp_bitmap_flip(srcData, dstData, scanline, height); return dstData; @@ -862,7 +862,7 @@ uint8* freerdp_glyph_convert(int width, int height, uint8* data) */ scanline = (width + 7) / 8; - dstData = (uint8*) xmalloc(width * height); + dstData = (uint8*) malloc(width * height); memset(dstData, 0, width * height); dstp = dstData; @@ -946,7 +946,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src } } - dstData = (uint8*) xmalloc(width * height * 2); + dstData = (uint8*) malloc(width * height * 2); dst16 = (uint16*) dstData; for (index = height; index > 0; index--) @@ -971,7 +971,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src } else if (dstBpp == 32) { - dstData = (uint8*) xmalloc(width * height * 4); + dstData = (uint8*) malloc(width * height * 4); dst32 = (uint32*) dstData; for (index = height; index > 0; index--) @@ -1070,8 +1070,8 @@ void freerdp_clrconv_free(HCLRCONV clrconv) if (clrconv != NULL) { if (clrconv->palette != NULL) - xfree(clrconv->palette); + free(clrconv->palette); - xfree(clrconv); + free(clrconv); } } diff --git a/libfreerdp/codec/mppc_dec.c b/libfreerdp/codec/mppc_dec.c index 22cc1b5ad..4ed6e1357 100644 --- a/libfreerdp/codec/mppc_dec.c +++ b/libfreerdp/codec/mppc_dec.c @@ -1414,7 +1414,7 @@ struct rdp_mppc_dec* mppc_dec_new(void) { struct rdp_mppc_dec* ptr; - ptr = (struct rdp_mppc_dec*) xmalloc(sizeof(struct rdp_mppc_dec)); + ptr = (struct rdp_mppc_dec*) malloc(sizeof(struct rdp_mppc_dec)); if (!ptr) { printf("mppc_new(): system out of memory\n"); @@ -1426,7 +1426,7 @@ struct rdp_mppc_dec* mppc_dec_new(void) if (!ptr->history_buf) { printf("mppc_new(): system out of memory\n"); - xfree(ptr); + free(ptr); return NULL; } @@ -1450,14 +1450,14 @@ void mppc_dec_free(struct rdp_mppc_dec* dec) if (dec->history_buf) { - xfree(dec->history_buf); + free(dec->history_buf); dec->history_buf = NULL; dec->history_ptr = NULL; } if (dec->offset_cache) { - xfree(dec->offset_cache); + free(dec->offset_cache); dec->offset_cache = NULL; } - xfree(dec); + free(dec); } diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index a01669d6b..167a6faeb 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -444,30 +444,30 @@ struct rdp_mppc_enc* mppc_enc_new(int protocol_type) enc->buf_len = RDP_50_HIST_BUF_LEN; break; default: - xfree(enc); + free(enc); return NULL; } enc->first_pkt = 1; enc->historyBuffer = (char*) xzalloc(enc->buf_len); if (enc->historyBuffer == NULL) { - xfree(enc); + free(enc); return NULL; } enc->outputBufferPlus = (char*) xzalloc(enc->buf_len + 64); if (enc->outputBufferPlus == NULL) { - xfree(enc->historyBuffer); - xfree(enc); + free(enc->historyBuffer); + free(enc); return NULL; } enc->outputBuffer = enc->outputBufferPlus + 64; enc->hash_table = (uint16*) xzalloc(enc->buf_len * 2); if (enc->hash_table == NULL) { - xfree(enc->historyBuffer); - xfree(enc->outputBufferPlus); - xfree(enc); + free(enc->historyBuffer); + free(enc->outputBufferPlus); + free(enc); return NULL; } return enc; @@ -483,10 +483,10 @@ void mppc_enc_free(struct rdp_mppc_enc* enc) { if (enc == NULL) return; - xfree(enc->historyBuffer); - xfree(enc->outputBufferPlus); - xfree(enc->hash_table); - xfree(enc); + free(enc->historyBuffer); + free(enc->outputBufferPlus); + free(enc->hash_table); + free(enc); } /** diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index e0bfb9a82..05cad27b2 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -199,7 +199,7 @@ static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s) } else if (length > context->bmpdata_length) { - context->bmpdata = xrealloc(context->bmpdata, length + 16); + context->bmpdata = realloc(context->bmpdata, length + 16); context->bmpdata_length = length; } @@ -210,7 +210,7 @@ static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s) if (length > context->priv->plane_buf_length) { for (i = 0; i < 4; i++) - context->priv->plane_buf[i] = (uint8*) xrealloc(context->priv->plane_buf[i], length); + context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length); context->priv->plane_buf_length = length; } @@ -244,10 +244,10 @@ void nsc_context_free(NSC_CONTEXT* context) for (i = 0; i < 4; i++) { if (context->priv->plane_buf[i]) - xfree(context->priv->plane_buf[i]); + free(context->priv->plane_buf[i]); } if (context->bmpdata) - xfree(context->bmpdata); + free(context->bmpdata); nsc_profiler_print(context); PROFILER_FREE(context->priv->prof_nsc_rle_decompress_data); @@ -255,8 +255,8 @@ void nsc_context_free(NSC_CONTEXT* context) PROFILER_FREE(context->priv->prof_nsc_rle_compress_data); PROFILER_FREE(context->priv->prof_nsc_encode); - xfree(context->priv); - xfree(context); + free(context->priv); + free(context); } NSC_CONTEXT* nsc_context_new(void) diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index dde2f6a09..d8e7ce674 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -48,7 +48,7 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context) if (length > context->priv->plane_buf_length) { for (i = 0; i < 5; i++) - context->priv->plane_buf[i] = (uint8*) xrealloc(context->priv->plane_buf[i], length); + context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length); context->priv->plane_buf_length = length; } diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 7deaaf271..6da02c202 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -177,15 +177,15 @@ void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt) void rfx_context_free(RFX_CONTEXT* context) { - xfree(context->quants); + free(context->quants); rfx_pool_free(context->priv->pool); rfx_profiler_print(context); rfx_profiler_free(context); - xfree(context->priv); - xfree(context); + free(context->priv); + free(context); } void rfx_context_set_pixel_format(RFX_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format) @@ -362,9 +362,9 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag } if (message->rects != NULL) - message->rects = (RFX_RECT*) xrealloc(message->rects, message->num_rects * sizeof(RFX_RECT)); + message->rects = (RFX_RECT*) realloc(message->rects, message->num_rects * sizeof(RFX_RECT)); else - message->rects = (RFX_RECT*) xmalloc(message->num_rects * sizeof(RFX_RECT)); + message->rects = (RFX_RECT*) malloc(message->num_rects * sizeof(RFX_RECT)); /* rects */ for (i = 0; i < message->num_rects; i++) @@ -453,9 +453,9 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa stream_read_uint32(s, tilesDataSize); /* tilesDataSize (4 bytes) */ if (context->quants != NULL) - context->quants = (uint32*) xrealloc((void*) context->quants, context->num_quants * 10 * sizeof(uint32)); + context->quants = (uint32*) realloc((void*) context->quants, context->num_quants * 10 * sizeof(uint32)); else - context->quants = (uint32*) xmalloc(context->num_quants * 10 * sizeof(uint32)); + context->quants = (uint32*) malloc(context->num_quants * 10 * sizeof(uint32)); quants = context->quants; /* quantVals */ @@ -617,15 +617,15 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message) { if (message != NULL) { - xfree(message->rects); + free(message->rects); if (message->tiles != NULL) { rfx_pool_put_tiles(context->priv->pool, message->tiles, message->num_tiles); - xfree(message->tiles); + free(message->tiles); } - xfree(message); + free(message); } } diff --git a/libfreerdp/codec/rfx_pool.c b/libfreerdp/codec/rfx_pool.c index e97b752ec..eb4e5a214 100644 --- a/libfreerdp/codec/rfx_pool.c +++ b/libfreerdp/codec/rfx_pool.c @@ -53,14 +53,14 @@ void rfx_pool_free(RFX_POOL* pool) if (tile != NULL) { if (tile->data != NULL) - xfree(tile->data); + free(tile->data); - xfree(tile); + free(tile); } } - xfree(pool->tiles); - xfree(pool); + free(pool->tiles); + free(pool); } void rfx_pool_put_tile(RFX_POOL* pool, RFX_TILE* tile) @@ -68,7 +68,7 @@ void rfx_pool_put_tile(RFX_POOL* pool, RFX_TILE* tile) if (pool->count >= pool->size) { pool->size *= 2; - pool->tiles = (RFX_TILE**) xrealloc((void*) pool->tiles, sizeof(RFX_TILE*) * pool->size); + pool->tiles = (RFX_TILE**) realloc((void*) pool->tiles, sizeof(RFX_TILE*) * pool->size); } pool->tiles[(pool->count)++] = tile; @@ -81,7 +81,7 @@ RFX_TILE* rfx_pool_get_tile(RFX_POOL* pool) if (pool->count < 1) { tile = xnew(RFX_TILE); - tile->data = (uint8*) xmalloc(4096 * 4); /* 64x64 * 4 */ + tile->data = (uint8*) malloc(4096 * 4); /* 64x64 * 4 */ } else { @@ -106,7 +106,7 @@ RFX_TILE** rfx_pool_get_tiles(RFX_POOL* pool, int count) int i; RFX_TILE** tiles; - tiles = (RFX_TILE**) xmalloc(sizeof(RFX_TILE*) * count); + tiles = (RFX_TILE**) malloc(sizeof(RFX_TILE*) * count); for (i = 0; i < count; i++) { diff --git a/libfreerdp/codec/rfx_rlgr.c b/libfreerdp/codec/rfx_rlgr.c index c7730c4bc..9a7b1ba37 100644 --- a/libfreerdp/codec/rfx_rlgr.c +++ b/libfreerdp/codec/rfx_rlgr.c @@ -234,7 +234,7 @@ int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* bu } } - xfree(bs); + free(bs); return (dst - buffer); } @@ -431,7 +431,7 @@ int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* bu } processed_size = rfx_bitstream_get_processed_bytes(bs); - xfree(bs); + free(bs); return processed_size; } diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 5e815367b..76ed0558a 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -218,7 +218,7 @@ rdpX509CertChain* certificate_new_x509_certificate_chain(uint32 count) { rdpX509CertChain* x509_cert_chain; - x509_cert_chain = (rdpX509CertChain*) xmalloc(sizeof(rdpX509CertChain)); + x509_cert_chain = (rdpX509CertChain*) malloc(sizeof(rdpX509CertChain)); x509_cert_chain->count = count; x509_cert_chain->array = (rdpCertBlob*) xzalloc(sizeof(rdpCertBlob) * count); @@ -240,11 +240,11 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain) for (i = 0; i < (int) x509_cert_chain->count; i++) { if (x509_cert_chain->array[i].data != NULL) - xfree(x509_cert_chain->array[i].data); + free(x509_cert_chain->array[i].data); } - xfree(x509_cert_chain->array); - xfree(x509_cert_chain); + free(x509_cert_chain->array); + free(x509_cert_chain); } } @@ -428,7 +428,7 @@ boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certifica DEBUG_CERTIFICATE("\nX.509 Certificate #%d, length:%d", i + 1, certLength); - certificate->x509_cert_chain->array[i].data = (uint8*) xmalloc(certLength); + certificate->x509_cert_chain->array[i].data = (uint8*) malloc(certLength); stream_read(s, certificate->x509_cert_chain->array[i].data, certLength); certificate->x509_cert_chain->array[i].length = certLength; @@ -489,7 +489,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8* break; } - xfree(s); + free(s); return true; } @@ -509,7 +509,7 @@ rdpKey* key_new(const char* keyfile) if (fp == NULL) { printf("unable to load RSA key from %s: %s.", keyfile, strerror(errno)); - xfree(key) ; + free(key) ; return NULL; } @@ -519,7 +519,7 @@ rdpKey* key_new(const char* keyfile) { ERR_print_errors_fp(stdout); fclose(fp); - xfree(key) ; + free(key) ; return NULL; } @@ -530,7 +530,7 @@ rdpKey* key_new(const char* keyfile) case 0: RSA_free(rsa); printf("invalid RSA key in %s", keyfile); - xfree(key) ; + free(key) ; return NULL; case 1: @@ -540,7 +540,7 @@ rdpKey* key_new(const char* keyfile) default: ERR_print_errors_fp(stdout); RSA_free(rsa); - xfree(key) ; + free(key) ; return NULL; } @@ -548,7 +548,7 @@ rdpKey* key_new(const char* keyfile) { RSA_free(rsa); printf("RSA public exponent too large in %s", keyfile); - xfree(key) ; + free(key) ; return NULL; } @@ -577,7 +577,7 @@ void key_free(rdpKey* key) { free(key->Modulus); free(key->PrivateExponent); - xfree(key); + free(key); } } @@ -615,6 +615,6 @@ void certificate_free(rdpCertificate* certificate) if (certificate->cert_info.Modulus != NULL) free(certificate->cert_info.Modulus); - xfree(certificate); + free(certificate); } } diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index ea126ab9e..1a11b4d00 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -146,7 +146,7 @@ boolean rdp_client_redirect(rdpRdp* rdp) free(settings->server_random); free(settings->server_certificate); - xfree(settings->ip_address); + free(settings->ip_address); rdp->transport = transport_new(settings); rdp->license = license_new(rdp); @@ -164,30 +164,30 @@ boolean rdp_client_redirect(rdpRdp* rdp) { if (redirection->flags & LB_TARGET_NET_ADDRESS) { - xfree(settings->hostname); + free(settings->hostname); settings->hostname = xstrdup(redirection->targetNetAddress.ascii); } else if (redirection->flags & LB_TARGET_FQDN) { - xfree(settings->hostname); + free(settings->hostname); settings->hostname = xstrdup(redirection->targetFQDN.ascii); } else if (redirection->flags & LB_TARGET_NETBIOS_NAME) { - xfree(settings->hostname); + free(settings->hostname); settings->hostname = xstrdup(redirection->targetNetBiosName.ascii); } } if (redirection->flags & LB_USERNAME) { - xfree(settings->username); + free(settings->username); settings->username = xstrdup(redirection->username.ascii); } if (redirection->flags & LB_DOMAIN) { - xfree(settings->domain); + free(settings->domain); settings->domain = xstrdup(redirection->domain.ascii); } diff --git a/libfreerdp/core/extension.c b/libfreerdp/core/extension.c index b0a6c48e8..2ddae36a4 100644 --- a/libfreerdp/core/extension.c +++ b/libfreerdp/core/extension.c @@ -224,6 +224,6 @@ void extension_free(rdpExtension* extension) if (extension != NULL) { extension_uninit_plugins(extension); - xfree(extension); + free(extension); } } diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index 7c9f63535..1994b8531 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -333,7 +333,7 @@ static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) stream_set_pos(s, next_pos); if (comp_stream != s) - xfree(comp_stream); + free(comp_stream); return true; } @@ -774,5 +774,5 @@ rdpFastPath* fastpath_new(rdpRdp* rdp) void fastpath_free(rdpFastPath* fastpath) { stream_free(fastpath->updateData); - xfree(fastpath); + free(fastpath); } diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index 2055d274f..5f44c7808 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -132,7 +132,7 @@ boolean freerdp_connect(freerdp* instance) { pcap_get_next_record_header(update->pcap_rfx, &record); - s->data = (uint8*) xrealloc(s->data, record.length); + s->data = (uint8*) realloc(s->data, record.length); record.data = s->data; s->size = record.length; @@ -144,7 +144,7 @@ boolean freerdp_connect(freerdp* instance) update->EndPaint(update->context); } - xfree(s->data); + free(s->data); return true; } } @@ -269,7 +269,7 @@ void freerdp_context_free(freerdp* instance) rdp_free(instance->context->rdp); graphics_free(instance->context->graphics); - xfree(instance->context); + free(instance->context); instance->context = NULL; } @@ -304,6 +304,6 @@ void freerdp_free(freerdp* instance) { if (instance) { - xfree(instance); + free(instance); } } diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index 4b70d317c..0cfb63252 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -495,7 +495,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 block stream_seek(s, 32); snprintf(settings->client_hostname, 31, "%s", str); settings->client_hostname[31] = 0; - xfree(str); + free(str); stream_read_uint32(s, settings->kbd_type); /* keyboardType */ stream_read_uint32(s, settings->kbd_subtype); /* keyboardSubType */ @@ -550,7 +550,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 block freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); stream_seek(s, 64); snprintf(settings->client_product_id, 32, "%s", str); - xfree(str); + free(str); blockLength -= 64; if (blockLength < 1) @@ -666,7 +666,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write(s, clientName, ((clientNameLength + 1) * 2)); stream_write_zero(s, 32 - ((clientNameLength + 1) * 2)); - xfree(clientName); + free(clientName); stream_write_uint32(s, settings->kbd_type); /* keyboardType */ stream_write_uint32(s, settings->kbd_subtype); /* keyboardSubType */ @@ -714,7 +714,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) } stream_write(s, clientDigProductId, clientDigProductIdLength + 2); stream_write_zero(s, 64 - clientDigProductIdLength - 2); - xfree(clientDigProductId); + free(clientDigProductId); stream_write_uint8(s, connectionType); /* connectionType */ stream_write_uint8(s, 0); /* pad1octet */ diff --git a/libfreerdp/core/graphics.c b/libfreerdp/core/graphics.c index 324484777..cc574ce9a 100644 --- a/libfreerdp/core/graphics.c +++ b/libfreerdp/core/graphics.c @@ -33,7 +33,7 @@ rdpBitmap* Bitmap_Alloc(rdpContext* context) rdpGraphics* graphics; graphics = context->graphics; - bitmap = (rdpBitmap*) xmalloc(graphics->Bitmap_Prototype->size); + bitmap = (rdpBitmap*) malloc(graphics->Bitmap_Prototype->size); if (bitmap != NULL) { @@ -56,9 +56,9 @@ void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap) bitmap->Free(context, bitmap); if (bitmap->data != NULL) - xfree(bitmap->data); + free(bitmap->data); - xfree(bitmap); + free(bitmap); } } @@ -95,7 +95,7 @@ rdpPointer* Pointer_Alloc(rdpContext* context) rdpGraphics* graphics; graphics = context->graphics; - pointer = (rdpPointer*) xmalloc(graphics->Pointer_Prototype->size); + pointer = (rdpPointer*) malloc(graphics->Pointer_Prototype->size); if (pointer != NULL) { @@ -117,12 +117,12 @@ void Pointer_Free(rdpContext* context, rdpPointer* pointer) pointer->Free(context, pointer); if (pointer->xorMaskData) - xfree(pointer->xorMaskData); + free(pointer->xorMaskData); if (pointer->andMaskData) - xfree(pointer->andMaskData); + free(pointer->andMaskData); - xfree(pointer); + free(pointer); } } @@ -155,7 +155,7 @@ rdpGlyph* Glyph_Alloc(rdpContext* context) rdpGraphics* graphics; graphics = context->graphics; - glyph = (rdpGlyph*) xmalloc(graphics->Glyph_Prototype->size); + glyph = (rdpGlyph*) malloc(graphics->Glyph_Prototype->size); if (glyph != NULL) { @@ -230,9 +230,9 @@ void graphics_free(rdpGraphics* graphics) { if (graphics != NULL) { - xfree(graphics->Bitmap_Prototype); - xfree(graphics->Pointer_Prototype); - xfree(graphics->Glyph_Prototype); - xfree(graphics); + free(graphics->Bitmap_Prototype); + free(graphics->Pointer_Prototype); + free(graphics->Glyph_Prototype); + free(graphics); } } diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index b9c7ceda4..2b5a2840d 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -42,7 +42,7 @@ HttpContext* http_context_new() void http_context_set_method(HttpContext* http_context, char* method) { if (http_context->Method) - xfree(http_context->Method); + free(http_context->Method); http_context->Method = xstrdup(method); } @@ -50,7 +50,7 @@ void http_context_set_method(HttpContext* http_context, char* method) void http_context_set_uri(HttpContext* http_context, char* uri) { if (http_context->URI) - xfree(http_context->URI); + free(http_context->URI); http_context->URI = xstrdup(uri); } @@ -58,7 +58,7 @@ void http_context_set_uri(HttpContext* http_context, char* uri) void http_context_set_user_agent(HttpContext* http_context, char* user_agent) { if (http_context->UserAgent) - xfree(http_context->UserAgent); + free(http_context->UserAgent); http_context->UserAgent = xstrdup(user_agent); } @@ -66,7 +66,7 @@ void http_context_set_user_agent(HttpContext* http_context, char* user_agent) void http_context_set_host(HttpContext* http_context, char* host) { if (http_context->Host) - xfree(http_context->Host); + free(http_context->Host); http_context->Host = xstrdup(host); } @@ -74,7 +74,7 @@ void http_context_set_host(HttpContext* http_context, char* host) void http_context_set_accept(HttpContext* http_context, char* accept) { if (http_context->Accept) - xfree(http_context->Accept); + free(http_context->Accept); http_context->Accept = xstrdup(accept); } @@ -82,7 +82,7 @@ void http_context_set_accept(HttpContext* http_context, char* accept) void http_context_set_cache_control(HttpContext* http_context, char* cache_control) { if (http_context->CacheControl) - xfree(http_context->CacheControl); + free(http_context->CacheControl); http_context->CacheControl = xstrdup(cache_control); } @@ -90,7 +90,7 @@ void http_context_set_cache_control(HttpContext* http_context, char* cache_contr void http_context_set_connection(HttpContext* http_context, char* connection) { if (http_context->Connection) - xfree(http_context->Connection); + free(http_context->Connection); http_context->Connection = xstrdup(connection); } @@ -98,7 +98,7 @@ void http_context_set_connection(HttpContext* http_context, char* connection) void http_context_set_pragma(HttpContext* http_context, char* pragma) { if (http_context->Pragma) - xfree(http_context->Pragma); + free(http_context->Pragma); http_context->Pragma = xstrdup(pragma); } @@ -107,20 +107,20 @@ void http_context_free(HttpContext* http_context) { if (http_context != NULL) { - xfree(http_context->UserAgent); - xfree(http_context->Host); - xfree(http_context->Accept); - xfree(http_context->CacheControl); - xfree(http_context->Connection); - xfree(http_context->Pragma); - xfree(http_context); + free(http_context->UserAgent); + free(http_context->Host); + free(http_context->Accept); + free(http_context->CacheControl); + free(http_context->Connection); + free(http_context->Pragma); + free(http_context); } } void http_request_set_method(HttpRequest* http_request, char* method) { if (http_request->Method) - xfree(http_request->Method); + free(http_request->Method); http_request->Method = xstrdup(method); } @@ -128,7 +128,7 @@ void http_request_set_method(HttpRequest* http_request, char* method) void http_request_set_uri(HttpRequest* http_request, char* uri) { if (http_request->URI) - xfree(http_request->URI); + free(http_request->URI); http_request->URI = xstrdup(uri); } @@ -136,7 +136,7 @@ void http_request_set_uri(HttpRequest* http_request, char* uri) void http_request_set_auth_scheme(HttpRequest* http_request, char* auth_scheme) { if (http_request->AuthScheme) - xfree(http_request->AuthScheme); + free(http_request->AuthScheme); http_request->AuthScheme = xstrdup(auth_scheme); } @@ -144,7 +144,7 @@ void http_request_set_auth_scheme(HttpRequest* http_request, char* auth_scheme) void http_request_set_auth_param(HttpRequest* http_request, char* auth_param) { if (http_request->AuthParam) - xfree(http_request->AuthParam); + free(http_request->AuthParam); http_request->AuthParam = xstrdup(auth_param); } @@ -261,11 +261,11 @@ STREAM* http_request_write(HttpContext* http_context, HttpRequest* http_request) { stream_write(s, http_request->lines[i], strlen(http_request->lines[i])); stream_write(s, "\n", 1); - xfree(http_request->lines[i]); + free(http_request->lines[i]); } stream_write(s, "\n", 1); - xfree(http_request->lines); + free(http_request->lines); stream_write(s, "\0", 1); /* append null terminator */ stream_rewind(s, 1); /* don't include null terminator in length */ @@ -290,9 +290,9 @@ void http_request_free(HttpRequest* http_request) { if (http_request != NULL) { - xfree(http_request->Method); - xfree(http_request->URI); - xfree(http_request); + free(http_request->Method); + free(http_request->URI); + free(http_request); } } @@ -420,7 +420,7 @@ HttpResponse* http_response_recv(rdpTls* tls) nbytes = 0; length = 10000; - buffer = xmalloc(length); + buffer = malloc(length); http_response = http_response_new(); p = buffer; @@ -466,7 +466,7 @@ HttpResponse* http_response_recv(rdpTls* tls) } http_response->count = count; - http_response->lines = (char**) xmalloc(sizeof(char*) * http_response->count); + http_response->lines = (char**) malloc(sizeof(char*) * http_response->count); count = 0; line = strtok((char*) buffer, "\r\n"); @@ -491,12 +491,12 @@ HttpResponse* http_response_recv(rdpTls* tls) if ((length - nbytes) <= 0) { length *= 2; - buffer = xrealloc(buffer, length); + buffer = realloc(buffer, length); p = (uint8*) &buffer[nbytes]; } } - xfree(buffer); + free(buffer); return http_response; } @@ -520,19 +520,19 @@ void http_response_free(HttpResponse* http_response) if (http_response != NULL) { for (i = 0; i < http_response->count; i++) - xfree(http_response->lines[i]); + free(http_response->lines[i]); - xfree(http_response->lines); + free(http_response->lines); - xfree(http_response->ReasonPhrase); + free(http_response->ReasonPhrase); - xfree(http_response->AuthParam); - xfree(http_response->AuthScheme); - xfree(http_response->Authorization); + free(http_response->AuthParam); + free(http_response->AuthScheme); + free(http_response->Authorization); if (http_response->ContentLength > 0) - xfree(http_response->Content); + free(http_response->Content); - xfree(http_response); + free(http_response); } } diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index cb0ba8267..432a77ca4 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -132,7 +132,7 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) return false; if (settings->client_dir) - xfree(settings->client_dir); + free(settings->client_dir); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->client_dir, cbClientDir / 2); stream_seek(s, cbClientDir); @@ -205,8 +205,8 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) /* reserved1 (2 bytes) */ /* reserved2 (2 bytes) */ - xfree(clientAddress); - xfree(clientDir); + free(clientAddress); + free(clientDir); } /** @@ -399,13 +399,13 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) stream_write(s, workingDir, cbWorkingDir); stream_write_uint16(s, 0); - xfree(domain); - xfree(userName); - xfree(alternateShell); - xfree(workingDir); + free(domain); + free(userName); + free(alternateShell); + free(workingDir); if (!usedPasswordCookie) - xfree(password); + free(password); if (settings->rdp_version >= 5) rdp_write_extended_info_packet(s, settings); /* extraInfo */ diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 0c69ae54d..3aaa975ab 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -437,6 +437,6 @@ void input_free(rdpInput* input) { if (input != NULL) { - xfree(input); + free(input); } } diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index d22284d09..0980d619a 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -331,7 +331,7 @@ void license_encrypt_premaster_secret(rdpLicense* license) freerdp_hexdump(exponent, 4); #endif - encrypted_premaster_secret = (uint8*) xmalloc(MODULUS_MAX_SIZE); + encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE); memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE); crypto_rsa_public_encrypt(license->premaster_secret, PREMASTER_SECRET_LENGTH, @@ -341,7 +341,7 @@ void license_encrypt_premaster_secret(rdpLicense* license) license->encrypted_premaster_secret->length = PREMASTER_SECRET_LENGTH; license->encrypted_premaster_secret->data = encrypted_premaster_secret; #else - encrypted_premaster_secret = (uint8*) xmalloc(MODULUS_MAX_SIZE); + encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE); memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE); license->encrypted_premaster_secret->type = BB_RANDOM_BLOB; @@ -355,7 +355,7 @@ void license_decrypt_platform_challenge(rdpLicense* license) CryptoRc4 rc4; license->platform_challenge->data = - (uint8*) xmalloc(license->encrypted_platform_challenge->length); + (uint8*) malloc(license->encrypted_platform_challenge->length); license->platform_challenge->length = license->encrypted_platform_challenge->length; @@ -390,12 +390,12 @@ void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo) stream_read_uint32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */ - productInfo->pbCompanyName = (uint8*) xmalloc(productInfo->cbCompanyName); + productInfo->pbCompanyName = (uint8*) malloc(productInfo->cbCompanyName); stream_read(s, productInfo->pbCompanyName, productInfo->cbCompanyName); stream_read_uint32(s, productInfo->cbProductId); /* cbProductId (4 bytes) */ - productInfo->pbProductId = (uint8*) xmalloc(productInfo->cbProductId); + productInfo->pbProductId = (uint8*) malloc(productInfo->cbProductId); stream_read(s, productInfo->pbProductId, productInfo->cbProductId); } @@ -409,7 +409,7 @@ PRODUCT_INFO* license_new_product_info() { PRODUCT_INFO* productInfo; - productInfo = (PRODUCT_INFO*) xmalloc(sizeof(PRODUCT_INFO)); + productInfo = (PRODUCT_INFO*) malloc(sizeof(PRODUCT_INFO)); productInfo->dwVersion = 0; productInfo->cbCompanyName = 0; @@ -429,12 +429,12 @@ PRODUCT_INFO* license_new_product_info() void license_free_product_info(PRODUCT_INFO* productInfo) { if (productInfo->pbCompanyName != NULL) - xfree(productInfo->pbCompanyName); + free(productInfo->pbCompanyName); if (productInfo->pbProductId != NULL) - xfree(productInfo->pbProductId); + free(productInfo->pbProductId); - xfree(productInfo); + free(productInfo); } /** @@ -464,7 +464,7 @@ void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob) } blob->type = wBlobType; - blob->data = (uint8*) xmalloc(blob->length); + blob->data = (uint8*) malloc(blob->length); stream_read(s, blob->data, blob->length); /* blobData */ } @@ -509,7 +509,7 @@ LICENSE_BLOB* license_new_binary_blob(uint16 type) { LICENSE_BLOB* blob; - blob = (LICENSE_BLOB*) xmalloc(sizeof(LICENSE_BLOB)); + blob = (LICENSE_BLOB*) malloc(sizeof(LICENSE_BLOB)); blob->type = type; blob->length = 0; blob->data = NULL; @@ -526,9 +526,9 @@ LICENSE_BLOB* license_new_binary_blob(uint16 type) void license_free_binary_blob(LICENSE_BLOB* blob) { if (blob->data != NULL) - xfree(blob->data); + free(blob->data); - xfree(blob); + free(blob); } /** @@ -546,7 +546,7 @@ void license_read_scope_list(STREAM* s, SCOPE_LIST* scopeList) stream_read_uint32(s, scopeCount); /* ScopeCount (4 bytes) */ scopeList->count = scopeCount; - scopeList->array = (LICENSE_BLOB*) xmalloc(sizeof(LICENSE_BLOB) * scopeCount); + scopeList->array = (LICENSE_BLOB*) malloc(sizeof(LICENSE_BLOB) * scopeCount); /* ScopeArray */ for (i = 0; i < scopeCount; i++) @@ -566,7 +566,7 @@ SCOPE_LIST* license_new_scope_list() { SCOPE_LIST* scopeList; - scopeList = (SCOPE_LIST*) xmalloc(sizeof(SCOPE_LIST)); + scopeList = (SCOPE_LIST*) malloc(sizeof(SCOPE_LIST)); scopeList->count = 0; scopeList->array = NULL; @@ -585,18 +585,18 @@ void license_free_scope_list(SCOPE_LIST* scopeList) /* * We must NOT call license_free_binary_blob() on each scopelist->array[i] element, - * because scopelist->array was allocated at once, by a single call to xmalloc. The elements + * because scopelist->array was allocated at once, by a single call to malloc. The elements * it contains cannot be deallocated separately then. * To make things clean, we must deallocate each scopelist->array[].data, - * and finish by deallocating scopelist->array with a single call to xfree(). + * and finish by deallocating scopelist->array with a single call to free(). */ for (i = 0; i < scopeList->count; i++) { - xfree(scopeList->array[i].data); + free(scopeList->array[i].data); } - xfree(scopeList->array) ; - xfree(scopeList); + free(scopeList->array) ; + free(scopeList); } /** @@ -836,13 +836,13 @@ void license_send_platform_challenge_response_packet(rdpLicense* license) license->encrypted_platform_challenge->type = BB_DATA_BLOB; length = license->platform_challenge->length + HWID_LENGTH; - buffer = (uint8*) xmalloc(length); + buffer = (uint8*) malloc(length); memcpy(buffer, license->platform_challenge->data, license->platform_challenge->length); memcpy(&buffer[license->platform_challenge->length], license->hwid, HWID_LENGTH); security_mac_data(license->mac_salt_key, buffer, length, mac_data); - xfree(buffer); + free(buffer); - buffer = (uint8*) xmalloc(HWID_LENGTH); + buffer = (uint8*) malloc(HWID_LENGTH); rc4 = crypto_rc4_init(license->licensing_encryption_key, LICENSING_ENCRYPTION_KEY_LENGTH); crypto_rc4(rc4, HWID_LENGTH, license->hwid, buffer); crypto_rc4_free(rc4); @@ -945,7 +945,7 @@ void license_free(rdpLicense* license) license_free_binary_blob(license->encrypted_premaster_secret); license_free_binary_blob(license->encrypted_hwid); license_free_scope_list(license->scope_list); - xfree(license); + free(license); } } diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index b78e0bca9..63ed52c84 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -332,8 +332,8 @@ void freerdp_listener_free(freerdp_listener* instance) rdpListener* listener; listener = (rdpListener*) instance->listener; - xfree(listener); + free(listener); - xfree(instance); + free(instance); } diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index b55bcb6e8..0320964c2 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -836,6 +836,6 @@ void mcs_free(rdpMcs* mcs) { if (mcs != NULL) { - xfree(mcs); + free(mcs); } } diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index 9b7cd70ca..f9d0338fb 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -266,7 +266,7 @@ boolean nego_send_preconnection_pdu(rdpNego* nego) if (wszPCB) { stream_write(s, wszPCB, cchPCB * 2); /* wszPCB */ - xfree(wszPCB); + free(wszPCB); } if (transport_write(nego->transport, s) < 0) @@ -831,7 +831,7 @@ rdpNego* nego_new(struct rdp_transport * transport) void nego_free(rdpNego* nego) { - xfree(nego); + free(nego); } /** diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index 5d1af4567..552722372 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -779,9 +779,9 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER stream_read_uint8(s, polyline->cbData); if (polyline->points == NULL) - polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->numPoints); + polyline->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polyline->numPoints); else - polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->numPoints); + polyline->points = (DELTA_POINT*) realloc(polyline->points, sizeof(DELTA_POINT) * polyline->numPoints); update_read_delta_points(s, polyline->points, polyline->numPoints, polyline->xStart, polyline->yStart); } @@ -1056,7 +1056,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O if ((fast_glyph->cbData > 1) && (fast_glyph->glyph_data == NULL)) { /* parse optional glyph data */ - glyph = (GLYPH_DATA_V2*) xmalloc(sizeof(GLYPH_DATA_V2)); + glyph = (GLYPH_DATA_V2*) malloc(sizeof(GLYPH_DATA_V2)); glyph->cacheIndex = fast_glyph->data[0]; update_read_2byte_signed(s, &glyph->x); update_read_2byte_signed(s, &glyph->y); @@ -1064,7 +1064,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O update_read_2byte_unsigned(s, &glyph->cy); glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) xmalloc(glyph->cb); + glyph->aj = (uint8*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); fast_glyph->glyph_data = glyph; } @@ -1097,9 +1097,9 @@ void update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_O stream_read_uint8(s, polygon_sc->cbData); if (polygon_sc->points == NULL) - polygon_sc->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polygon_sc->numPoints); + polygon_sc->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_sc->numPoints); else - polygon_sc->points = (DELTA_POINT*) xrealloc(polygon_sc->points, sizeof(DELTA_POINT) * polygon_sc->numPoints); + polygon_sc->points = (DELTA_POINT*) realloc(polygon_sc->points, sizeof(DELTA_POINT) * polygon_sc->numPoints); update_read_delta_points(s, polygon_sc->points, polygon_sc->numPoints, polygon_sc->xStart, polygon_sc->yStart); } @@ -1135,9 +1135,9 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O stream_read_uint8(s, polygon_cb->cbData); if (polygon_cb->points == NULL) - polygon_cb->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polygon_cb->numPoints); + polygon_cb->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_cb->numPoints); else - polygon_cb->points = (DELTA_POINT*) xrealloc(polygon_cb->points, sizeof(DELTA_POINT) * polygon_cb->numPoints); + polygon_cb->points = (DELTA_POINT*) realloc(polygon_cb->points, sizeof(DELTA_POINT) * polygon_cb->numPoints); update_read_delta_points(s, polygon_cb->points, polygon_cb->numPoints, polygon_cb->xStart, polygon_cb->yStart); } @@ -1311,9 +1311,9 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b stream_read_uint32(s, bitmapData->length); /* length (4 bytes) */ if (bitmapData->data == NULL) - bitmapData->data = (uint8*) xmalloc(bitmapData->length); + bitmapData->data = (uint8*) malloc(bitmapData->length); else - bitmapData->data = (uint8*) xrealloc(bitmapData->data, bitmapData->length); + bitmapData->data = (uint8*) realloc(bitmapData->data, bitmapData->length); stream_read(s, bitmapData->data, bitmapData->length); } @@ -1329,9 +1329,9 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac colorTable = cache_color_table_order->colorTable; if (colorTable == NULL) - colorTable = (uint32*) xmalloc(cache_color_table_order->numberColors * 4); + colorTable = (uint32*) malloc(cache_color_table_order->numberColors * 4); else - colorTable = (uint32*) xrealloc(colorTable, cache_color_table_order->numberColors * 4); + colorTable = (uint32*) realloc(colorTable, cache_color_table_order->numberColors * 4); for (i = 0; i < (int) cache_color_table_order->numberColors; i++) { @@ -1354,7 +1354,7 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord { if (cache_glyph_order->glyphData[i] == NULL) { - cache_glyph_order->glyphData[i] = (GLYPH_DATA*) xmalloc(sizeof(GLYPH_DATA)); + cache_glyph_order->glyphData[i] = (GLYPH_DATA*) malloc(sizeof(GLYPH_DATA)); } glyph = cache_glyph_order->glyphData[i]; @@ -1369,7 +1369,7 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) xmalloc(glyph->cb); + glyph->aj = (uint8*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); } @@ -1391,7 +1391,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly { if (cache_glyph_v2_order->glyphData[i] == NULL) { - cache_glyph_v2_order->glyphData[i] = (GLYPH_DATA_V2*) xmalloc(sizeof(GLYPH_DATA_V2)); + cache_glyph_v2_order->glyphData[i] = (GLYPH_DATA_V2*) malloc(sizeof(GLYPH_DATA_V2)); } glyph = cache_glyph_v2_order->glyphData[i]; @@ -1404,7 +1404,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) xmalloc(glyph->cb); + glyph->aj = (uint8*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); } @@ -1462,7 +1462,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord { size = (cache_brush_order->bpp == 1) ? 8 : 8 * 8 * cache_brush_order->bpp; - cache_brush_order->data = (uint8*) xmalloc(size); + cache_brush_order->data = (uint8*) malloc(size); if (cache_brush_order->bpp == 1) { @@ -1532,7 +1532,7 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA if (deleteList->cIndices > deleteList->sIndices) { deleteList->sIndices = deleteList->cIndices; - deleteList->indices = xrealloc(deleteList->indices, deleteList->sIndices * 2); + deleteList->indices = realloc(deleteList->indices, deleteList->sIndices * 2); } for (i = 0; i < (int) deleteList->cIndices; i++) diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index c1c0f86e2..d9cbcf532 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -415,7 +415,7 @@ void freerdp_peer_free(freerdp_peer* client) if (client) { rdp_free(client->context->rdp); - xfree(client->context); - xfree(client); + free(client->context); + free(client); } } diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 5f5d65b26..b5aa423e5 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -966,7 +966,7 @@ void rdp_free(rdpRdp* rdp) redirection_free(rdp->redirection); mppc_dec_free(rdp->mppc_dec); mppc_enc_free(rdp->mppc_enc); - xfree(rdp); + free(rdp); } } diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 6c8673ac6..6895ccd9a 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -216,10 +216,10 @@ void redirection_free(rdpRedirection* redirection) for (i = 0; i < (int) redirection->targetNetAddressesCount; i++) freerdp_string_free(&redirection->targetNetAddresses[i]); - xfree(redirection->targetNetAddresses); + free(redirection->targetNetAddresses); } - xfree(redirection); + free(redirection); } } diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index 9124c9952..319a7b1e5 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -104,7 +104,7 @@ boolean ntlm_authenticate(rdpNtlm* ntlm) ntlm->outputBufferDesc.pBuffers = &ntlm->outputBuffer; ntlm->outputBuffer.BufferType = SECBUFFER_TOKEN; ntlm->outputBuffer.cbBuffer = ntlm->cbMaxToken; - ntlm->outputBuffer.pvBuffer = xmalloc(ntlm->outputBuffer.cbBuffer); + ntlm->outputBuffer.pvBuffer = malloc(ntlm->outputBuffer.cbBuffer); if (ntlm->haveInputBuffer) { @@ -204,7 +204,7 @@ STREAM* rpc_ntlm_http_request(rdpRpc* rpc, SecBuffer* ntlm_token, int content_le s = http_request_write(http_context, http_request); http_request_free(http_request); - xfree(base64_ntlm_token); + free(base64_ntlm_token); return s; } @@ -392,7 +392,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) bind_pdu->p_context_elem.n_context_elem = 2; bind_pdu->p_context_elem.reserved = 0; bind_pdu->p_context_elem.reserved2 = 0; - bind_pdu->p_context_elem.p_cont_elem = xmalloc(sizeof(p_cont_elem_t) * bind_pdu->p_context_elem.n_context_elem); + bind_pdu->p_context_elem.p_cont_elem = malloc(sizeof(p_cont_elem_t) * bind_pdu->p_context_elem.n_context_elem); bind_pdu->p_context_elem.p_cont_elem[0].p_cont_id = 0; bind_pdu->p_context_elem.p_cont_elem[0].n_transfer_syn = 1; bind_pdu->p_context_elem.p_cont_elem[0].reserved = 0; @@ -408,7 +408,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) bind_pdu->p_context_elem.p_cont_elem[0].abstract_syntax.if_uuid.node[4] = 0x27; bind_pdu->p_context_elem.p_cont_elem[0].abstract_syntax.if_uuid.node[5] = 0x29; bind_pdu->p_context_elem.p_cont_elem[0].abstract_syntax.if_version = 0x00030001; - bind_pdu->p_context_elem.p_cont_elem[0].transfer_syntaxes = xmalloc(sizeof(p_syntax_id_t)); + bind_pdu->p_context_elem.p_cont_elem[0].transfer_syntaxes = malloc(sizeof(p_syntax_id_t)); bind_pdu->p_context_elem.p_cont_elem[0].transfer_syntaxes[0].if_uuid.time_low = 0x8a885d04; bind_pdu->p_context_elem.p_cont_elem[0].transfer_syntaxes[0].if_uuid.time_mid = 0x1ceb; bind_pdu->p_context_elem.p_cont_elem[0].transfer_syntaxes[0].if_uuid.time_hi_and_version = 0x11c9; @@ -436,7 +436,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) bind_pdu->p_context_elem.p_cont_elem[1].abstract_syntax.if_uuid.node[4] = 0x27; bind_pdu->p_context_elem.p_cont_elem[1].abstract_syntax.if_uuid.node[5] = 0x29; bind_pdu->p_context_elem.p_cont_elem[1].abstract_syntax.if_version = 0x00030001; - bind_pdu->p_context_elem.p_cont_elem[1].transfer_syntaxes = xmalloc(sizeof(p_syntax_id_t)); + bind_pdu->p_context_elem.p_cont_elem[1].transfer_syntaxes = malloc(sizeof(p_syntax_id_t)); bind_pdu->p_context_elem.p_cont_elem[1].transfer_syntaxes[0].if_uuid.time_low = 0x6cb71c2c; bind_pdu->p_context_elem.p_cont_elem[1].transfer_syntaxes[0].if_uuid.time_mid = 0x9812; bind_pdu->p_context_elem.p_cont_elem[1].transfer_syntaxes[0].if_uuid.time_hi_and_version = 0x4540; @@ -455,7 +455,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) bind_pdu->auth_verifier.auth_pad_length = 0x00; /* :01 */ bind_pdu->auth_verifier.auth_reserved = 0x00; /* :01 reserved, m.b.z. */ bind_pdu->auth_verifier.auth_context_id = 0x00000000; /* :04 */ - bind_pdu->auth_verifier.auth_value = xmalloc(bind_pdu->auth_length); /* credentials; size_is(auth_length) p*/; + bind_pdu->auth_verifier.auth_value = malloc(bind_pdu->auth_length); /* credentials; size_is(auth_length) p*/; memcpy(bind_pdu->auth_verifier.auth_value, ntlm_stream->data, bind_pdu->auth_length); stream_free(ntlm_stream); @@ -479,7 +479,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) rpc_in_write(rpc, pdu->data, pdu->size); stream_free(pdu) ; - xfree(bind_pdu); + free(bind_pdu); return true; } @@ -494,7 +494,7 @@ int rpc_recv_bind_ack_pdu(rdpRpc* rpc) RPC_PDU_HEADER header; int pdu_length = 0x8FFF; - pdu = xmalloc(pdu_length); + pdu = malloc(pdu_length); if (pdu == NULL) return -1; @@ -509,11 +509,11 @@ int rpc_recv_bind_ack_pdu(rdpRpc* rpc) stream_detach(s); stream_free(s); - auth_data = xmalloc(header.auth_length); + auth_data = malloc(header.auth_length); if (auth_data == NULL) { - xfree(pdu); + free(pdu); return -1; } @@ -526,7 +526,7 @@ int rpc_recv_bind_ack_pdu(rdpRpc* rpc) ntlm_authenticate(rpc->ntlm); } - xfree(pdu); + free(pdu); return status; } @@ -562,7 +562,7 @@ boolean rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) rpc_auth_3_pdu->auth_verifier.auth_pad_length = 0x00; /* :01 */ rpc_auth_3_pdu->auth_verifier.auth_reserved = 0x00; /* :01 reserved, m.b.z. */ rpc_auth_3_pdu->auth_verifier.auth_context_id = 0x00000000; /* :04 */ - rpc_auth_3_pdu->auth_verifier.auth_value = xmalloc(rpc_auth_3_pdu->auth_length); /* credentials; size_is(auth_length) p */ + rpc_auth_3_pdu->auth_verifier.auth_value = malloc(rpc_auth_3_pdu->auth_length); /* credentials; size_is(auth_length) p */ memcpy(rpc_auth_3_pdu->auth_verifier.auth_value, s->data, rpc_auth_3_pdu->auth_length); stream_free(s); @@ -580,7 +580,7 @@ boolean rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) rpc_in_write(rpc, pdu->data, stream_get_length(pdu)); stream_free(pdu) ; - xfree(rpc_auth_3_pdu); + free(rpc_auth_3_pdu); return true; } @@ -596,7 +596,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) if (rpc->VirtualConnection->DefaultOutChannel->ReceiverAvailableWindow < 0x00008FFF) /* Just a simple workaround */ rts_send_flow_control_ack_pdu(rpc); /* Send FlowControlAck every time AvailableWindow reaches the half */ - pdu = xmalloc(0xFFFF); + pdu = malloc(0xFFFF); if (pdu == NULL) { @@ -608,7 +608,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) if (status <= 0) { - xfree(pdu); + free(pdu); return status; } @@ -625,14 +625,14 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) if (status < 0) { - xfree(pdu); + free(pdu); return status; } if (header.ptype == PTYPE_RTS) /* RTS PDU */ { printf("rpc_out_read error: Unexpected RTS PDU\n"); - xfree(pdu); + free(pdu); return -1; } else @@ -645,7 +645,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) if (length < header.frag_length) { printf("rpc_out_read error! receive buffer is not large enough\n"); - xfree(pdu); + free(pdu); return -1; } @@ -657,7 +657,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) printf("\n"); #endif - xfree(pdu); + free(pdu); return header.frag_length; } @@ -704,7 +704,7 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) request_pdu->auth_verifier.auth_type = 0x0A; /* :01 which authentication service */ request_pdu->auth_verifier.auth_level = 0x05; /* :01 which level within service */ request_pdu->auth_verifier.auth_pad_length = auth_pad_length; /* :01 */ - request_pdu->auth_verifier.auth_pad = xmalloc(auth_pad_length); /* align(4); size_is(auth_pad_length) p */ + request_pdu->auth_verifier.auth_pad = malloc(auth_pad_length); /* align(4); size_is(auth_pad_length) p */ for (i = 0; i < auth_pad_length; i++) { @@ -713,7 +713,7 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) request_pdu->auth_verifier.auth_reserved = 0x00; /* :01 reserved, m.b.z. */ request_pdu->auth_verifier.auth_context_id = 0x00000000; /* :04 */ - request_pdu->auth_verifier.auth_value = xmalloc(request_pdu->auth_length); /* credentials; size_is(auth_length) p */ + request_pdu->auth_verifier.auth_value = malloc(request_pdu->auth_length); /* credentials; size_is(auth_length) p */ pdu = stream_new(request_pdu->frag_length); @@ -725,9 +725,9 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) stream_write(pdu, &request_pdu->auth_verifier.auth_type, 8); - xfree(request_pdu->auth_verifier.auth_value); - xfree(request_pdu->auth_verifier.auth_pad); - xfree(request_pdu); + free(request_pdu->auth_verifier.auth_value); + free(request_pdu->auth_verifier.auth_pad); + free(request_pdu); if (ntlm->table->QueryContextAttributes(&ntlm->context, SECPKG_ATTR_SIZES, &ntlm->ContextSizes) != SEC_E_OK) { @@ -783,7 +783,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) uint8 auth_pad_length; uint32 call_id = -1; int rpc_length = length + 0xFF; - uint8* rpc_data = xmalloc(rpc_length); + uint8* rpc_data = malloc(rpc_length); if (rpc_data == NULL) { @@ -796,13 +796,13 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) if (rpc->read_buffer_len > (uint32) length) { printf("rpc_read error: receiving buffer is not large enough\n"); - xfree(rpc_data); + free(rpc_data); return -1; } memcpy(data, rpc->read_buffer, rpc->read_buffer_len); read += rpc->read_buffer_len; - xfree(rpc->read_buffer); + free(rpc->read_buffer); rpc->read_buffer_len = 0; } @@ -812,7 +812,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) if (status == 0) { - xfree(rpc_data); + free(rpc_data); return read; } else if (status < 0) @@ -821,7 +821,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) rpc->VirtualConnection->DefaultInChannel->BytesSent, rpc->VirtualConnection->DefaultOutChannel->BytesReceived); - xfree(rpc_data); + free(rpc_data); return status; } @@ -840,7 +840,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) if (read + data_length > length) /* if read data is greater then given buffer */ { rpc->read_buffer_len = read + data_length - length; - rpc->read_buffer = xmalloc(rpc->read_buffer_len); + rpc->read_buffer = malloc(rpc->read_buffer_len); data_length -= rpc->read_buffer_len; @@ -857,7 +857,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) break; } - xfree(rpc_data); + free(rpc_data); return read; } @@ -924,7 +924,7 @@ void rpc_client_virtual_connection_free(RpcVirtualConnection* virtual_connection { if (virtual_connection != NULL) { - xfree(virtual_connection); + free(virtual_connection); } } @@ -1018,6 +1018,6 @@ void rpc_free(rdpRpc* rpc) ntlm_http_free(rpc->ntlm_http_in); ntlm_http_free(rpc->ntlm_http_out); rpc_client_virtual_connection_free(rpc->VirtualConnection); - xfree(rpc); + free(rpc); } } diff --git a/libfreerdp/core/rts.c b/libfreerdp/core/rts.c index f14fd66f3..687ca5bf1 100644 --- a/libfreerdp/core/rts.c +++ b/libfreerdp/core/rts.c @@ -688,7 +688,7 @@ int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu) stream_free(s); length = rts_pdu->header.frag_length - 20; - rts_pdu->content = (uint8*) xmalloc(length); + rts_pdu->content = (uint8*) malloc(length); status = tls_read(tls_out, rts_pdu->content, length); diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 45d0be19a..8b16c7c61 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -293,34 +293,34 @@ void settings_free(rdpSettings* settings) { if (settings != NULL) { - xfree(settings->hostname); - xfree(settings->username); - xfree(settings->password); - xfree(settings->domain); - xfree(settings->shell); - xfree(settings->directory); - xfree(settings->ip_address); - xfree(settings->client_dir); - xfree(settings->cert_file); - xfree(settings->privatekey_file); - xfree(settings->received_caps); - xfree(settings->order_support); - xfree(settings->client_hostname); - xfree(settings->client_product_id); - xfree(settings->server_random); - xfree(settings->server_certificate); - xfree(settings->rdp_key_file); + free(settings->hostname); + free(settings->username); + free(settings->password); + free(settings->domain); + free(settings->shell); + free(settings->directory); + free(settings->ip_address); + free(settings->client_dir); + free(settings->cert_file); + free(settings->privatekey_file); + free(settings->received_caps); + free(settings->order_support); + free(settings->client_hostname); + free(settings->client_product_id); + free(settings->server_random); + free(settings->server_certificate); + free(settings->rdp_key_file); certificate_free(settings->server_cert); - xfree(settings->client_auto_reconnect_cookie); - xfree(settings->server_auto_reconnect_cookie); - xfree(settings->client_time_zone); - xfree(settings->bitmapCacheV2CellInfo); - xfree(settings->glyphCache); - xfree(settings->fragCache); + free(settings->client_auto_reconnect_cookie); + free(settings->server_auto_reconnect_cookie); + free(settings->client_time_zone); + free(settings->bitmapCacheV2CellInfo); + free(settings->glyphCache); + free(settings->fragCache); key_free(settings->server_key); - xfree(settings->config_path); - xfree(settings->current_path); - xfree(settings->development_path); - xfree(settings); + free(settings->config_path); + free(settings->current_path); + free(settings->development_path); + free(settings); } } diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 9bd850584..b409e1fbd 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -257,6 +257,6 @@ void tcp_free(rdpTcp* tcp) { if (tcp != NULL) { - xfree(tcp); + free(tcp); } } diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index 0862d40e1..135c095b5 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -90,7 +90,7 @@ boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); stream_seek(s, 64); strncpy(clientTimeZone->standardName, str, sizeof(clientTimeZone->standardName)); - xfree(str); + free(str); rdp_read_system_time(s, &clientTimeZone->standardDate); /* StandardDate */ stream_read_uint32(s, clientTimeZone->standardBias); /* StandardBias */ @@ -99,7 +99,7 @@ boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); stream_seek(s, 64); strncpy(clientTimeZone->daylightName, str, sizeof(clientTimeZone->daylightName)); - xfree(str); + free(str); rdp_read_system_time(s, &clientTimeZone->daylightDate); /* DaylightDate */ stream_read_uint32(s, clientTimeZone->daylightBias); /* DaylightBias */ @@ -189,6 +189,6 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings) stream_write_uint32(s, bias2c); /* DaylightBias */ DEBUG_TIMEZONE("DaylightBias=%d", bias2c); - xfree(standardName); - xfree(daylightName); + free(standardName); + free(daylightName); } diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 231041f5f..02d5ff4e1 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -541,6 +541,6 @@ void transport_free(rdpTransport* transport) tcp_free(transport->tcp_in); tsg_free(transport->tsg); - xfree(transport); + free(transport); } } diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index 560f2c6c4..c19acde87 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -492,7 +492,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) } length = 0x8FFF; - data = xmalloc(length); + data = malloc(length); if (data == NULL) { printf("rpc_recv - memory allocation error\n") ; @@ -503,7 +503,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (status <= 0) { printf("rpc_recv failed!\n"); - xfree(data) ; + free(data) ; return false; } @@ -534,7 +534,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (status <= 0) { printf("rpc_write opnum=2 failed!\n"); - xfree(data) ; + free(data) ; return false; } @@ -543,7 +543,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (status <= 0) { printf("rpc_recv failed!\n"); - xfree(data) ; + free(data) ; return false; } @@ -566,7 +566,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (status <= 0) { printf("rpc_write opnum=3 failed!\n"); - xfree(data) ; + free(data) ; return false; } status = -1; @@ -584,7 +584,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) stream_write(s_p4, dest_addr_unic, dest_addr_unic_len); stream_write_uint16(s_p4, 0x0000); /* unicode zero to terminate hostname string */ - xfree(dest_addr_unic); + free(dest_addr_unic); /** * OpNum = 4 @@ -604,7 +604,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_write opnum=4 failed!\n"); stream_free(s_p4); - xfree(data); + free(data); return false; } @@ -614,7 +614,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_recv failed!\n"); stream_free(s_p4); - xfree(data); + free(data); return false; } @@ -643,12 +643,12 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_write opnum=8 failed!\n"); stream_free(s_p4); - xfree(data); + free(data); return false; } stream_free(s_p4); - xfree(data); + free(data); return true; } @@ -688,6 +688,6 @@ void tsg_free(rdpTsg* tsg) if (tsg != NULL) { rpc_free(tsg->rpc); - xfree(tsg); + free(tsg); } } diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 985b9d4d1..c8af9e302 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -101,7 +101,7 @@ void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_upda count = bitmap_update->number * 2; - bitmap_update->rectangles = (BITMAP_DATA*) xrealloc(bitmap_update->rectangles, + bitmap_update->rectangles = (BITMAP_DATA*) realloc(bitmap_update->rectangles, sizeof(BITMAP_DATA) * count); memset(&bitmap_update->rectangles[bitmap_update->count], 0, @@ -195,13 +195,13 @@ void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color) if (pointer_color->lengthXorMask > 0) { - pointer_color->xorMaskData = (uint8*) xmalloc(pointer_color->lengthXorMask); + pointer_color->xorMaskData = (uint8*) malloc(pointer_color->lengthXorMask); stream_read(s, pointer_color->xorMaskData, pointer_color->lengthXorMask); } if (pointer_color->lengthAndMask > 0) { - pointer_color->andMaskData = (uint8*) xmalloc(pointer_color->lengthAndMask); + pointer_color->andMaskData = (uint8*) malloc(pointer_color->lengthAndMask); stream_read(s, pointer_color->andMaskData, pointer_color->lengthAndMask); } @@ -635,7 +635,7 @@ rdpUpdate* update_new(rdpRdp* rdp) deleteList = &(update->altsec->create_offscreen_bitmap.deleteList); deleteList->sIndices = 64; - deleteList->indices = xmalloc(deleteList->sIndices * 2); + deleteList->indices = malloc(deleteList->sIndices * 2); deleteList->cIndices = 0; update->SuppressOutput = update_send_suppress_output; @@ -650,17 +650,17 @@ void update_free(rdpUpdate* update) { OFFSCREEN_DELETE_LIST* deleteList; deleteList = &(update->altsec->create_offscreen_bitmap.deleteList); - xfree(deleteList->indices); + free(deleteList->indices); - xfree(update->bitmap_update.rectangles); - xfree(update->pointer); - xfree(update->primary->polyline.points); - xfree(update->primary->polygon_sc.points); - xfree(update->primary); - xfree(update->secondary); - xfree(update->altsec); - xfree(update->window); - xfree(update); + free(update->bitmap_update.rectangles); + free(update->pointer); + free(update->primary->polyline.points); + free(update->primary->polygon_sc.points); + free(update->primary); + free(update->secondary); + free(update->altsec); + free(update->window); + free(update); } } diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c index 996eeadfd..20dad3902 100644 --- a/libfreerdp/core/window.c +++ b/libfreerdp/core/window.c @@ -46,23 +46,23 @@ void update_read_icon_info(STREAM* s, ICON_INFO* icon_info) /* bitsMask */ if (icon_info->bitsMask == NULL) - icon_info->bitsMask = (uint8*) xmalloc(icon_info->cbBitsMask); + icon_info->bitsMask = (uint8*) malloc(icon_info->cbBitsMask); else - icon_info->bitsMask = (uint8*) xrealloc(icon_info->bitsMask, icon_info->cbBitsMask); + icon_info->bitsMask = (uint8*) realloc(icon_info->bitsMask, icon_info->cbBitsMask); stream_read(s, icon_info->bitsMask, icon_info->cbBitsMask); /* colorTable */ if (icon_info->colorTable == NULL) - icon_info->colorTable = (uint8*) xmalloc(icon_info->cbColorTable); + icon_info->colorTable = (uint8*) malloc(icon_info->cbColorTable); else - icon_info->colorTable = (uint8*) xrealloc(icon_info->colorTable, icon_info->cbColorTable); + icon_info->colorTable = (uint8*) realloc(icon_info->colorTable, icon_info->cbColorTable); stream_read(s, icon_info->colorTable, icon_info->cbColorTable); /* bitsColor */ if (icon_info->bitsColor == NULL) - icon_info->bitsColor = (uint8*) xmalloc(icon_info->cbBitsColor); + icon_info->bitsColor = (uint8*) malloc(icon_info->cbBitsColor); else - icon_info->bitsColor = (uint8*) xrealloc(icon_info->bitsColor, icon_info->cbBitsColor); + icon_info->bitsColor = (uint8*) realloc(icon_info->bitsColor, icon_info->cbBitsColor); stream_read(s, icon_info->bitsColor, icon_info->cbBitsColor); } @@ -141,7 +141,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN stream_read_uint16(s, window_state->numWindowRects); /* numWindowRects (2 bytes) */ size = sizeof(RECTANGLE_16) * window_state->numWindowRects; - window_state->windowRects = (RECTANGLE_16*) xmalloc(size); + window_state->windowRects = (RECTANGLE_16*) malloc(size); /* windowRects */ for (i = 0; i < (int) window_state->numWindowRects; i++) @@ -164,7 +164,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN stream_read_uint16(s, window_state->numVisibilityRects); /* numVisibilityRects (2 bytes) */ size = sizeof(RECTANGLE_16) * window_state->numVisibilityRects; - window_state->visibilityRects = (RECTANGLE_16*) xmalloc(size); + window_state->visibilityRects = (RECTANGLE_16*) malloc(size); /* visibilityRects */ for (i = 0; i < (int) window_state->numVisibilityRects; i++) @@ -297,9 +297,9 @@ void update_read_desktop_actively_monitored_order(STREAM* s, WINDOW_ORDER_INFO* size = sizeof(uint32) * monitored_desktop->numWindowIds; if (monitored_desktop->windowIds == NULL) - monitored_desktop->windowIds = (uint32*) xmalloc(size); + monitored_desktop->windowIds = (uint32*) malloc(size); else - monitored_desktop->windowIds = (uint32*) xrealloc(monitored_desktop->windowIds, size); + monitored_desktop->windowIds = (uint32*) realloc(monitored_desktop->windowIds, size); /* windowIds */ for (i = 0; i < (int) monitored_desktop->numWindowIds; i++) diff --git a/libfreerdp/crypto/certificate.c b/libfreerdp/crypto/certificate.c index 61e0ab0f3..f60d6f0f7 100644 --- a/libfreerdp/crypto/certificate.c +++ b/libfreerdp/crypto/certificate.c @@ -93,11 +93,11 @@ int certificate_data_match(rdpCertificateStore* certificate_store, rdpCertificat if (size < 1) return match; - data = (char*) xmalloc(size + 2); + data = (char*) malloc(size + 2); if (fread(data, size, 1, fp) != 1) { - xfree(data); + free(data); return match; } @@ -128,7 +128,7 @@ int certificate_data_match(rdpCertificateStore* certificate_store, rdpCertificat pline = strtok(NULL, "\n"); } - xfree(data); + free(data); return match; } @@ -154,11 +154,11 @@ void certificate_data_replace(rdpCertificateStore* certificate_store, rdpCertifi if (size < 1) return; - data = (char*) xmalloc(size + 2); + data = (char*) malloc(size + 2); if (fread(data, size, 1, fp) != 1) { - xfree(data); + free(data); return; } @@ -192,7 +192,7 @@ void certificate_data_replace(rdpCertificateStore* certificate_store, rdpCertifi } fclose(fp); - xfree(data); + free(data); } void certificate_data_print(rdpCertificateStore* certificate_store, rdpCertificateData* certificate_data) @@ -228,9 +228,9 @@ void certificate_data_free(rdpCertificateData* certificate_data) { if (certificate_data != NULL) { - xfree(certificate_data->hostname); - xfree(certificate_data->fingerprint); - xfree(certificate_data); + free(certificate_data->hostname); + free(certificate_data->fingerprint); + free(certificate_data); } } @@ -256,8 +256,8 @@ void certificate_store_free(rdpCertificateStore* certstore) if (certstore->fp != NULL) fclose(certstore->fp); - xfree(certstore->path); - xfree(certstore->file); - xfree(certstore); + free(certstore->path); + free(certstore->file); + free(certstore); } } diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index a520e52e4..6caf93aa0 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -25,7 +25,7 @@ CryptoSha1 crypto_sha1_init(void) { - CryptoSha1 sha1 = xmalloc(sizeof(*sha1)); + CryptoSha1 sha1 = malloc(sizeof(*sha1)); SHA1_Init(&sha1->sha_ctx); return sha1; } @@ -38,12 +38,12 @@ void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length) void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data) { SHA1_Final(out_data, &sha1->sha_ctx); - xfree(sha1); + free(sha1); } CryptoMd5 crypto_md5_init(void) { - CryptoMd5 md5 = xmalloc(sizeof(*md5)); + CryptoMd5 md5 = malloc(sizeof(*md5)); MD5_Init(&md5->md5_ctx); return md5; } @@ -56,12 +56,12 @@ void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length) void crypto_md5_final(CryptoMd5 md5, uint8* out_data) { MD5_Final(out_data, &md5->md5_ctx); - xfree(md5); + free(md5); } CryptoRc4 crypto_rc4_init(const uint8* key, uint32 length) { - CryptoRc4 rc4 = xmalloc(sizeof(*rc4)); + CryptoRc4 rc4 = malloc(sizeof(*rc4)); RC4_set_key(&rc4->rc4_key, length, key); return rc4; } @@ -74,12 +74,12 @@ void crypto_rc4(CryptoRc4 rc4, uint32 length, const uint8* in_data, uint8* out_d void crypto_rc4_free(CryptoRc4 rc4) { if (rc4) - xfree(rc4); + free(rc4); } CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec) { - CryptoDes3 des3 = xmalloc(sizeof(*des3)); + CryptoDes3 des3 = malloc(sizeof(*des3)); EVP_CIPHER_CTX_init(&des3->des3_ctx); EVP_EncryptInit_ex(&des3->des3_ctx, EVP_des_ede3_cbc(), NULL, key, ivec); EVP_CIPHER_CTX_set_padding(&des3->des3_ctx, 0); @@ -88,7 +88,7 @@ CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec) CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec) { - CryptoDes3 des3 = xmalloc(sizeof(*des3)); + CryptoDes3 des3 = malloc(sizeof(*des3)); EVP_CIPHER_CTX_init(&des3->des3_ctx); EVP_DecryptInit_ex(&des3->des3_ctx, EVP_des_ede3_cbc(), NULL, key, ivec); EVP_CIPHER_CTX_set_padding(&des3->des3_ctx, 0); @@ -115,12 +115,12 @@ void crypto_des3_free(CryptoDes3 des3) if (des3 == NULL) return; EVP_CIPHER_CTX_cleanup(&des3->des3_ctx); - xfree(des3); + free(des3); } CryptoHmac crypto_hmac_new(void) { - CryptoHmac hmac = xmalloc(sizeof(*hmac)); + CryptoHmac hmac = malloc(sizeof(*hmac)); HMAC_CTX_init(&hmac->hmac_ctx); return hmac; } @@ -145,12 +145,12 @@ void crypto_hmac_free(CryptoHmac hmac) if (hmac == NULL) return; HMAC_CTX_cleanup(&hmac->hmac_ctx); - xfree(hmac); + free(hmac); } CryptoCert crypto_cert_read(uint8* data, uint32 length) { - CryptoCert cert = xmalloc(sizeof(*cert)); + CryptoCert cert = malloc(sizeof(*cert)); /* this will move the data pointer but we don't care, we don't use it again */ cert->px509 = d2i_X509(NULL, (D2I_X509_CONST uint8 **) &data, length); return cert; @@ -163,7 +163,7 @@ void crypto_cert_free(CryptoCert cert) X509_free(cert->px509); - xfree(cert); + free(cert); } boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength) @@ -213,7 +213,7 @@ static void crypto_rsa_common(const uint8* input, int length, uint32 key_length, uint8* exponent_reverse; BIGNUM mod, exp, x, y; - input_reverse = (uint8*) xmalloc(2 * key_length + exponent_size); + input_reverse = (uint8*) malloc(2 * key_length + exponent_size); modulus_reverse = input_reverse + key_length; exponent_reverse = modulus_reverse + key_length; @@ -246,7 +246,7 @@ static void crypto_rsa_common(const uint8* input, int length, uint32 key_length, BN_free(&exp); BN_free(&mod); BN_CTX_free(ctx); - xfree(input_reverse); + free(input_reverse); } static void crypto_rsa_public(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output) @@ -407,8 +407,8 @@ char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths) return NULL; num_subject_alt_names = sk_GENERAL_NAME_num(subject_alt_names); - strings = (char**) xmalloc(sizeof(char*) * num_subject_alt_names); - *lengths = (int*) xmalloc(sizeof(int*) * num_subject_alt_names); + strings = (char**) malloc(sizeof(char*) * num_subject_alt_names); + *lengths = (int*) malloc(sizeof(int*) * num_subject_alt_names); for (index = 0; index < num_subject_alt_names; ++index) { @@ -425,8 +425,8 @@ char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths) if (*count < 1) { - xfree(strings) ; - xfree(*lengths) ; + free(strings) ; + free(*lengths) ; *lengths = NULL ; return NULL; } @@ -497,7 +497,7 @@ rdpCertificateData* crypto_get_certificate_data(X509* xcert, char* hostname) fp = crypto_cert_fingerprint(xcert); certdata = certificate_data_new(hostname, fp); - xfree(fp); + free(fp); return certdata; } @@ -520,9 +520,9 @@ void crypto_cert_print_info(X509* xcert) "the CA certificate in your certificate store, or the certificate has expired. " "Please look at the documentation on how to create local certificate store for a private CA.\n"); - xfree(subject); - xfree(issuer); - xfree(fp); + free(subject); + free(issuer); + free(fp); } char* crypto_base64_encode(uint8* data, int length) @@ -543,7 +543,7 @@ char* crypto_base64_encode(uint8* data, int length) BIO_get_mem_ptr(b64, &bptr); - base64_string = xmalloc(bptr->length); + base64_string = malloc(bptr->length); memcpy(base64_string, bptr->data, bptr->length - 1); base64_string[bptr->length - 1] = '\0'; @@ -556,7 +556,7 @@ void crypto_base64_decode(uint8* enc_data, int length, uint8** dec_data, int* re { BIO *b64, *bmem; - *dec_data = xmalloc(length); + *dec_data = malloc(length); memset(*dec_data, 0, length); b64 = BIO_new(BIO_f_base64()); diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 8c8fd6f10..2462b6a7c 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -43,7 +43,7 @@ static CryptoCert tls_get_certificate(rdpTls* tls, boolean peer) } else { - cert = xmalloc(sizeof(*cert)); + cert = malloc(sizeof(*cert)); cert->px509 = server_cert; } @@ -53,7 +53,7 @@ static CryptoCert tls_get_certificate(rdpTls* tls, boolean peer) static void tls_free_certificate(CryptoCert cert) { X509_free(cert->px509); - xfree(cert); + free(cert); } boolean tls_connect(rdpTls* tls) @@ -241,7 +241,7 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi return false; } - xfree(cert); + free(cert); if (SSL_set_fd(tls->ssl, tls->sockfd) < 1) { @@ -476,7 +476,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) { if (common_name) { - xfree(common_name); + free(common_name); common_name = NULL; } @@ -550,16 +550,16 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) verification_status = true; /* success! */ } - xfree(issuer); - xfree(subject); - xfree(fingerprint); + free(issuer); + free(subject); + free(fingerprint); } if (certificate_data) { - xfree(certificate_data->fingerprint); - xfree(certificate_data->hostname); - xfree(certificate_data); + free(certificate_data->fingerprint); + free(certificate_data->hostname); + free(certificate_data); } return verification_status; @@ -644,6 +644,6 @@ void tls_free(rdpTls* tls) certificate_store_free(tls->certificate_store); - xfree(tls); + free(tls); } } diff --git a/libfreerdp/gdi/bitmap.c b/libfreerdp/gdi/bitmap.c index e2828caaa..4ca68ed2c 100644 --- a/libfreerdp/gdi/bitmap.c +++ b/libfreerdp/gdi/bitmap.c @@ -136,7 +136,7 @@ INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel) HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data) { - HGDI_BITMAP hBitmap = (HGDI_BITMAP) xmalloc(sizeof(GDI_BITMAP)); + HGDI_BITMAP hBitmap = (HGDI_BITMAP) malloc(sizeof(GDI_BITMAP)); hBitmap->objectType = GDIOBJECT_BITMAP; hBitmap->bitsPerPixel = cBitsPerPixel; hBitmap->bytesPerPixel = (cBitsPerPixel + 1) / 8; @@ -158,13 +158,13 @@ HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* HGDI_BITMAP gdi_CreateCompatibleBitmap(HGDI_DC hdc, int nWidth, int nHeight) { - HGDI_BITMAP hBitmap = (HGDI_BITMAP) xmalloc(sizeof(GDI_BITMAP)); + HGDI_BITMAP hBitmap = (HGDI_BITMAP) malloc(sizeof(GDI_BITMAP)); hBitmap->objectType = GDIOBJECT_BITMAP; hBitmap->bytesPerPixel = hdc->bytesPerPixel; hBitmap->bitsPerPixel = hdc->bitsPerPixel; hBitmap->width = nWidth; hBitmap->height = nHeight; - hBitmap->data = xmalloc(nWidth * nHeight * hBitmap->bytesPerPixel); + hBitmap->data = malloc(nWidth * nHeight * hBitmap->bytesPerPixel); hBitmap->scanline = nWidth * hBitmap->bytesPerPixel; return hBitmap; } diff --git a/libfreerdp/gdi/brush.c b/libfreerdp/gdi/brush.c index a93312c81..c92099306 100644 --- a/libfreerdp/gdi/brush.c +++ b/libfreerdp/gdi/brush.c @@ -55,7 +55,7 @@ p_PatBlt PatBlt_[5] = HGDI_BRUSH gdi_CreateSolidBrush(GDI_COLOR crColor) { - HGDI_BRUSH hBrush = (HGDI_BRUSH) xmalloc(sizeof(GDI_BRUSH)); + HGDI_BRUSH hBrush = (HGDI_BRUSH) malloc(sizeof(GDI_BRUSH)); hBrush->objectType = GDIOBJECT_BRUSH; hBrush->style = GDI_BS_SOLID; hBrush->color = crColor; @@ -71,7 +71,7 @@ HGDI_BRUSH gdi_CreateSolidBrush(GDI_COLOR crColor) HGDI_BRUSH gdi_CreatePatternBrush(HGDI_BITMAP hbmp) { - HGDI_BRUSH hBrush = (HGDI_BRUSH) xmalloc(sizeof(GDI_BRUSH)); + HGDI_BRUSH hBrush = (HGDI_BRUSH) malloc(sizeof(GDI_BRUSH)); hBrush->objectType = GDIOBJECT_BRUSH; hBrush->style = GDI_BS_PATTERN; hBrush->pattern = hbmp; diff --git a/libfreerdp/gdi/dc.c b/libfreerdp/gdi/dc.c index f08330820..4c814ebfc 100644 --- a/libfreerdp/gdi/dc.c +++ b/libfreerdp/gdi/dc.c @@ -44,7 +44,7 @@ HGDI_DC gdi_GetDC() { - HGDI_DC hDC = (HGDI_DC) xmalloc(sizeof(GDI_DC)); + HGDI_DC hDC = (HGDI_DC) malloc(sizeof(GDI_DC)); hDC->bytesPerPixel = 4; hDC->bitsPerPixel = 32; hDC->drawMode = GDI_R2_BLACK; @@ -62,7 +62,7 @@ HGDI_DC gdi_GetDC() HGDI_DC gdi_CreateDC(HCLRCONV clrconv, int bpp) { - HGDI_DC hDC = (HGDI_DC) xmalloc(sizeof(GDI_DC)); + HGDI_DC hDC = (HGDI_DC) malloc(sizeof(GDI_DC)); hDC->drawMode = GDI_R2_BLACK; hDC->clip = gdi_CreateRectRgn(0, 0, 0, 0); @@ -76,12 +76,12 @@ HGDI_DC gdi_CreateDC(HCLRCONV clrconv, int bpp) hDC->invert = clrconv->invert; hDC->rgb555 = clrconv->rgb555; - hDC->hwnd = (HGDI_WND) xmalloc(sizeof(GDI_WND)); + hDC->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND)); hDC->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0); hDC->hwnd->invalid->null = 1; hDC->hwnd->count = 32; - hDC->hwnd->cinvalid = (HGDI_RGN) xmalloc(sizeof(GDI_RGN) * hDC->hwnd->count); + hDC->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * hDC->hwnd->count); hDC->hwnd->ninvalid = 0; return hDC; @@ -96,7 +96,7 @@ HGDI_DC gdi_CreateDC(HCLRCONV clrconv, int bpp) HGDI_DC gdi_CreateCompatibleDC(HGDI_DC hdc) { - HGDI_DC hDC = (HGDI_DC) xmalloc(sizeof(GDI_DC)); + HGDI_DC hDC = (HGDI_DC) malloc(sizeof(GDI_DC)); hDC->bytesPerPixel = hdc->bytesPerPixel; hDC->bitsPerPixel = hdc->bitsPerPixel; hDC->drawMode = hdc->drawMode; diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index b506e984f..a5c2a1928 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -376,7 +376,7 @@ gdiBitmap* gdi_glyph_new(rdpGdi* gdi, GLYPH_DATA* glyph) uint8* extra; gdiBitmap* gdi_bmp; - gdi_bmp = (gdiBitmap*) xmalloc(sizeof(gdiBitmap)); + gdi_bmp = (gdiBitmap*) malloc(sizeof(gdiBitmap)); gdi_bmp->hdc = gdi_GetDC(); gdi_bmp->hdc->bytesPerPixel = 1; @@ -408,7 +408,7 @@ gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* { gdiBitmap* bitmap; - bitmap = (gdiBitmap*) xmalloc(sizeof(gdiBitmap)); + bitmap = (gdiBitmap*) malloc(sizeof(gdiBitmap)); bitmap->hdc = gdi_CreateCompatibleDC(gdi->hdc); DEBUG_GDI("gdi_bitmap_new: width:%d height:%d bpp:%d", width, height, bpp); @@ -748,7 +748,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co gdi->image->bitmap->height = surface_bits_command->height; gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp; gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8; - gdi->image->bitmap->data = (uint8*) xrealloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); + gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); freerdp_image_flip(nsc_context->bmpdata, gdi->image->bitmap->data, gdi->image->bitmap->width, gdi->image->bitmap->height, 32); gdi_BitBlt(gdi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, gdi->image->hdc, 0, 0, GDI_SRCCOPY); } @@ -759,7 +759,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp; gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8; - gdi->image->bitmap->data = (uint8*) xrealloc(gdi->image->bitmap->data, + gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); if ((surface_bits_command->bpp != 32) || (gdi->clrconv->alpha == true)) @@ -773,9 +773,9 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co surface_bits_command->bpp = 32; surface_bits_command->bitmapData = gdi->image->bitmap->data; - temp_image = (uint8*) xmalloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4); + temp_image = (uint8*) malloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4); freerdp_image_flip(gdi->image->bitmap->data, temp_image, gdi->image->bitmap->width, gdi->image->bitmap->height, 32); - xfree(gdi->image->bitmap->data); + free(gdi->image->bitmap->data); gdi->image->bitmap->data = temp_image; } else @@ -793,7 +793,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co } if (tile_bitmap != NULL) - xfree(tile_bitmap); + free(tile_bitmap); } /** @@ -843,12 +843,12 @@ void gdi_init_primary(rdpGdi* gdi) if (gdi->drawing == NULL) gdi->drawing = gdi->primary; - gdi->primary->hdc->hwnd = (HGDI_WND) xmalloc(sizeof(GDI_WND)); + gdi->primary->hdc->hwnd = (HGDI_WND) malloc(sizeof(GDI_WND)); gdi->primary->hdc->hwnd->invalid = gdi_CreateRectRgn(0, 0, 0, 0); gdi->primary->hdc->hwnd->invalid->null = 1; gdi->primary->hdc->hwnd->count = 32; - gdi->primary->hdc->hwnd->cinvalid = (HGDI_RGN) xmalloc(sizeof(GDI_RGN) * gdi->primary->hdc->hwnd->count); + gdi->primary->hdc->hwnd->cinvalid = (HGDI_RGN) malloc(sizeof(GDI_RGN) * gdi->primary->hdc->hwnd->count); gdi->primary->hdc->hwnd->ninvalid = 0; } @@ -930,11 +930,11 @@ int gdi_init(freerdp* instance, uint32 flags, uint8* buffer) gdi->hdc->bitsPerPixel = gdi->dstBpp; gdi->hdc->bytesPerPixel = gdi->bytesPerPixel; - gdi->clrconv = (HCLRCONV) xmalloc(sizeof(CLRCONV)); + gdi->clrconv = (HCLRCONV) malloc(sizeof(CLRCONV)); gdi->clrconv->alpha = (flags & CLRCONV_ALPHA) ? 1 : 0; gdi->clrconv->invert = (flags & CLRCONV_INVERT) ? 1 : 0; gdi->clrconv->rgb555 = (flags & CLRCONV_RGB555) ? 1 : 0; - gdi->clrconv->palette = (rdpPalette*) xmalloc(sizeof(rdpPalette)); + gdi->clrconv->palette = (rdpPalette*) malloc(sizeof(rdpPalette)); gdi->hdc->alpha = gdi->clrconv->alpha; gdi->hdc->invert = gdi->clrconv->invert; diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index b109473af..62415f9f2 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -108,9 +108,9 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, size = width * height * (bpp + 7) / 8; if (bitmap->data == NULL) - bitmap->data = (uint8*) xmalloc(size); + bitmap->data = (uint8*) malloc(size); else - bitmap->data = (uint8*) xrealloc(bitmap->data, size); + bitmap->data = (uint8*) realloc(bitmap->data, size); switch (codec_id) { @@ -274,7 +274,7 @@ void gdi_register_graphics(rdpGraphics* graphics) bitmap->SetSurface = gdi_Bitmap_SetSurface; graphics_register_bitmap(graphics, bitmap); - xfree(bitmap); + free(bitmap); glyph = xnew(rdpGlyph); glyph->size = sizeof(gdiGlyph); @@ -286,5 +286,5 @@ void gdi_register_graphics(rdpGraphics* graphics) glyph->EndDraw = gdi_Glyph_EndDraw; graphics_register_glyph(graphics, glyph); - xfree(glyph); + free(glyph); } diff --git a/libfreerdp/gdi/palette.c b/libfreerdp/gdi/palette.c index 08c04b3c5..d069bf2ed 100644 --- a/libfreerdp/gdi/palette.c +++ b/libfreerdp/gdi/palette.c @@ -71,9 +71,9 @@ static const GDI_PALETTEENTRY default_system_palette[20] = HGDI_PALETTE gdi_CreatePalette(HGDI_PALETTE palette) { - HGDI_PALETTE hPalette = (HGDI_PALETTE) xmalloc(sizeof(GDI_PALETTE)); + HGDI_PALETTE hPalette = (HGDI_PALETTE) malloc(sizeof(GDI_PALETTE)); hPalette->count = palette->count; - hPalette->entries = (GDI_PALETTEENTRY*) xmalloc(sizeof(GDI_PALETTEENTRY) * hPalette->count); + hPalette->entries = (GDI_PALETTEENTRY*) malloc(sizeof(GDI_PALETTEENTRY) * hPalette->count); memcpy(hPalette->entries, palette->entries, sizeof(GDI_PALETTEENTRY) * hPalette->count); return hPalette; } @@ -85,10 +85,10 @@ HGDI_PALETTE gdi_CreatePalette(HGDI_PALETTE palette) HGDI_PALETTE CreateSystemPalette() { - HGDI_PALETTE palette = (HGDI_PALETTE) xmalloc(sizeof(GDI_PALETTE)); + HGDI_PALETTE palette = (HGDI_PALETTE) malloc(sizeof(GDI_PALETTE)); palette->count = 256; - palette->entries = (GDI_PALETTEENTRY*) xmalloc(sizeof(GDI_PALETTEENTRY) * 256); + palette->entries = (GDI_PALETTEENTRY*) malloc(sizeof(GDI_PALETTEENTRY) * 256); memset(palette->entries, 0, sizeof(GDI_PALETTEENTRY) * 256); memcpy(&palette->entries[0], &default_system_palette[0], 10 * sizeof(GDI_PALETTEENTRY)); diff --git a/libfreerdp/gdi/pen.c b/libfreerdp/gdi/pen.c index 1bc9b8484..c727d42c7 100644 --- a/libfreerdp/gdi/pen.c +++ b/libfreerdp/gdi/pen.c @@ -45,7 +45,7 @@ HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor) { - HGDI_PEN hPen = (HGDI_PEN) xmalloc(sizeof(GDI_PEN)); + HGDI_PEN hPen = (HGDI_PEN) malloc(sizeof(GDI_PEN)); hPen->objectType = GDIOBJECT_PEN; hPen->style = fnPenStyle; hPen->color = crColor; diff --git a/libfreerdp/gdi/region.c b/libfreerdp/gdi/region.c index 496e27fbf..d3147188f 100644 --- a/libfreerdp/gdi/region.c +++ b/libfreerdp/gdi/region.c @@ -44,7 +44,7 @@ HGDI_RGN gdi_CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) { - HGDI_RGN hRgn = (HGDI_RGN) xmalloc(sizeof(GDI_RGN)); + HGDI_RGN hRgn = (HGDI_RGN) malloc(sizeof(GDI_RGN)); hRgn->objectType = GDIOBJECT_REGION; hRgn->x = nLeftRect; hRgn->y = nTopRect; @@ -65,7 +65,7 @@ HGDI_RGN gdi_CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBot HGDI_RECT gdi_CreateRect(int xLeft, int yTop, int xRight, int yBottom) { - HGDI_RECT hRect = (HGDI_RECT) xmalloc(sizeof(GDI_RECT)); + HGDI_RECT hRect = (HGDI_RECT) malloc(sizeof(GDI_RECT)); hRect->objectType = GDIOBJECT_RECT; hRect->left = xLeft; hRect->top = yTop; diff --git a/libfreerdp/locale/keyboard_keymap.c b/libfreerdp/locale/keyboard_keymap.c index f6f487fa8..079463b85 100644 --- a/libfreerdp/locale/keyboard_keymap.c +++ b/libfreerdp/locale/keyboard_keymap.c @@ -80,10 +80,10 @@ int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name) if ((fp = fopen(keymap_path, "r")) == NULL) { DEBUG_KBD("%s not found", keymap_path); - xfree(keymap_path); + free(keymap_path); return 0; } - xfree(keymap_path); + free(keymap_path); while (fgets(buffer, sizeof(buffer), fp) != NULL) { diff --git a/libfreerdp/locale/keyboard_layout.c b/libfreerdp/locale/keyboard_layout.c index 04d012e31..20bda4950 100644 --- a/libfreerdp/locale/keyboard_layout.c +++ b/libfreerdp/locale/keyboard_layout.c @@ -482,12 +482,12 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) RDP_KEYBOARD_LAYOUT* layouts; num = 0; - layouts = (RDP_KEYBOARD_LAYOUT*) xmalloc((num + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); + layouts = (RDP_KEYBOARD_LAYOUT*) malloc((num + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); if ((types & RDP_KEYBOARD_LAYOUT_TYPE_STANDARD) != 0) { length = ARRAY_SIZE(RDP_KEYBOARD_LAYOUT_TABLE); - layouts = (RDP_KEYBOARD_LAYOUT*) xrealloc(layouts, (num + length + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); + layouts = (RDP_KEYBOARD_LAYOUT*) realloc(layouts, (num + length + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); for (i = 0; i < length; i++, num++) { @@ -498,7 +498,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) if ((types & RDP_KEYBOARD_LAYOUT_TYPE_VARIANT) != 0) { length = ARRAY_SIZE(RDP_KEYBOARD_LAYOUT_VARIANT_TABLE); - layouts = (RDP_KEYBOARD_LAYOUT*) xrealloc(layouts, (num + length + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); + layouts = (RDP_KEYBOARD_LAYOUT*) realloc(layouts, (num + length + 1) * sizeof(RDP_KEYBOARD_LAYOUT)); for (i = 0; i < length; i++, num++) { diff --git a/libfreerdp/locale/keyboard_x11.c b/libfreerdp/locale/keyboard_x11.c index 55737d697..3996ccd30 100644 --- a/libfreerdp/locale/keyboard_x11.c +++ b/libfreerdp/locale/keyboard_x11.c @@ -194,7 +194,7 @@ char* freerdp_detect_keymap_from_xkb() *end = '\0'; length = (end - beg); - keymap = (char*) xmalloc(length + 1); + keymap = (char*) malloc(length + 1); strncpy(keymap, beg, length); keymap[length] = '\0'; @@ -236,8 +236,8 @@ uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId, RDP_SCANCODE x11_keyco if (keyboardLayoutId == 0) { keyboardLayoutId = freerdp_detect_keyboard_layout_from_xkb(&xkb_layout, &xkb_variant); - xfree(xkb_layout); - xfree(xkb_variant); + free(xkb_layout); + free(xkb_variant); } keymap = freerdp_detect_keymap_from_xkb(); @@ -245,7 +245,7 @@ uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId, RDP_SCANCODE x11_keyco if (keymap != NULL) { freerdp_keyboard_load_maps(keycode_to_vkcode, keymap); - xfree(keymap); + free(keymap); } } #endif diff --git a/libfreerdp/locale/keyboard_xkbfile.c b/libfreerdp/locale/keyboard_xkbfile.c index 7e1c000b8..991603e35 100644 --- a/libfreerdp/locale/keyboard_xkbfile.c +++ b/libfreerdp/locale/keyboard_xkbfile.c @@ -23,6 +23,8 @@ #include "keyboard_xkbfile.h" +#include +#include #include #include @@ -257,10 +259,10 @@ uint32 detect_keyboard_layout_from_xkbfile(void* display) keyboard_layout = find_keyboard_layout_in_xorg_rules(layout, variant); - xfree(rules_names.model); - xfree(rules_names.layout); - xfree(rules_names.variant); - xfree(rules_names.options); + free(rules_names.model); + free(rules_names.layout); + free(rules_names.variant); + free(rules_names.options); } return keyboard_layout; diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 895374f7a..2d98eecbd 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -1520,7 +1520,7 @@ char* freerdp_get_unix_timezone_identifier() return NULL; } - tzid = (char*) xmalloc(length + 1); + tzid = (char*) malloc(length + 1); fread(tzid, length, 1, fp); tzid[length] = '\0'; @@ -1558,7 +1558,7 @@ char* freerdp_get_unix_timezone_identifier() num++; } - tzid = (char*) xmalloc(len - pos + 1); + tzid = (char*) malloc(len - pos + 1); strncpy(tzid, buf + pos + 1, len - pos); return tzid; @@ -1584,14 +1584,14 @@ boolean freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const { if (strcmp(p, tzid) == 0) { - xfree(list_copy); + free(list_copy); return true; } p = strtok(NULL, " "); } - xfree(list_copy); + free(list_copy); return false; } @@ -1616,17 +1616,17 @@ TIME_ZONE_ENTRY* freerdp_detect_windows_time_zone(uint32 bias) if (freerdp_match_unix_timezone_identifier_with_list(tzid, WindowsTimeZoneIdTable[j].tzid)) { - timezone = (TIME_ZONE_ENTRY*) xmalloc(sizeof(TIME_ZONE_ENTRY)); + timezone = (TIME_ZONE_ENTRY*) malloc(sizeof(TIME_ZONE_ENTRY)); memcpy((void*) timezone, (void*) &TimeZoneTable[i], sizeof(TIME_ZONE_ENTRY)); timezone->Bias = bias; - xfree(tzid); + free(tzid); return timezone; } } } printf("Unable to find a match for unix timezone: %s\n", tzid); - xfree(tzid); + free(tzid); return NULL; } @@ -1730,7 +1730,7 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone) */ } - xfree(tz); + free(tz); } else { diff --git a/libfreerdp/rail/icon.c b/libfreerdp/rail/icon.c index d44e34829..5ab656c06 100644 --- a/libfreerdp/rail/icon.c +++ b/libfreerdp/rail/icon.c @@ -105,12 +105,12 @@ void icon_cache_free(rdpIconCache* cache) for (i = 0; i < cache->numCaches; i++) { - xfree(cache->caches[i].entries); + free(cache->caches[i].entries); } - xfree(cache->caches); + free(cache->caches); - xfree(cache); + free(cache); } } diff --git a/libfreerdp/rail/rail.c b/libfreerdp/rail/rail.c index f79f8a10b..072205cf5 100644 --- a/libfreerdp/rail/rail.c +++ b/libfreerdp/rail/rail.c @@ -160,7 +160,7 @@ void rail_free(rdpRail* rail) { icon_cache_free(rail->cache); window_list_free(rail->list); - xfree(rail->clrconv); - xfree(rail); + free(rail->clrconv); + free(rail); } } diff --git a/libfreerdp/rail/window.c b/libfreerdp/rail/window.c index 26dfee661..bfec8f62d 100644 --- a/libfreerdp/rail/window.c +++ b/libfreerdp/rail/window.c @@ -172,7 +172,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE) { window->titleInfo.length = window_state->titleInfo.length; - window->titleInfo.string = xmalloc(window_state->titleInfo.length); + window->titleInfo.string = malloc(window_state->titleInfo.length); memcpy(window->titleInfo.string, window_state->titleInfo.string, window->titleInfo.length); #ifdef WITH_DEBUG_RAIL @@ -240,7 +240,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW int i; if (window->windowRects != NULL) - xfree(window->windowRects); + free(window->windowRects); window->windowRects = window_state->windowRects; window->numWindowRects = window_state->numWindowRects; @@ -267,7 +267,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW int i; if (window->visibilityRects != NULL) - xfree(window->visibilityRects); + free(window->visibilityRects); window->visibilityRects = window_state->visibilityRects; window->numVisibilityRects = window_state->numVisibilityRects; @@ -289,7 +289,7 @@ void rail_CreateWindow(rdpRail* rail, rdpWindow* window) } else { - window->title = (char*) xmalloc(sizeof("RAIL")); + window->title = (char*) malloc(sizeof("RAIL")); memcpy(window->title, "RAIL", sizeof("RAIL")); } @@ -325,7 +325,7 @@ void rail_UpdateWindow(rdpRail* rail, rdpWindow* window) if (window->fieldFlags & WINDOW_ORDER_FIELD_TITLE) { if (window->title != NULL) - xfree(window->title); + free(window->title); freerdp_UnicodeToAsciiAlloc((WCHAR*) window->titleInfo.string, &window->title, window->titleInfo.length / 2); @@ -385,6 +385,6 @@ void rail_DestroyWindow(rdpRail* rail, rdpWindow* window) if (window != NULL) { - xfree(window); + free(window); } } diff --git a/libfreerdp/rail/window_list.c b/libfreerdp/rail/window_list.c index b4221dfef..8f8e7c2c8 100644 --- a/libfreerdp/rail/window_list.c +++ b/libfreerdp/rail/window_list.c @@ -223,6 +223,6 @@ void window_list_free(rdpWindowList* list) { if (list != NULL) { - xfree(list); + free(list); } } diff --git a/libfreerdp/utils/args.c b/libfreerdp/utils/args.c index 921e4e340..651490b56 100644 --- a/libfreerdp/utils/args.c +++ b/libfreerdp/utils/args.c @@ -714,9 +714,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, while (index < argc && strcmp("--", argv[index]) != 0) { if (plugin_data == NULL) - plugin_data = (RDP_PLUGIN_DATA*) xmalloc(sizeof(RDP_PLUGIN_DATA) * (i + 2)); + plugin_data = (RDP_PLUGIN_DATA*) malloc(sizeof(RDP_PLUGIN_DATA) * (i + 2)); else - plugin_data = (RDP_PLUGIN_DATA*) xrealloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2)); + plugin_data = (RDP_PLUGIN_DATA*) realloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2)); if (strstr(argv[t], "drdynvc") && strstr(argv[index], "audin")) settings->audio_capture = true; @@ -879,7 +879,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } /* password */ if (NULL == settings->password) { - settings->password = xmalloc(512 * sizeof(char)); + settings->password = malloc(512 * sizeof(char)); if (isatty(STDIN_FILENO)) freerdp_passphrase_read("password: ", settings->password, 512, settings->from_stdin); else { diff --git a/libfreerdp/utils/dsp.c b/libfreerdp/utils/dsp.c index 5a4cc3394..673dc59eb 100644 --- a/libfreerdp/utils/dsp.c +++ b/libfreerdp/utils/dsp.c @@ -50,7 +50,7 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context, if (rsize > (int) context->resampled_maxlength) { context->resampled_maxlength = rsize + 1024; - context->resampled_buffer = (uint8*) xrealloc(context->resampled_buffer, context->resampled_maxlength); + context->resampled_buffer = (uint8*) realloc(context->resampled_buffer, context->resampled_maxlength); } dst = context->resampled_buffer; @@ -148,7 +148,7 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, if (out_size > context->adpcm_maxlength) { context->adpcm_maxlength = out_size + 1024; - context->adpcm_buffer = xrealloc(context->adpcm_buffer, context->adpcm_maxlength); + context->adpcm_buffer = realloc(context->adpcm_buffer, context->adpcm_maxlength); } dst = context->adpcm_buffer; while (size > 0) @@ -307,7 +307,7 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, if (out_size > context->adpcm_maxlength) { context->adpcm_maxlength = out_size + 1024; - context->adpcm_buffer = xrealloc(context->adpcm_buffer, context->adpcm_maxlength); + context->adpcm_buffer = realloc(context->adpcm_buffer, context->adpcm_maxlength); } dst = context->adpcm_buffer; while (size > 0) @@ -410,7 +410,7 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, if (out_size > context->adpcm_maxlength) { context->adpcm_maxlength = out_size + 1024; - context->adpcm_buffer = xrealloc(context->adpcm_buffer, context->adpcm_maxlength); + context->adpcm_buffer = realloc(context->adpcm_buffer, context->adpcm_maxlength); } dst = context->adpcm_buffer; while (size > 0) @@ -530,7 +530,7 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, if (out_size > context->adpcm_maxlength) { context->adpcm_maxlength = out_size + 1024; - context->adpcm_buffer = xrealloc(context->adpcm_buffer, context->adpcm_maxlength); + context->adpcm_buffer = realloc(context->adpcm_buffer, context->adpcm_maxlength); } dst = context->adpcm_buffer; @@ -611,9 +611,9 @@ void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context) if (context) { if (context->resampled_buffer) - xfree(context->resampled_buffer); + free(context->resampled_buffer); if (context->adpcm_buffer) - xfree(context->adpcm_buffer); - xfree(context); + free(context->adpcm_buffer); + free(context); } } diff --git a/libfreerdp/utils/event.c b/libfreerdp/utils/event.c index 606f3ebeb..91608da96 100644 --- a/libfreerdp/utils/event.c +++ b/libfreerdp/utils/event.c @@ -117,14 +117,14 @@ static void freerdp_cliprdr_event_free(RDP_EVENT* event) case RDP_EVENT_TYPE_CB_FORMAT_LIST: { RDP_CB_FORMAT_LIST_EVENT* cb_event = (RDP_CB_FORMAT_LIST_EVENT*)event; - xfree(cb_event->formats); - xfree(cb_event->raw_format_data); + free(cb_event->formats); + free(cb_event->raw_format_data); } break; case RDP_EVENT_TYPE_CB_DATA_RESPONSE: { RDP_CB_DATA_RESPONSE_EVENT* cb_event = (RDP_CB_DATA_RESPONSE_EVENT*)event; - xfree(cb_event->data); + free(cb_event->data); } break; } @@ -137,8 +137,8 @@ static void freerdp_tsmf_event_free(RDP_EVENT* event) case RDP_EVENT_TYPE_TSMF_VIDEO_FRAME: { RDP_VIDEO_FRAME_EVENT* vevent = (RDP_VIDEO_FRAME_EVENT*)event; - xfree(vevent->frame_data); - xfree(vevent->visible_rects); + free(vevent->frame_data); + free(vevent->visible_rects); } break; } @@ -167,6 +167,6 @@ void freerdp_event_free(RDP_EVENT* event) freerdp_rail_event_free(event); break; } - xfree(event); + free(event); } } diff --git a/libfreerdp/utils/file.c b/libfreerdp/utils/file.c index 1fddca77b..076201005 100644 --- a/libfreerdp/utils/file.c +++ b/libfreerdp/utils/file.c @@ -97,7 +97,7 @@ char* freerdp_get_config_path(rdpSettings* settings) if (settings->config_path != NULL) return settings->config_path; - settings->config_path = (char*) xmalloc(strlen(settings->home_path) + sizeof(FREERDP_CONFIG_DIR) + 2); + settings->config_path = (char*) malloc(strlen(settings->home_path) + sizeof(FREERDP_CONFIG_DIR) + 2); sprintf(settings->config_path, "%s" PATH_SEPARATOR_STR "%s", settings->home_path, FREERDP_CONFIG_DIR); if (!freerdp_check_file_exists(settings->config_path)) @@ -125,7 +125,7 @@ char* freerdp_construct_path(char* base_path, char* relative_path) relative_path_length = strlen(relative_path); length = base_path_length + relative_path_length + 1; - path = xmalloc(length + 1); + path = malloc(length + 1); sprintf(path, "%s" PATH_SEPARATOR_STR "%s", base_path, relative_path); return path; @@ -150,7 +150,7 @@ char* freerdp_append_shared_library_suffix(char* file_path) if (strcmp(p, SHARED_LIB_SUFFIX) != 0) { - path = xmalloc(file_path_length + shared_lib_suffix_length + 1); + path = malloc(file_path_length + shared_lib_suffix_length + 1); sprintf(path, "%s%s", file_path, SHARED_LIB_SUFFIX); } else @@ -160,7 +160,7 @@ char* freerdp_append_shared_library_suffix(char* file_path) } else { - path = xmalloc(file_path_length + shared_lib_suffix_length + 1); + path = malloc(file_path_length + shared_lib_suffix_length + 1); sprintf(path, "%s%s", file_path, SHARED_LIB_SUFFIX); } @@ -196,7 +196,7 @@ char* freerdp_get_parent_path(char* base_path, int depth) length = (p - base_path); - path = (char*) xmalloc(length + 1); + path = (char*) malloc(length + 1); memcpy(path, base_path, length); path[length] = '\0'; diff --git a/libfreerdp/utils/list.c b/libfreerdp/utils/list.c index dfd9632ca..89cb1f41d 100644 --- a/libfreerdp/utils/list.c +++ b/libfreerdp/utils/list.c @@ -98,7 +98,7 @@ void list_free(LIST* list) { while (list->head) list_dequeue(list); - xfree(list); + free(list); } /** @@ -149,7 +149,7 @@ void* list_dequeue(LIST* list) list->head->prev = NULL; data = item->data; - xfree(item); + free(item); list->count--; } return data; @@ -221,7 +221,7 @@ void* list_remove(LIST* list, void* data) list->head = item->next; if (list->tail == item) list->tail = item->prev; - xfree(item); + free(item); list->count--; } else diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index 827b925f2..607f32144 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -134,8 +134,8 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) entry = freerdp_load_library_symbol(path, entry_name); - xfree(suffixed_name); - xfree(path); + free(suffixed_name); + free(path); if (entry == NULL) { diff --git a/libfreerdp/utils/memory.c b/libfreerdp/utils/memory.c index 8bffc9344..3cc2a69e1 100644 --- a/libfreerdp/utils/memory.c +++ b/libfreerdp/utils/memory.c @@ -27,34 +27,6 @@ #include -/** - * Allocate memory. - * This function is used to secure a malloc call. - * It verifies its return value, and logs an error if the allocation failed. - * - * @param size - number of bytes to allocate. If the size is < 1, it will default to 1. - * - * @return a pointer to the allocated buffer. NULL if the allocation failed. - */ - -void* xmalloc(size_t size) -{ - void* mem; - - if (size < 1) - size = 1; - - mem = malloc(size); - - if (mem == NULL) - { - perror("xmalloc"); - printf("xmalloc: failed to allocate memory of size: %d\n", (int) size); - } - - return mem; -} - /** * Allocate memory initialized to zero. * This function is used to secure a calloc call. @@ -82,46 +54,6 @@ void* xzalloc(size_t size) return mem; } -/** - * Reallocate memory. - * This function is used to secure a realloc call. - * It verifies its return value, and logs an error if the allocation failed. - * - * @param ptr - pointer to the buffer that needs reallocation. This can be NULL, in which case a new buffer is allocated. - * @param size - number of bytes to allocate. If the size is < 1, it will default to 1. - * - * @return a pointer to the reallocated buffer. NULL if the allocation failed (in which case the 'ptr' argument is untouched). - */ - -void* xrealloc(void* ptr, size_t size) -{ - void* mem; - - if (size < 1) - size = 1; - - mem = realloc(ptr, size); - - if (mem == NULL) - perror("xrealloc"); - - return mem; -} - -/** - * Free memory. - * This function is used to secure a free call. - * It verifies that the pointer is valid (non-NULL) before trying to deallocate it's buffer. - * - * @param ptr - pointer to a buffer that needs deallocation. If ptr is NULL, nothing will be done (no segfault). - */ - -void xfree(void* ptr) -{ - if (ptr != NULL) - free(ptr); -} - /** * Duplicate a string in memory. * This function is used to secure the strdup function. @@ -176,7 +108,7 @@ wchar_t* xwcsdup(const wchar_t* wstr) #elif sun mem = wsdup(wstr); #elif (defined(__APPLE__) && defined(__MACH__)) || defined(ANDROID) - mem = xmalloc(wcslen(wstr) * sizeof(wchar_t)); + mem = malloc(wcslen(wstr) * sizeof(wchar_t)); if (mem != NULL) wcscpy(mem, wstr); #else diff --git a/libfreerdp/utils/pcap.c b/libfreerdp/utils/pcap.c index cb1987f63..93dde00d7 100644 --- a/libfreerdp/utils/pcap.c +++ b/libfreerdp/utils/pcap.c @@ -22,6 +22,7 @@ #endif #include +#include #include #ifndef _WIN32 @@ -72,7 +73,7 @@ void pcap_read_record(rdpPcap* pcap, pcap_record* record) { pcap_read_record_header(pcap, &record->header); record->length = record->header.incl_len; - record->data = xmalloc(record->length); + record->data = malloc(record->length); fread(record->data, record->length, 1, pcap->fp); } diff --git a/libfreerdp/utils/profiler.c b/libfreerdp/utils/profiler.c index db0f8e256..3b52c72d0 100644 --- a/libfreerdp/utils/profiler.c +++ b/libfreerdp/utils/profiler.c @@ -22,6 +22,7 @@ #endif #include +#include #include @@ -29,7 +30,7 @@ PROFILER* profiler_create(char* name) { PROFILER* profiler; - profiler = (PROFILER*) xmalloc(sizeof(PROFILER)); + profiler = (PROFILER*) malloc(sizeof(PROFILER)); profiler->name = name; profiler->stopwatch = stopwatch_create(); @@ -41,7 +42,7 @@ void profiler_free(PROFILER* profiler) { stopwatch_free(profiler->stopwatch); - xfree(profiler); + free(profiler); } void profiler_enter(PROFILER* profiler) diff --git a/libfreerdp/utils/rail.c b/libfreerdp/utils/rail.c index d8c07e758..fa9b535cf 100644 --- a/libfreerdp/utils/rail.c +++ b/libfreerdp/utils/rail.c @@ -21,16 +21,21 @@ #include "config.h" #endif +#include +#include + #include -#include #include +#include + #include void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, uint16 cbString) { unicode_string->length = cbString; - unicode_string->string = xzalloc(cbString); + unicode_string->string = malloc(cbString); + memset(unicode_string->string, 0, cbString); } void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string) @@ -38,7 +43,7 @@ void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string) unicode_string->length = 0; if (unicode_string->string != NULL) - xfree(unicode_string->string); + free(unicode_string->string); } void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string) @@ -46,9 +51,9 @@ void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string) stream_read_uint16(s, unicode_string->length); /* cbString (2 bytes) */ if (unicode_string->string == NULL) - unicode_string->string = (uint8*) xmalloc(unicode_string->length); + unicode_string->string = (uint8*) malloc(unicode_string->length); else - unicode_string->string = (uint8*) xrealloc(unicode_string->string, unicode_string->length); + unicode_string->string = (uint8*) realloc(unicode_string->string, unicode_string->length); stream_read(s, unicode_string->string, unicode_string->length); } @@ -126,7 +131,7 @@ void* rail_clone_order(uint32 event_type, void* order) // Event type not found. if (order_size == 0) return NULL; - new_order = xmalloc(order_size); + new_order = malloc(order_size); memcpy(new_order, order, order_size); //printf("rail_clone_order: type=%d order=%p\n", event_type, new_order); @@ -184,5 +189,5 @@ void rail_free_cloned_order(uint32 event_type, void* order) RAIL_EXEC_RESULT_ORDER* exec_result = (RAIL_EXEC_RESULT_ORDER*)order; rail_unicode_string_free(&exec_result->exeOrFile); } - xfree(order); + free(order); } diff --git a/libfreerdp/utils/stopwatch.c b/libfreerdp/utils/stopwatch.c index 730cf41db..c1f3f4d8e 100644 --- a/libfreerdp/utils/stopwatch.c +++ b/libfreerdp/utils/stopwatch.c @@ -21,13 +21,16 @@ #include "config.h" #endif +#include +#include + #include STOPWATCH* stopwatch_create() { STOPWATCH* sw; - sw = (STOPWATCH*) xmalloc(sizeof(STOPWATCH)); + sw = (STOPWATCH*) malloc(sizeof(STOPWATCH)); stopwatch_reset(sw); return sw; @@ -35,7 +38,7 @@ STOPWATCH* stopwatch_create() void stopwatch_free(STOPWATCH* stopwatch) { - xfree(stopwatch); + free(stopwatch); } void stopwatch_start(STOPWATCH* stopwatch) diff --git a/libfreerdp/utils/stream.c b/libfreerdp/utils/stream.c index 85dc729bb..13e05041b 100644 --- a/libfreerdp/utils/stream.c +++ b/libfreerdp/utils/stream.c @@ -79,9 +79,9 @@ void stream_free(STREAM* stream) if (stream != NULL) { if (stream->data != NULL) - xfree(stream->data); + free(stream->data); - xfree(stream); + free(stream); } } @@ -107,9 +107,9 @@ void stream_extend(STREAM* stream, int request_size) stream->size += increased_size; if (original_size == 0) - stream->data = (uint8*) xmalloc(stream->size); + stream->data = (uint8*) malloc(stream->size); else - stream->data = (uint8*) xrealloc(stream->data, stream->size); + stream->data = (uint8*) realloc(stream->data, stream->size); memset(stream->data + original_size, 0, increased_size); stream_set_pos(stream, pos); diff --git a/libfreerdp/utils/string.c b/libfreerdp/utils/string.c index 9695a2eab..e79c926b9 100644 --- a/libfreerdp/utils/string.c +++ b/libfreerdp/utils/string.c @@ -21,7 +21,10 @@ #include "config.h" #endif -#include +#include +#include +#include + #include #include @@ -29,7 +32,7 @@ void freerdp_string_read_length32(STREAM* s, rdpString* string) { stream_read_uint32(s, string->length); - string->unicode = (char*) xmalloc(string->length); + string->unicode = (char*) malloc(string->length); stream_read(s, string->unicode, string->length); freerdp_UnicodeToAsciiAlloc((WCHAR*) string->unicode, &string->ascii, string->length / 2); } @@ -37,8 +40,8 @@ void freerdp_string_read_length32(STREAM* s, rdpString* string) void freerdp_string_free(rdpString* string) { if (string->unicode != NULL) - xfree(string->unicode); + free(string->unicode); if (string->ascii != NULL) - xfree(string->ascii); + free(string->ascii); } diff --git a/libfreerdp/utils/svc_plugin.c b/libfreerdp/utils/svc_plugin.c index 904556993..4824f6e90 100644 --- a/libfreerdp/utils/svc_plugin.c +++ b/libfreerdp/utils/svc_plugin.c @@ -69,7 +69,7 @@ static void svc_data_in_item_free(svc_data_in_item* item) freerdp_event_free(item->event_in); item->event_in = NULL; } - xfree(item); + free(item); } struct rdp_svc_plugin_private @@ -145,7 +145,7 @@ static void svc_plugin_remove(rdpSvcPlugin* plugin) prev->next = list->next; else g_svc_plugin_list = list->next; - xfree(list); + free(list); } ReleaseMutex(g_mutex); } @@ -264,7 +264,7 @@ static void svc_plugin_process_data_in(rdpSvcPlugin* plugin) IFCALL(plugin->receive_callback, plugin, item->data_in); if (item->event_in) IFCALL(plugin->event_callback, plugin, item->event_in); - xfree(item); + free(item); } else break; @@ -330,7 +330,7 @@ static void svc_plugin_process_terminated(rdpSvcPlugin* plugin) freerdp_thread_free(plugin->priv->thread); plugin->channel_entry_points.pVirtualChannelClose(plugin->priv->open_handle); - xfree(plugin->channel_entry_points.pExtendedData); + free(plugin->channel_entry_points.pExtendedData); svc_plugin_remove(plugin); @@ -343,7 +343,7 @@ static void svc_plugin_process_terminated(rdpSvcPlugin* plugin) stream_free(plugin->priv->data_in); plugin->priv->data_in = NULL; } - xfree(plugin->priv); + free(plugin->priv); plugin->priv = NULL; IFCALL(plugin->terminate_callback, plugin); diff --git a/libfreerdp/utils/thread.c b/libfreerdp/utils/thread.c index 5100265a0..98be69148 100644 --- a/libfreerdp/utils/thread.c +++ b/libfreerdp/utils/thread.c @@ -93,5 +93,5 @@ void freerdp_thread_free(freerdp_thread* thread) CloseHandle(thread->mutex); thread->mutex = NULL; - xfree(thread); + free(thread); } diff --git a/libfreerdp/utils/wait_obj.c b/libfreerdp/utils/wait_obj.c index 5f9240c99..a38603530 100644 --- a/libfreerdp/utils/wait_obj.c +++ b/libfreerdp/utils/wait_obj.c @@ -64,7 +64,7 @@ wait_obj_new(void) if (pipe(obj->pipe_fd) < 0) { printf("wait_obj_new: pipe failed\n"); - xfree(obj); + free(obj); return NULL; } #endif @@ -117,7 +117,7 @@ wait_obj_free(struct wait_obj* obj) #endif } - xfree(obj); + free(obj); } } @@ -219,7 +219,7 @@ wait_obj_select(struct wait_obj** listobj, int numobj, int timeout) status = -1; else status = 0; - xfree(hnds); + free(hnds); #endif return status; diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 14ce1085c..ae9332b5a 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -79,8 +79,8 @@ void test_peer_context_free(freerdp_peer* client, testPeerContext* context) } stream_free(context->s); - xfree(context->icon_data); - xfree(context->bg_data); + free(context->icon_data); + free(context->bg_data); rfx_context_free(context->rfx_context); nsc_context_free(context->nsc_context); @@ -160,7 +160,7 @@ static void test_peer_draw_background(freerdp_peer* client) rect.height = client->settings->height; size = rect.width * rect.height * 3; - rgb_data = xmalloc(size); + rgb_data = malloc(size); memset(rgb_data, 0xA0, size); if (client->settings->rfx_codec) @@ -187,7 +187,7 @@ static void test_peer_draw_background(freerdp_peer* client) cmd->bitmapData = stream_get_head(s); update->SurfaceBits(update->context, cmd); - xfree(rgb_data); + free(rgb_data); test_peer_end_frame(client); } @@ -217,7 +217,7 @@ static void test_peer_load_icon(freerdp_peer* client) /* Max */ fgets(line, sizeof(line), fp); - rgb_data = xmalloc(context->icon_width * context->icon_height * 3); + rgb_data = malloc(context->icon_width * context->icon_height * 3); for (i = 0; i < context->icon_width * context->icon_height * 3; i++) { @@ -231,7 +231,7 @@ static void test_peer_load_icon(freerdp_peer* client) context->icon_data = rgb_data; /* background with same size, which will be used to erase the icon from old position */ - context->bg_data = xmalloc(context->icon_width * context->icon_height * 3); + context->bg_data = malloc(context->icon_width * context->icon_height * 3); memset(context->bg_data, 0xA0, context->icon_width * context->icon_height * 3); } @@ -380,7 +380,7 @@ void tf_peer_dump_rfx(freerdp_peer* client) { pcap_get_next_record_header(pcap_rfx, &record); - s->data = xrealloc(s->data, record.length); + s->data = realloc(s->data, record.length); record.data = s->data; s->size = record.length; diff --git a/server/X11/xf_event.c b/server/X11/xf_event.c index b31cf5456..5086a5ca3 100644 --- a/server/X11/xf_event.c +++ b/server/X11/xf_event.c @@ -96,7 +96,7 @@ void xf_event_push(xfEventQueue* event_queue, xfEvent* event) if (event_queue->count >= event_queue->size) { event_queue->size *= 2; - event_queue->events = (xfEvent**) xrealloc((void*) event_queue->events, sizeof(xfEvent*) * event_queue->size); + event_queue->events = (xfEvent**) realloc((void*) event_queue->events, sizeof(xfEvent*) * event_queue->size); } event_queue->events[(event_queue->count)++] = event; @@ -161,7 +161,7 @@ xfEventRegion* xf_event_region_new(int x, int y, int width, int height) void xf_event_region_free(xfEventRegion* event_region) { - xfree(event_region); + free(event_region); } xfEvent* xf_event_new(int type) @@ -173,7 +173,7 @@ xfEvent* xf_event_new(int type) void xf_event_free(xfEvent* event) { - xfree(event); + free(event); } xfEventQueue* xf_event_queue_new() diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 9833ce60a..9e4755c13 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -381,7 +381,7 @@ void xf_peer_dump_rfx(freerdp_peer* client) { pcap_get_next_record_header(pcap_rfx, &record); - s->data = xrealloc(s->data, record.length); + s->data = realloc(s->data, record.length); record.data = s->data; s->size = record.length; From 2df7aaad396fb4a0abf28be9fd1727ac244bf2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 23:42:01 -0400 Subject: [PATCH 33/43] libfreerdp-utils: get rid of xstrdup in favor of WinPR _strdup --- channels/cliprdr/client/CMakeLists.txt | 4 +- channels/cliprdr/client/cliprdr_format.c | 5 ++- channels/disk/client/disk_main.c | 4 +- channels/drdynvc/client/dvcman.c | 3 +- channels/printer/client/printer_cups.c | 6 ++- channels/printer/client/printer_win.c | 16 +++++--- channels/rdpsnd/client/alsa/CMakeLists.txt | 7 ++-- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 6 ++- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 5 ++- client/X11/xfreerdp.c | 3 +- include/freerdp/utils/memory.h | 2 +- libfreerdp/core/CMakeLists.txt | 8 ++-- libfreerdp/core/connection.c | 12 +++--- libfreerdp/core/http.c | 40 +++++++++--------- libfreerdp/core/settings.c | 7 ++-- libfreerdp/core/tcp.c | 4 +- libfreerdp/crypto/CMakeLists.txt | 2 + libfreerdp/crypto/certificate.c | 6 ++- libfreerdp/locale/CMakeLists.txt | 2 + libfreerdp/locale/keyboard_layout.c | 8 ++-- libfreerdp/locale/keyboard_x11.c | 11 +++-- libfreerdp/locale/timezone.c | 6 ++- libfreerdp/utils/CMakeLists.txt | 7 +--- libfreerdp/utils/args.c | 36 +++++++++-------- libfreerdp/utils/file.c | 8 ++-- libfreerdp/utils/load_plugin.c | 5 ++- libfreerdp/utils/memory.c | 45 +++++---------------- server/Sample/CMakeLists.txt | 2 + server/Sample/sfreerdp.c | 6 ++- 29 files changed, 144 insertions(+), 132 deletions(-) diff --git a/channels/cliprdr/client/CMakeLists.txt b/channels/cliprdr/client/CMakeLists.txt index bd465b4eb..8a617b880 100644 --- a/channels/cliprdr/client/CMakeLists.txt +++ b/channels/cliprdr/client/CMakeLists.txt @@ -36,9 +36,9 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(MONOLITHIC_BUILD) - target_link_libraries(${MODULE_NAME} freerdp) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(${MODULE_NAME} freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt) endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index 119e41798..59f02a728 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -25,6 +25,9 @@ #include #include #include + +#include + #include #include #include @@ -138,7 +141,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3 if (ascii) { - format_name->name = xstrdup((char*) s->p); + format_name->name = _strdup((char*) s->p); format_name->length = strlen(format_name->name); } else diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index 9a216487a..73b906525 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -718,7 +718,7 @@ const int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) if( path[0] == '%' ) { _snprintf(buf, sizeof(buf), "%s\\", getenv("USERPROFILE")); - disk_register_disk_path(pEntryPoints, name, xstrdup(buf)); + disk_register_disk_path(pEntryPoints, name, _strdup(buf)); } else if( path[0] == '*' ) { @@ -738,7 +738,7 @@ const int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) buf[len + 1] = dev[0]; buf[len + 2] = 0; buf[len + 3] = 0; - disk_register_disk_path(pEntryPoints, xstrdup(buf), xstrdup(dev)); + disk_register_disk_path(pEntryPoints, _strdup(buf), _strdup(dev)); } } } diff --git a/channels/drdynvc/client/dvcman.c b/channels/drdynvc/client/dvcman.c index f87aa935c..53418ae93 100644 --- a/channels/drdynvc/client/dvcman.c +++ b/channels/drdynvc/client/dvcman.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -108,7 +109,7 @@ static int dvcman_create_listener(IWTSVirtualChannelManager* pChannelMgr, listener = xnew(DVCMAN_LISTENER); listener->iface.GetConfiguration = dvcman_get_configuration; listener->dvcman = dvcman; - listener->channel_name = xstrdup(pszChannelName); + listener->channel_name = _strdup(pszChannelName); listener->flags = ulFlags; listener->listener_callback = pListenerCallback; diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index 296ed78db..30bf5cf3f 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -29,6 +29,8 @@ #include #include +#include + #include #include #include @@ -152,7 +154,7 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) #ifndef _CUPS_API_1_4 - cups_printjob->printjob_object = xstrdup(tmpnam(NULL)); + cups_printjob->printjob_object = _strdup(tmpnam(NULL)); #else { @@ -218,7 +220,7 @@ static rdpPrinter* printer_cups_new_printer(rdpCupsPrinterDriver* cups_driver, c cups_printer = xnew(rdpCupsPrinter); cups_printer->printer.id = cups_driver->id_sequence++; - cups_printer->printer.name = xstrdup(name); + cups_printer->printer.name = _strdup(name); /* This is a generic PostScript printer driver developed by MS, so it should be good in most cases */ cups_printer->printer.driver = "MS Publisher Imagesetter"; cups_printer->printer.is_default = is_default; diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index a7db9c94c..f61ee3294 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -17,18 +17,22 @@ * limitations under the License. */ -#include -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include #include #include #include -#include +#include -#include "config.h" #include #include -#include "rdpdr_types.h" #include "printer_main.h" #include "printer_win.h" @@ -179,7 +183,7 @@ static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, cons win_printer = xnew(rdpWinPrinter); win_printer->printer.id = win_driver->id_sequence++; - win_printer->printer.name = xstrdup(name); + win_printer->printer.name = _strdup(name); win_printer->printer.is_default = is_default; win_printer->printer.CreatePrintJob = printer_win_create_printjob; diff --git a/channels/rdpsnd/client/alsa/CMakeLists.txt b/channels/rdpsnd/client/alsa/CMakeLists.txt index 1d50df6bc..1f9db48b2 100644 --- a/channels/rdpsnd/client/alsa/CMakeLists.txt +++ b/channels/rdpsnd/client/alsa/CMakeLists.txt @@ -18,8 +18,7 @@ # limitations under the License. set(RDPSND_ALSA_SRCS - rdpsnd_alsa.c -) + rdpsnd_alsa.c) include_directories(..) include_directories(${ALSA_INCLUDE_DIRS}) @@ -28,9 +27,9 @@ add_library(rdpsnd_alsa ${RDPSND_ALSA_SRCS}) set_target_properties(rdpsnd_alsa PROPERTIES PREFIX "") if(MONOLITHIC_BUILD) - target_link_libraries(rdpsnd_alsa freerdp) + target_link_libraries(rdpsnd_alsa freerdp winpr) else() - target_link_libraries(rdpsnd_alsa freerdp-utils) + target_link_libraries(rdpsnd_alsa freerdp-utils winpr-crt) endif() target_link_libraries(rdpsnd_alsa ${ALSA_LIBRARIES}) diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index 26326bbba..5864aeb0b 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -434,12 +436,12 @@ int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints) if (data && strcmp((char*) data->data[0], "alsa") == 0) { - alsa->device_name = xstrdup((char*) data->data[1]); + alsa->device_name = _strdup((char*) data->data[1]); } if (alsa->device_name == NULL) { - alsa->device_name = xstrdup("default"); + alsa->device_name = _strdup("default"); } alsa->out_handle = 0; diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index 702f2d49c..7a167da46 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -25,7 +25,10 @@ #include #include +#include + #include + #include #include #include @@ -541,7 +544,7 @@ int FreeRDPRdpsndDeviceEntry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints) if (data && strcmp((char*)data->data[0], "pulse") == 0) { if(data->data[1] && strlen((char*)data->data[1]) > 0) - pulse->device_name = xstrdup((char*)data->data[1]); + pulse->device_name = _strdup((char*)data->data[1]); else pulse->device_name = NULL; } diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index c794704eb..067e5f450 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -59,6 +59,7 @@ #include #include +#include #include #include "xf_gdi.h" @@ -310,7 +311,7 @@ void xf_create_window(xfInfo* xfi) if (xfi->instance->settings->window_title != NULL) { - win_title = xstrdup(xfi->instance->settings->window_title); + win_title = _strdup(xfi->instance->settings->window_title); } else if (xfi->instance->settings->port == 3389) { diff --git a/include/freerdp/utils/memory.h b/include/freerdp/utils/memory.h index b5ef007c6..d1e18f51f 100644 --- a/include/freerdp/utils/memory.h +++ b/include/freerdp/utils/memory.h @@ -23,11 +23,11 @@ #include #include #include + #include FREERDP_API void* xzalloc(size_t size); -FREERDP_API char* xstrdup(const char* str); FREERDP_API char* xstrtoup(const char* str); FREERDP_API wchar_t* xwcsdup(const wchar_t* wstr); diff --git a/libfreerdp/core/CMakeLists.txt b/libfreerdp/core/CMakeLists.txt index 81086c11b..d1187517d 100644 --- a/libfreerdp/core/CMakeLists.txt +++ b/libfreerdp/core/CMakeLists.txt @@ -104,12 +104,10 @@ if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS winpr) else() set(${MODULE_PREFIX}_LIBS + winpr-registry winpr-utils - winpr-sspi) - - if(NOT WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-registry) - endif() + winpr-sspi + winpr-crt) endif() if(WIN32) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 1a11b4d00..860ba958d 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -27,6 +27,8 @@ #include "connection.h" #include "transport.h" +#include + #include /** @@ -165,30 +167,30 @@ boolean rdp_client_redirect(rdpRdp* rdp) if (redirection->flags & LB_TARGET_NET_ADDRESS) { free(settings->hostname); - settings->hostname = xstrdup(redirection->targetNetAddress.ascii); + settings->hostname = _strdup(redirection->targetNetAddress.ascii); } else if (redirection->flags & LB_TARGET_FQDN) { free(settings->hostname); - settings->hostname = xstrdup(redirection->targetFQDN.ascii); + settings->hostname = _strdup(redirection->targetFQDN.ascii); } else if (redirection->flags & LB_TARGET_NETBIOS_NAME) { free(settings->hostname); - settings->hostname = xstrdup(redirection->targetNetBiosName.ascii); + settings->hostname = _strdup(redirection->targetNetBiosName.ascii); } } if (redirection->flags & LB_USERNAME) { free(settings->username); - settings->username = xstrdup(redirection->username.ascii); + settings->username = _strdup(redirection->username.ascii); } if (redirection->flags & LB_DOMAIN) { free(settings->domain); - settings->domain = xstrdup(redirection->domain.ascii); + settings->domain = _strdup(redirection->domain.ascii); } if (redirection->flags & LB_PASSWORD) diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index 2b5a2840d..ae9fd0fed 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -44,7 +44,7 @@ void http_context_set_method(HttpContext* http_context, char* method) if (http_context->Method) free(http_context->Method); - http_context->Method = xstrdup(method); + http_context->Method = _strdup(method); } void http_context_set_uri(HttpContext* http_context, char* uri) @@ -52,7 +52,7 @@ void http_context_set_uri(HttpContext* http_context, char* uri) if (http_context->URI) free(http_context->URI); - http_context->URI = xstrdup(uri); + http_context->URI = _strdup(uri); } void http_context_set_user_agent(HttpContext* http_context, char* user_agent) @@ -60,7 +60,7 @@ void http_context_set_user_agent(HttpContext* http_context, char* user_agent) if (http_context->UserAgent) free(http_context->UserAgent); - http_context->UserAgent = xstrdup(user_agent); + http_context->UserAgent = _strdup(user_agent); } void http_context_set_host(HttpContext* http_context, char* host) @@ -68,7 +68,7 @@ void http_context_set_host(HttpContext* http_context, char* host) if (http_context->Host) free(http_context->Host); - http_context->Host = xstrdup(host); + http_context->Host = _strdup(host); } void http_context_set_accept(HttpContext* http_context, char* accept) @@ -76,7 +76,7 @@ void http_context_set_accept(HttpContext* http_context, char* accept) if (http_context->Accept) free(http_context->Accept); - http_context->Accept = xstrdup(accept); + http_context->Accept = _strdup(accept); } void http_context_set_cache_control(HttpContext* http_context, char* cache_control) @@ -84,7 +84,7 @@ void http_context_set_cache_control(HttpContext* http_context, char* cache_contr if (http_context->CacheControl) free(http_context->CacheControl); - http_context->CacheControl = xstrdup(cache_control); + http_context->CacheControl = _strdup(cache_control); } void http_context_set_connection(HttpContext* http_context, char* connection) @@ -92,7 +92,7 @@ void http_context_set_connection(HttpContext* http_context, char* connection) if (http_context->Connection) free(http_context->Connection); - http_context->Connection = xstrdup(connection); + http_context->Connection = _strdup(connection); } void http_context_set_pragma(HttpContext* http_context, char* pragma) @@ -100,7 +100,7 @@ void http_context_set_pragma(HttpContext* http_context, char* pragma) if (http_context->Pragma) free(http_context->Pragma); - http_context->Pragma = xstrdup(pragma); + http_context->Pragma = _strdup(pragma); } void http_context_free(HttpContext* http_context) @@ -122,7 +122,7 @@ void http_request_set_method(HttpRequest* http_request, char* method) if (http_request->Method) free(http_request->Method); - http_request->Method = xstrdup(method); + http_request->Method = _strdup(method); } void http_request_set_uri(HttpRequest* http_request, char* uri) @@ -130,7 +130,7 @@ void http_request_set_uri(HttpRequest* http_request, char* uri) if (http_request->URI) free(http_request->URI); - http_request->URI = xstrdup(uri); + http_request->URI = _strdup(uri); } void http_request_set_auth_scheme(HttpRequest* http_request, char* auth_scheme) @@ -138,7 +138,7 @@ void http_request_set_auth_scheme(HttpRequest* http_request, char* auth_scheme) if (http_request->AuthScheme) free(http_request->AuthScheme); - http_request->AuthScheme = xstrdup(auth_scheme); + http_request->AuthScheme = _strdup(auth_scheme); } void http_request_set_auth_param(HttpRequest* http_request, char* auth_param) @@ -146,7 +146,7 @@ void http_request_set_auth_param(HttpRequest* http_request, char* auth_param) if (http_request->AuthParam) free(http_request->AuthParam); - http_request->AuthParam = xstrdup(auth_param); + http_request->AuthParam = _strdup(auth_param); } #ifndef _WIN32 @@ -310,7 +310,7 @@ void http_response_parse_header_status_line(HttpResponse* http_response, char* s *separator = '\0'; http_response->StatusCode = atoi(status_code); - http_response->ReasonPhrase = xstrdup(reason_phrase); + http_response->ReasonPhrase = _strdup(reason_phrase); *separator = ' '; } @@ -324,15 +324,15 @@ void http_response_parse_header_field(HttpResponse* http_response, char* name, c { char* separator; - http_response->Authorization = xstrdup(value); + http_response->Authorization = _strdup(value); separator = strchr(value, ' '); if (separator != NULL) { *separator = '\0'; - http_response->AuthScheme = xstrdup(value); - http_response->AuthParam = xstrdup(separator + 1); + http_response->AuthScheme = _strdup(value); + http_response->AuthParam = _strdup(separator + 1); *separator = ' '; } } @@ -355,8 +355,8 @@ void http_response_parse_header_field(HttpResponse* http_response, char* name, c /* WWW-Authenticate: NTLM base64token */ *separator = '\0'; - http_response->AuthScheme = xstrdup(value); - http_response->AuthParam = xstrdup(separator + 1); + http_response->AuthScheme = _strdup(value); + http_response->AuthParam = _strdup(separator + 1); *separator = ' '; return; @@ -473,7 +473,7 @@ HttpResponse* http_response_recv(rdpTls* tls) while (line != NULL) { - http_response->lines[count] = xstrdup(line); + http_response->lines[count] = _strdup(line); line = strtok(NULL, "\r\n"); count++; } @@ -482,7 +482,7 @@ HttpResponse* http_response_recv(rdpTls* tls) if (http_response->ContentLength > 0) { - http_response->Content = xstrdup(content); + http_response->Content = _strdup(content); } break; diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 8b16c7c61..11ef5d3e4 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -30,11 +30,12 @@ #include #endif +#include +#include + #include #include -#include - static const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll"; void settings_client_load_hkey_local_machine(rdpSettings* settings) @@ -258,7 +259,7 @@ rdpSettings* settings_new(void* instance) settings->draw_nine_grid_cache_size = 2560; settings->draw_nine_grid_cache_entries = 256; - settings->client_dir = xstrdup(client_dll); + settings->client_dir = _strdup(client_dll); settings->num_icon_caches = 3; settings->num_icon_cache_entries = 12; diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index b409e1fbd..8c8d8a1db 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -29,6 +29,8 @@ #include #include +#include + #ifndef _WIN32 #include #include @@ -79,7 +81,7 @@ void tcp_get_ip_address(rdpTcp * tcp) tcp->ip_address[sizeof(tcp->ip_address) - 1] = 0; tcp->settings->ipv6 = 0; - tcp->settings->ip_address = xstrdup(tcp->ip_address); + tcp->settings->ip_address = _strdup(tcp->ip_address); } void tcp_get_mac_address(rdpTcp * tcp) diff --git a/libfreerdp/crypto/CMakeLists.txt b/libfreerdp/crypto/CMakeLists.txt index e8a920624..4cd1b0e8d 100644 --- a/libfreerdp/crypto/CMakeLists.txt +++ b/libfreerdp/crypto/CMakeLists.txt @@ -59,8 +59,10 @@ else() endif() if(MONOLITHIC_BUILD) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/libfreerdp/crypto/certificate.c b/libfreerdp/crypto/certificate.c index f60d6f0f7..ecb47e696 100644 --- a/libfreerdp/crypto/certificate.c +++ b/libfreerdp/crypto/certificate.c @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -217,8 +219,8 @@ rdpCertificateData* certificate_data_new(char* hostname, char* fingerprint) if (certdata != NULL) { - certdata->hostname = xstrdup(hostname); - certdata->fingerprint = xstrdup(fingerprint); + certdata->hostname = _strdup(hostname); + certdata->fingerprint = _strdup(fingerprint); } return certdata; diff --git a/libfreerdp/locale/CMakeLists.txt b/libfreerdp/locale/CMakeLists.txt index bae6b46da..a96812706 100644 --- a/libfreerdp/locale/CMakeLists.txt +++ b/libfreerdp/locale/CMakeLists.txt @@ -81,8 +81,10 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") if(MONOLITHIC_BUILD) + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/libfreerdp/locale/keyboard_layout.c b/libfreerdp/locale/keyboard_layout.c index 20bda4950..422d113f9 100644 --- a/libfreerdp/locale/keyboard_layout.c +++ b/libfreerdp/locale/keyboard_layout.c @@ -25,6 +25,8 @@ #include #include +#include + #include "liblocale.h" #include @@ -492,7 +494,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) for (i = 0; i < length; i++, num++) { layouts[num].code = RDP_KEYBOARD_LAYOUT_TABLE[i].code; - layouts[num].name = xstrdup(RDP_KEYBOARD_LAYOUT_TABLE[i].name); + layouts[num].name = _strdup(RDP_KEYBOARD_LAYOUT_TABLE[i].name); } } if ((types & RDP_KEYBOARD_LAYOUT_TYPE_VARIANT) != 0) @@ -503,7 +505,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) for (i = 0; i < length; i++, num++) { layouts[num].code = RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].code; - layouts[num].name = xstrdup(RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].name); + layouts[num].name = _strdup(RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].name); } } if ((types & RDP_KEYBOARD_LAYOUT_TYPE_IME) != 0) @@ -514,7 +516,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) for (i = 0; i < length; i++, num++) { layouts[num].code = RDP_KEYBOARD_IME_TABLE[i].code; - layouts[num].name = xstrdup(RDP_KEYBOARD_IME_TABLE[i].name); + layouts[num].name = _strdup(RDP_KEYBOARD_IME_TABLE[i].name); } } diff --git a/libfreerdp/locale/keyboard_x11.c b/libfreerdp/locale/keyboard_x11.c index 3996ccd30..d974de55e 100644 --- a/libfreerdp/locale/keyboard_x11.c +++ b/libfreerdp/locale/keyboard_x11.c @@ -25,7 +25,10 @@ #include #include +#include + #include "liblocale.h" + #include #include #include @@ -103,8 +106,8 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var if (keyboardLayoutId > 0) { - *xkb_layout = xstrdup(layout); - *xkb_variant = xstrdup(variant); + *xkb_layout = _strdup(layout); + *xkb_variant = _strdup(variant); return keyboardLayoutId; } @@ -149,8 +152,8 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var if (keyboardLayoutId > 0) { - *xkb_layout = xstrdup(layout); - *xkb_variant = xstrdup(variant); + *xkb_layout = _strdup(layout); + *xkb_variant = _strdup(variant); return keyboardLayoutId; } diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 2d98eecbd..278f473c6 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -26,6 +26,8 @@ #include #include +#include + #include "liblocale.h" #include @@ -1502,7 +1504,7 @@ char* freerdp_get_unix_timezone_identifier() if (tz_env != NULL) { - tzid = xstrdup(tz_env); + tzid = _strdup(tz_env); return tzid; } @@ -1576,7 +1578,7 @@ boolean freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const char* p; char* list_copy; - list_copy = xstrdup(list); + list_copy = _strdup(list); p = strtok(list_copy, " "); diff --git a/libfreerdp/utils/CMakeLists.txt b/libfreerdp/utils/CMakeLists.txt index ae639bbb3..34e11f72e 100644 --- a/libfreerdp/utils/CMakeLists.txt +++ b/libfreerdp/utils/CMakeLists.txt @@ -76,12 +76,7 @@ if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() - if(NOT WIN32) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt) - endif() - - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-synch) - + set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt winpr-synch) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/libfreerdp/utils/args.c b/libfreerdp/utils/args.c index 651490b56..90ba448ad 100644 --- a/libfreerdp/utils/args.c +++ b/libfreerdp/utils/args.c @@ -26,6 +26,8 @@ #include #include +#include + #ifdef _WIN32 #include #define isatty _isatty @@ -51,7 +53,7 @@ void freerdp_parse_hostname(rdpSettings* settings, char* hostname) && (p[1] == 0 || (p[1] == ':' && !strchr(p + 2, ':')))) { /* Either "[...]" or "[...]:..." with at most one : after the brackets */ - settings->hostname = xstrdup(hostname + 1); + settings->hostname = _strdup(hostname + 1); if ((p = strchr((char*)settings->hostname, ']'))) { @@ -64,7 +66,7 @@ void freerdp_parse_hostname(rdpSettings* settings, char* hostname) else { /* Port number is cut off and used if exactly one : in the string */ - settings->hostname = xstrdup(hostname); + settings->hostname = _strdup(hostname); if ((p = strchr((char*)settings->hostname, ':')) && !strchr(p + 1, ':')) { @@ -185,7 +187,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing username\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->username = xstrdup(argv[index]); + settings->username = _strdup(argv[index]); } else if (strcmp("-p", argv[index]) == 0) { @@ -195,7 +197,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing password\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->password = xstrdup(argv[index]); + settings->password = _strdup(argv[index]); settings->autologon = 1; /* @@ -213,7 +215,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing domain\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->domain = xstrdup(argv[index]); + settings->domain = _strdup(argv[index]); } else if (strcmp("-s", argv[index]) == 0) { @@ -223,7 +225,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing shell\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->shell = xstrdup(argv[index]); + settings->shell = _strdup(argv[index]); } else if (strcmp("-c", argv[index]) == 0) { @@ -233,7 +235,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing directory\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->directory = xstrdup(argv[index]); + settings->directory = _strdup(argv[index]); } else if (strcmp("-g", argv[index]) == 0) { @@ -289,7 +291,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, return FREERDP_ARGS_PARSE_FAILURE; } - settings->window_title = xstrdup(argv[index]); + settings->window_title = _strdup(argv[index]); } else if (strcmp("-t", argv[index]) == 0) { @@ -384,7 +386,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, return FREERDP_ARGS_PARSE_FAILURE; } - settings->certificate_name = xstrdup(argv[index]); + settings->certificate_name = _strdup(argv[index]); } else if (strcmp("--no-fastpath", argv[index]) == 0) { @@ -520,7 +522,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing file name\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->dump_rfx_file = xstrdup(argv[index]); + settings->dump_rfx_file = _strdup(argv[index]); settings->dump_rfx = true; settings->rfx_codec_only = true; } @@ -532,7 +534,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing file name\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->play_rfx_file = xstrdup(argv[index]); + settings->play_rfx_file = _strdup(argv[index]); settings->play_rfx = true; } else if (strcmp("--fonts", argv[index]) == 0) @@ -679,21 +681,21 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing TSG username\n"); return -1; } - settings->tsg_username = xstrdup(argv[index]); + settings->tsg_username = _strdup(argv[index]); index++; if (index == argc) { printf("missing TSG password\n"); return -1; } - settings->tsg_password = xstrdup(argv[index]); + settings->tsg_password = _strdup(argv[index]); index++; if (index == argc) { printf("missing TSG server\n"); return -1; } - settings->tsg_hostname = xstrdup(argv[index]); + settings->tsg_hostname = _strdup(argv[index]); } else if (strcmp("--plugin", argv[index]) == 0) { @@ -809,7 +811,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, return -1; } settings->send_preconnection_pdu = true; - settings->preconnection_blob = xstrdup(argv[index]); + settings->preconnection_blob = _strdup(argv[index]); } else if (strcmp("--version", argv[index]) == 0) { @@ -874,7 +876,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, input[0] = '\0'; printf("username: "); if (scanf("%511s", input) > 0) { - settings->username = xstrdup(input); + settings->username = _strdup(input); } } /* password */ @@ -899,7 +901,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, /* Try to catch the cases where the string is NULL-ish right at the get go */ if (input[0] != '\0' && !(input[0] == '.' && input[1] == '\0')) { - settings->domain = xstrdup(input); + settings->domain = _strdup(input); } } } diff --git a/libfreerdp/utils/file.c b/libfreerdp/utils/file.c index 076201005..3be331a33 100644 --- a/libfreerdp/utils/file.c +++ b/libfreerdp/utils/file.c @@ -26,6 +26,8 @@ #include #include +#include + #include #include #include @@ -87,7 +89,7 @@ char* freerdp_get_home_path(rdpSettings* settings) if (settings->home_path == NULL) settings->home_path = getenv(HOME_ENV_VARIABLE); if (settings->home_path == NULL) - settings->home_path = xstrdup("/"); + settings->home_path = _strdup("/"); return settings->home_path; } @@ -155,7 +157,7 @@ char* freerdp_append_shared_library_suffix(char* file_path) } else { - path = xstrdup(file_path); + path = _strdup(file_path); } } else @@ -179,7 +181,7 @@ char* freerdp_get_parent_path(char* base_path, int depth) return NULL; if (depth <= 0) - return xstrdup(base_path); + return _strdup(base_path); base_length = strlen(base_path); diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index 607f32144..5bc5e617e 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -24,7 +24,10 @@ #include #include #include + +#include #include + #include #include #include @@ -129,7 +132,7 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) else { /* explicit path given, use it instead of default path */ - path = xstrdup(suffixed_name); + path = _strdup(suffixed_name); } entry = freerdp_load_library_symbol(path, entry_name); diff --git a/libfreerdp/utils/memory.c b/libfreerdp/utils/memory.c index 3cc2a69e1..d3b65a1ac 100644 --- a/libfreerdp/utils/memory.c +++ b/libfreerdp/utils/memory.c @@ -25,6 +25,8 @@ #include #include +#include + #include /** @@ -54,37 +56,6 @@ void* xzalloc(size_t size) return mem; } -/** - * Duplicate a string in memory. - * This function is used to secure the strdup function. - * It will allocate a new memory buffer and copy the string content in it. - * If allocation fails, it will log an error. - * - * @param str - pointer to the character string to copy. If str is NULL, nothing is done. - * - * @return a pointer to a newly allocated character string containing the same bytes as str. - * NULL if an allocation error occurred, or if the str parameter was NULL. - */ - -char* xstrdup(const char* str) -{ - char* mem; - - if (str == NULL) - return NULL; - -#ifdef _WIN32 - mem = _strdup(str); -#else - mem = strdup(str); -#endif - - if (mem == NULL) - perror("strdup"); - - return mem; -} - /** * Duplicate a wide string in memory. * This function is used to secure a call to wcsdup. @@ -136,15 +107,19 @@ char* xstrtoup(const char* str) char* out; char* p; int c; - out = xstrdup(str); - if(out != NULL) + + out = _strdup(str); + + if (out != NULL) { p = out; - while(*p != '\0') + + while (*p != '\0') { c = toupper((unsigned char)*p); - *p++ = (char)c; + *p++ = (char) c; } } + return out; } diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt index 783c621ba..35dc0a348 100644 --- a/server/Sample/CMakeLists.txt +++ b/server/Sample/CMakeLists.txt @@ -30,10 +30,12 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) if(MONOLITHIC_BUILD) target_link_libraries(${MODULE_NAME} + winpr freerdp freerdp-channels-server) else() target_link_libraries(${MODULE_NAME} + winpr-crt freerdp-core freerdp-utils freerdp-codec diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index ae9332b5a..4c2d3de61 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -30,6 +30,8 @@ #include #include +#include + #include #include #include @@ -650,8 +652,8 @@ static void* test_peer_mainloop(void* arg) test_peer_init(client); /* Initialize the real server settings here */ - client->settings->cert_file = xstrdup("server.crt"); - client->settings->privatekey_file = xstrdup("server.key"); + client->settings->cert_file = _strdup("server.crt"); + client->settings->privatekey_file = _strdup("server.key"); client->settings->nla_security = false; client->settings->rfx_codec = true; client->settings->suppress_output = true; From 7b55d27f965721a2683ba35fc2f40d3331325a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 8 Oct 2012 23:46:05 -0400 Subject: [PATCH 34/43] libfreerdp-utils: remove xwcsdup and xstrtoup --- include/freerdp/utils/memory.h | 3 -- libfreerdp/utils/memory.c | 67 ---------------------------------- 2 files changed, 70 deletions(-) diff --git a/include/freerdp/utils/memory.h b/include/freerdp/utils/memory.h index d1e18f51f..27f08e75f 100644 --- a/include/freerdp/utils/memory.h +++ b/include/freerdp/utils/memory.h @@ -28,9 +28,6 @@ FREERDP_API void* xzalloc(size_t size); -FREERDP_API char* xstrtoup(const char* str); -FREERDP_API wchar_t* xwcsdup(const wchar_t* wstr); - #define xnew(_type) (_type*)xzalloc(sizeof(_type)) #define ARRAY_SIZE(_x) (sizeof(_x)/sizeof(*(_x))) diff --git a/libfreerdp/utils/memory.c b/libfreerdp/utils/memory.c index d3b65a1ac..eaa96dc28 100644 --- a/libfreerdp/utils/memory.c +++ b/libfreerdp/utils/memory.c @@ -56,70 +56,3 @@ void* xzalloc(size_t size) return mem; } -/** - * Duplicate a wide string in memory. - * This function is used to secure a call to wcsdup. - * It verifies the return value, and logs a message if an allocation error occurred. - * - * @param wstr - pointer to the wide-character string to duplicate. If wstr is NULL, nothing will be done. - * - * @return a pointer to the newly allocated string, containing the same data as wstr. - * NULL if an allocation error occurred (or if wstr was NULL). - */ - -wchar_t* xwcsdup(const wchar_t* wstr) -{ - wchar_t* mem; - - if (wstr == NULL) - return NULL; - -#ifdef _WIN32 - mem = _wcsdup(wstr); -#elif sun - mem = wsdup(wstr); -#elif (defined(__APPLE__) && defined(__MACH__)) || defined(ANDROID) - mem = malloc(wcslen(wstr) * sizeof(wchar_t)); - if (mem != NULL) - wcscpy(mem, wstr); -#else - mem = wcsdup(wstr); -#endif - - if (mem == NULL) - perror("wstrdup"); - - return mem; -} - -/** - * Create an uppercase version of the given string. - * This function will duplicate the string (using xstrdup()) and change its content to all uppercase. - * The original string is untouched. - * - * @param str - pointer to the character string to convert. This content is untouched by the function. - * - * @return pointer to a newly allocated character string, containing the same content as str, converted to uppercase. - * NULL if an allocation error occured. - */ -char* xstrtoup(const char* str) -{ - char* out; - char* p; - int c; - - out = _strdup(str); - - if (out != NULL) - { - p = out; - - while (*p != '\0') - { - c = toupper((unsigned char)*p); - *p++ = (char) c; - } - } - - return out; -} From 5612bc43f839df5b240b54f0e8e433326a521eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 02:31:28 -0400 Subject: [PATCH 35/43] freerdp: change true/false to TRUE/FALSE --- channels/audin/client/alsa/audin_alsa.c | 10 +- channels/audin/client/audin_main.c | 18 +- channels/audin/client/pulse/audin_pulse.c | 18 +- channels/audin/server/audin.c | 42 +-- channels/cliprdr/client/cliprdr_format.c | 6 +- channels/cliprdr/client/cliprdr_main.c | 10 +- channels/disk/client/dirent.h | 2 +- channels/disk/client/disk_file.c | 84 +++--- channels/printer/client/printer_cups.c | 2 +- channels/printer/client/printer_win.c | 2 +- channels/rail/client/rail_orders.c | 14 +- channels/rdpdr/client/devman.c | 4 +- channels/rdpdr/client/rdpdr_main.c | 8 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 6 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 20 +- channels/rdpsnd/client/rdpsnd_main.c | 12 +- channels/rdpsnd/server/rdpsnd.c | 26 +- channels/serial/client/serial_tty.c | 28 +- channels/smartcard/client/scard_main.c | 12 +- channels/smartcard/client/scard_operations.c | 6 +- channels/tsmf/client/alsa/tsmf_alsa.c | 14 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 50 ++-- .../tsmf/client/gstreamer/tsmf_gstreamer.c | 4 +- channels/tsmf/client/pulse/tsmf_pulse.c | 34 +-- channels/tsmf/client/tsmf_codec.c | 14 +- channels/tsmf/client/tsmf_ifman.c | 28 +- channels/tsmf/client/tsmf_main.c | 8 +- channels/tsmf/client/tsmf_media.c | 10 +- channels/urbdrc/client/data_transfer.c | 2 +- channels/urbdrc/client/urbdrc_main.c | 8 +- client/DirectFB/df_event.c | 10 +- client/DirectFB/dfreerdp.c | 70 ++--- client/Mac/MRDPView.m | 54 ++-- client/Sample/freerdp.c | 56 ++-- client/Windows/wf_cliprdr.c | 8 +- client/Windows/wf_event.c | 14 +- client/Windows/wf_gdi.c | 6 +- client/Windows/wf_graphics.c | 4 +- client/X11/xf_cliprdr.c | 68 ++--- client/X11/xf_event.c | 176 +++++------ client/X11/xf_gdi.c | 32 +- client/X11/xf_graphics.c | 10 +- client/X11/xf_keyboard.c | 22 +- client/X11/xf_monitor.c | 10 +- client/X11/xf_rail.c | 12 +- client/X11/xf_tsmf.c | 22 +- client/X11/xf_window.c | 68 ++--- client/X11/xfreerdp.c | 128 ++++---- cunit/test_bitmap.c | 16 +- cunit/test_mppc.c | 2 +- cunit/test_mppc_enc.c | 8 +- cunit/test_orders.c | 14 +- cunit/test_pcap.c | 4 +- cunit/test_rail.c | 26 +- include/freerdp/channels/wtsvc.h | 6 +- include/freerdp/errorcodes.h | 2 +- include/freerdp/freerdp.h | 2 +- include/freerdp/scancode.h | 280 +++++++++--------- include/freerdp/types.h | 18 +- libfreerdp/cache/bitmap.c | 22 +- libfreerdp/cache/offscreen.c | 6 +- libfreerdp/channels/libchannels.c | 4 +- libfreerdp/channels/wtsvc.c | 50 ++-- libfreerdp/codec/bitmap.c | 8 +- libfreerdp/codec/color.c | 6 +- libfreerdp/codec/include/bitmap.c | 12 +- libfreerdp/codec/mppc_dec.c | 22 +- libfreerdp/codec/mppc_enc.c | 20 +- libfreerdp/codec/rfx.c | 4 +- libfreerdp/core/activation.c | 44 +-- libfreerdp/core/capabilities.c | 102 +++---- libfreerdp/core/certificate.c | 34 +-- libfreerdp/core/channel.c | 4 +- libfreerdp/core/connection.c | 200 ++++++------- libfreerdp/core/fastpath.c | 72 ++--- libfreerdp/core/freerdp.c | 30 +- libfreerdp/core/gcc.c | 106 +++---- libfreerdp/core/http.c | 2 +- libfreerdp/core/info.c | 48 +-- libfreerdp/core/input.c | 42 +-- libfreerdp/core/license.c | 18 +- libfreerdp/core/listener.c | 26 +- libfreerdp/core/mcs.c | 82 ++--- libfreerdp/core/nego.c | 84 +++--- libfreerdp/core/orders.c | 50 ++-- libfreerdp/core/peer.c | 78 ++--- libfreerdp/core/rdp.c | 88 +++--- libfreerdp/core/redirection.c | 6 +- libfreerdp/core/rpc.c | 44 +-- libfreerdp/core/rts.c | 22 +- libfreerdp/core/security.c | 18 +- libfreerdp/core/settings.c | 114 +++---- libfreerdp/core/surface.c | 4 +- libfreerdp/core/tcp.c | 20 +- libfreerdp/core/timezone.c | 4 +- libfreerdp/core/tpkt.c | 4 +- libfreerdp/core/transport.c | 60 ++-- libfreerdp/core/tsg.c | 22 +- libfreerdp/core/update.c | 22 +- libfreerdp/crypto/ber.c | 72 ++--- libfreerdp/crypto/certificate.c | 4 +- libfreerdp/crypto/crypto.c | 10 +- libfreerdp/crypto/der.c | 2 +- libfreerdp/crypto/er.c | 86 +++--- libfreerdp/crypto/nla.c | 66 ++--- libfreerdp/crypto/per.c | 68 ++--- libfreerdp/crypto/tls.c | 76 ++--- libfreerdp/gdi/gdi.c | 2 +- libfreerdp/gdi/graphics.c | 4 +- libfreerdp/locale/keyboard_xkbfile.c | 8 +- libfreerdp/locale/locale.c | 8 +- libfreerdp/locale/timezone.c | 206 ++++++------- libfreerdp/rail/rail.c | 2 +- libfreerdp/rail/window.c | 98 +++--- libfreerdp/rail/window_list.c | 4 +- libfreerdp/utils/args.c | 122 ++++---- libfreerdp/utils/file.c | 18 +- libfreerdp/utils/load_plugin.c | 6 +- libfreerdp/utils/pcap.c | 18 +- server/Sample/sf_rdpsnd.c | 2 +- server/Sample/sfreerdp.c | 54 ++-- server/Windows/wf_interface.c | 4 +- server/Windows/wf_mirage.c | 16 +- server/Windows/wf_peer.c | 18 +- server/Windows/wf_update.c | 2 +- server/X11/xf_input.c | 12 +- server/X11/xf_peer.c | 54 ++-- server/X11/xfreerdp.c | 8 +- 128 files changed, 2152 insertions(+), 2152 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index 4183b6187..50069d101 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -67,7 +67,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, @@ -90,7 +90,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) @@ -249,7 +249,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; @@ -258,11 +258,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) diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index c63adc90e..d1c19033c 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -228,7 +228,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); @@ -236,7 +236,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) @@ -456,7 +456,7 @@ static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, R } if (entry == NULL) - return false; + return FALSE; entryPoints.plugin = pPlugin; entryPoints.pRegisterAudinDevice = audin_register_device_plugin; @@ -465,10 +465,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) @@ -482,17 +482,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]) { @@ -520,7 +520,7 @@ static boolean audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* d } } - return true; + return TRUE; } int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 1ab856595..4628ac425 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -86,13 +86,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) @@ -100,7 +100,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 (;;) { @@ -119,12 +119,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; } } @@ -170,7 +170,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; @@ -181,7 +181,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; @@ -190,11 +190,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) diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index f244c9934..2d395e1b0 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -78,12 +78,12 @@ static boolean audin_server_recv_version(audin_server* audin, STREAM* s, uint32 uint32 Version; if (length < 4) - return false; + return FALSE; stream_read_uint32(s, Version); if (Version < 1) - return false; + return FALSE; - return true; + return TRUE; } static void audin_server_send_formats(audin_server* audin, STREAM* s) @@ -125,14 +125,14 @@ static boolean audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 int i; if (length < 8) - return false; + return FALSE; stream_read_uint32(s, audin->context.num_client_formats); /* NumFormats (4 bytes) */ stream_seek_uint32(s); /* cbSizeFormatsPacket (4 bytes) */ length -= 8; if (audin->context.num_client_formats <= 0) - return false; + return FALSE; audin->context.client_formats = xzalloc(audin->context.num_client_formats * sizeof(rdpsndFormat)); for (i = 0; i < audin->context.num_client_formats; i++) @@ -141,7 +141,7 @@ static boolean audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 { free(audin->context.client_formats); audin->context.client_formats = NULL; - return false; + return FALSE; } stream_read_uint16(s, audin->context.client_formats[i].wFormatTag); @@ -159,7 +159,7 @@ static boolean audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 IFCALL(audin->context.Opening, &audin->context); - return true; + return TRUE; } static void audin_server_send_open(audin_server* audin, STREAM* s) @@ -167,7 +167,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) if (audin->context.selected_client_format < 0) return; - audin->opened = true; + audin->opened = TRUE; stream_set_pos(s, 0); stream_write_uint8(s, MSG_SNDIN_OPEN); @@ -194,12 +194,12 @@ static boolean audin_server_recv_open_reply(audin_server* audin, STREAM* s, uint uint32 Result; if (length < 4) - return false; + return FALSE; stream_read_uint32(s, Result); IFCALL(audin->context.OpenResult, &audin->context, Result); - return true; + return TRUE; } static boolean audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length) @@ -212,7 +212,7 @@ static boolean audin_server_recv_data(audin_server* audin, STREAM* s, uint32 len int frames; if (audin->context.selected_client_format < 0) - return false; + return FALSE; format = &audin->context.client_formats[audin->context.selected_client_format]; @@ -257,7 +257,7 @@ static boolean audin_server_recv_data(audin_server* audin, STREAM* s, uint32 len IFCALL(audin->context.ReceiveSamples, &audin->context, src, frames); - return true; + return TRUE; } static void* audin_server_thread_func(void* arg) @@ -266,12 +266,12 @@ static void* audin_server_thread_func(void* arg) STREAM* s; void* buffer; uint8 MessageId; - boolean ready = false; + boolean ready = FALSE; uint32 bytes_returned = 0; audin_server* audin = (audin_server*) arg; freerdp_thread* thread = audin->audin_channel_thread; - if (WTSVirtualChannelQuery(audin->audin_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == true) + if (WTSVirtualChannelQuery(audin->audin_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == TRUE) { fd = *((void**)buffer); WTSFreeMemory(buffer); @@ -285,7 +285,7 @@ static void* audin_server_thread_func(void* arg) if (freerdp_thread_is_stopped(thread)) break; - if (WTSVirtualChannelQuery(audin->audin_channel, WTSVirtualChannelReady, &buffer, &bytes_returned) == false) + if (WTSVirtualChannelQuery(audin->audin_channel, WTSVirtualChannelReady, &buffer, &bytes_returned) == FALSE) break; ready = *((boolean*)buffer); WTSFreeMemory(buffer); @@ -310,7 +310,7 @@ static void* audin_server_thread_func(void* arg) stream_set_pos(s, 0); if (WTSVirtualChannelRead(audin->audin_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) { if (bytes_returned == 0) break; @@ -318,7 +318,7 @@ static void* audin_server_thread_func(void* arg) stream_check_size(s, (int) bytes_returned); if (WTSVirtualChannelRead(audin->audin_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) break; } if (bytes_returned < 1) @@ -375,15 +375,15 @@ static boolean audin_server_open(audin_server_context* context) audin->audin_channel = WTSVirtualChannelOpenEx(context->vcm, "AUDIO_INPUT", WTS_CHANNEL_OPTION_DYNAMIC); if (audin->audin_channel == NULL) - return false; + return FALSE; audin->audin_channel_thread = freerdp_thread_new(); freerdp_thread_start(audin->audin_channel_thread, audin_server_thread_func, audin); - return true; + return TRUE; } - return false; + return FALSE; } static boolean audin_server_close(audin_server_context* context) @@ -403,7 +403,7 @@ static boolean audin_server_close(audin_server_context* context) } audin->context.selected_client_format = -1; - return true; + return TRUE; } audin_server_context* audin_server_context_new(WTSVirtualChannelManager* vcm) diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index 59f02a728..131135fa2 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -128,7 +128,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*) malloc(sizeof(CLIPRDR_FORMAT_NAME) * num_formats); cliprdr->num_format_names = num_formats; @@ -224,7 +224,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; @@ -264,7 +264,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL } else { - supported = false; + supported = FALSE; } break; diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index f91cd38f4..e59a7c5a7 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -118,18 +118,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, uint16 length, uint16 flags) diff --git a/channels/disk/client/dirent.h b/channels/disk/client/dirent.h index fa5a294d5..9a293daa1 100644 --- a/channels/disk/client/dirent.h +++ b/channels/disk/client/dirent.h @@ -137,7 +137,7 @@ /* * File type macros. Note that block devices, sockets and links cannot be * distinguished on Windows and the macros S_ISBLK, S_ISSOCK and S_ISLNK are - * only defined for compatibility. These macros should always return false + * only defined for compatibility. These macros should always return FALSE * on Windows. */ #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFFIFO) diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index e05b925f8..cee593ef5 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -71,17 +71,17 @@ static boolean disk_file_wildcard_match(const char* pattern, const char* filenam { c = *p++; if (!c) /* shortcut */ - return true; + return TRUE; /* TODO: skip to tail comparison */ } if (c != *f++) - return false; + return FALSE; } if (!*f) - return true; + return TRUE; - return false; + return FALSE; } static void disk_file_fix_path(char* path) @@ -127,12 +127,12 @@ static boolean disk_file_remove_dir(const char* path) char* p; struct STAT st; struct dirent* pdirent; - boolean ret = true; + boolean ret = TRUE; dir = opendir(path); if (dir == NULL) - return false; + return FALSE; pdirent = readdir(dir); @@ -150,7 +150,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)) { @@ -159,11 +159,11 @@ 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; } free(p); @@ -181,7 +181,7 @@ static boolean disk_file_remove_dir(const char* path) if (rmdir(path) < 0) { DEBUG_WARN("rmdir %s failed.", path); - ret = false; + ret = FALSE; } } @@ -208,22 +208,22 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea const static int mode = _S_IREAD | _S_IWRITE ; #else const static int mode = S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH; - boolean largeFile = false; + boolean largeFile = FALSE; #endif int oflag = 0; if (STAT(file->fullpath, &st) == 0) { - file->is_dir = (S_ISDIR(st.st_mode) ? true : false); + file->is_dir = (S_ISDIR(st.st_mode) ? TRUE : FALSE); #ifndef WIN32 if (st.st_size > (unsigned long)0x07fffffff) - largeFile = true; + largeFile = TRUE; #endif - exists = true; + 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) { //Should only create the directory if the disposition allows for it @@ -232,11 +232,11 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea if (mkdir(file->fullpath, mode) != 0) { file->err = errno; - return true; + return TRUE; } } } - exists = false; + exists = FALSE; } if (file->is_dir) @@ -245,7 +245,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 @@ -275,7 +275,7 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea if (CreateOptions & FILE_DELETE_ON_CLOSE && DesiredAccess & DELETE) { - file->delete_pending = true; + file->delete_pending = TRUE; } if ((DesiredAccess & GENERIC_ALL) @@ -299,11 +299,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, @@ -349,12 +349,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) @@ -362,14 +362,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) @@ -377,18 +377,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) @@ -398,7 +398,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) { @@ -437,9 +437,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) @@ -466,7 +466,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; @@ -495,7 +495,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: @@ -528,17 +528,17 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui { DEBUG_WARN("rename %s to %s failed, errno = %d", file->fullpath, fullpath, errno); 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, @@ -556,7 +556,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; } if (InitialQuery != 0) @@ -593,7 +593,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui DEBUG_SVC(" pattern %s not found.", file->pattern); stream_write_uint32(output, 0); /* Length */ stream_write_uint8(output, 0); /* Padding */ - return false; + return FALSE; } memset(&st, 0, sizeof(struct STAT)); @@ -610,7 +610,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui length = freerdp_AsciiToUnicodeAlloc(ent->d_name, &ent_path, 0) * 2; - ret = true; + ret = TRUE; switch (FsInformationClass) { @@ -684,7 +684,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; } diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index 30bf5cf3f..60fba2d87 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -261,7 +261,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; diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index f61ee3294..91a3d5820 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -255,7 +255,7 @@ static rdpPrinter* printer_win_get_printer(rdpPrinterDriver* driver, const char* DEBUG_WINPR("printer %s", name); - myPrinter = printer_win_new_printer(win_driver, name, L"", win_driver->id_sequence == 1 ? true : false); + myPrinter = printer_win_new_printer(win_driver, name, L"", win_driver->id_sequence == 1 ? TRUE : FALSE); return myPrinter; } diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index d24178a8d..2c4303a17 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -157,11 +157,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: @@ -188,7 +188,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) */ @@ -353,16 +353,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; diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index eab0feb33..5b810313e 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -89,7 +89,7 @@ boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data) } if (entry == NULL) - return false; + return FALSE; ep.devman = devman; ep.RegisterDevice = devman_register_device; @@ -97,7 +97,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) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index e398b33ca..9953bd0ad 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -226,11 +226,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) @@ -264,12 +264,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: diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index 5864aeb0b..4eaf28ef5 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -274,7 +274,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; @@ -284,11 +284,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) diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index 7a167da46..e0792e40c 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -86,12 +86,12 @@ static boolean rdpsnd_pulse_connect(rdpsndDevicePlugin* device) rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*) 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); @@ -100,7 +100,7 @@ static boolean rdpsnd_pulse_connect(rdpsndDevicePlugin* 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 (;;) @@ -121,12 +121,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; } } @@ -370,7 +370,7 @@ static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndF rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)device; if (!pulse->context) - return false; + return FALSE; switch (format->wFormatTag) { @@ -380,7 +380,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; @@ -391,7 +391,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; @@ -401,11 +401,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) diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 3b2c92ec0..88528c58d 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -117,7 +117,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"); @@ -295,7 +295,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); @@ -303,7 +303,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); @@ -447,7 +447,7 @@ static boolean rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, } if (entry == NULL) { - return false; + return FALSE; } entryPoints.rdpsnd = rdpsnd; @@ -456,9 +456,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) diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index a5d73e7c5..78ee8e913 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -114,7 +114,7 @@ static boolean rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) int i; if (stream_get_left(s) < 20) - return false; + return FALSE; stream_seek_uint32(s); /* dwFlags */ stream_seek_uint32(s); /* dwVolume */ @@ -135,7 +135,7 @@ static boolean rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) { free(rdpsnd->context.client_formats); rdpsnd->context.client_formats = NULL; - return false; + return FALSE; } stream_read_uint16(s, rdpsnd->context.client_formats[i].wFormatTag); @@ -153,7 +153,7 @@ static boolean rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) } } - return true; + return TRUE; } static void* rdpsnd_server_thread_func(void* arg) @@ -167,7 +167,7 @@ static void* rdpsnd_server_thread_func(void* arg) rdpsnd_server* rdpsnd = (rdpsnd_server*) arg; freerdp_thread* thread = rdpsnd->rdpsnd_channel_thread; - if (WTSVirtualChannelQuery(rdpsnd->rdpsnd_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == true) + if (WTSVirtualChannelQuery(rdpsnd->rdpsnd_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == TRUE) { fd = *((void**)buffer); WTSFreeMemory(buffer); @@ -188,7 +188,7 @@ static void* rdpsnd_server_thread_func(void* arg) stream_set_pos(s, 0); if (WTSVirtualChannelRead(rdpsnd->rdpsnd_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) { if (bytes_returned == 0) break; @@ -196,7 +196,7 @@ static void* rdpsnd_server_thread_func(void* arg) stream_check_size(s, (int) bytes_returned); if (WTSVirtualChannelRead(rdpsnd->rdpsnd_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) break; } @@ -238,11 +238,11 @@ static boolean rdpsnd_server_initialize(rdpsnd_server_context* context) rdpsnd->rdpsnd_channel_thread = freerdp_thread_new(); freerdp_thread_start(rdpsnd->rdpsnd_channel_thread, rdpsnd_server_thread_func, rdpsnd); - return true; + return TRUE; } else { - return false; + return FALSE; } } @@ -389,7 +389,7 @@ static boolean rdpsnd_server_send_samples(rdpsnd_server_context* context, const rdpsnd_server* rdpsnd = (rdpsnd_server*) context; if (rdpsnd->context.selected_client_format < 0) - return false; + return FALSE; while (nframes > 0) { @@ -404,11 +404,11 @@ static boolean rdpsnd_server_send_samples(rdpsnd_server_context* context, const if (rdpsnd->out_pending_frames >= rdpsnd->out_frames) { if (!rdpsnd_server_send_audio_pdu(rdpsnd)) - return false; + return FALSE; } } - return true; + return TRUE; } static boolean rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, int right) @@ -430,12 +430,12 @@ static boolean rdpsnd_server_close(rdpsnd_server_context* context) STREAM* s = rdpsnd->rdpsnd_pdu; if (rdpsnd->context.selected_client_format < 0) - return false; + return FALSE; if (rdpsnd->out_pending_frames > 0) { if (!rdpsnd_server_send_audio_pdu(rdpsnd)) - return false; + return FALSE; } rdpsnd->context.selected_client_format = -1; diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index 0e0f73907..693d0d71f 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -410,12 +410,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) @@ -429,14 +429,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; } /** @@ -534,7 +534,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"); @@ -546,7 +546,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); @@ -562,7 +562,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result) { DEBUG_SVC("SERIAL_EV_RLSD"); *result |= SERIAL_EV_RLSD; - ret = true; + ret = TRUE; } } @@ -571,13 +571,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; } } @@ -594,7 +594,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 @@ -607,7 +607,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; } } @@ -618,7 +618,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; } } @@ -636,7 +636,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) @@ -776,7 +776,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) diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index aee9f6fe8..9a9c359e6 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -145,9 +145,9 @@ static COMPLETIONIDINFO* scard_mark_duplicate_id(SCARD_DEVICE* scard, uint32 Com CompletionIdInfo = (COMPLETIONIDINFO*)item->data; if (CompletionIdInfo->ID == CompletionId) { - if (false == CompletionIdInfo->duplicate) + if (FALSE == CompletionIdInfo->duplicate) { - CompletionIdInfo->duplicate = true; + CompletionIdInfo->duplicate = TRUE; DEBUG_WARN("CompletionID number %u is now marked as a duplicate.", CompletionId); } return CompletionIdInfo; @@ -175,7 +175,7 @@ static boolean scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 Complet if (CompletionIdInfo->ID == CompletionId) { duplicate = CompletionIdInfo->duplicate; - if (true == duplicate) + if (TRUE == duplicate) { DEBUG_WARN("CompletionID number %u was previously marked as a duplicate. The response to the command is removed.", CompletionId); } @@ -190,7 +190,7 @@ static boolean scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 Complet */ DEBUG_WARN("Error!!! No CompletionIDs (or no matching IDs) in the list!"); - return false; + return FALSE; } static void scard_irp_complete(IRP* irp) @@ -219,7 +219,7 @@ static void scard_irp_complete(IRP* irp) duplicate = scard_check_for_duplicate_id(scard, irp->CompletionId); ReleaseMutex(scard->CompletionIdsMutex); - if (false == duplicate) + if (FALSE == duplicate) { svc_plugin_send(irp->devman->plugin, irp->output); irp->output = NULL; @@ -245,7 +245,7 @@ static void scard_irp_request(DEVICE* device, IRP* irp) /* Begin TS Client defect workaround. */ CompletionIdInfo= xnew(COMPLETIONIDINFO); CompletionIdInfo->ID = irp->CompletionId;/* "duplicate" member is set - * to false by "xnew()" + * to FALSE by "xnew()" */ WaitForSingleObject(scard->CompletionIdsMutex, INFINITE); scard_mark_duplicate_id(scard, irp->CompletionId); diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index d43a2cafe..1d3318f2e 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -1345,7 +1345,7 @@ boolean scard_async_op(IRP* irp) case SCARD_IOCTL_RELEASE_CONTEXT: case SCARD_IOCTL_IS_VALID_CONTEXT: - return false; + return FALSE; break; /* async events */ @@ -1356,7 +1356,7 @@ boolean scard_async_op(IRP* irp) case SCARD_IOCTL_STATUS: case SCARD_IOCTL_STATUS + 4: - return true; + return TRUE; break; default: @@ -1364,7 +1364,7 @@ boolean scard_async_op(IRP* irp) } /* default to async */ - return true; + return TRUE; } void scard_device_control(SCARD_DEVICE* scard, IRP* irp) diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index a74e81d16..52906459d 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -56,11 +56,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) @@ -90,7 +90,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); @@ -102,7 +102,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, @@ -123,7 +123,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, @@ -144,7 +144,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) @@ -211,7 +211,7 @@ static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_ } free(data); - return true; + return TRUE; } static uint64 tsmf_alsa_get_latency(ITSMFAudioDevice* audio) diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index edd985fe8..3ad6268ad 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -63,10 +63,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) @@ -81,7 +81,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) @@ -103,7 +103,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) @@ -117,7 +117,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; @@ -126,12 +126,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) @@ -172,7 +172,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) @@ -182,12 +182,12 @@ static boolean tsmf_ffmpeg_prepare(ITSMFDecoder* decoder) if (avcodec_open2(mdecoder->codec_context, mdecoder->codec, NULL) < 0) { DEBUG_WARN("avcodec_open2 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) @@ -203,7 +203,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) { @@ -247,17 +247,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) @@ -266,7 +266,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); @@ -285,12 +285,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 { @@ -416,7 +416,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) @@ -438,7 +438,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; } } @@ -478,11 +478,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; } } @@ -505,7 +505,7 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder) free(decoder); } -static boolean initialized = false; +static boolean initialized = FALSE; ITSMFDecoder* TSMFDecoderEntry(void) @@ -515,7 +515,7 @@ TSMFDecoderEntry(void) if (!initialized) { avcodec_register_all(); - initialized = true; + initialized = TRUE; } decoder = xnew(TSMFFFmpegDecoder); diff --git a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c index 52a7d0a49..9f110039d 100644 --- a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c +++ b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c @@ -323,7 +323,7 @@ static boolean tsmf_gstreamer_set_format(ITSMFDecoder * decoder, TS_AM_MEDIA_TYP { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) - return false; + return FALSE; GstBuffer *gst_buf_cap_codec_data; /* Buffer to hold extra descriptive codec-specific caps data */ DEBUG_DVC("tsmf_gstreamer_set_format: "); @@ -775,7 +775,7 @@ static void tsmf_gstreamer_clean_up(TSMFGstreamerDecoder * mdecoder) static boolean tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) { if (!mdecoder) - return false; + return FALSE; GstPad *out_pad; mdecoder->pipe = gst_pipeline_new (NULL); diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index d1306fcd6..d4ba6e6b2 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -72,13 +72,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) @@ -86,7 +86,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 (;;) { @@ -105,12 +105,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; } } @@ -127,23 +127,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) @@ -201,7 +201,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(""); @@ -214,7 +214,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) @@ -223,7 +223,7 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) pa_buffer_attr buffer_attr = { 0 }; if (!pulse->context) - return false; + return FALSE; DEBUG_DVC(""); @@ -235,7 +235,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); @@ -254,7 +254,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 (;;) @@ -274,12 +274,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; } } @@ -338,7 +338,7 @@ static boolean tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data } free(data); - return true; + return TRUE; } static uint64 tsmf_pulse_get_latency(ITSMFAudioDevice* audio) diff --git a/channels/tsmf/client/tsmf_codec.c b/channels/tsmf/client/tsmf_codec.c index b6619e4ec..a45c41298 100644 --- a/channels/tsmf/client/tsmf_codec.c +++ b/channels/tsmf/client/tsmf_codec.c @@ -371,7 +371,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)); @@ -385,7 +385,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); @@ -399,7 +399,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); @@ -416,7 +416,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); @@ -472,7 +472,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) /* http://msdn.microsoft.com/en-us/library/dd390700.aspx */ i = tsmf_codec_parse_VIDEOINFOHEADER(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; @@ -484,7 +484,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; @@ -494,7 +494,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; diff --git a/channels/tsmf/client/tsmf_ifman.c b/channels/tsmf/client/tsmf_ifman.c index 8885264d9..85762735e 100644 --- a/channels/tsmf/client/tsmf_ifman.c +++ b/channels/tsmf/client/tsmf_ifman.c @@ -134,7 +134,7 @@ int tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman) DEBUG_DVC(""); if (pexisted) { - ifman->output_pending = false; + ifman->output_pending = FALSE; return 0; } @@ -145,7 +145,7 @@ int tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman) error = 1; else tsmf_presentation_set_audio_device(presentation, ifman->audio_name, ifman->audio_device); - ifman->output_pending = true; + ifman->output_pending = TRUE; return error; } @@ -171,7 +171,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; } @@ -209,7 +209,7 @@ int tsmf_ifman_remove_stream(TSMF_IFMAN* ifman) else error = 1; } - ifman->output_pending = true; + ifman->output_pending = TRUE; return error; } @@ -256,7 +256,7 @@ int tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman) DEBUG_WARN("unknown presentation id"); } - ifman->output_pending = true; + ifman->output_pending = TRUE; return 0; } @@ -281,7 +281,7 @@ int tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman) DEBUG_DVC("on stream volume: changed channel=[%d]", changedChannel); } - ifman->output_pending = true; + ifman->output_pending = TRUE; return 0; } @@ -289,7 +289,7 @@ int tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman) int tsmf_ifman_set_video_window(TSMF_IFMAN* ifman) { DEBUG_DVC(""); - ifman->output_pending = true; + ifman->output_pending = TRUE; return 0; } @@ -356,7 +356,7 @@ 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; } @@ -364,14 +364,14 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman) 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; } @@ -417,7 +417,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; } @@ -439,7 +439,7 @@ int tsmf_ifman_on_flush(TSMF_IFMAN* ifman) tsmf_presentation_flush(presentation); - ifman->output_pending = true; + ifman->output_pending = TRUE; return 0; } @@ -497,7 +497,7 @@ int tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman) TSMF_PRESENTATION* presentation; DEBUG_DVC(""); - ifman->output_pending = true; + ifman->output_pending = TRUE; /* Added pause control so gstreamer pipeline can be paused accordingly */ @@ -514,7 +514,7 @@ int tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman) TSMF_PRESENTATION* presentation; DEBUG_DVC(""); - ifman->output_pending = true; + ifman->output_pending = TRUE; /* Added restart control so gstreamer pipeline can be resumed accordingly */ diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index 88390930a..3b038e7e4 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -106,9 +106,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, @@ -153,7 +153,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) @@ -180,7 +180,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; diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 206e39cd4..a1d7f1b56 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -154,7 +154,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 (list_size(stream->sample_list) == 0) @@ -180,7 +180,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; } } @@ -192,7 +192,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; } } @@ -455,7 +455,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; @@ -494,7 +494,7 @@ static void tsmf_sample_playback(TSMF_SAMPLE* sample) sample->pixfmt = pixfmt; } - ret = false ; + ret = FALSE ; if (stream->decoder->GetDecodedDimension) { ret = stream->decoder->GetDecodedDimension(stream->decoder, &width, &height); diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c index cf0987926..f0a3ba703 100644 --- a/channels/urbdrc/client/data_transfer.c +++ b/channels/urbdrc/client/data_transfer.c @@ -333,7 +333,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - /** Fixme: Currently this is a false bustime... */ + /** Fixme: Currently this is a FALSE bustime... */ urbdrc_get_mstime(frames); out_size = 32; diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index 3617dcdae..986afe8c7 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -1014,7 +1014,7 @@ static int urbdrc_load_udevman_plugin(IWTSPlugin* pPlugin, const char* name, RDP } if (entry == NULL) - return false; + return FALSE; entryPoints.plugin = pPlugin; entryPoints.pRegisterUDEVMAN = urbdrc_register_udevman_plugin; @@ -1023,10 +1023,10 @@ static int urbdrc_load_udevman_plugin(IWTSPlugin* pPlugin, const char* name, RDP if (entry(&entryPoints) != 0) { DEBUG_WARN("%s entry returns error.", name); - return false; + return FALSE; } - return true; + return TRUE; } static int urbdrc_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data) @@ -1039,7 +1039,7 @@ static int urbdrc_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data return ret; } - return true; + return TRUE; } int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index 3cf133576..9000aef1e 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -245,19 +245,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, input_event->key_symbol - DFB_FUNCTION_KEY(0)); + df_send_keyboard_event(instance->input, TRUE, input_event->key_id - DIKI_UNKNOWN, input_event->key_symbol - DFB_FUNCTION_KEY(0)); break; case DIET_KEYRELEASE: - df_send_keyboard_event(instance->input, false, input_event->key_id - DIKI_UNKNOWN, input_event->key_symbol - DFB_FUNCTION_KEY(0)); + df_send_keyboard_event(instance->input, FALSE, input_event->key_id - DIKI_UNKNOWN, input_event->key_symbol - DFB_FUNCTION_KEY(0)); break; case DIET_UNKNOWN: @@ -265,5 +265,5 @@ boolean df_event_process(freerdp* instance, DFBEvent* event) } } - return true; + return TRUE; } diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index 8f103291d..10b25327d 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -94,7 +94,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) @@ -104,12 +104,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) @@ -126,30 +126,30 @@ boolean df_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] = 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_MEM3BLT_V2_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; dfi->clrconv = xnew(CLRCONV); dfi->clrconv->alpha = 1; @@ -161,7 +161,7 @@ boolean df_pre_connect(freerdp* instance) instance->context->cache = cache_new(instance->settings); - return true; + return TRUE; } boolean df_post_connect(freerdp* instance) @@ -217,7 +217,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, @@ -249,7 +249,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') { @@ -257,7 +257,7 @@ boolean df_verify_certificate(freerdp* instance, char* subject, char* issuer, ch } } - return false; + return FALSE; } static int @@ -340,17 +340,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; @@ -386,17 +386,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; diff --git a/client/Mac/MRDPView.m b/client/Mac/MRDPView.m index 722a7d21e..289d644e4 100644 --- a/client/Mac/MRDPView.m +++ b/client/Mac/MRDPView.m @@ -1020,37 +1020,37 @@ boolean mac_pre_connect(freerdp *inst) int len; int i; - inst->settings->offscreen_bitmap_cache = false; - inst->settings->glyph_cache = true; + inst->settings->offscreen_bitmap_cache = FALSE; + inst->settings->glyph_cache = TRUE; inst->settings->glyphSupportLevel = GLYPH_SUPPORT_FULL; - inst->settings->order_support[NEG_GLYPH_INDEX_INDEX] = true; - inst->settings->order_support[NEG_FAST_GLYPH_INDEX] = false; - inst->settings->order_support[NEG_FAST_INDEX_INDEX] = false; - inst->settings->order_support[NEG_SCRBLT_INDEX] = true; - inst->settings->order_support[NEG_SAVEBITMAP_INDEX] = false; + inst->settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE; + inst->settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE; + inst->settings->order_support[NEG_FAST_INDEX_INDEX] = FALSE; + inst->settings->order_support[NEG_SCRBLT_INDEX] = TRUE; + inst->settings->order_support[NEG_SAVEBITMAP_INDEX] = FALSE; - inst->settings->bitmap_cache = true; - inst->settings->order_support[NEG_MEMBLT_INDEX] = true; - inst->settings->order_support[NEG_MEMBLT_V2_INDEX] = true; - inst->settings->order_support[NEG_MEM3BLT_INDEX] = false; - inst->settings->order_support[NEG_MEM3BLT_V2_INDEX] = false; + inst->settings->bitmap_cache = TRUE; + inst->settings->order_support[NEG_MEMBLT_INDEX] = TRUE; + inst->settings->order_support[NEG_MEMBLT_V2_INDEX] = TRUE; + inst->settings->order_support[NEG_MEM3BLT_INDEX] = FALSE; + inst->settings->order_support[NEG_MEM3BLT_V2_INDEX] = FALSE; inst->settings->bitmapCacheV2NumCells = 3; // 5; inst->settings->bitmapCacheV2CellInfo[0].numEntries = 0x78; // 600; - inst->settings->bitmapCacheV2CellInfo[0].persistent = false; + inst->settings->bitmapCacheV2CellInfo[0].persistent = FALSE; inst->settings->bitmapCacheV2CellInfo[1].numEntries = 0x78; // 600; - inst->settings->bitmapCacheV2CellInfo[1].persistent = false; + inst->settings->bitmapCacheV2CellInfo[1].persistent = FALSE; inst->settings->bitmapCacheV2CellInfo[2].numEntries = 0x150; // 2048; - inst->settings->bitmapCacheV2CellInfo[2].persistent = false; + inst->settings->bitmapCacheV2CellInfo[2].persistent = FALSE; inst->settings->bitmapCacheV2CellInfo[3].numEntries = 0; // 4096; - inst->settings->bitmapCacheV2CellInfo[3].persistent = false; + inst->settings->bitmapCacheV2CellInfo[3].persistent = FALSE; inst->settings->bitmapCacheV2CellInfo[4].numEntries = 0; // 2048; - inst->settings->bitmapCacheV2CellInfo[4].persistent = false; + inst->settings->bitmapCacheV2CellInfo[4].persistent = FALSE; - inst->settings->order_support[NEG_MULTIDSTBLT_INDEX] = false; - inst->settings->order_support[NEG_MULTIPATBLT_INDEX] = false; - inst->settings->order_support[NEG_MULTISCRBLT_INDEX] = false; - inst->settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = false; - inst->settings->order_support[NEG_POLYLINE_INDEX] = false; + inst->settings->order_support[NEG_MULTIDSTBLT_INDEX] = FALSE; + inst->settings->order_support[NEG_MULTIPATBLT_INDEX] = FALSE; + inst->settings->order_support[NEG_MULTISCRBLT_INDEX] = FALSE; + inst->settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = FALSE; + inst->settings->order_support[NEG_POLYLINE_INDEX] = FALSE; inst->settings->color_depth = 24; inst->settings->sw_gdi = 1; @@ -1070,7 +1070,7 @@ boolean mac_pre_connect(freerdp *inst) g_mrdpview->argv = malloc(sizeof(char *) * g_mrdpview->argc); if (g_mrdpview->argv == NULL) { - return false; + return FALSE; } #ifdef RUN_IN_XCODE @@ -1218,13 +1218,13 @@ boolean mac_pre_connect(freerdp *inst) freerdp_parse_args(inst->settings, g_mrdpview->argc, g_mrdpview->argv, process_plugin_args, inst->context->channels, NULL, NULL); if ((strcmp(g_mrdpview->argv[1], "-h") == 0) || (strcmp(g_mrdpview->argv[1], "--help") == 0)) { [NSApp terminate:nil]; - return true; + return TRUE; } [g_mrdpview setViewSize:inst->settings->width :inst->settings->height]; freerdp_channels_pre_connect(inst->context->channels, inst); - return true; + return TRUE; } /** ********************************************************************* @@ -1304,7 +1304,7 @@ boolean mac_post_connect(freerdp *inst) // we want to be notified when window resizes [[NSNotificationCenter defaultCenter] addObserver:g_mrdpview selector:@selector(windowDidResize:) name:NSWindowDidResizeNotification object:nil]; - return true; + return TRUE; } /** ********************************************************************* @@ -2100,7 +2100,7 @@ void mac_process_rail_get_sysparams_event(rdpChannels *channels, RDP_EVENT *even sysparam->taskbarPos.right = 0; sysparam->taskbarPos.bottom = 0; - sysparam->dragFullWindows = false; + sysparam->dragFullWindows = FALSE; mac_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS, sysparam); } diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 72804bb2e..919a92655 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -156,32 +156,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) @@ -196,7 +196,7 @@ boolean tf_post_connect(freerdp* instance) freerdp_channels_post_connect(instance->context->channels, instance); - return true; + return TRUE; } int tfreerdp_run(freerdp* instance) @@ -224,12 +224,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; @@ -265,12 +265,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; diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index 9961bcabc..6da40f7ae 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -85,22 +85,22 @@ void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event) boolean wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - return true; + return TRUE; } boolean wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - return true; + return TRUE; } boolean wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - return true; + return TRUE; } boolean wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - return true; + return TRUE; } void wf_cliprdr_check_owner(wfInfo* wfi) diff --git a/client/Windows/wf_event.c b/client/Windows/wf_event.c index c4ad9bb97..e96816092 100644 --- a/client/Windows/wf_event.c +++ b/client/Windows/wf_event.c @@ -87,10 +87,10 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam) if (wParam == WM_KEYDOWN) { DEBUG_KBD("Pause, sent as Ctrl+NumLock"); - freerdp_input_send_keyboard_event_ex(input, true, RDP_SCANCODE_LCONTROL); - freerdp_input_send_keyboard_event_ex(input, true, RDP_SCANCODE_NUMLOCK); - freerdp_input_send_keyboard_event_ex(input, false, RDP_SCANCODE_LCONTROL); - freerdp_input_send_keyboard_event_ex(input, false, RDP_SCANCODE_NUMLOCK); + freerdp_input_send_keyboard_event_ex(input, TRUE, RDP_SCANCODE_LCONTROL); + freerdp_input_send_keyboard_event_ex(input, TRUE, RDP_SCANCODE_NUMLOCK); + freerdp_input_send_keyboard_event_ex(input, FALSE, RDP_SCANCODE_LCONTROL); + freerdp_input_send_keyboard_event_ex(input, FALSE, RDP_SCANCODE_NUMLOCK); } else { @@ -129,7 +129,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; @@ -179,13 +179,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) diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index d2a10c0dc..537252b0d 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -64,12 +64,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) @@ -479,7 +479,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits wfi->image->_bitmap.data = (uint8*) realloc(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; diff --git a/client/Windows/wf_graphics.c b/client/Windows/wf_graphics.c index fc2f669d2..3cce037fd 100644 --- a/client/Windows/wf_graphics.c +++ b/client/Windows/wf_graphics.c @@ -160,7 +160,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"); } @@ -170,7 +170,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; } diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index c02f92871..95afe041b 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -87,7 +87,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) { @@ -95,8 +95,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); @@ -104,11 +104,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++; @@ -116,31 +116,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) @@ -255,12 +255,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) @@ -421,7 +421,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) @@ -696,7 +696,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; @@ -705,7 +705,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) { DEBUG_X11_CLIPRDR("invalid target"); xf_cliprdr_send_null_data_response(xfi); - return false; + return FALSE; } XGetWindowProperty(xfi->display, xfi->drawable, @@ -727,7 +727,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) { free(cb->incr_data); @@ -735,7 +735,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 { @@ -748,7 +748,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, @@ -764,7 +764,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) XFree(data); data = NULL; } - has_data = true; + has_data = TRUE; } else { @@ -778,7 +778,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) @@ -1055,7 +1055,7 @@ boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent) xf_cliprdr_get_requested_targets(xfi); } - return true; + return TRUE; } else { @@ -1081,10 +1081,10 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) if (xevent->xselectionrequest.owner != xfi->drawable) { DEBUG_X11_CLIPRDR("not owner"); - return false; + return FALSE; } - delay_respond = false; + delay_respond = FALSE; respond = xnew(XEvent); respond->xselection.property = None; respond->xselection.type = SelectionNotify; @@ -1157,21 +1157,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); free(respond); } - return true; + return TRUE; } boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent) @@ -1179,11 +1179,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) @@ -1191,7 +1191,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) { @@ -1207,7 +1207,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) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 2f180e301..f2b4094eb 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -83,7 +83,7 @@ static 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); } @@ -102,13 +102,13 @@ static boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app) } } - return true; + return TRUE; } static boolean xf_event_VisibilityNotify(xfInfo* xfi, XEvent* event, boolean app) { xfi->unobscured = event->xvisibility.state == VisibilityUnobscured; - return true; + return TRUE; } static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) @@ -121,10 +121,10 @@ static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) x = event->xmotion.x; y = event->xmotion.y; - if (xfi->mouse_motion != true) + if (xfi->mouse_motion != TRUE) { if ((event->xmotion.state & (Button1Mask | Button2Mask | Button3Mask)) == 0) - return true; + return TRUE; } if (app) @@ -132,7 +132,7 @@ static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) /* make sure window exists */ if (xf_rdpWindowFromWindow(xfi, event->xmotion.window) == 0) { - return true; + return TRUE; } // Translate to desktop coordinates XTranslateCoordinates(xfi->display, event->xmotion.window, @@ -147,7 +147,7 @@ static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) XSetInputFocus(xfi->display, xfi->window->handle, RevertToPointerRoot, CurrentTime); } - return true; + return TRUE; } static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) @@ -164,8 +164,8 @@ static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) x = 0; y = 0; flags = 0; - wheel = false; - extended = false; + wheel = FALSE; + extended = FALSE; switch (event->xbutton.button) { @@ -188,19 +188,19 @@ static 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; case 6: // wheel left or back case 8: // back case 97: // Xming - extended = true; + extended = TRUE; x = event->xbutton.x; y = event->xbutton.y; flags = PTR_XFLAGS_DOWN | PTR_XFLAGS_BUTTON1; @@ -209,7 +209,7 @@ static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) case 7: // wheel right or forward case 9: // forward case 112: // Xming - extended = true; + extended = TRUE; x = event->xbutton.x; y = event->xbutton.y; flags = PTR_XFLAGS_DOWN | PTR_XFLAGS_BUTTON2; @@ -235,7 +235,7 @@ static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) /* make sure window exists */ if (xf_rdpWindowFromWindow(xfi, event->xbutton.window) == 0) { - return true; + return TRUE; } // Translate to desktop coordinates XTranslateCoordinates(xfi->display, event->xbutton.window, @@ -250,7 +250,7 @@ static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) } } - return true; + return TRUE; } static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) @@ -266,7 +266,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) x = 0; y = 0; flags = 0; - extended = false; + extended = FALSE; switch (event->xbutton.button) { @@ -291,7 +291,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) case 6: case 8: case 97: - extended = true; + extended = TRUE; x = event->xbutton.x; y = event->xbutton.y; flags = PTR_XFLAGS_BUTTON1; @@ -300,7 +300,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) case 7: case 9: case 112: - extended = true; + extended = TRUE; x = event->xbutton.x; y = event->xbutton.y; flags = PTR_XFLAGS_BUTTON2; @@ -318,7 +318,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) /* make sure window exists */ if (xf_rdpWindowFromWindow(xfi, event->xbutton.window) == NULL) { - return true; + return TRUE; } // Translate to desktop coordinates XTranslateCoordinates(xfi->display, event->xbutton.window, @@ -332,7 +332,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) input->MouseEvent(input, flags, x, y); } - return true; + return TRUE; } static boolean xf_event_KeyPress(xfInfo* xfi, XEvent* event, boolean app) @@ -345,11 +345,11 @@ static 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; } static boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app) @@ -364,29 +364,29 @@ static 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; } static 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); if (app) { - xf_rail_send_activate(xfi, event->xany.window, true); + xf_rail_send_activate(xfi, event->xany.window, TRUE); rdpWindow* window; rdpRail* rail = ((rdpContext*) xfi->context)->rail; @@ -399,18 +399,18 @@ static boolean xf_event_FocusIn(xfInfo* xfi, XEvent* event, boolean app) } xf_kbd_focus_in(xfi); - if (app != true) + if (app != TRUE) xf_cliprdr_check_owner(xfi); - return true; + return TRUE; } static 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); @@ -418,9 +418,9 @@ static boolean xf_event_FocusOut(xfInfo* xfi, XEvent* event, boolean app) xf_kbd_clear(xfi); if (app) - xf_rail_send_activate(xfi, event->xany.window, false); + xf_rail_send_activate(xfi, event->xany.window, FALSE); - return true; + return TRUE; } static boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app) @@ -431,7 +431,7 @@ static boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app) xfi->modifier_map = XGetModifierMapping(xfi->display); } - return true; + return TRUE; } static boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app) @@ -452,29 +452,29 @@ static 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 { DEBUG_X11("Main window closed"); - return false; + return FALSE; } } - return true; + return TRUE; } static 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 { @@ -492,18 +492,18 @@ static boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app) } } - return true; + return TRUE; } static 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; } static boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app) @@ -571,11 +571,11 @@ static boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app) rdpUpdate* update = xfi->instance->update; rdpRail* rail = ((rdpContext*) xfi->context)->rail; - if (app != true) + if (app != TRUE) { - if (xfi->suppress_output == true) + if (xfi->suppress_output == TRUE) { - xfi->suppress_output = false; + xfi->suppress_output = FALSE; rect.left = 0; rect.top = 0; rect.right = xfi->width; @@ -595,11 +595,11 @@ static boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app) //that is minimized back to the maximized state //xf_rail_send_client_system_command(xfi, window->windowId, SC_RESTORE); xfWindow *xfw = (xfWindow*) window->extra; - xfw->is_mapped = true; + xfw->is_mapped = TRUE; } } - return true; + return TRUE; } static boolean xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, boolean app) @@ -610,11 +610,11 @@ static boolean xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, boolean app) xf_kbd_release_all_keypress(xfi); - if (app != true) + if (app != TRUE) { - if (xfi->suppress_output == false) + if (xfi->suppress_output == FALSE) { - xfi->suppress_output = true; + xfi->suppress_output = TRUE; update->SuppressOutput((rdpContext*) xfi->context, 0, NULL); } } @@ -625,44 +625,44 @@ static boolean xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, boolean app) if (window != NULL) { xfWindow *xfw = (xfWindow*) window->extra; - xfw->is_mapped = false; + xfw->is_mapped = FALSE; } } - return true; + return TRUE; } static boolean xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, boolean app) { - if (app != true) + if (app != TRUE) { if (xf_cliprdr_process_selection_notify(xfi, event)) - return true; + return TRUE; } - return true; + return TRUE; } static boolean xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, boolean app) { - if (app != true) + if (app != TRUE) { if (xf_cliprdr_process_selection_request(xfi, event)) - return true; + return TRUE; } - return true; + return TRUE; } static boolean xf_event_SelectionClear(xfInfo* xfi, XEvent* event, boolean app) { - if (app != true) + if (app != TRUE) { if (xf_cliprdr_process_selection_clear(xfi, event)) - return true; + return TRUE; } - return true; + return TRUE; } static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) @@ -670,23 +670,23 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) //This section handles sending the appropriate commands to the rail server //when the window has been minimized, maximized, restored locally //ie. not using the buttons on the rail window itself - if (app == true) + if (app == TRUE) { rdpWindow* window; window = xf_rdpWindowFromWindow(xfi, event->xproperty.window); if (window == NULL) { - return true; + return TRUE; } if ((((Atom)event->xproperty.atom == xfi->_NET_WM_STATE) && (event->xproperty.state != PropertyDelete)) || (((Atom)event->xproperty.atom == xfi->WM_STATE) && (event->xproperty.state != PropertyDelete))) { boolean status; - boolean maxVert = false; - boolean maxHorz = false; - boolean minimized = false; + boolean maxVert = FALSE; + boolean maxHorz = FALSE; + boolean minimized = FALSE; unsigned long nitems; unsigned long bytes; unsigned char* prop; @@ -695,7 +695,7 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) status = xf_GetWindowProperty(xfi, event->xproperty.window, xfi->_NET_WM_STATE, 12, &nitems, &bytes, &prop); - if (status != true) { + if (status != TRUE) { DEBUG_X11_LMS("No return _NET_WM_STATE, window is not maximized"); } @@ -703,12 +703,12 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) { if ((Atom) ((uint16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False)) { - maxVert = true; + maxVert = TRUE; } if ((Atom) ((uint16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False)) { - maxHorz = true; + maxHorz = TRUE; } } @@ -717,7 +717,7 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) status = xf_GetWindowProperty(xfi, event->xproperty.window, xfi->WM_STATE, 1, &nitems, &bytes, &prop); - if (status != true) { + if (status != TRUE) { DEBUG_X11_LMS("No return WM_STATE, window is not minimized"); } else @@ -725,10 +725,10 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) //If the window is in the iconic state if (((uint32) *prop == 3)) { - minimized = true; + minimized = TRUE; } else - minimized = false; + minimized = FALSE; XFree(prop); } @@ -756,19 +756,19 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) } - if (app != true) + if (app != TRUE) { if (xf_cliprdr_process_property_notify(xfi, event)) - return true; + return TRUE; } - return true; + return TRUE; } static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event) { if (! xfi->remote_app) - return false; + return FALSE; switch (xfi->window->local_move.state) { @@ -779,8 +779,8 @@ static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*e if ( (event->type == ConfigureNotify) && xfi->window->rail_ignore_configure) { DEBUG_X11_LMS("ConfigureNotify Event Ignored"); - xfi->window->rail_ignore_configure = false; - return true; + xfi->window->rail_ignore_configure = FALSE; + return TRUE; } break; @@ -817,7 +817,7 @@ static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*e break; default: // Eat any other events - return true; + return TRUE; } break; @@ -846,13 +846,13 @@ static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*e break; } - return false; + return FALSE; } boolean xf_event_process(freerdp* instance, XEvent* event) { - boolean status = true; + boolean status = TRUE; xfInfo* xfi = ((xfContext*) instance->context)->xfi; rdpRail* rail = ((rdpContext*) xfi->context)->rail; rdpWindow* window; @@ -867,7 +867,7 @@ boolean xf_event_process(freerdp* instance, XEvent* event) xfi->window = (xfWindow *) window->extra; if (xf_event_suppress_events(xfi, window, event)) - return true; + return TRUE; } } diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index ecc78b363..711850d37 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -60,11 +60,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) @@ -197,12 +197,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) @@ -316,7 +316,7 @@ void xf_gdi_dstblt(rdpContext* context, 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); @@ -392,7 +392,7 @@ void xf_gdi_patblt(rdpContext* context, 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); @@ -415,7 +415,7 @@ void xf_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) if (xfi->drawing == xfi->primary) { - if (xfi->remote_app != true) + if (xfi->remote_app != TRUE) { if (xfi->unobscured) { @@ -456,7 +456,7 @@ void xf_gdi_opaque_rect(rdpContext* context, 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); @@ -491,7 +491,7 @@ void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult 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); @@ -526,7 +526,7 @@ void xf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) { int width, height; - if (xfi->remote_app != true) + if (xfi->remote_app != TRUE) { XDrawLine(xfi->display, xfi->drawable, xfi->gc, line_to->nXStart, line_to->nYStart, line_to->nXEnd, line_to->nYEnd); @@ -583,7 +583,7 @@ void xf_gdi_polyline(rdpContext* context, 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; @@ -625,7 +625,7 @@ void xf_gdi_memblt(rdpContext* context, 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, @@ -694,7 +694,7 @@ void xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) if (xfi->drawing == xfi->primary) { - if (xfi->remote_app != true) + if (xfi->remote_app != TRUE) { XCopyArea(xfi->display, bitmap->pixmap, xfi->drawable, xfi->gc, mem3blt->nXSrc, mem3blt->nYSrc, mem3blt->nWidth, mem3blt->nHeight, @@ -886,7 +886,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf switch (surface_frame_marker->frameAction) { case SURFACECMD_FRAMEACTION_BEGIN: - xfi->frame_begin = true; + xfi->frame_begin = TRUE; xfi->frame_x1 = 0; xfi->frame_y1 = 0; xfi->frame_x2 = 0; @@ -894,7 +894,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf break; case SURFACECMD_FRAMEACTION_END: - xfi->frame_begin = false; + xfi->frame_begin = FALSE; if (xfi->frame_x2 > xfi->frame_x1 && xfi->frame_y2 > xfi->frame_y1) { XSetFunction(xfi->display, xfi->gc, GXcopy); @@ -913,7 +913,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf static void xf_gdi_surface_update_frame(xfInfo* xfi, uint16 tx, uint16 ty, uint16 width, uint16 height) { - if (xfi->remote_app != true) + if (xfi->remote_app != TRUE) { if (xfi->frame_begin) { diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 2ed873aaa..e51563ef0 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -52,7 +52,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap) data = freerdp_image_convert(bitmap->data, NULL, bitmap->width, bitmap->height, context_->settings->color_depth, 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); @@ -102,7 +102,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); @@ -172,7 +172,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, { status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp); - if (status == false) + if (status == FALSE) { printf("xf_Bitmap_Decompress: Bitmap Decompression Failed\n"); } @@ -184,7 +184,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, break; } - bitmap->compressed = false; + bitmap->compressed = FALSE; bitmap->length = size; bitmap->bpp = bpp; } @@ -349,7 +349,7 @@ void xf_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, if (xfi->drawing == xfi->primary) { - if (xfi->remote_app != true) + if (xfi->remote_app != TRUE) { XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc, x, y, width, height, x, y); } diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 532930f64..175d5ff9d 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -69,7 +69,7 @@ void xf_kbd_release_all_keypress(xfInfo* xfi) if (xfi->pressed_keys[keycode] != NoSymbol) { rdp_scancode = freerdp_keyboard_get_rdp_scancode_from_x11_keycode(keycode); - freerdp_input_send_keyboard_event_ex(xfi->instance->input, false, rdp_scancode); + freerdp_input_send_keyboard_event_ex(xfi->instance->input, FALSE, rdp_scancode); xfi->pressed_keys[keycode] = NoSymbol; } } @@ -99,17 +99,17 @@ void xf_kbd_send_key(xfInfo* xfi, boolean down, uint8 keycode) /* Pause without Ctrl has to be sent as Ctrl + NumLock. */ if (down) { - freerdp_input_send_keyboard_event_ex(input, true, RDP_SCANCODE_LCONTROL); - freerdp_input_send_keyboard_event_ex(input, true, RDP_SCANCODE_NUMLOCK); - freerdp_input_send_keyboard_event_ex(input, false, RDP_SCANCODE_LCONTROL); - freerdp_input_send_keyboard_event_ex(input, false, RDP_SCANCODE_NUMLOCK); + freerdp_input_send_keyboard_event_ex(input, TRUE, RDP_SCANCODE_LCONTROL); + freerdp_input_send_keyboard_event_ex(input, TRUE, RDP_SCANCODE_NUMLOCK); + freerdp_input_send_keyboard_event_ex(input, FALSE, RDP_SCANCODE_LCONTROL); + freerdp_input_send_keyboard_event_ex(input, FALSE, RDP_SCANCODE_NUMLOCK); } } else { freerdp_input_send_keyboard_event_ex(input, down, rdp_scancode); - if ((rdp_scancode == RDP_SCANCODE_CAPSLOCK) && (down == false)) + if ((rdp_scancode == RDP_SCANCODE_CAPSLOCK) && (down == FALSE)) { uint32 syncFlags; syncFlags = xf_kbd_get_toggle_keys_state(xfi); @@ -124,7 +124,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); @@ -144,7 +144,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++) { @@ -158,7 +158,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) @@ -203,10 +203,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; } diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index fa9a34672..c026f2e3c 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -47,7 +47,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; @@ -71,8 +71,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)) @@ -96,7 +96,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; } } @@ -137,5 +137,5 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) settings->height = vscreen->area.bottom - vscreen->area.top + 1; } - return true; + return TRUE; } diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index 73122852a..10c340b91 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -34,9 +34,9 @@ void xf_rail_enable_remoteapp_mode(xfInfo* xfi) { - if (xfi->remote_app == false) + if (xfi->remote_app == FALSE) { - xfi->remote_app = true; + xfi->remote_app = TRUE; xfi->drawable = DefaultRootWindow(xfi->display); xf_DestroyWindow(xfi, xfi->window); xfi->window = NULL; @@ -45,9 +45,9 @@ void xf_rail_enable_remoteapp_mode(xfInfo* xfi) void xf_rail_disable_remoteapp_mode(xfInfo* xfi) { - if (xfi->remote_app == true) + if (xfi->remote_app == TRUE) { - xfi->remote_app = false; + xfi->remote_app = FALSE; xf_create_window(xfi); } } @@ -90,7 +90,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 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) { @@ -453,7 +453,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); } diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index 8ec037fb7..199321582 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -129,7 +129,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; } @@ -186,15 +186,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) @@ -204,7 +204,7 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT uint8* data2; uint32 pixfmt; uint32 xvpixfmt; - boolean converti420yv12 = false; + boolean converti420yv12 = FALSE; XvImage * image; int colorkey = 0; XShmSegmentInfo shminfo; @@ -247,12 +247,12 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT else if (pixfmt == RDP_PIXFMT_I420 && xf_tsmf_is_format_supported(xv, RDP_PIXFMT_YV12)) { xvpixfmt = RDP_PIXFMT_YV12; - converti420yv12 = true; + converti420yv12 = TRUE; } else if (pixfmt == RDP_PIXFMT_YV12 && xf_tsmf_is_format_supported(xv, RDP_PIXFMT_I420)) { xvpixfmt = RDP_PIXFMT_I420; - converti420yv12 = true; + converti420yv12 = TRUE; } else { @@ -276,7 +276,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)) { @@ -309,7 +309,7 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT } /* UV */ /* Conversion between I420 and YV12 is to simply swap U and V */ - if (converti420yv12 == false) + if (converti420yv12 == FALSE) { data1 = vevent->frame_data + vevent->frame_width * vevent->frame_height; data2 = vevent->frame_data + vevent->frame_width * vevent->frame_height + @@ -353,10 +353,10 @@ 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); + vevent->x, vevent->y, vevent->width, vevent->height, FALSE); if (xv->xv_colorkey_atom == None) XSetClipMask(xfi->display, xfi->gc, None); - XSync(xfi->display, false); + XSync(xfi->display, FALSE); XShmDetach(xfi->display, &shminfo); XFree(image); diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index d865fc510..61b177562 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -121,12 +121,12 @@ 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; } } @@ -140,22 +140,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) @@ -168,14 +168,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; free(prop); - return true; + return TRUE; } boolean xf_GetWorkArea(xfInfo* xfi) @@ -188,18 +188,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) { free(prop); - return false; + return FALSE; } plong = (long*) prop; @@ -210,7 +210,7 @@ boolean xf_GetWorkArea(xfInfo* xfi) xfi->workArea.height = plong[xfi->current_desktop * 4 + 3]; free(prop); - return true; + return TRUE; } void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, boolean show) @@ -257,7 +257,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st attrs.override_redirect = True; XChangeWindowAttributes(xfi->display, window->handle, CWOverrideRedirect, &attrs); - window->is_transient = true; + window->is_transient = TRUE; xf_SetWindowUnlisted(xfi, window); window_type = xfi->_NET_WM_WINDOW_TYPE_POPUP; } @@ -272,7 +272,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st else if (style & WS_POPUP) { /* this includes dialogs, popups, etc, that need to be full-fledged windows */ - window->is_transient = true; + window->is_transient = TRUE; window_type = xfi->_NET_WM_WINDOW_TYPE_DIALOG; xf_SetWindowUnlisted(xfi, window); } @@ -319,11 +319,11 @@ 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->local_move.state = LMS_NOT_ACTIVE; - window->is_mapped = false; - window->is_transient = false; + window->is_mapped = FALSE; + window->is_transient = FALSE; window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen), xfi->workArea.x, xfi->workArea.y, xfi->workArea.width, xfi->workArea.height, 0, xfi->depth, InputOutput, xfi->visual, @@ -485,14 +485,14 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, /* this window need decorations the WS_EX_APPWINDOW is used to tell the client to use local decorations only sent from xrdp */ - window->decorations = (wnd->extendedStyle & WS_EX_APPWINDOW) ? true : false; - window->fullscreen = false; + window->decorations = (wnd->extendedStyle & WS_EX_APPWINDOW) ? TRUE : FALSE; + window->fullscreen = FALSE; window->window = wnd; window->local_move.state = LMS_NOT_ACTIVE; - window->is_mapped = false; - window->is_transient = false; + window->is_mapped = FALSE; + window->is_transient = FALSE; window->rail_state = 0; - window->rail_ignore_configure = false; + window->rail_ignore_configure = FALSE; window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen), x, y, window->width, window->height, 0, xfi->depth, InputOutput, xfi->visual, @@ -651,13 +651,13 @@ void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window) 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 (window->local_move.state == LMS_STARTING || window->local_move.state == LMS_ACTIVE) @@ -731,7 +731,7 @@ void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state) */ if (window->rail_state == WINDOW_SHOW_MAXIMIZED) - window->rail_ignore_configure = true; + window->rail_ignore_configure = TRUE; if (window->is_transient) @@ -756,7 +756,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; @@ -884,18 +884,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)); } diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 067e5f450..f644be32f 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -115,9 +115,9 @@ void xf_sw_end_paint(rdpContext* context) xfi = ((xfContext*) context)->xfi; gdi = context->gdi; - 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; @@ -178,7 +178,7 @@ void xf_sw_desktop_resize(rdpContext* context) xfi = ((xfContext*) context)->xfi; settings = xfi->instance->settings; - if (xfi->fullscreen != true) + if (xfi->fullscreen != TRUE) { rdpGdi* gdi = context->gdi; gdi_resize(gdi, xfi->width, xfi->height); @@ -232,7 +232,7 @@ void xf_hw_desktop_resize(rdpContext* context) xfi = ((xfContext*) context)->xfi; settings = xfi->instance->settings; - if (xfi->fullscreen != true) + if (xfi->fullscreen != TRUE) { xfi->width = settings->width; xfi->height = settings->height; @@ -242,7 +242,7 @@ void xf_hw_desktop_resize(rdpContext* context) if (xfi->primary) { - same = (xfi->primary == xfi->drawing) ? true : false; + same = (xfi->primary == xfi->drawing) ? TRUE : FALSE; XFreePixmap(xfi->display, xfi->primary); @@ -270,7 +270,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_process_x_events(freerdp* instance) @@ -283,11 +283,11 @@ boolean xf_process_x_events(freerdp* instance) 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) @@ -344,7 +344,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); @@ -391,7 +391,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi) if (XGetWindowAttributes(xfi->display, RootWindowOfScreen(xfi->screen), &window_attributes) == 0) { printf("xf_get_pixmap_info: XGetWindowAttributes failed\n"); - return false; + return FALSE; } vis = XGetVisualInfo(xfi->display, VisualClassMask | VisualScreenMask, &template, &vi_count); @@ -399,7 +399,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi) if (vis == NULL) { printf("xf_get_pixmap_info: XGetVisualInfo failed\n"); - return false; + return FALSE; } vi = NULL; @@ -423,7 +423,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi) if (vi->red_mask & 0xFF) { - xfi->clrconv->invert = true; + xfi->clrconv->invert = TRUE; } } @@ -431,10 +431,10 @@ boolean xf_get_pixmap_info(xfInfo* xfi) if ((xfi->visual == NULL) || (xfi->scanline_pad == 0)) { - return false; + return FALSE; } - return true; + return TRUE; } static int (*_def_error_handler)(Display*, XErrorEvent*); @@ -442,7 +442,7 @@ static int (*_def_error_handler)(Display*, XErrorEvent*); int xf_error_handler(Display* d, XErrorEvent* ev) { char buf[256]; - int do_abort = true; + int do_abort = TRUE; XGetErrorText(d, ev->error_code, buf, sizeof(buf)); printf("%s", buf); @@ -452,7 +452,7 @@ int xf_error_handler(Display* d, XErrorEvent* ev) _def_error_handler(d, ev); - return false; + return FALSE; } int _xf_error_handler(Display* d, XErrorEvent* ev) @@ -474,7 +474,7 @@ int _xf_error_handler(Display* d, XErrorEvent* ev) * @param instance - pointer to the rdp_freerdp structure that contains the connection's parameters, and will * be filled with the appropriate informations. * - * @return true if successful. false otherwise. + * @return TRUE if successful. FALSE otherwise. * Can exit with error code XF_EXIT_PARSE_ARGUMENTS if there is an error in the parameters. */ boolean xf_pre_connect(freerdp* instance) @@ -509,34 +509,34 @@ boolean xf_pre_connect(freerdp* instance) settings->os_major_type = OSMAJORTYPE_UNIX; settings->os_minor_type = OSMINORTYPE_NATIVE_XSERVER; - 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] = (settings->sw_gdi) ? true : false; + settings->order_support[NEG_MEM3BLT_INDEX] = (settings->sw_gdi) ? TRUE : 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_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] = (settings->sw_gdi) ? false : true; - settings->order_support[NEG_POLYGON_CB_INDEX] = (settings->sw_gdi) ? false : true; + settings->order_support[NEG_POLYGON_SC_INDEX] = (settings->sw_gdi) ? FALSE : TRUE; + settings->order_support[NEG_POLYGON_CB_INDEX] = (settings->sw_gdi) ? FALSE : TRUE; - settings->order_support[NEG_ELLIPSE_SC_INDEX] = false; - settings->order_support[NEG_ELLIPSE_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); @@ -555,7 +555,7 @@ boolean xf_pre_connect(freerdp* instance) } fprintf(stderr, "%s:%d: Authenication only. Don't connect to X.\n", __FILE__, __LINE__); /* Avoid XWindows initialization and configuration below. */ - return true; + return TRUE; } xfi->display = XOpenDisplay(NULL); @@ -564,13 +564,13 @@ boolean xf_pre_connect(freerdp* instance) { printf("xf_pre_connect: failed to open display: %s\n", XDisplayName(NULL)); printf("Please check that the $DISPLAY environment variable is properly set.\n"); - return false; + return FALSE; } if (xfi->debug) { printf("Enabling X11 debug mode.\n"); - XSynchronize(xfi->display, true); + XSynchronize(xfi->display, TRUE); _def_error_handler = XSetErrorHandler(_xf_error_handler); } @@ -609,17 +609,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->fullscreen = settings->fullscreen; xfi->grab_keyboard = settings->grab_keyboard; - xfi->fullscreen_toggle = true; + xfi->fullscreen_toggle = TRUE; xfi->sw_gdi = settings->sw_gdi; xfi->parent_window = (Window) settings->parent_window_xid; xf_detect_monitors(xfi, settings); - return true; + return TRUE; } void cpuid(unsigned info, unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx) @@ -683,8 +683,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); @@ -776,7 +776,7 @@ boolean xf_post_connect(freerdp* instance) pointer_cache_register_callbacks(instance->update); - if (xfi->sw_gdi != true) + if (xfi->sw_gdi != TRUE) { glyph_cache_register_callbacks(instance->update); brush_cache_register_callbacks(instance->update); @@ -795,7 +795,7 @@ boolean xf_post_connect(freerdp* instance) xf_cliprdr_init(xfi, channels); - return true; + return TRUE; } /** Callback set in the rdp_freerdp structure, and used to get the user's password, @@ -808,7 +808,7 @@ boolean xf_post_connect(freerdp* instance) * Note that this character string will be allocated inside the function, and needs to be deallocated by the caller * using free(), even in case this function fails. * @param domain - unused - * @return true if a password was successfully entered. See freerdp_passphrase_read() for more details. + * @return TRUE if a password was successfully entered. See freerdp_passphrase_read() for more details. */ boolean xf_authenticate(freerdp* instance, char** username, char** password, char** domain) { @@ -817,9 +817,9 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha *password = malloc(password_size * sizeof(char)); if (freerdp_passphrase_read("Password: ", *password, password_size, instance->settings->from_stdin) == NULL) - return false; + return FALSE; - return true; + return TRUE; } /** Callback set in the rdp_freerdp structure, and used to make a certificate validation @@ -830,7 +830,7 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha * @param subject * @param issuer * @param fingerprint - * @return true if the certificate is trusted. false otherwise. + * @return TRUE if the certificate is trusted. FALSE otherwise. */ boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) { @@ -851,7 +851,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') { @@ -860,7 +860,7 @@ boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, ch printf("\n"); } - return false; + return FALSE; } /** Used to parse xfreerdp-specific commandline parameters. @@ -925,7 +925,7 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v } else if (strcmp("--dbg-x11", opt) == 0) { - xfi->debug = true; + xfi->debug = TRUE; argc = 1; } @@ -1139,19 +1139,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; @@ -1196,17 +1196,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_process_x_events(instance) != true) + if (xf_process_x_events(instance) != TRUE) { printf("Closed from X\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; @@ -1321,7 +1321,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; diff --git a/cunit/test_bitmap.c b/cunit/test_bitmap.c index c3a4a5262..1e5f0c6dc 100644 --- a/cunit/test_bitmap.c +++ b/cunit/test_bitmap.c @@ -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); diff --git a/cunit/test_mppc.c b/cunit/test_mppc.c index 321c19e58..e53b87e4c 100644 --- a/cunit/test_mppc.c +++ b/cunit/test_mppc.c @@ -650,7 +650,7 @@ void test_mppc(void) /* uncompress data */ CU_ASSERT(decompress_rdp_5(rmppc, compressed_rd5, sizeof(compressed_rd5), - PACKET_COMPRESSED, &roff, &rlen) == true); + PACKET_COMPRESSED, &roff, &rlen) == TRUE); /* get end time */ gettimeofday(&end_time, NULL); diff --git a/cunit/test_mppc_enc.c b/cunit/test_mppc_enc.c index 66915aea1..d1f21c474 100644 --- a/cunit/test_mppc_enc.c +++ b/cunit/test_mppc_enc.c @@ -525,13 +525,13 @@ void test_mppc_enc(void) block_num++; total += bytes_read; DLOG(("block_num=%d\n", block_num)); - CU_ASSERT(compress_rdp(enc, (uint8*) buf, bytes_read) != false); + CU_ASSERT(compress_rdp(enc, (uint8*) buf, bytes_read) != FALSE); if (enc->flags & PACKET_COMPRESSED) { DLOG(("%d bytes compressed to %d\n", bytes_read, enc->bytes_in_opb)); clen += enc->bytes_in_opb; CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer, - enc->bytes_in_opb, enc->flags, &roff, &rlen) != false); + enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE); CU_ASSERT(bytes_read == rlen); CU_ASSERT(memcmp(buf, &rmppc->history_buf[roff], rlen) == 0); } @@ -561,11 +561,11 @@ void test_mppc_enc(void) /* save starting time */ gettimeofday(&start_time, NULL); - CU_ASSERT(compress_rdp(enc, (uint8*) decompressed_rd5_data, data_len) != false); + CU_ASSERT(compress_rdp(enc, (uint8*) decompressed_rd5_data, data_len) != FALSE); if (enc->flags & PACKET_COMPRESSED) { CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer, - enc->bytes_in_opb, enc->flags, &roff, &rlen) != false); + enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE); CU_ASSERT(data_len == rlen); CU_ASSERT(memcmp(decompressed_rd5_data, &rmppc->history_buf[roff], rlen) == 0); } diff --git a/cunit/test_orders.c b/cunit/test_orders.c index f27332878..0739a2eb8 100644 --- a/cunit/test_orders.c +++ b/cunit/test_orders.c @@ -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; @@ -379,7 +379,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)); @@ -393,7 +393,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)); @@ -537,7 +537,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); @@ -578,7 +578,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); @@ -609,7 +609,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); diff --git a/cunit/test_pcap.c b/cunit/test_pcap.c index b0a7d4f15..23e435389 100644 --- a/cunit/test_pcap.c +++ b/cunit/test_pcap.c @@ -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)) diff --git a/cunit/test_rail.c b/cunit/test_rail.c index a4e243dd0..182e71ce5 100644 --- a/cunit/test_rail.c +++ b/cunit/test_rail.c @@ -131,7 +131,7 @@ static uint8 client_sysparam_mousebuttonswap_pdu[] = 0x03,0x00, 0x09,0x00, 0x21,0x00,0x00,0x00, // SPI_SETMOUSEBUTTONSWAP -0x00 // false +0x00 // FALSE }; @@ -140,7 +140,7 @@ static uint8 client_sysparam_keyboardpref_pdu[] = 0x03,0x00, 0x09,0x00, 0x45,0x00,0x00,0x00, // SPI_SETKEYBOARDPREF -0x00 // false +0x00 // FALSE }; @@ -149,7 +149,7 @@ static uint8 client_sysparam_dragfullwindow_pdu[] = 0x03,0x00, 0x09,0x00, 0x25,0x00,0x00,0x00, // SPI_SETDRAGFULLWINDOWS -0x01 // true +0x01 // TRUE }; @@ -158,7 +158,7 @@ static uint8 client_sysparam_keyboardcues_pdu[] = 0x03,0x00, 0x09,0x00, 0x0b,0x10,0x00,0x00, //SPI_SETKEYBOARDCUES -0x00 // false +0x00 // FALSE }; static uint8 client_sysparam_setworkarea_pdu[] = @@ -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, ¶m.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, ¶m.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 diff --git a/include/freerdp/channels/wtsvc.h b/include/freerdp/channels/wtsvc.h index 7a155b372..535b93bfb 100644 --- a/include/freerdp/channels/wtsvc.h +++ b/include/freerdp/channels/wtsvc.h @@ -95,11 +95,11 @@ FREERDP_API void WTSFreeMemory( * * This function will always return a complete channel data packet, i.e. chunks * are already assembled. If BufferSize argument is smaller than the packet - * size, it will set the desired size in pBytesRead and return false. The + * size, it will set the desired size in pBytesRead and return FALSE. The * caller should allocate a large enough buffer and call this function again. - * Returning false with pBytesRead set to zero indicates an error has occurred. + * Returning FALSE with pBytesRead set to zero indicates an error has occurred. * If no pending packet to be read, it will set pBytesRead to zero and return - * true. + * TRUE. * * TimeOut is not supported, and this function will always return immediately. * The caller should use the file handle returned by WTSVirtualChannelQuery to diff --git a/include/freerdp/errorcodes.h b/include/freerdp/errorcodes.h index 826dfdc77..b907b83f7 100644 --- a/include/freerdp/errorcodes.h +++ b/include/freerdp/errorcodes.h @@ -13,7 +13,7 @@ extern "C" { #endif /** -* This static variable holds an error code if the return value from connect is false. +* This static variable holds an error code if the return value from connect is FALSE. * This variable is always set to 0 in the beginning of the connect sequence. * The returned code can be used to inform the user of the detailed connect error. * The value can hold one of the defined error codes below OR an error according to errno diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 503b5626f..6296f79fa 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -167,7 +167,7 @@ struct rdp_freerdp pVerifyChangedCertificate VerifyChangedCertificate; /**< (offset 52) Callback for changed certificate validation. Used when a certificate differs from stored fingerprint. - If returns true, the new fingerprint will be trusted and old thrown out. */ + If returns TRUE, the new fingerprint will be trusted and old thrown out. */ uint32 paddingD[64 - 51]; /* 51 */ pSendChannelData SendChannelData; /* (offset 64) diff --git a/include/freerdp/scancode.h b/include/freerdp/scancode.h index 6da0bfe21..36603cd4e 100644 --- a/include/freerdp/scancode.h +++ b/include/freerdp/scancode.h @@ -29,157 +29,157 @@ typedef uint32 RDP_SCANCODE; /* Our own representation of a RDP protocol scancode */ #define RDP_SCANCODE_CODE(_rdp_scancode) ((uint8)(_rdp_scancode & 0xFF)) -#define RDP_SCANCODE_EXTENDED(_rdp_scancode) (((_rdp_scancode) & 0x100) ? true : false) +#define RDP_SCANCODE_EXTENDED(_rdp_scancode) (((_rdp_scancode) & 0x100) ? TRUE : FALSE) #define MAKE_RDP_SCANCODE(_code, _extended) (((_code) & 0xFF) | ((_extended) ? 0x100 : 0)) /* Defines for known RDP_SCANCODE protocol values. * Mostly the same as the PKBDLLHOOKSTRUCT scanCode, "A hardware scan code for the key", @msdn{ms644967}. * Based @msdn{ms894073} US, @msdn{ms894072} UK, @msdn{ms892472} */ -#define RDP_SCANCODE_UNKNOWN MAKE_RDP_SCANCODE(0x00, false) +#define RDP_SCANCODE_UNKNOWN MAKE_RDP_SCANCODE(0x00, FALSE) -#define RDP_SCANCODE_ESCAPE MAKE_RDP_SCANCODE(0x01, false) /* VK_ESCAPE */ -#define RDP_SCANCODE_KEY_1 MAKE_RDP_SCANCODE(0x02, false) /* VK_KEY_1 */ -#define RDP_SCANCODE_KEY_2 MAKE_RDP_SCANCODE(0x03, false) /* VK_KEY_2 */ -#define RDP_SCANCODE_KEY_3 MAKE_RDP_SCANCODE(0x04, false) /* VK_KEY_3 */ -#define RDP_SCANCODE_KEY_4 MAKE_RDP_SCANCODE(0x05, false) /* VK_KEY_4 */ -#define RDP_SCANCODE_KEY_5 MAKE_RDP_SCANCODE(0x06, false) /* VK_KEY_5 */ -#define RDP_SCANCODE_KEY_6 MAKE_RDP_SCANCODE(0x07, false) /* VK_KEY_6 */ -#define RDP_SCANCODE_KEY_7 MAKE_RDP_SCANCODE(0x08, false) /* VK_KEY_7 */ -#define RDP_SCANCODE_KEY_8 MAKE_RDP_SCANCODE(0x09, false) /* VK_KEY_8 */ -#define RDP_SCANCODE_KEY_9 MAKE_RDP_SCANCODE(0x0A, false) /* VK_KEY_9 */ -#define RDP_SCANCODE_KEY_0 MAKE_RDP_SCANCODE(0x0B, false) /* VK_KEY_0 */ -#define RDP_SCANCODE_OEM_MINUS MAKE_RDP_SCANCODE(0x0C, false) /* VK_OEM_MINUS */ -#define RDP_SCANCODE_OEM_PLUS MAKE_RDP_SCANCODE(0x0D, false) /* VK_OEM_PLUS */ -#define RDP_SCANCODE_BACKSPACE MAKE_RDP_SCANCODE(0x0E, false) /* VK_BACK Backspace */ -#define RDP_SCANCODE_TAB MAKE_RDP_SCANCODE(0x0F, false) /* VK_TAB */ -#define RDP_SCANCODE_KEY_Q MAKE_RDP_SCANCODE(0x10, false) /* VK_KEY_Q */ -#define RDP_SCANCODE_KEY_W MAKE_RDP_SCANCODE(0x11, false) /* VK_KEY_W */ -#define RDP_SCANCODE_KEY_E MAKE_RDP_SCANCODE(0x12, false) /* VK_KEY_E */ -#define RDP_SCANCODE_KEY_R MAKE_RDP_SCANCODE(0x13, false) /* VK_KEY_R */ -#define RDP_SCANCODE_KEY_T MAKE_RDP_SCANCODE(0x14, false) /* VK_KEY_T */ -#define RDP_SCANCODE_KEY_Y MAKE_RDP_SCANCODE(0x15, false) /* VK_KEY_Y */ -#define RDP_SCANCODE_KEY_U MAKE_RDP_SCANCODE(0x16, false) /* VK_KEY_U */ -#define RDP_SCANCODE_KEY_I MAKE_RDP_SCANCODE(0x17, false) /* VK_KEY_I */ -#define RDP_SCANCODE_KEY_O MAKE_RDP_SCANCODE(0x18, false) /* VK_KEY_O */ -#define RDP_SCANCODE_KEY_P MAKE_RDP_SCANCODE(0x19, false) /* VK_KEY_P */ -#define RDP_SCANCODE_OEM_4 MAKE_RDP_SCANCODE(0x1A, false) /* VK_OEM_4 '[' on US */ -#define RDP_SCANCODE_OEM_6 MAKE_RDP_SCANCODE(0x1B, false) /* VK_OEM_6 ']' on US */ -#define RDP_SCANCODE_RETURN MAKE_RDP_SCANCODE(0x1C, false) /* VK_RETURN Normal Enter */ -#define RDP_SCANCODE_LCONTROL MAKE_RDP_SCANCODE(0x1D, false) /* VK_LCONTROL */ -#define RDP_SCANCODE_KEY_A MAKE_RDP_SCANCODE(0x1E, false) /* VK_KEY_A */ -#define RDP_SCANCODE_KEY_S MAKE_RDP_SCANCODE(0x1F, false) /* VK_KEY_S */ -#define RDP_SCANCODE_KEY_D MAKE_RDP_SCANCODE(0x20, false) /* VK_KEY_D */ -#define RDP_SCANCODE_KEY_F MAKE_RDP_SCANCODE(0x21, false) /* VK_KEY_F */ -#define RDP_SCANCODE_KEY_G MAKE_RDP_SCANCODE(0x22, false) /* VK_KEY_G */ -#define RDP_SCANCODE_KEY_H MAKE_RDP_SCANCODE(0x23, false) /* VK_KEY_H */ -#define RDP_SCANCODE_KEY_J MAKE_RDP_SCANCODE(0x24, false) /* VK_KEY_J */ -#define RDP_SCANCODE_KEY_K MAKE_RDP_SCANCODE(0x25, false) /* VK_KEY_K */ -#define RDP_SCANCODE_KEY_L MAKE_RDP_SCANCODE(0x26, false) /* VK_KEY_L */ -#define RDP_SCANCODE_OEM_1 MAKE_RDP_SCANCODE(0x27, false) /* VK_OEM_1 ';' on US */ -#define RDP_SCANCODE_OEM_7 MAKE_RDP_SCANCODE(0x28, false) /* VK_OEM_7 "'" on US */ -#define RDP_SCANCODE_OEM_3 MAKE_RDP_SCANCODE(0x29, false) /* VK_OEM_3 Top left, '`' on US, JP DBE_SBCSCHAR */ -#define RDP_SCANCODE_LSHIFT MAKE_RDP_SCANCODE(0x2A, false) /* VK_LSHIFT */ -#define RDP_SCANCODE_OEM_5 MAKE_RDP_SCANCODE(0x2B, false) /* VK_OEM_5 Next to Enter, '\' on US */ -#define RDP_SCANCODE_KEY_Z MAKE_RDP_SCANCODE(0x2C, false) /* VK_KEY_Z */ -#define RDP_SCANCODE_KEY_X MAKE_RDP_SCANCODE(0x2D, false) /* VK_KEY_X */ -#define RDP_SCANCODE_KEY_C MAKE_RDP_SCANCODE(0x2E, false) /* VK_KEY_C */ -#define RDP_SCANCODE_KEY_V MAKE_RDP_SCANCODE(0x2F, false) /* VK_KEY_V */ -#define RDP_SCANCODE_KEY_B MAKE_RDP_SCANCODE(0x30, false) /* VK_KEY_B */ -#define RDP_SCANCODE_KEY_N MAKE_RDP_SCANCODE(0x31, false) /* VK_KEY_N */ -#define RDP_SCANCODE_KEY_M MAKE_RDP_SCANCODE(0x32, false) /* VK_KEY_M */ -#define RDP_SCANCODE_OEM_COMMA MAKE_RDP_SCANCODE(0x33, false) /* VK_OEM_COMMA */ -#define RDP_SCANCODE_OEM_PERIOD MAKE_RDP_SCANCODE(0x34, false) /* VK_OEM_PERIOD */ -#define RDP_SCANCODE_OEM_2 MAKE_RDP_SCANCODE(0x35, false) /* VK_OEM_2 '/' on US */ -#define RDP_SCANCODE_RSHIFT MAKE_RDP_SCANCODE(0x36, false) /* VK_RSHIFT */ -#define RDP_SCANCODE_MULTIPLY MAKE_RDP_SCANCODE(0x37, false) /* VK_MULTIPLY Numerical */ -#define RDP_SCANCODE_LMENU MAKE_RDP_SCANCODE(0x38, false) /* VK_LMENU Left 'Alt' key */ -#define RDP_SCANCODE_SPACE MAKE_RDP_SCANCODE(0x39, false) /* VK_SPACE */ -#define RDP_SCANCODE_CAPSLOCK MAKE_RDP_SCANCODE(0x3A, false) /* VK_CAPITAL 'Caps Lock', JP DBE_ALPHANUMERIC */ -#define RDP_SCANCODE_F1 MAKE_RDP_SCANCODE(0x3B, false) /* VK_F1 */ -#define RDP_SCANCODE_F2 MAKE_RDP_SCANCODE(0x3C, false) /* VK_F2 */ -#define RDP_SCANCODE_F3 MAKE_RDP_SCANCODE(0x3D, false) /* VK_F3 */ -#define RDP_SCANCODE_F4 MAKE_RDP_SCANCODE(0x3E, false) /* VK_F4 */ -#define RDP_SCANCODE_F5 MAKE_RDP_SCANCODE(0x3F, false) /* VK_F5 */ -#define RDP_SCANCODE_F6 MAKE_RDP_SCANCODE(0x40, false) /* VK_F6 */ -#define RDP_SCANCODE_F7 MAKE_RDP_SCANCODE(0x41, false) /* VK_F7 */ -#define RDP_SCANCODE_F8 MAKE_RDP_SCANCODE(0x42, false) /* VK_F8 */ -#define RDP_SCANCODE_F9 MAKE_RDP_SCANCODE(0x43, false) /* VK_F9 */ -#define RDP_SCANCODE_F10 MAKE_RDP_SCANCODE(0x44, false) /* VK_F10 */ -#define RDP_SCANCODE_NUMLOCK MAKE_RDP_SCANCODE(0x45, false) /* VK_NUMLOCK */ /* Note: when this seems to appear in PKBDLLHOOKSTRUCT it means Pause which must be sent as Ctrl + NumLock */ -#define RDP_SCANCODE_SCROLLLOCK MAKE_RDP_SCANCODE(0x46, false) /* VK_SCROLL 'Scroll Lock', JP OEM_SCROLL */ -#define RDP_SCANCODE_NUMPAD7 MAKE_RDP_SCANCODE(0x47, false) /* VK_NUMPAD7 */ -#define RDP_SCANCODE_NUMPAD8 MAKE_RDP_SCANCODE(0x48, false) /* VK_NUMPAD8 */ -#define RDP_SCANCODE_NUMPAD9 MAKE_RDP_SCANCODE(0x49, false) /* VK_NUMPAD9 */ -#define RDP_SCANCODE_SUBTRACT MAKE_RDP_SCANCODE(0x4A, false) /* VK_SUBTRACT */ -#define RDP_SCANCODE_NUMPAD4 MAKE_RDP_SCANCODE(0x4B, false) /* VK_NUMPAD4 */ -#define RDP_SCANCODE_NUMPAD5 MAKE_RDP_SCANCODE(0x4C, false) /* VK_NUMPAD5 */ -#define RDP_SCANCODE_NUMPAD6 MAKE_RDP_SCANCODE(0x4D, false) /* VK_NUMPAD6 */ -#define RDP_SCANCODE_ADD MAKE_RDP_SCANCODE(0x4E, false) /* VK_ADD */ -#define RDP_SCANCODE_NUMPAD1 MAKE_RDP_SCANCODE(0x4F, false) /* VK_NUMPAD1 */ -#define RDP_SCANCODE_NUMPAD2 MAKE_RDP_SCANCODE(0x50, false) /* VK_NUMPAD2 */ -#define RDP_SCANCODE_NUMPAD3 MAKE_RDP_SCANCODE(0x51, false) /* VK_NUMPAD3 */ -#define RDP_SCANCODE_NUMPAD0 MAKE_RDP_SCANCODE(0x52, false) /* VK_NUMPAD0 */ -#define RDP_SCANCODE_DECIMAL MAKE_RDP_SCANCODE(0x53, false) /* VK_DECIMAL Numerical, '.' on US */ -#define RDP_SCANCODE_SYSREQ MAKE_RDP_SCANCODE(0x54, false) /* Sys Req */ -#define RDP_SCANCODE_OEM_102 MAKE_RDP_SCANCODE(0x56, false) /* VK_OEM_102 Lower left '\' on US */ -#define RDP_SCANCODE_F11 MAKE_RDP_SCANCODE(0x57, false) /* VK_F11 */ -#define RDP_SCANCODE_F12 MAKE_RDP_SCANCODE(0x58, false) /* VK_F12 */ -#define RDP_SCANCODE_SLEEP MAKE_RDP_SCANCODE(0x5F, false) /* VK_SLEEP OEM_8 on FR (undocumented?) */ -#define RDP_SCANCODE_ZOOM MAKE_RDP_SCANCODE(0x62, false) /* VK_ZOOM (undocumented?) */ -#define RDP_SCANCODE_HELP MAKE_RDP_SCANCODE(0x63, false) /* VK_HELP (undocumented?) */ +#define RDP_SCANCODE_ESCAPE MAKE_RDP_SCANCODE(0x01, FALSE) /* VK_ESCAPE */ +#define RDP_SCANCODE_KEY_1 MAKE_RDP_SCANCODE(0x02, FALSE) /* VK_KEY_1 */ +#define RDP_SCANCODE_KEY_2 MAKE_RDP_SCANCODE(0x03, FALSE) /* VK_KEY_2 */ +#define RDP_SCANCODE_KEY_3 MAKE_RDP_SCANCODE(0x04, FALSE) /* VK_KEY_3 */ +#define RDP_SCANCODE_KEY_4 MAKE_RDP_SCANCODE(0x05, FALSE) /* VK_KEY_4 */ +#define RDP_SCANCODE_KEY_5 MAKE_RDP_SCANCODE(0x06, FALSE) /* VK_KEY_5 */ +#define RDP_SCANCODE_KEY_6 MAKE_RDP_SCANCODE(0x07, FALSE) /* VK_KEY_6 */ +#define RDP_SCANCODE_KEY_7 MAKE_RDP_SCANCODE(0x08, FALSE) /* VK_KEY_7 */ +#define RDP_SCANCODE_KEY_8 MAKE_RDP_SCANCODE(0x09, FALSE) /* VK_KEY_8 */ +#define RDP_SCANCODE_KEY_9 MAKE_RDP_SCANCODE(0x0A, FALSE) /* VK_KEY_9 */ +#define RDP_SCANCODE_KEY_0 MAKE_RDP_SCANCODE(0x0B, FALSE) /* VK_KEY_0 */ +#define RDP_SCANCODE_OEM_MINUS MAKE_RDP_SCANCODE(0x0C, FALSE) /* VK_OEM_MINUS */ +#define RDP_SCANCODE_OEM_PLUS MAKE_RDP_SCANCODE(0x0D, FALSE) /* VK_OEM_PLUS */ +#define RDP_SCANCODE_BACKSPACE MAKE_RDP_SCANCODE(0x0E, FALSE) /* VK_BACK Backspace */ +#define RDP_SCANCODE_TAB MAKE_RDP_SCANCODE(0x0F, FALSE) /* VK_TAB */ +#define RDP_SCANCODE_KEY_Q MAKE_RDP_SCANCODE(0x10, FALSE) /* VK_KEY_Q */ +#define RDP_SCANCODE_KEY_W MAKE_RDP_SCANCODE(0x11, FALSE) /* VK_KEY_W */ +#define RDP_SCANCODE_KEY_E MAKE_RDP_SCANCODE(0x12, FALSE) /* VK_KEY_E */ +#define RDP_SCANCODE_KEY_R MAKE_RDP_SCANCODE(0x13, FALSE) /* VK_KEY_R */ +#define RDP_SCANCODE_KEY_T MAKE_RDP_SCANCODE(0x14, FALSE) /* VK_KEY_T */ +#define RDP_SCANCODE_KEY_Y MAKE_RDP_SCANCODE(0x15, FALSE) /* VK_KEY_Y */ +#define RDP_SCANCODE_KEY_U MAKE_RDP_SCANCODE(0x16, FALSE) /* VK_KEY_U */ +#define RDP_SCANCODE_KEY_I MAKE_RDP_SCANCODE(0x17, FALSE) /* VK_KEY_I */ +#define RDP_SCANCODE_KEY_O MAKE_RDP_SCANCODE(0x18, FALSE) /* VK_KEY_O */ +#define RDP_SCANCODE_KEY_P MAKE_RDP_SCANCODE(0x19, FALSE) /* VK_KEY_P */ +#define RDP_SCANCODE_OEM_4 MAKE_RDP_SCANCODE(0x1A, FALSE) /* VK_OEM_4 '[' on US */ +#define RDP_SCANCODE_OEM_6 MAKE_RDP_SCANCODE(0x1B, FALSE) /* VK_OEM_6 ']' on US */ +#define RDP_SCANCODE_RETURN MAKE_RDP_SCANCODE(0x1C, FALSE) /* VK_RETURN Normal Enter */ +#define RDP_SCANCODE_LCONTROL MAKE_RDP_SCANCODE(0x1D, FALSE) /* VK_LCONTROL */ +#define RDP_SCANCODE_KEY_A MAKE_RDP_SCANCODE(0x1E, FALSE) /* VK_KEY_A */ +#define RDP_SCANCODE_KEY_S MAKE_RDP_SCANCODE(0x1F, FALSE) /* VK_KEY_S */ +#define RDP_SCANCODE_KEY_D MAKE_RDP_SCANCODE(0x20, FALSE) /* VK_KEY_D */ +#define RDP_SCANCODE_KEY_F MAKE_RDP_SCANCODE(0x21, FALSE) /* VK_KEY_F */ +#define RDP_SCANCODE_KEY_G MAKE_RDP_SCANCODE(0x22, FALSE) /* VK_KEY_G */ +#define RDP_SCANCODE_KEY_H MAKE_RDP_SCANCODE(0x23, FALSE) /* VK_KEY_H */ +#define RDP_SCANCODE_KEY_J MAKE_RDP_SCANCODE(0x24, FALSE) /* VK_KEY_J */ +#define RDP_SCANCODE_KEY_K MAKE_RDP_SCANCODE(0x25, FALSE) /* VK_KEY_K */ +#define RDP_SCANCODE_KEY_L MAKE_RDP_SCANCODE(0x26, FALSE) /* VK_KEY_L */ +#define RDP_SCANCODE_OEM_1 MAKE_RDP_SCANCODE(0x27, FALSE) /* VK_OEM_1 ';' on US */ +#define RDP_SCANCODE_OEM_7 MAKE_RDP_SCANCODE(0x28, FALSE) /* VK_OEM_7 "'" on US */ +#define RDP_SCANCODE_OEM_3 MAKE_RDP_SCANCODE(0x29, FALSE) /* VK_OEM_3 Top left, '`' on US, JP DBE_SBCSCHAR */ +#define RDP_SCANCODE_LSHIFT MAKE_RDP_SCANCODE(0x2A, FALSE) /* VK_LSHIFT */ +#define RDP_SCANCODE_OEM_5 MAKE_RDP_SCANCODE(0x2B, FALSE) /* VK_OEM_5 Next to Enter, '\' on US */ +#define RDP_SCANCODE_KEY_Z MAKE_RDP_SCANCODE(0x2C, FALSE) /* VK_KEY_Z */ +#define RDP_SCANCODE_KEY_X MAKE_RDP_SCANCODE(0x2D, FALSE) /* VK_KEY_X */ +#define RDP_SCANCODE_KEY_C MAKE_RDP_SCANCODE(0x2E, FALSE) /* VK_KEY_C */ +#define RDP_SCANCODE_KEY_V MAKE_RDP_SCANCODE(0x2F, FALSE) /* VK_KEY_V */ +#define RDP_SCANCODE_KEY_B MAKE_RDP_SCANCODE(0x30, FALSE) /* VK_KEY_B */ +#define RDP_SCANCODE_KEY_N MAKE_RDP_SCANCODE(0x31, FALSE) /* VK_KEY_N */ +#define RDP_SCANCODE_KEY_M MAKE_RDP_SCANCODE(0x32, FALSE) /* VK_KEY_M */ +#define RDP_SCANCODE_OEM_COMMA MAKE_RDP_SCANCODE(0x33, FALSE) /* VK_OEM_COMMA */ +#define RDP_SCANCODE_OEM_PERIOD MAKE_RDP_SCANCODE(0x34, FALSE) /* VK_OEM_PERIOD */ +#define RDP_SCANCODE_OEM_2 MAKE_RDP_SCANCODE(0x35, FALSE) /* VK_OEM_2 '/' on US */ +#define RDP_SCANCODE_RSHIFT MAKE_RDP_SCANCODE(0x36, FALSE) /* VK_RSHIFT */ +#define RDP_SCANCODE_MULTIPLY MAKE_RDP_SCANCODE(0x37, FALSE) /* VK_MULTIPLY Numerical */ +#define RDP_SCANCODE_LMENU MAKE_RDP_SCANCODE(0x38, FALSE) /* VK_LMENU Left 'Alt' key */ +#define RDP_SCANCODE_SPACE MAKE_RDP_SCANCODE(0x39, FALSE) /* VK_SPACE */ +#define RDP_SCANCODE_CAPSLOCK MAKE_RDP_SCANCODE(0x3A, FALSE) /* VK_CAPITAL 'Caps Lock', JP DBE_ALPHANUMERIC */ +#define RDP_SCANCODE_F1 MAKE_RDP_SCANCODE(0x3B, FALSE) /* VK_F1 */ +#define RDP_SCANCODE_F2 MAKE_RDP_SCANCODE(0x3C, FALSE) /* VK_F2 */ +#define RDP_SCANCODE_F3 MAKE_RDP_SCANCODE(0x3D, FALSE) /* VK_F3 */ +#define RDP_SCANCODE_F4 MAKE_RDP_SCANCODE(0x3E, FALSE) /* VK_F4 */ +#define RDP_SCANCODE_F5 MAKE_RDP_SCANCODE(0x3F, FALSE) /* VK_F5 */ +#define RDP_SCANCODE_F6 MAKE_RDP_SCANCODE(0x40, FALSE) /* VK_F6 */ +#define RDP_SCANCODE_F7 MAKE_RDP_SCANCODE(0x41, FALSE) /* VK_F7 */ +#define RDP_SCANCODE_F8 MAKE_RDP_SCANCODE(0x42, FALSE) /* VK_F8 */ +#define RDP_SCANCODE_F9 MAKE_RDP_SCANCODE(0x43, FALSE) /* VK_F9 */ +#define RDP_SCANCODE_F10 MAKE_RDP_SCANCODE(0x44, FALSE) /* VK_F10 */ +#define RDP_SCANCODE_NUMLOCK MAKE_RDP_SCANCODE(0x45, FALSE) /* VK_NUMLOCK */ /* Note: when this seems to appear in PKBDLLHOOKSTRUCT it means Pause which must be sent as Ctrl + NumLock */ +#define RDP_SCANCODE_SCROLLLOCK MAKE_RDP_SCANCODE(0x46, FALSE) /* VK_SCROLL 'Scroll Lock', JP OEM_SCROLL */ +#define RDP_SCANCODE_NUMPAD7 MAKE_RDP_SCANCODE(0x47, FALSE) /* VK_NUMPAD7 */ +#define RDP_SCANCODE_NUMPAD8 MAKE_RDP_SCANCODE(0x48, FALSE) /* VK_NUMPAD8 */ +#define RDP_SCANCODE_NUMPAD9 MAKE_RDP_SCANCODE(0x49, FALSE) /* VK_NUMPAD9 */ +#define RDP_SCANCODE_SUBTRACT MAKE_RDP_SCANCODE(0x4A, FALSE) /* VK_SUBTRACT */ +#define RDP_SCANCODE_NUMPAD4 MAKE_RDP_SCANCODE(0x4B, FALSE) /* VK_NUMPAD4 */ +#define RDP_SCANCODE_NUMPAD5 MAKE_RDP_SCANCODE(0x4C, FALSE) /* VK_NUMPAD5 */ +#define RDP_SCANCODE_NUMPAD6 MAKE_RDP_SCANCODE(0x4D, FALSE) /* VK_NUMPAD6 */ +#define RDP_SCANCODE_ADD MAKE_RDP_SCANCODE(0x4E, FALSE) /* VK_ADD */ +#define RDP_SCANCODE_NUMPAD1 MAKE_RDP_SCANCODE(0x4F, FALSE) /* VK_NUMPAD1 */ +#define RDP_SCANCODE_NUMPAD2 MAKE_RDP_SCANCODE(0x50, FALSE) /* VK_NUMPAD2 */ +#define RDP_SCANCODE_NUMPAD3 MAKE_RDP_SCANCODE(0x51, FALSE) /* VK_NUMPAD3 */ +#define RDP_SCANCODE_NUMPAD0 MAKE_RDP_SCANCODE(0x52, FALSE) /* VK_NUMPAD0 */ +#define RDP_SCANCODE_DECIMAL MAKE_RDP_SCANCODE(0x53, FALSE) /* VK_DECIMAL Numerical, '.' on US */ +#define RDP_SCANCODE_SYSREQ MAKE_RDP_SCANCODE(0x54, FALSE) /* Sys Req */ +#define RDP_SCANCODE_OEM_102 MAKE_RDP_SCANCODE(0x56, FALSE) /* VK_OEM_102 Lower left '\' on US */ +#define RDP_SCANCODE_F11 MAKE_RDP_SCANCODE(0x57, FALSE) /* VK_F11 */ +#define RDP_SCANCODE_F12 MAKE_RDP_SCANCODE(0x58, FALSE) /* VK_F12 */ +#define RDP_SCANCODE_SLEEP MAKE_RDP_SCANCODE(0x5F, FALSE) /* VK_SLEEP OEM_8 on FR (undocumented?) */ +#define RDP_SCANCODE_ZOOM MAKE_RDP_SCANCODE(0x62, FALSE) /* VK_ZOOM (undocumented?) */ +#define RDP_SCANCODE_HELP MAKE_RDP_SCANCODE(0x63, FALSE) /* VK_HELP (undocumented?) */ -#define RDP_SCANCODE_F13 MAKE_RDP_SCANCODE(0x64, false) /* VK_F13 */ /* JP agree, should 0x7d according to ms894073 */ -#define RDP_SCANCODE_F14 MAKE_RDP_SCANCODE(0x65, false) /* VK_F14 */ -#define RDP_SCANCODE_F15 MAKE_RDP_SCANCODE(0x66, false) /* VK_F15 */ -#define RDP_SCANCODE_F16 MAKE_RDP_SCANCODE(0x67, false) /* VK_F16 */ -#define RDP_SCANCODE_F17 MAKE_RDP_SCANCODE(0x68, false) /* VK_F17 */ -#define RDP_SCANCODE_F18 MAKE_RDP_SCANCODE(0x69, false) /* VK_F18 */ -#define RDP_SCANCODE_F19 MAKE_RDP_SCANCODE(0x6A, false) /* VK_F19 */ -#define RDP_SCANCODE_F20 MAKE_RDP_SCANCODE(0x6B, false) /* VK_F20 */ -#define RDP_SCANCODE_F21 MAKE_RDP_SCANCODE(0x6C, false) /* VK_F21 */ -#define RDP_SCANCODE_F22 MAKE_RDP_SCANCODE(0x6D, false) /* VK_F22 */ -#define RDP_SCANCODE_F23 MAKE_RDP_SCANCODE(0x6E, false) /* VK_F23 */ /* JP agree */ -#define RDP_SCANCODE_F24 MAKE_RDP_SCANCODE(0x6F, false) /* VK_F24 */ /* 0x87 according to ms894073 */ +#define RDP_SCANCODE_F13 MAKE_RDP_SCANCODE(0x64, FALSE) /* VK_F13 */ /* JP agree, should 0x7d according to ms894073 */ +#define RDP_SCANCODE_F14 MAKE_RDP_SCANCODE(0x65, FALSE) /* VK_F14 */ +#define RDP_SCANCODE_F15 MAKE_RDP_SCANCODE(0x66, FALSE) /* VK_F15 */ +#define RDP_SCANCODE_F16 MAKE_RDP_SCANCODE(0x67, FALSE) /* VK_F16 */ +#define RDP_SCANCODE_F17 MAKE_RDP_SCANCODE(0x68, FALSE) /* VK_F17 */ +#define RDP_SCANCODE_F18 MAKE_RDP_SCANCODE(0x69, FALSE) /* VK_F18 */ +#define RDP_SCANCODE_F19 MAKE_RDP_SCANCODE(0x6A, FALSE) /* VK_F19 */ +#define RDP_SCANCODE_F20 MAKE_RDP_SCANCODE(0x6B, FALSE) /* VK_F20 */ +#define RDP_SCANCODE_F21 MAKE_RDP_SCANCODE(0x6C, FALSE) /* VK_F21 */ +#define RDP_SCANCODE_F22 MAKE_RDP_SCANCODE(0x6D, FALSE) /* VK_F22 */ +#define RDP_SCANCODE_F23 MAKE_RDP_SCANCODE(0x6E, FALSE) /* VK_F23 */ /* JP agree */ +#define RDP_SCANCODE_F24 MAKE_RDP_SCANCODE(0x6F, FALSE) /* VK_F24 */ /* 0x87 according to ms894073 */ -#define RDP_SCANCODE_HIRAGANA MAKE_RDP_SCANCODE(0x70, false) /* JP DBE_HIRAGANA */ -#define RDP_SCANCODE_HANJA_KANJI MAKE_RDP_SCANCODE(0x71, false) /* VK_HANJA / VK_KANJI (undocumented?) */ -#define RDP_SCANCODE_KANA_HANGUL MAKE_RDP_SCANCODE(0x72, false) /* VK_KANA / VK_HANGUL (undocumented?) */ -#define RDP_SCANCODE_ABNT_C1 MAKE_RDP_SCANCODE(0x73, false) /* VK_ABNT_C1 JP OEM_102 */ -#define RDP_SCANCODE_F24_JP MAKE_RDP_SCANCODE(0x76, false) /* JP F24 */ -#define RDP_SCANCODE_CONVERT_JP MAKE_RDP_SCANCODE(0x79, false) /* JP CONVERT */ -#define RDP_SCANCODE_NONCONVERT_JP MAKE_RDP_SCANCODE(0x7B, false) /* JP NONCONVERT */ -#define RDP_SCANCODE_TAB_JP MAKE_RDP_SCANCODE(0x7C, false) /* JP TAB */ -#define RDP_SCANCODE_BACKSLASH_JP MAKE_RDP_SCANCODE(0x7D, false) /* JP OEM_5 ('\') */ -#define RDP_SCANCODE_ABNT_C2 MAKE_RDP_SCANCODE(0x7E, false) /* VK_ABNT_C2, JP */ -#define RDP_SCANCODE_ABNT_C2 MAKE_RDP_SCANCODE(0x7E, false) /* JP OEM_PA2 */ +#define RDP_SCANCODE_HIRAGANA MAKE_RDP_SCANCODE(0x70, FALSE) /* JP DBE_HIRAGANA */ +#define RDP_SCANCODE_HANJA_KANJI MAKE_RDP_SCANCODE(0x71, FALSE) /* VK_HANJA / VK_KANJI (undocumented?) */ +#define RDP_SCANCODE_KANA_HANGUL MAKE_RDP_SCANCODE(0x72, FALSE) /* VK_KANA / VK_HANGUL (undocumented?) */ +#define RDP_SCANCODE_ABNT_C1 MAKE_RDP_SCANCODE(0x73, FALSE) /* VK_ABNT_C1 JP OEM_102 */ +#define RDP_SCANCODE_F24_JP MAKE_RDP_SCANCODE(0x76, FALSE) /* JP F24 */ +#define RDP_SCANCODE_CONVERT_JP MAKE_RDP_SCANCODE(0x79, FALSE) /* JP CONVERT */ +#define RDP_SCANCODE_NONCONVERT_JP MAKE_RDP_SCANCODE(0x7B, FALSE) /* JP NONCONVERT */ +#define RDP_SCANCODE_TAB_JP MAKE_RDP_SCANCODE(0x7C, FALSE) /* JP TAB */ +#define RDP_SCANCODE_BACKSLASH_JP MAKE_RDP_SCANCODE(0x7D, FALSE) /* JP OEM_5 ('\') */ +#define RDP_SCANCODE_ABNT_C2 MAKE_RDP_SCANCODE(0x7E, FALSE) /* VK_ABNT_C2, JP */ +#define RDP_SCANCODE_ABNT_C2 MAKE_RDP_SCANCODE(0x7E, FALSE) /* JP OEM_PA2 */ -#define RDP_SCANCODE_RETURN_KP MAKE_RDP_SCANCODE(0x1C, true) /* not RDP_SCANCODE_RETURN Numerical Enter */ -#define RDP_SCANCODE_RCONTROL MAKE_RDP_SCANCODE(0x1D, true) /* VK_RCONTROL */ -#define RDP_SCANCODE_DIVIDE MAKE_RDP_SCANCODE(0x35, true) /* VK_DIVIDE Numerical */ -#define RDP_SCANCODE_PRINTSCREEN MAKE_RDP_SCANCODE(0x37, true) /* VK_EXECUTE/VK_PRINT/VK_SNAPSHOT Print Screen */ -#define RDP_SCANCODE_RMENU MAKE_RDP_SCANCODE(0x38, true) /* VK_RMENU Right 'Alt' / 'Alt Gr' */ -#define RDP_SCANCODE_PAUSE MAKE_RDP_SCANCODE(0x46, true) /* VK_PAUSE Pause / Break (Slightly special handling) */ -#define RDP_SCANCODE_HOME MAKE_RDP_SCANCODE(0x47, true) /* VK_HOME */ -#define RDP_SCANCODE_UP MAKE_RDP_SCANCODE(0x48, true) /* VK_UP */ -#define RDP_SCANCODE_PRIOR MAKE_RDP_SCANCODE(0x49, true) /* VK_PRIOR 'Page Up' */ -#define RDP_SCANCODE_LEFT MAKE_RDP_SCANCODE(0x4B, true) /* VK_LEFT */ -#define RDP_SCANCODE_RIGHT MAKE_RDP_SCANCODE(0x4D, true) /* VK_RIGHT */ -#define RDP_SCANCODE_END MAKE_RDP_SCANCODE(0x4F, true) /* VK_END */ -#define RDP_SCANCODE_DOWN MAKE_RDP_SCANCODE(0x50, true) /* VK_DOWN */ -#define RDP_SCANCODE_NEXT MAKE_RDP_SCANCODE(0x51, true) /* VK_NEXT 'Page Down' */ -#define RDP_SCANCODE_INSERT MAKE_RDP_SCANCODE(0x52, true) /* VK_INSERT */ -#define RDP_SCANCODE_DELETE MAKE_RDP_SCANCODE(0x53, true) /* VK_DELETE */ -#define RDP_SCANCODE_NULL MAKE_RDP_SCANCODE(0x54, true) /* <00> */ -#define RDP_SCANCODE_HELP2 MAKE_RDP_SCANCODE(0x56, true) /* Help - documented, different from VK_HELP */ -#define RDP_SCANCODE_LWIN MAKE_RDP_SCANCODE(0x5B, true) /* VK_LWIN */ -#define RDP_SCANCODE_RWIN MAKE_RDP_SCANCODE(0x5C, true) /* VK_RWIN */ -#define RDP_SCANCODE_APPS MAKE_RDP_SCANCODE(0x5D, true) /* VK_APPS Application */ -#define RDP_SCANCODE_POWER_JP MAKE_RDP_SCANCODE(0x5E, true) /* JP POWER */ -#define RDP_SCANCODE_SLEEP_JP MAKE_RDP_SCANCODE(0x5F, true) /* JP SLEEP */ +#define RDP_SCANCODE_RETURN_KP MAKE_RDP_SCANCODE(0x1C, TRUE) /* not RDP_SCANCODE_RETURN Numerical Enter */ +#define RDP_SCANCODE_RCONTROL MAKE_RDP_SCANCODE(0x1D, TRUE) /* VK_RCONTROL */ +#define RDP_SCANCODE_DIVIDE MAKE_RDP_SCANCODE(0x35, TRUE) /* VK_DIVIDE Numerical */ +#define RDP_SCANCODE_PRINTSCREEN MAKE_RDP_SCANCODE(0x37, TRUE) /* VK_EXECUTE/VK_PRINT/VK_SNAPSHOT Print Screen */ +#define RDP_SCANCODE_RMENU MAKE_RDP_SCANCODE(0x38, TRUE) /* VK_RMENU Right 'Alt' / 'Alt Gr' */ +#define RDP_SCANCODE_PAUSE MAKE_RDP_SCANCODE(0x46, TRUE) /* VK_PAUSE Pause / Break (Slightly special handling) */ +#define RDP_SCANCODE_HOME MAKE_RDP_SCANCODE(0x47, TRUE) /* VK_HOME */ +#define RDP_SCANCODE_UP MAKE_RDP_SCANCODE(0x48, TRUE) /* VK_UP */ +#define RDP_SCANCODE_PRIOR MAKE_RDP_SCANCODE(0x49, TRUE) /* VK_PRIOR 'Page Up' */ +#define RDP_SCANCODE_LEFT MAKE_RDP_SCANCODE(0x4B, TRUE) /* VK_LEFT */ +#define RDP_SCANCODE_RIGHT MAKE_RDP_SCANCODE(0x4D, TRUE) /* VK_RIGHT */ +#define RDP_SCANCODE_END MAKE_RDP_SCANCODE(0x4F, TRUE) /* VK_END */ +#define RDP_SCANCODE_DOWN MAKE_RDP_SCANCODE(0x50, TRUE) /* VK_DOWN */ +#define RDP_SCANCODE_NEXT MAKE_RDP_SCANCODE(0x51, TRUE) /* VK_NEXT 'Page Down' */ +#define RDP_SCANCODE_INSERT MAKE_RDP_SCANCODE(0x52, TRUE) /* VK_INSERT */ +#define RDP_SCANCODE_DELETE MAKE_RDP_SCANCODE(0x53, TRUE) /* VK_DELETE */ +#define RDP_SCANCODE_NULL MAKE_RDP_SCANCODE(0x54, TRUE) /* <00> */ +#define RDP_SCANCODE_HELP2 MAKE_RDP_SCANCODE(0x56, TRUE) /* Help - documented, different from VK_HELP */ +#define RDP_SCANCODE_LWIN MAKE_RDP_SCANCODE(0x5B, TRUE) /* VK_LWIN */ +#define RDP_SCANCODE_RWIN MAKE_RDP_SCANCODE(0x5C, TRUE) /* VK_RWIN */ +#define RDP_SCANCODE_APPS MAKE_RDP_SCANCODE(0x5D, TRUE) /* VK_APPS Application */ +#define RDP_SCANCODE_POWER_JP MAKE_RDP_SCANCODE(0x5E, TRUE) /* JP POWER */ +#define RDP_SCANCODE_SLEEP_JP MAKE_RDP_SCANCODE(0x5F, TRUE) /* JP SLEEP */ /* _not_ valid scancode, but this is what a windows PKBDLLHOOKSTRUCT for NumLock contains */ -#define RDP_SCANCODE_NUMLOCK_EXTENDED MAKE_RDP_SCANCODE(0x45, true) /* should be RDP_SCANCODE_NUMLOCK */ -#define RDP_SCANCODE_RSHIFT_EXTENDED MAKE_RDP_SCANCODE(0x36, true) /* should be RDP_SCANCODE_RSHIFT */ +#define RDP_SCANCODE_NUMLOCK_EXTENDED MAKE_RDP_SCANCODE(0x45, TRUE) /* should be RDP_SCANCODE_NUMLOCK */ +#define RDP_SCANCODE_RSHIFT_EXTENDED MAKE_RDP_SCANCODE(0x36, TRUE) /* should be RDP_SCANCODE_RSHIFT */ #endif /* __FREERDP_LOCALE_KEYBOARD_RDP_SCANCODE_H */ diff --git a/include/freerdp/types.h b/include/freerdp/types.h index 6d14af12f..89dda14b2 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -81,11 +81,11 @@ typedef int boolean; #ifndef __cplusplus -#ifndef __bool_true_false_are_defined -#define __bool_true_false_are_defined 1 +#ifndef __bool_TRUE_FALSE_are_defined +#define __bool_TRUE_FALSE_are_defined 1 -#define true 1 -#define false 0 +#define TRUE 1 +#define FALSE 0 #ifdef _WIN32 #define boolean BOOLEAN @@ -93,16 +93,16 @@ typedef int boolean; typedef int boolean; #endif -#endif /* __bool_true_false_are_defined */ +#endif /* __bool_TRUE_FALSE_are_defined */ #else /* ifdef __cplusplus */ -#ifndef true -#define true 1 +#ifndef TRUE +#define TRUE 1 #endif -#ifndef false -#define false 0 +#ifndef FALSE +#define FALSE 0 #endif typedef int boolean; diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 2c8a97e6c..2f73efeef 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -144,7 +144,7 @@ void update_gdi_cache_bitmap_v3(rdpContext* context, CACHE_BITMAP_V3_ORDER* cach bitmap->Decompress(context, bitmap, bitmapData->data, bitmap->width, bitmap->height, - bitmapData->bpp, bitmapData->length, true, + bitmapData->bpp, bitmapData->length, TRUE, bitmapData->codecID); bitmap->New(context, bitmap); @@ -162,14 +162,14 @@ void update_gdi_bitmap_update(rdpContext* context, BITMAP_UPDATE* bitmap_update) int i; rdpBitmap* bitmap; BITMAP_DATA* bitmap_data; - boolean reused = true; + boolean reused = TRUE; rdpCache* cache = context->cache; if (cache->bitmap->bitmap == NULL) { cache->bitmap->bitmap = Bitmap_Alloc(context); - cache->bitmap->bitmap->ephemeral = true; - reused = false; + cache->bitmap->bitmap->ephemeral = TRUE; + reused = FALSE; } bitmap = cache->bitmap->bitmap; @@ -196,7 +196,7 @@ void update_gdi_bitmap_update(rdpContext* context, BITMAP_UPDATE* bitmap_update) if (reused) bitmap->Free(context, bitmap); else - reused = true; + reused = TRUE; bitmap->New(context, bitmap); @@ -282,18 +282,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); diff --git a/libfreerdp/cache/offscreen.c b/libfreerdp/cache/offscreen.c index 5d6168f63..28f1a1cab 100644 --- a/libfreerdp/cache/offscreen.c +++ b/libfreerdp/cache/offscreen.c @@ -46,7 +46,7 @@ void update_gdi_create_offscreen_bitmap(rdpContext* context, CREATE_OFFSCREEN_BI offscreen_cache_put(cache->offscreen, create_offscreen_bitmap->id, bitmap); if(cache->offscreen->currentSurface == create_offscreen_bitmap->id) - Bitmap_SetSurface(context, bitmap, false); + Bitmap_SetSurface(context, bitmap, FALSE); for (i = 0; i < (int) create_offscreen_bitmap->deleteList.cIndices; i++) { @@ -61,13 +61,13 @@ void update_gdi_switch_surface(rdpContext* context, SWITCH_SURFACE_ORDER* switch if (switch_surface->bitmapId == SCREEN_BITMAP_SURFACE) { - Bitmap_SetSurface(context, NULL, true); + Bitmap_SetSurface(context, NULL, TRUE); } else { rdpBitmap* bitmap; bitmap = offscreen_cache_get(cache->offscreen, switch_surface->bitmapId); - Bitmap_SetSurface(context, bitmap, false); + Bitmap_SetSurface(context, bitmap, FALSE); } cache->offscreen->currentSurface = switch_surface->bitmapId; diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 9c5fcede1..f47376aa5 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -953,7 +953,7 @@ boolean freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void* int* read_count, void** write_fds, int* write_count) { wait_obj_get_fds(channels->signal, read_fds, read_count); - return true; + return TRUE; } /** @@ -967,7 +967,7 @@ boolean freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance) freerdp_channels_process_sync(channels, instance); } - return true; + return TRUE; } RDP_EVENT* freerdp_channels_pop_event(rdpChannels* channels) diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index 9db452a09..f0200c439 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -357,7 +357,7 @@ static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8* static int WTSReceiveChannelData(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size) { int i; - boolean result = false; + boolean result = FALSE; rdpPeerChannel* channel; for (i = 0; i < client->settings->num_channels; i++) @@ -372,7 +372,7 @@ static int WTSReceiveChannelData(freerdp_peer* client, int channelId, uint8* dat if (channel != NULL) { WTSProcessChannelData(channel, channelId, data, size, flags, total_size); - result = true; + result = TRUE; } } @@ -446,7 +446,7 @@ void WTSVirtualChannelManagerGetFileDescriptor(WTSVirtualChannelManager* vcm, boolean WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) { - boolean result = true; + boolean result = TRUE; wts_data_item* item; rdpPeerChannel* channel; uint32 dynvc_caps; @@ -472,14 +472,14 @@ boolean WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vc while ((item = (wts_data_item*) list_dequeue(vcm->send_queue)) != NULL) { - if (vcm->client->SendChannelData(vcm->client, item->channel_id, item->buffer, item->length) == false) + if (vcm->client->SendChannelData(vcm->client, item->channel_id, item->buffer, item->length) == FALSE) { - result = false; + result = FALSE; } wts_data_item_free(item); - if (result == false) + if (result == FALSE) break; } @@ -578,7 +578,7 @@ boolean WTSVirtualChannelQuery( boolean bval; void* fds[10]; int fds_count = 0; - boolean result = false; + boolean result = FALSE; rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle; switch (WtsVirtualClass) @@ -588,30 +588,30 @@ boolean WTSVirtualChannelQuery( *ppBuffer = malloc(sizeof(void*)); memcpy(*ppBuffer, &fds[0], sizeof(void*)); *pBytesReturned = sizeof(void*); - result = true; + result = TRUE; break; case WTSVirtualChannelReady: if (channel->channel_type == RDP_PEER_CHANNEL_TYPE_SVC) { - bval = true; - result = true; + bval = TRUE; + result = TRUE; } else { switch (channel->dvc_open_state) { case DVC_OPEN_STATE_NONE: - bval = false; - result = true; + bval = FALSE; + result = TRUE; break; case DVC_OPEN_STATE_SUCCEEDED: - bval = true; - result = true; + bval = TRUE; + result = TRUE; break; default: - bval = false; - result = false; + bval = FALSE; + result = FALSE; break; } } @@ -648,13 +648,13 @@ boolean WTSVirtualChannelRead( { wait_obj_clear(channel->receive_event); *pBytesRead = 0; - return true; + return TRUE; } *pBytesRead = item->length; if (item->length > BufferSize) - return false; + return FALSE; /* remove the first element (same as what we just peek) */ WaitForSingleObject(channel->mutex, INFINITE); @@ -668,7 +668,7 @@ boolean WTSVirtualChannelRead( memcpy(Buffer, item->buffer, item->length); wts_data_item_free(item) ; - return true; + return TRUE; } boolean WTSVirtualChannelWrite( @@ -686,7 +686,7 @@ boolean WTSVirtualChannelWrite( uint32 written; if (channel == NULL) - return false; + return FALSE; if (channel->channel_type == RDP_PEER_CHANNEL_TYPE_SVC) { @@ -700,12 +700,12 @@ boolean WTSVirtualChannelWrite( else if (channel->vcm->drdynvc_channel == NULL || channel->vcm->drdynvc_state != DRDYNVC_STATE_READY) { DEBUG_DVC("drdynvc not ready"); - return false; + return FALSE; } else { s = stream_new(0); - first = true; + first = TRUE; while (Length > 0) { @@ -726,7 +726,7 @@ boolean WTSVirtualChannelWrite( item->buffer[0] = (DATA_PDU << 4) | cbChId; } - first = false; + first = FALSE; written = stream_get_left(s); if (written > Length) @@ -746,7 +746,7 @@ boolean WTSVirtualChannelWrite( if (pBytesWritten != NULL) *pBytesWritten = Length; - return true; + return TRUE; } boolean WTSVirtualChannelClose( @@ -803,5 +803,5 @@ boolean WTSVirtualChannelClose( free(channel); } - return true; + return TRUE; } diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index 008aa7f0d..2908b8920 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -432,7 +432,7 @@ static boolean bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int total_processed += bytes_processed + 1; } - return (size == total_processed) ? true : false; + return (size == total_processed) ? TRUE : FALSE; } @@ -453,7 +453,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) { @@ -478,8 +478,8 @@ boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, } else { - return false; + return FALSE; } - return true; + return TRUE; } diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index 3ae5fb661..d64dd5677 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -1057,9 +1057,9 @@ HCLRCONV freerdp_clrconv_new(uint32 flags) { HCLRCONV clrconv = xnew(CLRCONV); - clrconv->alpha = (flags & CLRCONV_ALPHA) ? true : false; - clrconv->invert = (flags & CLRCONV_INVERT) ? true : false; - clrconv->rgb555 = (flags & CLRCONV_RGB555) ? true : false; + clrconv->alpha = (flags & CLRCONV_ALPHA) ? TRUE : FALSE; + clrconv->invert = (flags & CLRCONV_INVERT) ? TRUE : FALSE; + clrconv->rgb555 = (flags & CLRCONV_RGB555) ? TRUE : FALSE; clrconv->palette = xnew(rdpPalette); return clrconv; diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index c9f838e1f..f2a0056ab 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -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) { diff --git a/libfreerdp/codec/mppc_dec.c b/libfreerdp/codec/mppc_dec.c index 4ed6e1357..f6f6f662a 100644 --- a/libfreerdp/codec/mppc_dec.c +++ b/libfreerdp/codec/mppc_dec.c @@ -152,7 +152,7 @@ int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, ui default: printf("mppc.c: invalid RDP compression code 0x%2.2x\n", type); - return false; + return FALSE; } } @@ -189,7 +189,7 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, if ((dec == NULL) || (dec->history_buf == NULL)) { printf("decompress_rdp_4: null\n"); - return false; + return FALSE; } src_ptr = 0; @@ -232,7 +232,7 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, history_ptr += len; *rlen = history_ptr - dec->history_ptr; dec->history_ptr = history_ptr; - return true; + return TRUE; } /* load initial data */ @@ -583,7 +583,7 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, dec->history_ptr = history_ptr; - return true; + return TRUE; } /** @@ -617,7 +617,7 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, if ((dec == NULL) || (dec->history_buf == NULL)) { printf("decompress_rdp_5: null\n"); - return false; + return FALSE; } src_ptr = 0; @@ -660,7 +660,7 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, history_ptr += len; *rlen = history_ptr - dec->history_ptr; dec->history_ptr = history_ptr; - return true; + return TRUE; } /* load initial data */ @@ -1047,7 +1047,7 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, dec->history_ptr = history_ptr; - return true; + return TRUE; } /** @@ -1083,7 +1083,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, if ((dec == NULL) || (dec->history_buf == NULL)) { printf("decompress_rdp_6: null\n"); - return false; + return FALSE; } src_ptr = 0; @@ -1131,7 +1131,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, history_ptr += len; *rlen = history_ptr - dec->history_ptr; dec->history_ptr = history_ptr; - return true; + return TRUE; } /* load initial data */ @@ -1382,7 +1382,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, dec->history_ptr = history_ptr; - return true; + return TRUE; } /** @@ -1400,7 +1400,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, int decompress_rdp_61(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { - return false; + return FALSE; } /** diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index 167a6faeb..e2e34111b 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -496,13 +496,13 @@ void mppc_enc_free(struct rdp_mppc_enc* enc) * @param srcData uncompressed data * @param len length of srcData * - * @return true on success, false on failure + * @return TRUE on success, FALSE on failure */ boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) { if ((enc == NULL) || (srcData == NULL) || (len <= 0) || (len > enc->buf_len)) - return false; + return FALSE; switch (enc->protocol_type) { case PROTO_RDP_40: @@ -512,7 +512,7 @@ boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) return compress_rdp_5(enc, srcData, len); break; } - return false; + return FALSE; } /** @@ -522,13 +522,13 @@ boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @param srcData uncompressed data * @param len length of srcData * - * @return true on success, false on failure + * @return TRUE on success, FALSE on failure */ boolean compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) { /* RDP 4.0 encoding not yet implemented */ - return false; + return FALSE; } /** @@ -538,7 +538,7 @@ boolean compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @param srcData uncompressed data * @param len length of srcData * - * @return true on success, false on failure + * @return TRUE on success, FALSE on failure */ boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) @@ -980,7 +980,7 @@ boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) memset(hash_table, 0, enc->buf_len * 2); enc->flagsHold |= PACKET_FLUSHED; enc->first_pkt = 1; - return true; + return TRUE; } else if (opb_index + 1 > len) { @@ -990,7 +990,7 @@ boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) memset(hash_table, 0, enc->buf_len * 2); enc->flagsHold |= PACKET_FLUSHED; enc->first_pkt = 1; - return true; + return TRUE; } /* if bits_left != 8, increment opb_index, which is zero indexed */ @@ -1006,7 +1006,7 @@ boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) memset(hash_table, 0, enc->buf_len * 2); enc->flagsHold |= PACKET_FLUSHED; enc->first_pkt = 1; - return true; + return TRUE; } enc->flags |= PACKET_COMPRESSED; enc->bytes_in_opb = opb_index; @@ -1015,5 +1015,5 @@ boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) enc->flagsHold = 0; DLOG(("\n")); - return true; + return TRUE; } diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 6da02c202..86305d6c4 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -219,7 +219,7 @@ void rfx_context_set_pixel_format(RFX_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f void rfx_context_reset(RFX_CONTEXT* context) { - context->header_processed = false; + context->header_processed = FALSE; context->frame_idx = 0; } @@ -694,7 +694,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) diff --git a/libfreerdp/core/activation.c b/libfreerdp/core/activation.c index 469a24226..19bebd2d6 100644 --- a/libfreerdp/core/activation.c +++ b/libfreerdp/core/activation.c @@ -51,7 +51,7 @@ boolean rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s) boolean rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU; - return true; + return TRUE; } boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp) @@ -63,7 +63,7 @@ boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp) rdp_write_synchronize_pdu(s, rdp->settings); rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id); - return true; + return TRUE; } boolean rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) @@ -73,17 +73,17 @@ boolean rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU; 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) */ stream_seek_uint16(s); - return true; + return TRUE; } boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp) @@ -100,13 +100,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) @@ -133,7 +133,7 @@ boolean rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) break; } - return true; + return TRUE; } boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) @@ -148,7 +148,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) @@ -163,7 +163,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) @@ -214,9 +214,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) @@ -248,7 +248,7 @@ boolean rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s) boolean rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU; - return true; + return TRUE; } boolean rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) @@ -260,7 +260,7 @@ boolean rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) stream_seek_uint16(s); /* mapFlags (2 bytes) */ stream_seek_uint16(s); /* entrySize (2 bytes) */ - return true; + return TRUE; } boolean rdp_send_server_font_map_pdu(rdpRdp* rdp) @@ -297,12 +297,12 @@ 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; if (rdp->disconnect) break; } - return true; + return TRUE; } boolean rdp_send_deactivate_all(rdpRdp* rdp) @@ -323,22 +323,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; } diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 197b4d7a2..3f0f0f85a 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -138,13 +138,13 @@ void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* sett stream_read_uint8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */ if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED)) - settings->fastpath_output = false; + settings->fastpath_output = FALSE; - 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; } /** @@ -222,8 +222,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) { @@ -309,8 +309,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; } } @@ -520,8 +520,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; if (settings->server_mode) { @@ -637,7 +637,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; } /** @@ -693,7 +693,7 @@ void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settin stream_seek(s, 64); /* imeFileName (64 bytes) */ - if (settings->server_mode != true) + if (settings->server_mode != TRUE) { if (inputFlags & INPUT_FLAG_FASTPATH_INPUT) { @@ -706,7 +706,7 @@ void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settin else { /* server does not support fastpath input */ - settings->fastpath_input = false; + settings->fastpath_input = FALSE; } } } @@ -899,8 +899,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; } /** @@ -913,12 +913,12 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rd void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) { uint8* header; - uint32 offscreenSupportLevel = false; + uint32 offscreenSupportLevel = FALSE; header = rdp_capability_set_start(s); if (settings->offscreen_bitmap_cache) - offscreenSupportLevel = true; + offscreenSupportLevel = TRUE; stream_write_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ stream_write_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ @@ -943,7 +943,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; } /** @@ -1050,7 +1050,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; } @@ -1093,7 +1093,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; } /** @@ -1163,10 +1163,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; } /** @@ -1212,10 +1212,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; } } } @@ -1389,7 +1389,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; } /** @@ -1432,9 +1432,9 @@ 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->jpeg_codec = false; + settings->rfx_codec = FALSE; + settings->ns_codec = FALSE; + settings->jpeg_codec = FALSE; } while (bitmapCodecCount > 0) @@ -1443,13 +1443,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 { @@ -1698,13 +1698,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) @@ -1840,7 +1840,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) @@ -1856,10 +1856,10 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) uint16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) - return false; + return FALSE; if (rdp->disconnect) - return true; + return TRUE; if (rdp->settings->encryption) { @@ -1869,7 +1869,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) if (!rdp_decrypt(rdp, s, length - 4, securityFlags)) { printf("rdp_decrypt failed\n"); - return false; + return FALSE; } } } @@ -1877,13 +1877,13 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) if (channelId != MCS_GLOBAL_CHANNEL_ID) { printf("expected MCS_GLOBAL_CHANNEL_ID %04x, got %04x\n", MCS_GLOBAL_CHANNEL_ID, channelId); - 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; @@ -1891,7 +1891,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) if (pduType != PDU_TYPE_DEMAND_ACTIVE) { printf("expected PDU_TYPE_DEMAND_ACTIVE %04x, got %04x\n", PDU_TYPE_DEMAND_ACTIVE, pduType); - return false; + return FALSE; } stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ @@ -1905,12 +1905,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->secondary->glyph_v2 = (rdp->settings->glyphSupportLevel > GLYPH_SUPPORT_FULL) ? true : false; + rdp->update->secondary->glyph_v2 = (rdp->settings->glyphSupportLevel > GLYPH_SUPPORT_FULL) ? TRUE : FALSE; - return true; + return TRUE; } void rdp_write_demand_active(STREAM* s, rdpSettings* settings) @@ -1978,7 +1978,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) @@ -1994,7 +1994,7 @@ boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) uint16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) - return false; + return FALSE; if (rdp->settings->encryption) { @@ -2004,21 +2004,21 @@ boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) if (!rdp_decrypt(rdp, s, length - 4, securityFlags)) { printf("rdp_decrypt failed\n"); - 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) */ @@ -2029,9 +2029,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) diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 76ed0558a..37a702fc9 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -144,7 +144,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++; @@ -261,7 +261,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_read_uint32(s, keylen); @@ -276,7 +276,7 @@ static boolean certificate_process_server_public_key(rdpCertificate* certificate /* 8 bytes of zero padding */ stream_seek(s, 8); - return true; + return TRUE; } static boolean certificate_process_server_public_signature(rdpCertificate* certificate, uint8* sigdata, int sigdatalen, STREAM* s, uint32 siglen) @@ -301,7 +301,7 @@ static boolean certificate_process_server_public_signature(rdpCertificate* certi if (sum != 0) { printf("certificate_process_server_public_signature: invalid signature\n"); - //return false; + //return FALSE; } siglen -= 8; @@ -312,7 +312,7 @@ static boolean certificate_process_server_public_signature(rdpCertificate* certi if (memcmp(md5hash, sig, sizeof(md5hash)) != 0) { printf("certificate_process_server_public_signature: invalid signature\n"); - //return false; + //return FALSE; } /* @@ -328,10 +328,10 @@ static boolean certificate_process_server_public_signature(rdpCertificate* certi if (sig[16] != 0x00 || sum != 0xFF * (62 - 17) || sig[62] != 0x01) { printf("certificate_process_server_public_signature: invalid signature\n"); - //return false; + //return FALSE; } - return true; + return TRUE; } /** @@ -359,7 +359,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific if (!(dwSigAlgId == SIGNATURE_ALG_RSA && dwKeyAlgId == KEY_EXCHANGE_ALG_RSA)) { printf("certificate_read_server_proprietary_certificate: parse error 1\n"); - return false; + return FALSE; } stream_read_uint16(s, wPublicKeyBlobType); @@ -367,7 +367,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific 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); @@ -375,7 +375,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific if (!certificate_process_server_public_key(certificate, s, wPublicKeyBlobLen)) { printf("certificate_read_server_proprietary_certificate: parse error 3\n"); - return false; + return FALSE; } sigdatalen = stream_get_tail(s) - sigdata; @@ -384,7 +384,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific 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); @@ -392,16 +392,16 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific if (wSignatureBlobLen != 72) { printf("certificate_process_server_public_signature: invalid signature length (got %d, expected %d)\n", wSignatureBlobLen, 64); - return false; + return FALSE; } if (!certificate_process_server_public_signature(certificate, sigdata, sigdatalen, s, wSignatureBlobLen)) { printf("certificate_read_server_proprietary_certificate: parse error 5\n"); - return false; + return FALSE; } - return true; + return TRUE; } /** @@ -448,7 +448,7 @@ boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certifica } } - return true; + return TRUE; } /** @@ -466,7 +466,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8* if (length < 1) { DEBUG_CERTIFICATE("null server certificate\n"); - return false; + return FALSE; } s = stream_new(0); @@ -490,7 +490,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8* } free(s); - return true; + return TRUE; } rdpKey* key_new(const char* keyfile) diff --git a/libfreerdp/core/channel.c b/libfreerdp/core/channel.c index 29816baab..8cb582b3d 100644 --- a/libfreerdp/core/channel.c +++ b/libfreerdp/core/channel.c @@ -54,7 +54,7 @@ boolean freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int si if (channel == NULL) { printf("freerdp_channel_send: unknown channel_id %d\n", channel_id); - return false; + return FALSE; } flags = CHANNEL_FLAG_FIRST; @@ -89,7 +89,7 @@ boolean freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int si flags = 0; } - return true; + return TRUE; } void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id) diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 860ba958d..4885145a2 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -65,7 +65,7 @@ * Establish RDP Connection based on the settings given in the 'rdp' paremeter. * @msdn{cc240452} * @param rdp RDP module - * @return true if the connection succeeded. false otherwise. + * @return true if the connection succeeded. FALSE otherwise. */ boolean rdp_client_connect(rdpRdp* rdp) @@ -88,17 +88,17 @@ boolean rdp_client_connect(rdpRdp* rdp) if (!nego_connect(rdp->nego)) { printf("Error: protocol security negotiation or connection failure\n"); - return false; + return FALSE; } if ((rdp->nego->selected_protocol & PROTOCOL_TLS) || (rdp->nego->selected_protocol == PROTOCOL_RDP)) { if ((settings->username != NULL) && ((settings->password != NULL) || (settings->password_cookie != NULL && settings->password_cookie_length > 0))) - settings->autologon = true; + settings->autologon = TRUE; } - rdp_set_blocking_mode(rdp, false); + rdp_set_blocking_mode(rdp, FALSE); rdp->state = CONNECTION_STATE_NEGO; rdp->finalize_sc_pdus = 0; @@ -109,18 +109,18 @@ boolean rdp_client_connect(rdpRdp* rdp) connectErrorCode = MCSCONNECTINITIALERROR; } printf("Error: unable to send MCS Connect Initial\n"); - return false; + return FALSE; } - rdp->transport->process_single_pdu = true; + rdp->transport->process_single_pdu = TRUE; while (rdp->state != CONNECTION_STATE_ACTIVE) { if (rdp_check_fds(rdp) < 0) - return false; + return FALSE; } - rdp->transport->process_single_pdu = false; + rdp->transport->process_single_pdu = FALSE; - return true; + return TRUE; } boolean rdp_client_disconnect(rdpRdp* rdp) @@ -212,10 +212,10 @@ static boolean rdp_client_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 */ @@ -236,18 +236,18 @@ static boolean rdp_client_establish_keys(rdpRdp* rdp) stream_write(s, crypt_client_random, 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->salted_checksum) - rdp->do_secure_checksum = true; + rdp->do_secure_checksum = TRUE; if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS) { @@ -256,13 +256,13 @@ static boolean rdp_client_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; } static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) @@ -274,16 +274,16 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) uint8* mod; uint8* priv_exp; - if (rdp->settings->encryption == false) + if (rdp->settings->encryption == FALSE) { /* No RDP Security. */ - return true; + return TRUE; } if (!rdp_read_header(rdp, s, &length, &channel_id)) { printf("rdp_server_establish_keys: invalid RDP header\n"); - return false; + return FALSE; } rdp_read_security_header(s, &sec_flags); @@ -291,7 +291,7 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) if ((sec_flags & SEC_EXCHANGE_PKT) == 0) { printf("rdp_server_establish_keys: missing SEC_EXCHANGE_PKT in security header\n"); - return false; + return FALSE; } stream_read_uint32(s, rand_len); @@ -300,7 +300,7 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) if (rand_len != key_len + 8) { printf("rdp_server_establish_keys: invalid encrypted client random length\n"); - return false; + return FALSE; } memset(crypt_client_random, 0, sizeof(crypt_client_random)); @@ -314,12 +314,12 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) /* 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->salted_checksum) - rdp->do_secure_checksum = true; + rdp->do_secure_checksum = TRUE; if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS) { @@ -328,13 +328,13 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) 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) @@ -342,63 +342,63 @@ 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 @@ -409,41 +409,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_client_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) @@ -451,7 +451,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) @@ -470,17 +470,17 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) stream_set_mark(s, mark); stream_seek(s, RDP_PACKET_HEADER_MAX_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->disconnect) - return true; + return TRUE; if (!rdp_send_confirm_active(rdp)) - return false; + return FALSE; input_register_client_callbacks(rdp->input); @@ -498,7 +498,7 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) rdp_client_connect_finalize(rdp); - return true; + return TRUE; } boolean rdp_client_connect_finalize(rdpRdp* rdp) @@ -510,17 +510,17 @@ boolean rdp_client_connect_finalize(rdpRdp* rdp) */ 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; - return true; + return TRUE; } boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) @@ -528,10 +528,10 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) boolean status; rdpSettings* settings = rdp->settings; - 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; rdp->nego->selected_protocol = 0; @@ -566,9 +566,9 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) (rdp->nego->selected_protocol == PROTOCOL_RDP) ? 1: 0); if (!nego_send_negotiation_response(rdp->nego)) - return false; + return FALSE; - status = false; + status = FALSE; if (rdp->nego->selected_protocol & PROTOCOL_NLA) status = transport_accept_nla(rdp->transport); else if (rdp->nego->selected_protocol & PROTOCOL_TLS) @@ -577,13 +577,13 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) status = transport_accept_rdp(rdp->transport); if (!status) - 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) @@ -591,7 +591,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:"); @@ -603,120 +603,120 @@ 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_keys(rdpRdp* rdp, STREAM* s) { if (!rdp_server_establish_keys(rdp, s)) - return false; + return FALSE; rdp->state = CONNECTION_STATE_ESTABLISH_KEYS; - 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; - return true; + return TRUE; } boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s) { if (!rdp_recv_confirm_active(rdp, s)) - return false; + return FALSE; 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; } diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index 1994b8531..f5f9c3e32 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -153,11 +153,11 @@ static boolean fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s) while (numberOrders > 0) { if (!update_recv_order(update, s)) - return false; + return FALSE; numberOrders--; } - return true; + return TRUE; } static void fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s) @@ -202,7 +202,7 @@ static boolean fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uin { case FASTPATH_UPDATETYPE_ORDERS: if (!fastpath_recv_orders(fastpath, s)) - return false; + return FALSE; break; case FASTPATH_UPDATETYPE_BITMAP: @@ -254,7 +254,7 @@ static boolean fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uin break; } - return true; + return TRUE; } static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) @@ -327,7 +327,7 @@ static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) if (update_stream) { if (!fastpath_recv_update(fastpath, updateCode, totalSize, update_stream)) - return false; + return FALSE; } stream_set_pos(s, next_pos); @@ -335,7 +335,7 @@ static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) if (comp_stream != s) free(comp_stream); - return true; + return TRUE; } boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) @@ -349,13 +349,13 @@ boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) if (!fastpath_recv_update_data(fastpath, s)) { /* XXX: Do we need to call EndPaint? */ - return false; + return FALSE; } } IFCALL(update->EndPaint, update->context); - return true; + return TRUE; } static boolean fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode) @@ -363,14 +363,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) @@ -379,7 +379,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) */ @@ -394,7 +394,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) @@ -404,7 +404,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) */ @@ -412,7 +412,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) @@ -422,7 +422,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) */ @@ -430,14 +430,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) @@ -446,7 +446,7 @@ static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* uint16 flags; if (stream_get_left(s) < 2) - return false; + return FALSE; stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */ @@ -458,7 +458,7 @@ static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* IFCALL(fastpath->rdp->input->UnicodeKeyboardEvent, fastpath->rdp->input, flags, unicodeCode); - return true; + return TRUE; } static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) @@ -467,33 +467,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: @@ -501,7 +501,7 @@ static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) break; } - return true; + return TRUE; } boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) @@ -516,7 +516,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) */ } @@ -524,10 +524,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; } static uint32 fastpath_get_sec_bytes(rdpRdp* rdp) @@ -577,7 +577,7 @@ boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) if (length >= (2 << 14)) { printf("Maximum FastPath PDU length is 32767\n"); - return false; + return FALSE; } eventHeader = FASTPATH_INPUT_ACTION_FASTPATH; @@ -606,7 +606,7 @@ boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) fpInputEvents = stream_get_tail(s) + sec_bytes; fpInputEvents_length = length - 3 - sec_bytes; if (rdp->sec_flags & SEC_SECURE_CHECKSUM) - security_salted_mac_signature(rdp, fpInputEvents, fpInputEvents_length, true, stream_get_tail(s)); + security_salted_mac_signature(rdp, fpInputEvents, fpInputEvents_length, TRUE, stream_get_tail(s)); else security_mac_signature(rdp, fpInputEvents, fpInputEvents_length, stream_get_tail(s)); security_encrypt(fpInputEvents, fpInputEvents_length, rdp); @@ -616,9 +616,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) @@ -657,7 +657,7 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM STREAM* comp_update; STREAM* ls; - result = true; + result = TRUE; rdp = fastpath->rdp; sec_bytes = fastpath_get_sec_bytes(rdp); maxLength = FASTPATH_MAX_PACKET_SIZE - (6 + sec_bytes); @@ -736,7 +736,7 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM ptr_to_crypt = bm + 3 + sec_bytes; ptr_sig = bm + 3; if (rdp->sec_flags & SEC_SECURE_CHECKSUM) - security_salted_mac_signature(rdp, ptr_to_crypt, bytes_to_crypt, true, ptr_sig); + security_salted_mac_signature(rdp, ptr_to_crypt, bytes_to_crypt, TRUE, ptr_sig); else security_mac_signature(rdp, ptr_to_crypt, bytes_to_crypt, ptr_sig); security_encrypt(ptr_to_crypt, bytes_to_crypt, rdp); @@ -744,7 +744,7 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM if (transport_write(fastpath->rdp->transport, update) < 0) { - result = false; + result = FALSE; break; } diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index 5f44c7808..1eff2af8b 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -44,14 +44,14 @@ * @param instance - pointer to a rdp_freerdp structure that contains base information to establish the connection. * On return, this function will be initialized with the new connection's settings. * - * @return true if successful. false otherwise. + * @return TRUE if successful. FALSE otherwise. * */ boolean freerdp_connect(freerdp* instance) { rdpRdp* rdp; rdpSettings* settings; - boolean status = false; + boolean status = FALSE; /* We always set the return code to 0 before we start the connect sequence*/ connectErrorCode = 0; @@ -71,14 +71,14 @@ boolean freerdp_connect(freerdp* instance) extension_load_and_init_plugins(rdp->extension); extension_pre_connect(rdp->extension); - if (status != true) + if (status != TRUE) { if(!connectErrorCode) { connectErrorCode = PREECONNECTERROR; } fprintf(stderr, "%s:%d: freerdp_pre_connect failed\n", __FILE__, __LINE__); - return false; + return FALSE; } status = rdp_client_connect(rdp); @@ -93,16 +93,16 @@ 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); IFCALLRET(instance->PostConnect, status, instance); - if (status != true) + if (status != TRUE) { printf("freerdp_post_connect failed\n"); @@ -111,7 +111,7 @@ boolean freerdp_connect(freerdp* instance) connectErrorCode = POSTCONNECTERROR; } - return false; + return FALSE; } if (instance->settings->play_rfx) @@ -121,10 +121,10 @@ 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; @@ -145,7 +145,7 @@ boolean freerdp_connect(freerdp* instance) } free(s->data); - return true; + return TRUE; } } @@ -164,7 +164,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) @@ -177,9 +177,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) @@ -194,7 +194,7 @@ boolean freerdp_disconnect(freerdp* instance) rdp = instance->context->rdp; transport_disconnect(rdp->transport); - return true; + return TRUE; } boolean freerdp_shall_disconnect(freerdp* instance) diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index 0cfb63252..d59010031 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -147,45 +147,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; } /** @@ -259,17 +259,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) @@ -321,27 +321,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: @@ -352,7 +352,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) @@ -382,7 +382,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) @@ -391,7 +391,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; @@ -399,7 +399,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; @@ -407,7 +407,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; @@ -419,7 +419,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) @@ -435,12 +435,12 @@ boolean gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length) stream_read_uint16(s, *length); /* length */ if (*length < 4) - return false; + return FALSE; if (stream_get_left(s) < *length - 4) - return false; + return FALSE; - return true; + return TRUE; } /** @@ -478,7 +478,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); @@ -569,7 +569,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) @@ -594,7 +594,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 block color_depth = 24; break; default: - return false; + return FALSE; } } else @@ -608,7 +608,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 block color_depth = 8; break; default: - return false; + return FALSE; } } @@ -619,7 +619,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 block if (color_depth < settings->color_depth || !settings->server_mode) settings->color_depth = color_depth; - return true; + return TRUE; } /** @@ -735,7 +735,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) @@ -756,7 +756,7 @@ 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; if (settings->encryption) { @@ -768,7 +768,7 @@ boolean gcc_read_client_security_data(STREAM* s, rdpSettings* settings, uint16 b { stream_seek(s, 8); } - return true; + return TRUE; } /** @@ -806,10 +806,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, settings->server_random_length); /* serverRandomLen */ @@ -823,7 +823,7 @@ boolean gcc_read_server_security_data(STREAM* s, rdpSettings* settings) } else { - return false; + return FALSE; } if (settings->server_certificate_length > 0) @@ -838,14 +838,14 @@ boolean gcc_read_server_security_data(STREAM* s, rdpSettings* settings) length = settings->server_certificate_length; if (!certificate_read_server_certificate(settings->server_cert, data, length)) - return false; + return FALSE; } else { - return false; + return FALSE; } - return true; + return TRUE; } static const uint8 initial_signature[] = @@ -1028,13 +1028,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++) @@ -1045,7 +1045,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; } /** @@ -1102,7 +1102,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) @@ -1135,14 +1135,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; } /** @@ -1177,7 +1177,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; } /** diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index ae9fd0fed..2534414b8 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -425,7 +425,7 @@ HttpResponse* http_response_recv(rdpTls* tls) p = buffer; - while (true) + while (TRUE) { status = tls_read(tls, p, length - nbytes); diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index 432a77ca4..4960896ce 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -73,14 +73,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_read_uint32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ stream_read_uint32(s, autoReconnectCookie->version); /* version (4 bytes) */ stream_read_uint32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */ stream_read(s, autoReconnectCookie->securityVerifier, 16); /* SecurityVerifier */ - return true; + return TRUE; } /** @@ -118,10 +118,10 @@ 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; freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ip_address, cbClientAddress / 2); stream_seek(s, cbClientAddress); @@ -129,7 +129,7 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) stream_read_uint16(s, cbClientDir); /* cbClientDir */ if (stream_get_left(s) < cbClientDir) - return false; + return FALSE; if (settings->client_dir) free(settings->client_dir); @@ -138,7 +138,7 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) 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 */ @@ -151,7 +151,7 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) /* reserved1 (2 bytes) */ /* reserved2 (2 bytes) */ - return true; + return TRUE; } /** @@ -228,10 +228,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 */ @@ -240,7 +240,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) { @@ -250,7 +250,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) { @@ -260,7 +260,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) { @@ -270,7 +270,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) { @@ -280,7 +280,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) { @@ -292,7 +292,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; } /** @@ -315,7 +315,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) int cbAlternateShell; WCHAR* workingDir; int cbWorkingDir; - boolean usedPasswordCookie = false; + boolean usedPasswordCookie = FALSE; flags = INFO_MOUSE | INFO_UNICODE | @@ -357,7 +357,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) if (settings->password_cookie && settings->password_cookie_length > 0) { - usedPasswordCookie = true; + usedPasswordCookie = TRUE; password = (WCHAR*) settings->password_cookie; cbPassword = settings->password_cookie_length - 2; /* Strip double zero termination */ } @@ -425,25 +425,25 @@ boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s) uint16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) - return false; + return FALSE; rdp_read_security_header(s, &securityFlags); if ((securityFlags & SEC_INFO_PKT) == 0) - return false; + return FALSE; if (rdp->settings->encryption) { if (securityFlags & SEC_REDIRECTION_PKT) { printf("Error: SEC_REDIRECTION_PKT unsupported\n"); - return false; + return FALSE; } if (securityFlags & SEC_ENCRYPT) { if (!rdp_decrypt(rdp, s, length - 4, securityFlags)) { printf("rdp_decrypt failed\n"); - return false; + return FALSE; } } } @@ -565,6 +565,6 @@ boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s) break; } - return true; + return TRUE; } diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 3aaa975ab..587e742f7 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -207,14 +207,14 @@ static boolean input_recv_sync_event(rdpInput* input, STREAM* s) uint32 toggleFlags; if (stream_get_left(s) < 6) - return false; + return FALSE; stream_seek(s, 2); /* pad2Octets (2 bytes) */ stream_read_uint32(s, toggleFlags); /* toggleFlags (4 bytes) */ IFCALL(input->SynchronizeEvent, input, toggleFlags); - return true; + return TRUE; } static boolean input_recv_keyboard_event(rdpInput* input, STREAM* s) @@ -222,7 +222,7 @@ static boolean input_recv_keyboard_event(rdpInput* input, STREAM* s) uint16 keyboardFlags, keyCode; if (stream_get_left(s) < 6) - return false; + return FALSE; stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ stream_read_uint16(s, keyCode); /* keyCode (2 bytes) */ @@ -230,7 +230,7 @@ static boolean input_recv_keyboard_event(rdpInput* input, STREAM* s) IFCALL(input->KeyboardEvent, input, keyboardFlags, keyCode); - return true; + return TRUE; } static boolean input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) @@ -238,7 +238,7 @@ static boolean input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) uint16 keyboardFlags, unicodeCode; if (stream_get_left(s) < 6) - return false; + return FALSE; stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */ @@ -259,7 +259,7 @@ static boolean input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) IFCALL(input->UnicodeKeyboardEvent, input, keyboardFlags, unicodeCode); - return true; + return TRUE; } static boolean input_recv_mouse_event(rdpInput* input, STREAM* s) @@ -267,7 +267,7 @@ static boolean input_recv_mouse_event(rdpInput* input, STREAM* s) uint16 pointerFlags, xPos, 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) */ @@ -275,7 +275,7 @@ static boolean input_recv_mouse_event(rdpInput* input, STREAM* s) IFCALL(input->MouseEvent, input, pointerFlags, xPos, yPos); - return true; + return TRUE; } static boolean input_recv_extended_mouse_event(rdpInput* input, STREAM* s) @@ -283,7 +283,7 @@ static boolean input_recv_extended_mouse_event(rdpInput* input, STREAM* s) uint16 pointerFlags, xPos, 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) */ @@ -291,7 +291,7 @@ static boolean input_recv_extended_mouse_event(rdpInput* input, STREAM* s) IFCALL(input->ExtendedMouseEvent, input, pointerFlags, xPos, yPos); - return true; + return TRUE; } static boolean input_recv_event(rdpInput* input, STREAM* s) @@ -299,7 +299,7 @@ static boolean input_recv_event(rdpInput* input, STREAM* s) uint16 messageType; if (stream_get_left(s) < 4) - return false; + return FALSE; stream_seek(s, 4); /* eventTime (4 bytes), ignored by the server */ stream_read_uint16(s, messageType); /* messageType (2 bytes) */ @@ -308,27 +308,27 @@ static boolean input_recv_event(rdpInput* input, STREAM* s) { case INPUT_EVENT_SYNC: if (!input_recv_sync_event(input, s)) - return false; + return FALSE; break; case INPUT_EVENT_SCANCODE: if (!input_recv_keyboard_event(input, s)) - return false; + return FALSE; break; case INPUT_EVENT_UNICODE: if (!input_recv_unicode_keyboard_event(input, s)) - return false; + return FALSE; break; case INPUT_EVENT_MOUSE: if (!input_recv_mouse_event(input, s)) - return false; + return FALSE; break; case INPUT_EVENT_MOUSEX: if (!input_recv_extended_mouse_event(input, s)) - return false; + return FALSE; break; default: @@ -338,7 +338,7 @@ static boolean input_recv_event(rdpInput* input, STREAM* s) break; } - return true; + return TRUE; } boolean input_recv(rdpInput* input, STREAM* s) @@ -346,22 +346,22 @@ boolean input_recv(rdpInput* input, STREAM* s) uint16 i, numberEvents; if (stream_get_left(s) < 4) - return false; + return FALSE; stream_read_uint16(s, numberEvents); /* numberEvents (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ /* Each input event uses 6 exactly bytes. */ if (stream_get_left(s) < 6 * numberEvents) - return false; + return FALSE; for (i = 0; i < numberEvents; i++) { if (!input_recv_event(input, s)) - return false; + return FALSE; } - return true; + return TRUE; } void input_register_client_callbacks(rdpInput* input) diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 0980d619a..0ab8b23bd 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -158,9 +158,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; } /** @@ -182,19 +182,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) */ @@ -227,10 +227,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) @@ -886,7 +886,7 @@ boolean license_send_valid_client_error_packet(rdpLicense* license) license_send(license, s, ERROR_ALERT); - return true; + return TRUE; } /** diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index 63ed52c84..8dbb99d42 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -105,7 +105,7 @@ static boolean freerdp_listener_open(freerdp_listener* instance, const char* bin #else perror("getaddrinfo"); #endif - return false; + return FALSE; } for (ai = res; ai && listener->num_sockfds < 5; ai = ai->ai_next) @@ -168,7 +168,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 boolean freerdp_listener_open_local(freerdp_listener* instance, const char* path) @@ -184,7 +184,7 @@ static boolean freerdp_listener_open_local(freerdp_listener* instance, const cha if (sockfd == -1) { perror("socket"); - return false; + return FALSE; } fcntl(sockfd, F_SETFL, O_NONBLOCK); @@ -199,7 +199,7 @@ static boolean freerdp_listener_open_local(freerdp_listener* instance, const cha { perror("bind"); close(sockfd); - return false; + return FALSE; } status = listen(sockfd, 10); @@ -208,16 +208,16 @@ static boolean freerdp_listener_open_local(freerdp_listener* instance, const cha { perror("listen"); close(sockfd); - return false; + return FALSE; } listener->sockfds[listener->num_sockfds++] = sockfd; printf("Listening on socket %s.\n", addr.sun_path); - return true; + return TRUE; #else - return true; + return TRUE; #endif } @@ -241,7 +241,7 @@ static boolean freerdp_listener_get_fds(freerdp_listener* instance, void** rfds, rdpListener* listener = (rdpListener*) instance->listener; if (listener->num_sockfds < 1) - return false; + return FALSE; for (i = 0; i < listener->num_sockfds; i++) { @@ -249,7 +249,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) @@ -263,7 +263,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance) rdpListener* listener = (rdpListener*) instance->listener; if (listener->num_sockfds < 1) - return false; + return FALSE; for (i = 0; i < listener->num_sockfds; i++) { @@ -283,7 +283,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance) continue; #endif perror("accept"); - return false; + return FALSE; } client = freerdp_peer_new(peer_sockfd); @@ -295,7 +295,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance) sin_addr = &(((struct sockaddr_in6*) &peer_addr)->sin6_addr); #ifndef _WIN32 else if (peer_addr.ss_family == AF_UNIX) - client->local = true; + client->local = TRUE; #endif if (sin_addr) @@ -304,7 +304,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) diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index 0320964c2..15238c418 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -197,16 +197,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; } /** @@ -265,7 +265,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; } /** @@ -329,24 +329,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_tag(s, &length)) - return false; + return FALSE; stream_seek(s, length); /* calledDomainSelector (OCTET_STRING) */ if (!ber_read_octet_string_tag(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); @@ -358,12 +358,12 @@ boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s) mcs_read_domain_parameters(s, &mcs->maximumParameters); if (!ber_read_octet_string_tag(s, &length)) - return false; + return FALSE; if (!gcc_read_conference_create_request(s, mcs->transport->settings)) - return false; + return FALSE; - return true; + return TRUE; } /** @@ -388,7 +388,7 @@ void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data) ber_write_octet_string(tmps, calledDomainSelector, sizeof(calledDomainSelector)); /* upwardFlag (BOOLEAN) */ - ber_write_boolean(tmps, true); + ber_write_boolean(tmps, TRUE); /* targetParameters (DomainParameters) */ mcs_write_domain_parameters(tmps, &mcs->targetParameters); @@ -476,7 +476,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); } /** @@ -494,24 +494,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_tag(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; } /** @@ -553,7 +553,7 @@ boolean mcs_send_connect_response(rdpMcs* mcs) stream_free(gcc_CCrsp); stream_free(server_data); - return true; + return TRUE; } /** @@ -570,9 +570,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; } /** @@ -593,9 +593,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; } /** @@ -612,9 +612,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; } /** @@ -632,9 +632,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; } /** @@ -651,12 +651,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; } /** @@ -680,7 +680,7 @@ boolean mcs_send_attach_user_confirm(rdpMcs* mcs) transport_write(mcs->transport, s); - return true; + return TRUE; } /** @@ -698,16 +698,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; } /** @@ -729,9 +729,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; } /** @@ -750,14 +750,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; } /** @@ -781,7 +781,7 @@ boolean mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) transport_write(mcs->transport, s); - return true; + return TRUE; } /** @@ -801,7 +801,7 @@ boolean mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs) transport_write(mcs->transport, s); - return true; + return TRUE; } /** diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index f9d0338fb..0091649f2 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -103,7 +103,7 @@ boolean nego_connect(rdpNego* nego) { DEBUG_NEGO("Failed to send preconnection information"); nego->state = NEGO_STATE_FINAL; - return false; + return FALSE; } } @@ -117,7 +117,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); @@ -131,7 +131,7 @@ 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; } @@ -140,10 +140,10 @@ boolean nego_connect(rdpNego* nego) if(!nego_security_connect(nego)) { DEBUG_NEGO("Failed to connect with %s security", PROTOCOL_SECURITY_STRINGS[nego->selected_protocol]); - return false; + return FALSE; } - return true; + return TRUE; } /* connect to selected security layer */ @@ -151,7 +151,7 @@ boolean nego_security_connect(rdpNego* nego) { if(!nego->tcp_connected) { - nego->security_connected = false; + nego->security_connected = FALSE; } else if (!nego->security_connected) { @@ -239,12 +239,12 @@ boolean nego_send_preconnection_pdu(rdpNego* nego) WCHAR* wszPCB = NULL; if (!nego->send_preconnection_pdu) - return true; + return TRUE; DEBUG_NEGO("Sending preconnection PDU"); if (!nego_tcp_connect(nego)) - return false; + return FALSE; /* it's easier to always send the version 2 PDU, and it's just 2 bytes overhead */ cbSize = PRECONNECTION_PDU_V2_MIN_SIZE; @@ -270,9 +270,9 @@ boolean nego_send_preconnection_pdu(rdpNego* nego) } if (transport_write(nego->transport, s) < 0) - return false; + return FALSE; - return true; + return TRUE; } /** @@ -398,7 +398,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); } @@ -418,7 +418,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); @@ -471,7 +471,7 @@ boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra) nego->state = NEGO_STATE_FINAL; } - return true; + return TRUE; } /** @@ -492,7 +492,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) @@ -524,13 +524,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; } /** @@ -602,9 +602,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; } /** @@ -705,7 +705,7 @@ boolean nego_send_negotiation_response(rdpNego* nego) boolean status; rdpSettings* settings; - status = true; + status = TRUE; settings = nego->transport->settings; s = transport_send_stream_init(nego->transport, 256); @@ -734,7 +734,7 @@ boolean nego_send_negotiation_response(rdpNego* nego) printf("nego_send_negotiation_response: client supports only Standard RDP Security\n"); stream_write_uint32(s, SSL_REQUIRED_BY_SERVER); length += 8; - status = false; + status = FALSE; } stream_get_mark(s, em); @@ -744,7 +744,7 @@ boolean nego_send_negotiation_response(rdpNego* nego) stream_set_mark(s, em); if (transport_write(nego->transport, s) < 0) - return false; + return FALSE; if (status) { @@ -754,35 +754,35 @@ boolean nego_send_negotiation_response(rdpNego* nego) if (settings->selected_protocol == PROTOCOL_RDP) { - settings->tls_security = false; - settings->nla_security = false; - settings->rdp_security = true; + settings->tls_security = FALSE; + settings->nla_security = FALSE; + settings->rdp_security = TRUE; if (!settings->local) { - settings->encryption = true; + settings->encryption = TRUE; settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; } if (settings->encryption && settings->server_key == NULL && settings->rdp_key_file == NULL) - return false; + return FALSE; } else if (settings->selected_protocol == PROTOCOL_TLS) { - settings->tls_security = true; - settings->nla_security = false; - settings->rdp_security = false; - settings->encryption = false; + settings->tls_security = TRUE; + settings->nla_security = FALSE; + settings->rdp_security = FALSE; + settings->encryption = FALSE; settings->encryption_method = ENCRYPTION_METHOD_NONE; settings->encryption_level = ENCRYPTION_LEVEL_NONE; } else if (settings->selected_protocol == PROTOCOL_NLA) { - settings->tls_security = true; - settings->nla_security = true; - settings->rdp_security = false; - settings->encryption = false; + settings->tls_security = TRUE; + settings->nla_security = TRUE; + settings->rdp_security = FALSE; + settings->encryption = FALSE; settings->encryption_method = ENCRYPTION_METHOD_NONE; settings->encryption_level = ENCRYPTION_LEVEL_NONE; } @@ -850,35 +850,35 @@ void nego_set_target(rdpNego* nego, char* hostname, int port) /** * Enable security layer negotiation. * @param nego pointer to the negotiation structure - * @param enable_rdp whether to enable security layer negotiation (true for enabled, false for disabled) + * @param enable_rdp whether to enable security layer negotiation (TRUE for enabled, FALSE for disabled) */ void nego_set_negotiation_enabled(rdpNego* nego, boolean security_layer_negotiation_enabled) { - DEBUG_NEGO("Enabling security layer negotiation: %s", security_layer_negotiation_enabled ? "true" : "false"); + DEBUG_NEGO("Enabling security layer negotiation: %s", security_layer_negotiation_enabled ? "TRUE" : "FALSE"); nego->security_layer_negotiation_enabled = security_layer_negotiation_enabled; } /** * 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; } @@ -886,12 +886,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; } diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index 552722372..c96c3feb4 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -222,7 +222,7 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) stream_read_uint8(s, byte); - negative = (byte & 0x40) ? true : false; + negative = (byte & 0x40) ? TRUE : FALSE; *value = (byte & 0x3F); @@ -1446,7 +1446,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord int i; int size; uint8 iBitmapFormat; - boolean compressed = false; + boolean compressed = FALSE; stream_read_uint8(s, cache_brush_order->index); /* cacheEntry (1 byte) */ @@ -1482,13 +1482,13 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord else { if ((iBitmapFormat == BMF_8BPP) && (cache_brush_order->length == 20)) - compressed = true; + compressed = TRUE; else if ((iBitmapFormat == BMF_16BPP) && (cache_brush_order->length == 24)) - compressed = true; + compressed = TRUE; else if ((iBitmapFormat == BMF_32BPP) && (cache_brush_order->length == 32)) - compressed = true; + compressed = TRUE; - if (compressed != false) + if (compressed != FALSE) { /* compressed brush */ update_decompress_brush(s, cache_brush_order->data, cache_brush_order->bpp); @@ -1517,7 +1517,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) */ @@ -1682,24 +1682,24 @@ void update_read_bounds(STREAM* s, rdpBounds* 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); } boolean update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) @@ -1716,7 +1716,7 @@ boolean update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) if (orderInfo->orderType >= PRIMARY_DRAWING_ORDER_COUNT) { printf("Invalid Primary Drawing Order (0x%02X)\n", orderInfo->orderType); - return false; + return FALSE; } update_read_field_flags(s, &(orderInfo->fieldFlags), flags, @@ -1730,7 +1730,7 @@ boolean update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) IFCALL(update->SetBounds, context, &orderInfo->bounds); } - orderInfo->deltaCoordinates = (flags & ORDER_DELTA_COORDINATES) ? true : false; + orderInfo->deltaCoordinates = (flags & ORDER_DELTA_COORDINATES) ? TRUE : FALSE; #ifdef WITH_DEBUG_ORDERS printf("%s Primary Drawing Order (0x%02X)\n", PRIMARY_DRAWING_ORDER_STRINGS[orderInfo->orderType], orderInfo->orderType); @@ -1857,7 +1857,7 @@ boolean update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) IFCALL(update->SetBounds, context, NULL); } - return true; + return TRUE; } void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags) @@ -1885,27 +1885,27 @@ void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags) switch (orderType) { case ORDER_TYPE_BITMAP_UNCOMPRESSED: - update_read_cache_bitmap_order(s, &(secondary->cache_bitmap_order), false, extraFlags); + update_read_cache_bitmap_order(s, &(secondary->cache_bitmap_order), FALSE, extraFlags); IFCALL(secondary->CacheBitmap, context, &(secondary->cache_bitmap_order)); break; case ORDER_TYPE_CACHE_BITMAP_COMPRESSED: - update_read_cache_bitmap_order(s, &(secondary->cache_bitmap_order), true, extraFlags); + update_read_cache_bitmap_order(s, &(secondary->cache_bitmap_order), TRUE, extraFlags); IFCALL(secondary->CacheBitmap, context, &(secondary->cache_bitmap_order)); break; case ORDER_TYPE_BITMAP_UNCOMPRESSED_V2: - update_read_cache_bitmap_v2_order(s, &(secondary->cache_bitmap_v2_order), false, extraFlags); + update_read_cache_bitmap_v2_order(s, &(secondary->cache_bitmap_v2_order), FALSE, extraFlags); IFCALL(secondary->CacheBitmapV2, context, &(secondary->cache_bitmap_v2_order)); break; case ORDER_TYPE_BITMAP_COMPRESSED_V2: - update_read_cache_bitmap_v2_order(s, &(secondary->cache_bitmap_v2_order), true, extraFlags); + update_read_cache_bitmap_v2_order(s, &(secondary->cache_bitmap_v2_order), TRUE, extraFlags); IFCALL(secondary->CacheBitmapV2, context, &(secondary->cache_bitmap_v2_order)); break; case ORDER_TYPE_BITMAP_COMPRESSED_V3: - update_read_cache_bitmap_v3_order(s, &(secondary->cache_bitmap_v3_order), true, extraFlags); + update_read_cache_bitmap_v3_order(s, &(secondary->cache_bitmap_v3_order), TRUE, extraFlags); IFCALL(secondary->CacheBitmapV3, context, &(secondary->cache_bitmap_v3_order)); break; @@ -2041,8 +2041,8 @@ boolean update_recv_order(rdpUpdate* update, STREAM* s) else { if (!update_recv_primary_order(update, s, controlFlags)) - return false; + return FALSE; } - return true; + return TRUE; } diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index d9cbcf532..60b306202 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -28,7 +28,7 @@ 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->settings->frame_acknowledge = 0; client->context->rdp->settings->local = client->local; client->context->rdp->state = CONNECTION_STATE_INITIAL; @@ -39,7 +39,7 @@ static boolean freerdp_peer_initialize(freerdp_peer* client) key_new(client->context->rdp->settings->rdp_key_file); } - return true; + return TRUE; } static boolean freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) @@ -47,7 +47,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) @@ -60,9 +60,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) @@ -74,23 +74,23 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) uint16 compressed_len; 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(client->context->rdp, 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_INPUT: if (!input_recv(client->context->rdp->input, s)) - return false; + return FALSE; break; case DATA_PDU_TYPE_BITMAP_CACHE_PERSISTENT_LIST: @@ -100,7 +100,7 @@ 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->connected) { @@ -112,7 +112,7 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) IFCALLRET(client->PostConnect, client->connected, client); if (!client->connected) - return false; + return FALSE; } if (!client->activated) @@ -122,14 +122,14 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) IFCALLRET(client->Activate, client->activated, client); if (!client->activated) - return false; + return FALSE; } break; case DATA_PDU_TYPE_SHUTDOWN_REQUEST: mcs_send_disconnect_provider_ultimatum(client->context->rdp->mcs); - return false; + return FALSE; case DATA_PDU_TYPE_FRAME_ACKNOWLEDGE: stream_read_uint32(s, client->ack_frame_id); @@ -137,12 +137,12 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) case DATA_PDU_TYPE_REFRESH_RECT: if (!update_read_refresh_rect(client->update, s)) - return false; + return FALSE; break; case DATA_PDU_TYPE_SUPPRESS_OUTPUT: if (!update_read_suppress_output(client->update, s)) - return false; + return FALSE; break; default: @@ -150,7 +150,7 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) break; } - return true; + return TRUE; } static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) @@ -168,7 +168,7 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) if (!rdp_read_header(rdp, s, &length, &channelId)) { printf("Incorrect RDP header.\n"); - return false; + return FALSE; } if (rdp->settings->encryption) @@ -180,7 +180,7 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) if (!rdp_decrypt(rdp, s, length - 4, securityFlags)) { printf("rdp_decrypt failed\n"); - return false; + return FALSE; } } } @@ -192,7 +192,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; @@ -200,16 +200,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) @@ -225,7 +225,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) @@ -253,46 +253,46 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr { case CONNECTION_STATE_INITIAL: if (!rdp_server_accept_nego(rdp, s)) - return false; + return FALSE; if (rdp->nego->selected_protocol & PROTOCOL_NLA) { sspi_CopyAuthIdentity(&client->identity, &(rdp->nego->transport->credssp->identity)); - IFCALLRET(client->Logon, client->authenticated, client, &client->identity, true); + IFCALLRET(client->Logon, client->authenticated, client, &client->identity, TRUE); credssp_free(rdp->nego->transport->credssp); } else { - IFCALLRET(client->Logon, client->authenticated, client, &client->identity, false); + IFCALLRET(client->Logon, client->authenticated, client, &client->identity, FALSE); } break; case CONNECTION_STATE_NEGO: if (!rdp_server_accept_mcs_connect_initial(rdp, s)) - return false; + return FALSE; break; case CONNECTION_STATE_MCS_CONNECT: if (!rdp_server_accept_mcs_erect_domain_request(rdp, s)) - return false; + return FALSE; break; case CONNECTION_STATE_MCS_ERECT_DOMAIN: if (!rdp_server_accept_mcs_attach_user_request(rdp, s)) - return false; + return FALSE; break; case CONNECTION_STATE_MCS_ATTACH_USER: if (!rdp_server_accept_mcs_channel_join_request(rdp, s)) - return false; + return FALSE; break; case CONNECTION_STATE_MCS_CHANNEL_JOIN: if (rdp->settings->encryption) { if (!rdp_server_accept_client_keys(rdp, s)) - return false; + return FALSE; break; } rdp->state = CONNECTION_STATE_ESTABLISH_KEYS; @@ -300,12 +300,12 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr case CONNECTION_STATE_ESTABLISH_KEYS: if (!rdp_server_accept_client_info(rdp, s)) - return false; + return FALSE; IFCALL(client->Capabilities, client); if (!rdp_send_demand_active(rdp)) - return false; + return FALSE; break; case CONNECTION_STATE_LICENSE: @@ -322,15 +322,15 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr case CONNECTION_STATE_ACTIVE: if (!peer_recv_pdu(client, s)) - return false; + return FALSE; break; default: printf("Invalid state %d\n", rdp->state); - return false; + return FALSE; } - return true; + return TRUE; } static boolean freerdp_peer_close(freerdp_peer* client) @@ -341,7 +341,7 @@ static boolean freerdp_peer_close(freerdp_peer* client) * optional MCS Disconnect Provider Ultimatum PDU. */ if (!rdp_send_deactivate_all(client->context->rdp)) - return false; + return FALSE; return mcs_send_disconnect_provider_ultimatum(client->context->rdp->mcs); } @@ -377,7 +377,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); } @@ -393,7 +393,7 @@ freerdp_peer* freerdp_peer_new(int sockfd) client = xnew(freerdp_peer); - freerdp_tcp_set_no_delay(sockfd, true); + freerdp_tcp_set_no_delay(sockfd, TRUE); if (client != NULL) { diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index b5aa423e5..e71c48e6e 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -102,7 +102,7 @@ boolean rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, u stream_read_uint16(s, *length); /* totalLength */ if (*length - 2 > stream_get_left(s)) - return false; + return FALSE; stream_read_uint16(s, *type); /* pduType */ *type &= 0x0F; /* type is in the 4 least significant bits */ @@ -112,7 +112,7 @@ boolean rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, u else /* Windows XP can send such short DEACTIVATE_ALL PDUs. */ *channel_id = 0; - return true; + return TRUE; } void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id) @@ -129,7 +129,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) */ @@ -139,7 +139,7 @@ boolean rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint3 stream_read_uint8(s, *type); /* pduType2, Data PDU Type (1 byte) */ stream_read_uint8(s, *compressed_type); /* compressedType (1 byte) */ stream_read_uint16(s, *compressed_len); /* compressedLength (2 bytes) */ - return true; + return TRUE; } void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id) @@ -232,11 +232,11 @@ boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_ if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, length)) { if (MCSPDU != DomainMCSPDU_DisconnectProviderUltimatum) - return false; + return FALSE; } if (*length - 8 > stream_get_left(s)) - return false; + return FALSE; if (MCSPDU == DomainMCSPDU_DisconnectProviderUltimatum) { @@ -245,9 +245,9 @@ boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_ (void) per_read_enumerated(s, &reason, 0); DEBUG_RDP("DisconnectProviderUltimatum from server, reason code 0x%02x\n", reason); - rdp->disconnect = true; + rdp->disconnect = TRUE; - return true; + return TRUE; } per_read_integer16(s, &initiator, MCS_BASE_CHANNEL_ID); /* initiator (UserId) */ @@ -256,9 +256,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; } /** @@ -341,7 +341,7 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) data = s->p + 8; length = length - (data - s->data); if (sec_flags & SEC_SECURE_CHECKSUM) - security_salted_mac_signature(rdp, data, length, true, s->p); + security_salted_mac_signature(rdp, data, length, TRUE, s->p); else security_mac_signature(rdp, data, length, s->p); stream_seek(s, 8); @@ -405,9 +405,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) @@ -432,9 +432,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) @@ -460,9 +460,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) @@ -500,7 +500,7 @@ boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) else { printf("decompress_rdp() failed\n"); - return false; + return FALSE; } stream_seek(s, compressed_len - 18); } @@ -515,7 +515,7 @@ boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) { case DATA_PDU_TYPE_UPDATE: if (!update_recv(rdp->update, comp_stream)) - return false; + return FALSE; break; case DATA_PDU_TYPE_CONTROL: @@ -604,7 +604,7 @@ boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) stream_free(comp_stream); } - return true; + return TRUE; } boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) @@ -622,11 +622,11 @@ boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) else if (type == PDU_TYPE_SERVER_REDIRECTION) { rdp_recv_enhanced_security_redirection_packet(rdp, s); - return true; + return TRUE; } else { - return false; + return FALSE; } } @@ -659,25 +659,25 @@ boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) if (!security_fips_decrypt(s->p, length, rdp)) { printf("FATAL: cannot decrypt\n"); - return false; /* TODO */ + return FALSE; /* TODO */ } if (!security_fips_check_signature(s->p, length - 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_read(s, wmac, sizeof(wmac)); length -= sizeof(wmac); security_decrypt(s->p, length, rdp); if (securityFlags & SEC_SECURE_CHECKSUM) - security_salted_mac_signature(rdp, s->p, length, false, cmac); + security_salted_mac_signature(rdp, s->p, length, FALSE, cmac); else security_mac_signature(rdp, s->p, length, cmac); if (memcmp(wmac, cmac, sizeof(wmac)) != 0) @@ -690,9 +690,9 @@ boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) * us to work with broken RDP clients and servers that * generate invalid signatures. */ - //return false; + //return FALSE; } - return true; + return TRUE; } /** @@ -714,7 +714,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) @@ -725,7 +725,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) if (!rdp_decrypt(rdp, s, length - 4, securityFlags)) { printf("rdp_decrypt failed\n"); - return false; + return FALSE; } } if (securityFlags & SEC_REDIRECTION_PKT) @@ -736,7 +736,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) */ s->p -= 2; rdp_recv_enhanced_security_redirection_packet(rdp, s); - return true; + return TRUE; } } @@ -760,13 +760,13 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) if (!rdp_recv_data_pdu(rdp, s)) { printf("rdp_recv_data_pdu failed\n"); - return false; + return FALSE; } break; case PDU_TYPE_DEACTIVATE_ALL: if (!rdp_recv_deactivate_all(rdp, s)) - return false; + return FALSE; break; case PDU_TYPE_SERVER_REDIRECTION: @@ -781,7 +781,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) @@ -795,7 +795,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) @@ -837,50 +837,50 @@ 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_FINALIZATION: if (!rdp_recv_pdu(rdp, s)) - return false; + return FALSE; if (rdp->finalize_sc_pdus == FINALIZE_SC_COMPLETE) rdp->state = CONNECTION_STATE_ACTIVE; 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) diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 6895ccd9a..b9669f155 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -159,7 +159,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); } @@ -167,7 +167,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) @@ -175,7 +175,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() diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index 319a7b1e5..c1b0f2544 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -67,7 +67,7 @@ boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, cha if (status != SEC_E_OK) { printf("QuerySecurityPackageInfo status: 0x%08X\n", status); - return false; + return FALSE; } ntlm->cbMaxToken = ntlm->pPackageInfo->cbMaxToken; @@ -78,11 +78,11 @@ boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, cha if (status != SEC_E_OK) { printf("AcquireCredentialsHandle status: 0x%08X\n", status); - return false; + return FALSE; } - ntlm->haveContext = false; - ntlm->haveInputBuffer = false; + ntlm->haveContext = FALSE; + ntlm->haveInputBuffer = FALSE; ZeroMemory(&ntlm->inputBuffer, sizeof(SecBuffer)); ZeroMemory(&ntlm->outputBuffer, sizeof(SecBuffer)); ZeroMemory(&ntlm->ContextSizes, sizeof(SecPkgContext_Sizes)); @@ -92,7 +92,7 @@ boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, cha if (ntlm->confidentiality) ntlm->fContextReq |= ISC_REQ_CONFIDENTIALITY; - return true; + return TRUE; } boolean ntlm_authenticate(rdpNtlm* ntlm) @@ -129,7 +129,7 @@ boolean ntlm_authenticate(rdpNtlm* ntlm) if (ntlm->table->QueryContextAttributes(&ntlm->context, SECPKG_ATTR_SIZES, &ntlm->ContextSizes) != SEC_E_OK) { printf("QueryContextAttributes SECPKG_ATTR_SIZES failure\n"); - return false ; + return FALSE ; } if (status == SEC_I_COMPLETE_NEEDED) @@ -138,10 +138,10 @@ boolean ntlm_authenticate(rdpNtlm* ntlm) status = SEC_I_CONTINUE_NEEDED; } - ntlm->haveInputBuffer = true; - ntlm->haveContext = true; + ntlm->haveInputBuffer = TRUE; + ntlm->haveContext = TRUE; - return true; + return TRUE; } void ntlm_client_uninit(rdpNtlm* ntlm) @@ -217,7 +217,7 @@ boolean rpc_ntlm_http_out_connect(rdpRpc* rpc) HttpResponse* http_response; rdpNtlm* ntlm = rpc->ntlm_http_out->ntlm; - ntlm_client_init(ntlm, true, rpc->settings->username, + ntlm_client_init(ntlm, TRUE, rpc->settings->username, rpc->settings->domain, rpc->settings->password); ntlm_authenticate(ntlm); @@ -256,7 +256,7 @@ boolean rpc_ntlm_http_out_connect(rdpRpc* rpc) ntlm_client_uninit(ntlm); ntlm_free(ntlm); - return true; + return TRUE; } boolean rpc_ntlm_http_in_connect(rdpRpc* rpc) @@ -267,7 +267,7 @@ boolean rpc_ntlm_http_in_connect(rdpRpc* rpc) HttpResponse* http_response; rdpNtlm* ntlm = rpc->ntlm_http_in->ntlm; - ntlm_client_init(ntlm, true, rpc->settings->username, + ntlm_client_init(ntlm, TRUE, rpc->settings->username, rpc->settings->domain, rpc->settings->password); ntlm_authenticate(ntlm); @@ -306,7 +306,7 @@ boolean rpc_ntlm_http_in_connect(rdpRpc* rpc) ntlm_client_uninit(ntlm); ntlm_free(ntlm); - return true; + return TRUE; } void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header) @@ -368,7 +368,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) DEBUG_RPC("Sending bind PDU"); - ntlm_client_init(rpc->ntlm, false, settings->username, settings->domain, settings->password); + ntlm_client_init(rpc->ntlm, FALSE, settings->username, settings->domain, settings->password); ntlm_authenticate(rpc->ntlm); ntlm_stream->size = rpc->ntlm->outputBuffer.cbBuffer; @@ -481,7 +481,7 @@ boolean rpc_send_bind_pdu(rdpRpc* rpc) stream_free(pdu) ; free(bind_pdu); - return true; + return TRUE; } int rpc_recv_bind_ack_pdu(rdpRpc* rpc) @@ -582,7 +582,7 @@ boolean rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) stream_free(pdu) ; free(rpc_auth_3_pdu); - return true; + return TRUE; } int rpc_out_read(rdpRpc* rpc, uint8* data, int length) @@ -806,7 +806,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) rpc->read_buffer_len = 0; } - while (true) + while (TRUE) { status = rpc_out_read(rpc, rpc_data, rpc_length); @@ -869,28 +869,28 @@ boolean rpc_connect(rdpRpc* rpc) if (!rts_connect(rpc)) { printf("rts_connect error!\n"); - return false; + return FALSE; } if (!rpc_send_bind_pdu(rpc)) { printf("rpc_send_bind_pdu error!\n"); - return false; + return FALSE; } if (rpc_recv_bind_ack_pdu(rpc) <= 0) { printf("rpc_recv_bind_ack_pdu error!\n"); - return false; + return FALSE; } if (!rpc_send_rpc_auth_3_pdu(rpc)) { printf("rpc_send_rpc_auth_3 error!\n"); - return false; + return FALSE; } - return true; + return TRUE; } void rpc_client_virtual_connection_init(rdpRpc* rpc, RpcVirtualConnection* virtual_connection) diff --git a/libfreerdp/core/rts.c b/libfreerdp/core/rts.c index 687ca5bf1..2f2fe40dc 100644 --- a/libfreerdp/core/rts.c +++ b/libfreerdp/core/rts.c @@ -54,25 +54,25 @@ boolean rts_connect(rdpRpc* rpc) if (!rpc_ntlm_http_out_connect(rpc)) { printf("rpc_out_connect_http error!\n"); - return false; + return FALSE; } if (!rts_send_CONN_A1_pdu(rpc)) { printf("rpc_send_CONN_A1_pdu error!\n"); - return false; + return FALSE; } if (!rpc_ntlm_http_in_connect(rpc)) { printf("rpc_in_connect_http error!\n"); - return false; + return FALSE; } if (!rts_send_CONN_B1_pdu(rpc)) { printf("rpc_send_CONN_B1_pdu error!\n"); - return false; + return FALSE; } /* Receive OUT Channel Response */ @@ -83,7 +83,7 @@ boolean rts_connect(rdpRpc* rpc) printf("rts_connect error!\n"); http_response_print(http_response); http_response_free(http_response) ; - return false; + return FALSE; } http_response_print(http_response); @@ -96,7 +96,7 @@ boolean rts_connect(rdpRpc* rpc) /* Receive CONN_C2 RTS PDU */ status = rts_recv_pdu(rpc, &rts_pdu); - return true; + return TRUE; } #ifdef WITH_DEBUG_RTS @@ -401,7 +401,7 @@ boolean rts_send_CONN_A1_pdu(rdpRpc* rpc) stream_free(s); - return true; + return TRUE; } boolean rts_send_CONN_B1_pdu(rdpRpc* rpc) @@ -450,7 +450,7 @@ boolean rts_send_CONN_B1_pdu(rdpRpc* rpc) stream_free(s); - return true; + return TRUE; } boolean rts_send_keep_alive_pdu(rdpRpc* rpc) @@ -483,7 +483,7 @@ boolean rts_send_keep_alive_pdu(rdpRpc* rpc) stream_free(s); - return true; + return TRUE; } boolean rts_send_flow_control_ack_pdu(rdpRpc* rpc) @@ -527,7 +527,7 @@ boolean rts_send_flow_control_ack_pdu(rdpRpc* rpc) stream_free(s); - return true; + return TRUE; } boolean rts_send_ping_pdu(rdpRpc* rpc) @@ -559,7 +559,7 @@ boolean rts_send_ping_pdu(rdpRpc* rpc) stream_free(s); - return true; + return TRUE; } int rts_recv_pdu_commands(rdpRpc* rpc, RTS_PDU* rts_pdu) diff --git a/libfreerdp/core/security.c b/libfreerdp/core/security.c index 285bc2695..cfa7c0042 100644 --- a/libfreerdp/core/security.c +++ b/libfreerdp/core/security.c @@ -366,7 +366,7 @@ boolean security_establish_keys(uint8* client_random, rdpRdp* rdp) printf("FIPS Compliant encryption level.\n"); /* disable fastpath input; it doesnt handle FIPS encryption yet */ - rdp->settings->fastpath_input = false; + rdp->settings->fastpath_input = FALSE; sha1 = crypto_sha1_init(); crypto_sha1_update(sha1, client_random + 16, 16); @@ -432,7 +432,7 @@ boolean security_establish_keys(uint8* client_random, rdpRdp* rdp) rdp->encrypt_use_count =0; rdp->encrypt_checksum_use_count =0; - return true; + return TRUE; } boolean security_key_update(uint8* key, uint8* update_key, int key_len) @@ -462,7 +462,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) @@ -477,7 +477,7 @@ boolean security_encrypt(uint8* data, int length, rdpRdp* rdp) crypto_rc4(rdp->rc4_encrypt_key, length, data, data); rdp->encrypt_use_count++; rdp->encrypt_checksum_use_count++; - return true; + return TRUE; } boolean security_decrypt(uint8* data, int length, rdpRdp* rdp) @@ -492,7 +492,7 @@ boolean security_decrypt(uint8* data, int length, rdpRdp* rdp) crypto_rc4(rdp->rc4_decrypt_key, length, data, data); rdp->decrypt_use_count += 1; rdp->decrypt_checksum_use_count++; - return true; + return TRUE; } void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp) @@ -514,13 +514,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) @@ -538,7 +538,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; } diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 11ef5d3e4..aa5b42471 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -136,96 +136,96 @@ rdpSettings* settings_new(void* instance) /* Server instances are NULL */ if (!settings->instance) - settings->server_mode = true; + settings->server_mode = TRUE; 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->security_layer_negotiation = true; + settings->nla_security = TRUE; + settings->tls_security = TRUE; + settings->rdp_security = TRUE; + settings->security_layer_negotiation = TRUE; settings->client_build = 2600; settings->kbd_type = 4; /* @msdn{cc240510} 'IBM enhanced (101- or 102-key) keyboard' */ settings->kbd_subtype = 0; settings->kbd_fn_keys = 12; settings->kbd_layout = 0; - settings->encryption = false; - settings->salted_checksum = true; + settings->encryption = FALSE; + settings->salted_checksum = TRUE; 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_only = false; - settings->from_stdin = false; + settings->authentication = TRUE; + settings->authentication_only = FALSE; + settings->from_stdin = FALSE; settings->received_caps = xzalloc(32); settings->order_support = xzalloc(32); - 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->client_hostname = xzalloc(32); settings->client_product_id = xzalloc(32); - settings->color_pointer = true; - settings->large_pointer = true; + settings->color_pointer = TRUE; + settings->large_pointer = TRUE; settings->pointer_cache_size = 20; - settings->sound_beeps = true; - settings->disable_wallpaper = false; - settings->disable_full_window_drag = false; - settings->disable_menu_animations = false; - settings->disable_theming = false; + settings->sound_beeps = TRUE; + settings->disable_wallpaper = FALSE; + settings->disable_full_window_drag = FALSE; + settings->disable_menu_animations = FALSE; + settings->disable_theming = FALSE; settings->connection_type = 0; - 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->bitmapCacheV2CellInfo = xzalloc(sizeof(BITMAP_CACHE_V2_CELL_INFO) * 6); - settings->refresh_rect = true; - settings->suppress_output = true; + settings->refresh_rect = TRUE; + settings->suppress_output = TRUE; - settings->glyph_cache = true; + settings->glyph_cache = TRUE; settings->glyphSupportLevel = GLYPH_SUPPORT_NONE; settings->glyphCache = xzalloc(sizeof(GLYPH_CACHE_DEFINITION) * 10); settings->fragCache = xnew(GLYPH_CACHE_DEFINITION); @@ -252,7 +252,7 @@ rdpSettings* settings_new(void* instance) settings->fragCache->cacheEntries = 256; settings->fragCache->cacheMaximumCellSize = 256; - settings->offscreen_bitmap_cache = true; + settings->offscreen_bitmap_cache = TRUE; settings->offscreen_bitmap_cache_size = 7680; settings->offscreen_bitmap_cache_entries = 2000; @@ -268,14 +268,14 @@ 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->frame_acknowledge = 2; gethostname(settings->client_hostname, 31); settings->client_hostname[31] = 0; - settings->mouse_motion = true; + settings->mouse_motion = TRUE; settings->client_auto_reconnect_cookie = xnew(ARC_CS_PRIVATE_PACKET); settings->server_auto_reconnect_cookie = xnew(ARC_SC_PRIVATE_PACKET); diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c index 878e79989..e0509711f 100644 --- a/libfreerdp/core/surface.c +++ b/libfreerdp/core/surface.c @@ -102,7 +102,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; @@ -113,7 +113,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) diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 8c8d8a1db..b8ee68751 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -127,14 +127,14 @@ boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) tcp->sockfd = freerdp_uds_connect(hostname); if (tcp->sockfd < 0) - return false; + return FALSE; } else { tcp->sockfd = freerdp_tcp_connect(hostname, port); if (tcp->sockfd < 0) - return false; + return FALSE; tcp_get_ip_address(tcp); tcp_get_mac_address(tcp); @@ -157,7 +157,7 @@ boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) tcp_set_keep_alive_mode(tcp); } - return true; + return TRUE; } int tcp_read(rdpTcp* tcp, uint8* data, int length) @@ -175,7 +175,7 @@ boolean tcp_disconnect(rdpTcp* tcp) freerdp_tcp_disconnect(tcp->sockfd); tcp->sockfd = -1; - return true; + return TRUE; } boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking) @@ -187,10 +187,10 @@ boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking) if (flags == -1) { printf("tcp_set_blocking_mode: 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); @@ -207,7 +207,7 @@ boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking) WSAEventSelect(tcp->sockfd, tcp->wsa_event, FD_READ); #endif - return true; + return TRUE; } boolean tcp_set_keep_alive_mode(rdpTcp* tcp) @@ -222,7 +222,7 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp) if (setsockopt(tcp->sockfd, SOL_SOCKET, SO_KEEPALIVE, (void*) &option_value, option_len) < 0) { perror("setsockopt() SOL_SOCKET, SO_KEEPALIVE:"); - return false; + return FALSE; } #ifdef TCP_KEEPIDLE @@ -232,12 +232,12 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp) if (setsockopt(tcp->sockfd, IPPROTO_TCP, TCP_KEEPIDLE, (void*) &option_value, option_len) < 0) { perror("setsockopt() IPPROTO_TCP, SO_KEEPIDLE:"); - return false; + return FALSE; } #endif #endif - return true; + return TRUE; } rdpTcp* tcp_new(rdpSettings* settings) diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index 135c095b5..f6675106e 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -80,7 +80,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; @@ -104,7 +104,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; } /** diff --git a/libfreerdp/core/tpkt.c b/libfreerdp/core/tpkt.c index 5e84733ef..24d5dee81 100644 --- a/libfreerdp/core/tpkt.c +++ b/libfreerdp/core/tpkt.c @@ -69,9 +69,9 @@ boolean tpkt_verify_header(STREAM* s) stream_peek_uint8(s, version); if (version == 3) - return true; + return TRUE; else - return false; + return FALSE; } /** diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 02d5ff4e1..9627dc34c 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -82,7 +82,7 @@ boolean transport_connect_rdp(rdpTransport* transport) { /* RDP encryption */ - return true; + return TRUE; } boolean transport_connect_tls(rdpTransport* transport) @@ -93,17 +93,17 @@ boolean transport_connect_tls(rdpTransport* transport) transport->layer = TRANSPORT_LAYER_TLS; transport->tls->sockfd = transport->tcp->sockfd; - if (tls_connect(transport->tls) != true) + if (tls_connect(transport->tls) != TRUE) { if (!connectErrorCode) connectErrorCode = TLSCONNECTERROR; tls_free(transport->tls); transport->tls = NULL; - return false; + return FALSE; } - return true; + return TRUE; } boolean transport_connect_nla(rdpTransport* transport) @@ -117,20 +117,20 @@ boolean transport_connect_nla(rdpTransport* transport) transport->layer = TRANSPORT_LAYER_TLS; transport->tls->sockfd = transport->tcp->sockfd; - if (tls_connect(transport->tls) != true) + if (tls_connect(transport->tls) != TRUE) { if (!connectErrorCode) connectErrorCode = TLSCONNECTERROR; tls_free(transport->tls); transport->tls = NULL; - return false; + return FALSE; } /* Network Level Authentication */ - if (transport->settings->authentication != true) - return true; + if (transport->settings->authentication != TRUE) + return TRUE; settings = transport->settings; instance = (freerdp*) settings->instance; @@ -147,12 +147,12 @@ 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_tsg_connect(rdpTransport* transport, const char* hostname, uint16 port) @@ -172,21 +172,21 @@ boolean transport_tsg_connect(rdpTransport* transport, const char* hostname, uin transport->tls_out->sockfd = transport->tcp_out->sockfd; - if (tls_connect(transport->tls_in) != true) - return false; + if (tls_connect(transport->tls_in) != TRUE) + return FALSE; - if (tls_connect(transport->tls_out) != true) - return false; + if (tls_connect(transport->tls_out) != TRUE) + return FALSE; if (!tsg_connect(tsg, hostname, port)) - return false; + return FALSE; - return true; + return TRUE; } boolean transport_connect(rdpTransport* transport, const char* hostname, uint16 port) { - boolean status = false; + boolean status = FALSE; rdpSettings* settings = transport->settings; if (transport->settings->ts_gateway) @@ -214,7 +214,7 @@ boolean transport_accept_rdp(rdpTransport* transport) { /* RDP encryption */ - return true; + return TRUE; } boolean transport_accept_tls(rdpTransport* transport) @@ -225,10 +225,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) @@ -242,13 +242,13 @@ 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; settings = transport->settings; instance = (freerdp*) settings->instance; @@ -260,19 +260,19 @@ boolean transport_accept_nla(rdpTransport* transport) { printf("client authentication failure\n"); credssp_free(transport->credssp); - return false; + return FALSE; } /* don't free credssp module yet, we need to copy the credentials from it first */ - 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)); @@ -462,7 +462,7 @@ int transport_check_fds(rdpTransport** ptransport) 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); @@ -517,7 +517,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; } diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index c19acde87..e901b7fb9 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -466,7 +466,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (!rpc_connect(rpc)) { printf("rpc_connect failed!\n"); - return false; + return FALSE; } DEBUG_TSG("rpc_connect success"); @@ -488,7 +488,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (status <= 0) { printf("rpc_write opnum=1 failed!\n"); - return false; + return FALSE; } length = 0x8FFF; @@ -496,7 +496,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) if (data == NULL) { printf("rpc_recv - memory allocation error\n") ; - return false ; + return FALSE ; } status = rpc_read(rpc, data, length); @@ -504,7 +504,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_recv failed!\n"); free(data) ; - return false; + return FALSE; } memcpy(tsg->TunnelContext, data + (status - 24), 16); @@ -535,7 +535,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_write opnum=2 failed!\n"); free(data) ; - return false; + return FALSE; } status = rpc_read(rpc, data, length); @@ -544,7 +544,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_recv failed!\n"); free(data) ; - return false; + return FALSE; } memcpy(tsg_packet3 + 4, tsg->TunnelContext, 16); @@ -567,7 +567,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { printf("rpc_write opnum=3 failed!\n"); free(data) ; - return false; + return FALSE; } status = -1; @@ -605,7 +605,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) printf("rpc_write opnum=4 failed!\n"); stream_free(s_p4); free(data); - return false; + return FALSE; } status = rpc_read(rpc, data, length); @@ -615,7 +615,7 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) printf("rpc_recv failed!\n"); stream_free(s_p4); free(data); - return false; + return FALSE; } memcpy(tsg->ChannelContext, data + 4, 16); @@ -644,13 +644,13 @@ boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) printf("rpc_write opnum=8 failed!\n"); stream_free(s_p4); free(data); - return false; + return FALSE; } stream_free(s_p4); free(data); - return true; + return TRUE; } int tsg_read(rdpTsg* tsg, uint8* data, uint32 length) diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index c8af9e302..e98bc9348 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -47,11 +47,11 @@ boolean update_recv_orders(rdpUpdate* update, STREAM* s) while (numberOrders > 0) { if (!update_recv_order(update, s)) - return false; + return FALSE; numberOrders--; } - return true; + return TRUE; } void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data) @@ -77,13 +77,13 @@ void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data) bitmap_data->bitmapLength = bitmap_data->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); } @@ -278,7 +278,7 @@ boolean update_recv(rdpUpdate* update, STREAM* s) if (!update_recv_orders(update, s)) { /* XXX: Do we have to call EndPaint? */ - return false; + return FALSE; } break; @@ -300,7 +300,7 @@ boolean update_recv(rdpUpdate* update, STREAM* s) IFCALL(update->EndPaint, context); - return true; + return TRUE; } void update_reset_state(rdpUpdate* update) @@ -551,7 +551,7 @@ boolean update_read_refresh_rect(rdpUpdate* update, STREAM* s) RECTANGLE_16* areas; if (stream_get_left(s) < 4) - return false; + return FALSE; stream_read_uint8(s, numberOfAreas); stream_seek(s, 3); /* pad3Octects */ @@ -570,7 +570,7 @@ boolean update_read_refresh_rect(rdpUpdate* update, STREAM* s) free(areas); - return true; + return TRUE; } boolean update_read_suppress_output(rdpUpdate* update, STREAM* s) @@ -578,18 +578,18 @@ boolean update_read_suppress_output(rdpUpdate* update, STREAM* s) uint8 allowDisplayUpdates; if (stream_get_left(s) < 4) - return false; + return FALSE; stream_read_uint8(s, allowDisplayUpdates); stream_seek(s, 3); /* pad3Octects */ if (allowDisplayUpdates > 0 && stream_get_left(s) < 8) - return false; + return FALSE; IFCALL(update->SuppressOutput, update->context, allowDisplayUpdates, allowDisplayUpdates > 0 ? (RECTANGLE_16*) stream_get_tail(s) : NULL); - return true; + return TRUE; } void update_register_server_callbacks(rdpUpdate* update) diff --git a/libfreerdp/crypto/ber.c b/libfreerdp/crypto/ber.c index 3fe817a40..14dc2e3f8 100644 --- a/libfreerdp/crypto/ber.c +++ b/libfreerdp/crypto/ber.c @@ -95,16 +95,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) @@ -128,12 +128,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); } @@ -142,12 +142,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; } /** @@ -181,12 +181,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) @@ -207,11 +207,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; } /** @@ -240,35 +240,35 @@ 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; } /** @@ -280,21 +280,21 @@ boolean ber_read_bit_string(STREAM* s, int* length, uint8* padding) void ber_write_octet_string(STREAM* s, const 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); } boolean ber_read_octet_string_tag(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; } 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); } @@ -315,14 +315,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; } /** @@ -333,22 +333,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) @@ -365,9 +365,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; } /** @@ -378,7 +378,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) { @@ -429,7 +429,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; } diff --git a/libfreerdp/crypto/certificate.c b/libfreerdp/crypto/certificate.c index ecb47e696..5e3d56923 100644 --- a/libfreerdp/crypto/certificate.c +++ b/libfreerdp/crypto/certificate.c @@ -48,7 +48,7 @@ void certificate_store_init(rdpCertificateStore* certificate_store) config_path = freerdp_get_config_path(settings); certificate_store->path = freerdp_construct_path(config_path, (char*) certificate_store_dir); - if (freerdp_check_file_exists(certificate_store->path) == false) + if (freerdp_check_file_exists(certificate_store->path) == FALSE) { freerdp_mkdir(certificate_store->path); printf("creating directory %s\n", certificate_store->path); @@ -56,7 +56,7 @@ void certificate_store_init(rdpCertificateStore* certificate_store) certificate_store->file = freerdp_construct_path(config_path, (char*) certificate_known_hosts_file); - if (freerdp_check_file_exists(certificate_store->file) == false) + if (freerdp_check_file_exists(certificate_store->file) == FALSE) { certificate_store->fp = fopen((char*) certificate_store->file, "w+"); diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index 6caf93aa0..1907c4cc7 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -170,7 +170,7 @@ boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* Pub { BYTE* ptr; int length; - boolean status = true; + boolean status = TRUE; EVP_PKEY* pkey = NULL; pkey = X509_get_pubkey(cert->px509); @@ -178,7 +178,7 @@ boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* Pub if (!pkey) { printf("crypto_cert_get_public_key: X509_get_pubkey() failed\n"); - status = false; + status = FALSE; goto exit; } @@ -187,7 +187,7 @@ boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* Pub if (length < 1) { printf("crypto_cert_get_public_key: i2d_PublicKey() failed\n"); - status = false; + status = FALSE; goto exit; } @@ -442,7 +442,7 @@ char* crypto_cert_issuer(X509* xcert) boolean x509_verify_certificate(CryptoCert cert, char* certificate_store_path) { X509_STORE_CTX* csc; - boolean status = false; + boolean status = FALSE; X509_STORE* cert_ctx = NULL; X509_LOOKUP* lookup = NULL; X509* xcert = cert->px509; @@ -481,7 +481,7 @@ boolean x509_verify_certificate(CryptoCert cert, char* certificate_store_path) goto end; if (X509_verify_cert(csc) == 1) - status = true; + status = TRUE; X509_STORE_CTX_free(csc); X509_STORE_free(cert_ctx); diff --git a/libfreerdp/crypto/der.c b/libfreerdp/crypto/der.c index f76508d92..59c2a7ff9 100644 --- a/libfreerdp/crypto/der.c +++ b/libfreerdp/crypto/der.c @@ -87,7 +87,7 @@ int der_skip_octet_string(int length) void der_write_octet_string(STREAM* s, uint8* oct_str, int length) { - der_write_universal_tag(s, ER_TAG_OCTET_STRING, false); + der_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); der_write_length(s, length); stream_write(s, oct_str, length); } diff --git a/libfreerdp/crypto/er.c b/libfreerdp/crypto/er.c index 26503dba6..18f11c8d7 100644 --- a/libfreerdp/crypto/er.c +++ b/libfreerdp/crypto/er.c @@ -91,16 +91,16 @@ boolean er_read_universal_tag(STREAM* s, uint8 tag, boolean pc) stream_read_uint8(s, byte); if (byte != (ER_CLASS_UNIV | ER_PC(pc) | (ER_TAG_MASK & tag))) - return false; + return FALSE; - return true; + return TRUE; } /** * Write er Universal tag. * @param s stream * @param tag er universally-defined tag - * @param pc primitive (false) or constructed (true) + * @param pc primitive (FALSE) or constructed (TRUE) */ void er_write_universal_tag(STREAM* s, uint8 tag, boolean pc) @@ -124,12 +124,12 @@ boolean er_read_application_tag(STREAM* s, uint8 tag, int* length) stream_read_uint8(s, byte); if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK)) - return false; + return FALSE; stream_read_uint8(s, byte); if (byte != tag) - return false; + return FALSE; er_read_length(s, length); } @@ -138,12 +138,12 @@ boolean er_read_application_tag(STREAM* s, uint8 tag, int* length) stream_read_uint8(s, byte); if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag))) - return false; + return FALSE; er_read_length(s, length); } - return true; + return TRUE; } /** @@ -177,12 +177,12 @@ boolean er_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc) if (byte != ((ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag))) { stream_rewind(s, 1); - return false; + return FALSE; } er_read_length(s, length); - return true; + return TRUE; } int er_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc, boolean flag) @@ -203,11 +203,11 @@ boolean er_read_sequence_tag(STREAM* s, int* length) stream_read_uint8(s, byte); if (byte != ((ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_SEQUENCE_OF))) - return false; + return FALSE; er_read_length(s, length); - return true; + return TRUE; } /** @@ -236,52 +236,52 @@ boolean er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) { int length; - er_read_universal_tag(s, ER_TAG_ENUMERATED, false); + er_read_universal_tag(s, ER_TAG_ENUMERATED, FALSE); er_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 er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, boolean flag) { - er_write_universal_tag(s, ER_TAG_ENUMERATED, false); + er_write_universal_tag(s, ER_TAG_ENUMERATED, FALSE); er_write_length(s, 1, flag); stream_write_uint8(s, enumerated); } boolean er_read_bit_string(STREAM* s, int* length, uint8* padding) { - er_read_universal_tag(s, ER_TAG_BIT_STRING, false); + er_read_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_read_length(s, length); stream_read_uint8(s, *padding); - return true; + return TRUE; } boolean er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, boolean flag) { - er_write_universal_tag(s, ER_TAG_BIT_STRING, false); + er_write_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_write_length(s, length, flag); stream_write_uint8(s, padding); - return true; + return TRUE; } boolean er_read_octet_string(STREAM* s, int* length) { - if(!er_read_universal_tag(s, ER_TAG_OCTET_STRING, false)) - return false; + if(!er_read_universal_tag(s, ER_TAG_OCTET_STRING, FALSE)) + return FALSE; er_read_length(s, length); - return true; + return TRUE; } /** @@ -293,14 +293,14 @@ boolean er_read_octet_string(STREAM* s, int* length) void er_write_octet_string(STREAM* s, uint8* oct_str, int length, boolean flag) { - er_write_universal_tag(s, ER_TAG_OCTET_STRING, false); + er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); er_write_length(s, length, flag); stream_write(s, oct_str, length); } int er_write_octet_string_tag(STREAM* s, int length, boolean flag) { - er_write_universal_tag(s, ER_TAG_OCTET_STRING, false); + er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); er_write_length(s, length, flag); return 1 + _er_skip_length(length); } @@ -321,14 +321,14 @@ boolean er_read_boolean(STREAM* s, boolean* value) int length; uint8 v; - if (!er_read_universal_tag(s, ER_TAG_BOOLEAN, false)) - return false; + if (!er_read_universal_tag(s, ER_TAG_BOOLEAN, FALSE)) + return FALSE; er_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; } /** @@ -339,22 +339,22 @@ boolean er_read_boolean(STREAM* s, boolean* value) void er_write_boolean(STREAM* s, boolean value) { - er_write_universal_tag(s, ER_TAG_BOOLEAN, false); - er_write_length(s, 1, false); - stream_write_uint8(s, (value == true) ? 0xFF : 0); + er_write_universal_tag(s, ER_TAG_BOOLEAN, FALSE); + er_write_length(s, 1, FALSE); + stream_write_uint8(s, (value == TRUE) ? 0xFF : 0); } boolean er_read_integer(STREAM* s, uint32* value) { int length; - er_read_universal_tag(s, ER_TAG_INTEGER, false); + er_read_universal_tag(s, ER_TAG_INTEGER, FALSE); er_read_length(s, &length); if (value == NULL) { stream_seek(s, length); - return true; + return TRUE; } if (length == 1) @@ -371,9 +371,9 @@ boolean er_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; } /** @@ -384,23 +384,23 @@ boolean er_read_integer(STREAM* s, uint32* value) int er_write_integer(STREAM* s, sint32 value) { - er_write_universal_tag(s, ER_TAG_INTEGER, false); + er_write_universal_tag(s, ER_TAG_INTEGER, FALSE); if (value <= 127 && value >= -128) { - er_write_length(s, 1, false); + er_write_length(s, 1, FALSE); stream_write_uint8(s, value); return 2; } else if (value <= 32767 && value >= -32768) { - er_write_length(s, 2, false); + er_write_length(s, 2, FALSE); stream_write_uint16_be(s, value); return 3; } else { - er_write_length(s, 4, false); + er_write_length(s, 4, FALSE); stream_write_uint32_be(s, value); return 5; } @@ -428,7 +428,7 @@ int er_skip_integer(sint32 value) boolean er_read_integer_length(STREAM* s, int* length) { - er_read_universal_tag(s, ER_TAG_INTEGER, false); + er_read_universal_tag(s, ER_TAG_INTEGER, FALSE); er_read_length(s, length); - return true; + return TRUE; } diff --git a/libfreerdp/crypto/nla.c b/libfreerdp/crypto/nla.c index dc20954fa..111ed9040 100644 --- a/libfreerdp/crypto/nla.c +++ b/libfreerdp/crypto/nla.c @@ -230,9 +230,9 @@ int credssp_client_authenticate(rdpCredssp* credssp) return 0; } - have_context = false; - have_input_buffer = false; - have_pub_key_auth = false; + have_context = FALSE; + have_input_buffer = FALSE; + have_pub_key_auth = FALSE; ZeroMemory(&input_buffer, sizeof(SecBuffer)); ZeroMemory(&output_buffer, sizeof(SecBuffer)); ZeroMemory(&credssp->ContextSizes, sizeof(SecPkgContext_Sizes)); @@ -247,7 +247,7 @@ int credssp_client_authenticate(rdpCredssp* credssp) fContextReq = ISC_REQ_MUTUAL_AUTH | ISC_REQ_CONFIDENTIALITY | ISC_REQ_USE_SESSION_KEY; - while (true) + while (TRUE) { output_buffer_desc.ulVersion = SECBUFFER_VERSION; output_buffer_desc.cBuffers = 1; @@ -273,7 +273,7 @@ int credssp_client_authenticate(rdpCredssp* credssp) if (credssp->table->CompleteAuthToken != NULL) credssp->table->CompleteAuthToken(&credssp->context, &output_buffer_desc); - have_pub_key_auth = true; + have_pub_key_auth = TRUE; if (credssp->table->QueryContextAttributes(&credssp->context, SECPKG_ATTR_SIZES, &credssp->ContextSizes) != SEC_E_OK) { @@ -326,8 +326,8 @@ int credssp_client_authenticate(rdpCredssp* credssp) input_buffer.pvBuffer = credssp->negoToken.pvBuffer; input_buffer.cbBuffer = credssp->negoToken.cbBuffer; - have_input_buffer = true; - have_context = true; + have_input_buffer = TRUE; + have_context = TRUE; } /* Encrypted Public Key +1 */ @@ -446,9 +446,9 @@ int credssp_server_authenticate(rdpCredssp* credssp) return 0; } - have_context = false; - have_input_buffer = false; - have_pub_key_auth = false; + have_context = FALSE; + have_input_buffer = FALSE; + have_pub_key_auth = FALSE; ZeroMemory(&input_buffer, sizeof(SecBuffer)); ZeroMemory(&output_buffer, sizeof(SecBuffer)); ZeroMemory(&input_buffer_desc, sizeof(SecBufferDesc)); @@ -474,7 +474,7 @@ int credssp_server_authenticate(rdpCredssp* credssp) fContextReq |= ASC_REQ_EXTENDED_ERROR; - while (true) + while (TRUE) { input_buffer_desc.ulVersion = SECBUFFER_VERSION; input_buffer_desc.cBuffers = 1; @@ -533,7 +533,7 @@ int credssp_server_authenticate(rdpCredssp* credssp) if (status == SEC_E_OK) { - have_pub_key_auth = true; + have_pub_key_auth = TRUE; if (credssp->table->QueryContextAttributes(&credssp->context, SECPKG_ATTR_SIZES, &credssp->ContextSizes) != SEC_E_OK) { @@ -573,7 +573,7 @@ int credssp_server_authenticate(rdpCredssp* credssp) if (status != SEC_I_CONTINUE_NEEDED) break; - have_context = true; + have_context = TRUE; } /* Receive encrypted credentials */ @@ -812,7 +812,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s) ber_read_sequence_tag(s, &length); /* [0] domainName (OCTET STRING) */ - ber_read_contextual_tag(s, 0, &length, true); + ber_read_contextual_tag(s, 0, &length, TRUE); ber_read_octet_string_tag(s, &length); credssp->identity.DomainLength = (UINT32) length; credssp->identity.Domain = (UINT16*) malloc(length); @@ -821,7 +821,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s) credssp->identity.DomainLength /= 2; /* [1] userName (OCTET STRING) */ - ber_read_contextual_tag(s, 1, &length, true); + ber_read_contextual_tag(s, 1, &length, TRUE); ber_read_octet_string_tag(s, &length); credssp->identity.UserLength = (UINT32) length; credssp->identity.User = (UINT16*) malloc(length); @@ -830,7 +830,7 @@ void credssp_read_ts_password_creds(rdpCredssp* credssp, STREAM* s) credssp->identity.UserLength /= 2; /* [2] password (OCTET STRING) */ - ber_read_contextual_tag(s, 2, &length, true); + ber_read_contextual_tag(s, 2, &length, TRUE); ber_read_octet_string_tag(s, &length); credssp->identity.PasswordLength = (UINT32) length; credssp->identity.Password = (UINT16*) malloc(length); @@ -852,15 +852,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->identity.DomainLength * 2 + 2, true); + ber_write_contextual_tag(s, 0, credssp->identity.DomainLength * 2 + 2, TRUE); ber_write_octet_string(s, (BYTE*) credssp->identity.Domain, credssp->identity.DomainLength * 2); /* [1] userName (OCTET STRING) */ - ber_write_contextual_tag(s, 1, credssp->identity.UserLength * 2 + 2, true); + ber_write_contextual_tag(s, 1, credssp->identity.UserLength * 2 + 2, TRUE); ber_write_octet_string(s, (BYTE*) credssp->identity.User, credssp->identity.UserLength * 2); /* [2] password (OCTET STRING) */ - ber_write_contextual_tag(s, 2, credssp->identity.PasswordLength * 2 + 2, true); + ber_write_contextual_tag(s, 2, credssp->identity.PasswordLength * 2 + 2, TRUE); ber_write_octet_string(s, (BYTE*) credssp->identity.Password, credssp->identity.PasswordLength * 2); } @@ -897,11 +897,11 @@ void credssp_read_ts_credentials(rdpCredssp* credssp, PSecBuffer ts_credentials) ber_read_sequence_tag(s, &length); /* [0] credType (INTEGER) */ - ber_read_contextual_tag(s, 0, &length, true); + ber_read_contextual_tag(s, 0, &length, TRUE); ber_read_integer(s, NULL); /* [1] credentials (OCTET STRING) */ - ber_read_contextual_tag(s, 1, &length, true); + ber_read_contextual_tag(s, 1, &length, TRUE); ber_read_octet_string_tag(s, &ts_password_creds_length); credssp_read_ts_password_creds(credssp, s); @@ -923,12 +923,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); @@ -1097,17 +1097,17 @@ void credssp_send(rdpCredssp* credssp) der_write_sequence_tag(s, length); /* SEQUENCE */ /* [0] version */ - ber_write_contextual_tag(s, 0, 3, true); + ber_write_contextual_tag(s, 0, 3, TRUE); ber_write_integer(s, 2); /* INTEGER */ /* [1] negoTokens (NegoData) */ if (nego_tokens_length > 0) { length = der_get_content_length(nego_tokens_length); - length -= der_write_contextual_tag(s, 1, length, true); /* NegoData */ + length -= der_write_contextual_tag(s, 1, length, TRUE); /* NegoData */ length -= der_write_sequence_tag(s, length); /* SEQUENCE OF NegoDataItem */ length -= der_write_sequence_tag(s, length); /* NegoDataItem */ - length -= der_write_contextual_tag(s, 0, length, true); /* [0] negoToken */ + length -= der_write_contextual_tag(s, 0, length, TRUE); /* [0] negoToken */ der_write_octet_string(s, (uint8*) credssp->negoToken.pvBuffer, length); /* OCTET STRING */ } @@ -1115,7 +1115,7 @@ void credssp_send(rdpCredssp* credssp) 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, credssp->authInfo.pvBuffer, credssp->authInfo.cbBuffer); } @@ -1123,7 +1123,7 @@ void credssp_send(rdpCredssp* credssp) 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, credssp->pubKeyAuth.pvBuffer, length); } @@ -1164,15 +1164,15 @@ int credssp_recv(rdpCredssp* credssp) /* 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_tag(s, &length); /* OCTET STRING */ sspi_SecBufferAlloc(&credssp->negoToken, length); stream_read(s, credssp->negoToken.pvBuffer, length); @@ -1180,7 +1180,7 @@ int credssp_recv(rdpCredssp* credssp) } /* [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_tag(s, &length); /* OCTET STRING */ sspi_SecBufferAlloc(&credssp->authInfo, length); @@ -1189,7 +1189,7 @@ int credssp_recv(rdpCredssp* credssp) } /* [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_tag(s, &length); /* OCTET STRING */ sspi_SecBufferAlloc(&credssp->pubKeyAuth, length); diff --git a/libfreerdp/crypto/per.c b/libfreerdp/crypto/per.c index 34d723647..403807495 100644 --- a/libfreerdp/crypto/per.c +++ b/libfreerdp/crypto/per.c @@ -35,14 +35,14 @@ boolean per_read_length(STREAM* s, uint16* length) uint8 byte; if (stream_get_left(s) < 1) - return false; + return FALSE; stream_read_uint8(s, byte); if (byte & 0x80) { if (stream_get_left(s) < 1) - return false; + return FALSE; byte &= ~(0x80); *length = (byte << 8); @@ -54,7 +54,7 @@ boolean per_read_length(STREAM* s, uint16* length) *length = byte; } - return true; + return TRUE; } /** @@ -81,10 +81,10 @@ void per_write_length(STREAM* s, int length) boolean per_read_choice(STREAM* s, uint8* choice) { if (stream_get_left(s) < 1) - return false; + return FALSE; stream_read_uint8(s, *choice); - return true; + return TRUE; } /** @@ -108,10 +108,10 @@ void per_write_choice(STREAM* s, uint8 choice) boolean per_read_selection(STREAM* s, uint8* selection) { if (stream_get_left(s) < 1) - return false; + return FALSE; stream_read_uint8(s, *selection); - return true; + return TRUE; } /** @@ -135,10 +135,10 @@ void per_write_selection(STREAM* s, uint8 selection) boolean per_read_number_of_sets(STREAM* s, uint8* number) { if (stream_get_left(s) < 1) - return false; + return FALSE; stream_read_uint8(s, *number); - return true; + return TRUE; } /** @@ -161,10 +161,10 @@ void per_write_number_of_sets(STREAM* s, uint8 number) boolean per_read_padding(STREAM* s, int length) { if (stream_get_left(s) < length) - return false; + return FALSE; stream_seek(s, length); - return true; + return TRUE; } /** @@ -193,19 +193,19 @@ boolean per_read_integer(STREAM* s, uint32* integer) uint16 length; if (!per_read_length(s, &length)) - return false; + return FALSE; if (stream_get_left(s) < length) - return false; + return FALSE; if (length == 1) stream_read_uint8(s, *integer); else if (length == 2) stream_read_uint16_be(s, *integer); else - return false; + return FALSE; - return true; + return TRUE; } /** @@ -244,16 +244,16 @@ void per_write_integer(STREAM* s, uint32 integer) boolean per_read_integer16(STREAM* s, uint16* integer, uint16 min) { if (stream_get_left(s) < 2) - return false; + return FALSE; stream_read_uint16_be(s, *integer); if (*integer + min > 0xFFFF) - return false; + return FALSE; *integer += min; - return true; + return TRUE; } /** @@ -279,15 +279,15 @@ void per_write_integer16(STREAM* s, uint16 integer, uint16 min) boolean per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) { if (stream_get_left(s) < 1) - return false; + return FALSE; stream_read_uint8(s, *enumerated); /* check that enumerated value falls within expected range */ if (*enumerated + 1 > count) - return false; + return FALSE; - return true; + return TRUE; } /** @@ -317,13 +317,13 @@ boolean per_read_object_identifier(STREAM* s, uint8 oid[6]) uint8 a_oid[6]; if (!per_read_length(s, &length)) - return false; + return FALSE; if (length != 5) - return false; + return FALSE; if (stream_get_left(s) < length) - return false; + return FALSE; stream_read_uint8(s, t12); /* first two tuples */ a_oid[0] = (t12 >> 4); @@ -338,11 +338,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; } } @@ -394,13 +394,13 @@ boolean per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min) uint8* a_oct_str; if (!per_read_length(s, &mlength)) - return false; + return FALSE; if (mlength + min != length) - return false; + return FALSE; if (stream_get_left(s) < length) - return false; + return FALSE; a_oct_str = s->p; stream_seek(s, length); @@ -408,10 +408,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; } /** @@ -449,15 +449,15 @@ boolean per_read_numeric_string(STREAM* s, int min) uint16 mlength; if (!per_read_length(s, &mlength)) - return false; + return FALSE; length = (mlength + min + 1) / 2; if (stream_get_left(s) < length) - return false; + return FALSE; stream_seek(s, length); - return true; + return TRUE; } /** diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index 2462b6a7c..f1ee966d2 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -67,7 +67,7 @@ boolean tls_connect(rdpTls* tls) if (tls->ctx == NULL) { printf("SSL_CTX_new failed\n"); - return false; + return FALSE; } /** @@ -106,13 +106,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); @@ -121,23 +121,23 @@ boolean tls_connect(rdpTls* tls) { if (tls_print_error("SSL_connect", tls->ssl, connection_status)) { - return false; + return FALSE; } } - cert = tls_get_certificate(tls, true); + cert = tls_get_certificate(tls, TRUE); if (cert == NULL) { printf("tls_connect: tls_get_certificate failed to return the server certificate.\n"); - return false; + return FALSE; } if (!crypto_cert_get_public_key(cert, &tls->PublicKey, &tls->PublicKeyLength)) { printf("tls_connect: crypto_cert_get_public_key failed to return the server public key.\n"); tls_free_certificate(cert); - return false; + return FALSE; } if (!tls_verify_certificate(tls, cert, tls->settings->hostname)) @@ -145,12 +145,12 @@ boolean tls_connect(rdpTls* tls) printf("tls_connect: certificate not trusted, aborting.\n"); tls_disconnect(tls); tls_free_certificate(cert); - return false; + return FALSE; } tls_free_certificate(cert); - return true; + return TRUE; } boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file) @@ -164,7 +164,7 @@ 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; } /* @@ -209,7 +209,7 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi 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); @@ -217,28 +217,28 @@ 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; } - cert = tls_get_certificate(tls, false); + cert = tls_get_certificate(tls, FALSE); if (cert == NULL) { printf("tls_connect: tls_get_certificate failed to return the server certificate.\n"); - return false; + return FALSE; } if (!crypto_cert_get_public_key(cert, &tls->PublicKey, &tls->PublicKeyLength)) { printf("tls_connect: crypto_cert_get_public_key failed to return the server public key.\n"); tls_free_certificate(cert); - return false; + return FALSE; } free(cert); @@ -246,7 +246,7 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi if (SSL_set_fd(tls->ssl, tls->sockfd) < 1) { printf("SSL_set_fd failed\n"); - return false; + return FALSE; } while (1) @@ -263,7 +263,7 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi default: if (tls_print_error("SSL_accept", tls->ssl, connection_status)) - return false; + return FALSE; break; } @@ -276,14 +276,14 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi printf("TLS connection accepted\n"); - return true; + return TRUE; } boolean tls_disconnect(rdpTls* tls) { if (tls->ssl) SSL_shutdown(tls->ssl); - return true; + return TRUE; } int tls_read(rdpTls* tls, uint8* data, int length) @@ -387,30 +387,30 @@ 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("%s: SSL_ERROR_WANT_READ\n", func); - return false; + return FALSE; case SSL_ERROR_WANT_WRITE: printf("%s: SSL_ERROR_WANT_WRITE\n", func); - return false; + return FALSE; case SSL_ERROR_SYSCALL: printf("%s: I/O error\n", func); tls_errors(func); - return true; + return TRUE; case SSL_ERROR_SSL: printf("%s: Failure in SSL library (protocol error?)\n", func); tls_errors(func); - return true; + return TRUE; default: printf("%s: Unknown error\n", func); tls_errors(func); - return true; + return TRUE; } } @@ -424,13 +424,13 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) int alt_names_count = 0; int* alt_names_lengths = NULL; boolean certificate_status; - boolean hostname_match = false; - boolean verification_status = false; + boolean hostname_match = FALSE; + boolean verification_status = FALSE; rdpCertificateData* certificate_data; /* ignore certificate verification if user explicitly required it (discouraged) */ if (tls->settings->ignore_certificate) - return true; /* success! */ + return TRUE; /* success! */ /* if user explicitly specified a certificate name, use it instead of the hostname */ if (tls->settings->certificate_name) @@ -453,7 +453,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) if (strlen(hostname) == common_name_length) { if (memcmp((void*) hostname, (void*) common_name, common_name_length) == 0) - hostname_match = true; + hostname_match = TRUE; } } @@ -466,7 +466,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) if (strlen(hostname) == alt_names_lengths[index]) { if (memcmp((void*) hostname, (void*) alt_names[index], alt_names_lengths[index]) == 0) - hostname_match = true; + hostname_match = TRUE; } } } @@ -480,7 +480,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) common_name = NULL; } - verification_status = true; /* success! */ + verification_status = TRUE; /* success! */ } /* if the certificate is valid but the certificate name does not match, warn user, do not accept */ @@ -495,7 +495,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) char* subject; char* fingerprint; freerdp* instance = (freerdp*) tls->settings->instance; - boolean accept_certificate = false; + boolean accept_certificate = FALSE; issuer = crypto_cert_issuer(cert->px509); subject = crypto_cert_subject(cert->px509); @@ -516,13 +516,13 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) if (!accept_certificate) { /* user did not accept, abort and do not add entry in known_hosts file */ - verification_status = false; /* failure! */ + verification_status = FALSE; /* failure! */ } else { /* user accepted certificate, add entry in known_hosts file */ certificate_data_print(tls->certificate_store, certificate_data); - verification_status = true; /* success! */ + verification_status = TRUE; /* success! */ } } else if (match == -1) @@ -536,18 +536,18 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) if (!accept_certificate) { /* user did not accept, abort and do not change known_hosts file */ - verification_status = false; /* failure! */ + verification_status = FALSE; /* failure! */ } else { /* user accepted new certificate, add replace fingerprint for this host in known_hosts file */ certificate_data_replace(tls->certificate_store, certificate_data); - verification_status = true; /* success! */ + verification_status = TRUE; /* success! */ } } else if (match == 0) { - verification_status = true; /* success! */ + verification_status = TRUE; /* success! */ } free(issuer); diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index a5c2a1928..540d2bf73 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -762,7 +762,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co gdi->image->bitmap->data = (uint8*) realloc(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; diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index 62415f9f2..f915564e5 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -155,7 +155,7 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, { status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp); - if (status == false) + if (status == FALSE) { printf("gdi_Bitmap_Decompress: Bitmap Decompression Failed\n"); } @@ -169,7 +169,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; } diff --git a/libfreerdp/locale/keyboard_xkbfile.c b/libfreerdp/locale/keyboard_xkbfile.c index 991603e35..74a7b0221 100644 --- a/libfreerdp/locale/keyboard_xkbfile.c +++ b/libfreerdp/locale/keyboard_xkbfile.c @@ -273,7 +273,7 @@ int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keyco int i, j; boolean found; XkbDescPtr xkb; - boolean status = false; + boolean status = FALSE; if (display && (xkb = XkbGetMap(display, 0, XkbUseCoreKbd))) { @@ -283,7 +283,7 @@ int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keyco for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { - found = false; + found = FALSE; memcpy(xkb_keyname, xkb->names->keys[i].name, 4); if (strlen(xkb_keyname) < 1) @@ -303,7 +303,7 @@ int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keyco } x11_keycode_to_rdp_scancode[i] = XKB_KEY_NAME_SCANCODE_TABLE[j].rdp_scancode; - found = true; + found = TRUE; } } @@ -313,7 +313,7 @@ int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keyco } } - status = true; + status = TRUE; } XkbFreeKeyboard(xkb, 0, 1); diff --git a/libfreerdp/locale/locale.c b/libfreerdp/locale/locale.c index 82362ef78..035001b88 100644 --- a/libfreerdp/locale/locale.c +++ b/libfreerdp/locale/locale.c @@ -639,13 +639,13 @@ boolean freerdp_get_system_language_and_country_codes(char* language, char* coun env_lang = getenv("LANG"); /* Get locale from environment variable LANG */ if (env_lang == NULL) - return false; /* LANG environment variable was not set */ + return FALSE; /* LANG environment variable was not set */ underscore = strcspn(env_lang, "_"); if (underscore > 3) { - return false; /* The language name should not be more than 3 letters long */ + return FALSE; /* The language name should not be more than 3 letters long */ } else { @@ -664,10 +664,10 @@ boolean freerdp_get_system_language_and_country_codes(char* language, char* coun } else { - return false; /* Invalid locale */ + return FALSE; /* Invalid locale */ } - return true; + return TRUE; } SYSTEM_LOCALE* freerdp_detect_system_locale() diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 278f473c6..704433574 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -596,507 +596,507 @@ static const TIME_ZONE_RULE_ENTRY TimeZoneRuleTable_100[] = static const TIME_ZONE_ENTRY TimeZoneTable[] = { { - "Dateline Standard Time", 720, false, "(UTC-12:00) International Date Line West", + "Dateline Standard Time", 720, FALSE, "(UTC-12:00) International Date Line West", "Dateline Standard Time", "Dateline Daylight Time", NULL, 0 }, { - "UTC-11", 780, false, "(UTC-11:00) Coordinated Universal Time-11", + "UTC-11", 780, FALSE, "(UTC-11:00) Coordinated Universal Time-11", "UTC-11", "UTC-11", NULL, 0 }, { - "Hawaiian Standard Time", 840, false, "(UTC-10:00) Hawaii", + "Hawaiian Standard Time", 840, FALSE, "(UTC-10:00) Hawaii", "Hawaiian Standard Time", "Hawaiian Daylight Time", NULL, 0 }, { - "Alaskan Standard Time", 900, true, "(UTC-09:00) Alaska", + "Alaskan Standard Time", 900, TRUE, "(UTC-09:00) Alaska", "Alaskan Standard Time", "Alaskan Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_3, 2 }, { - "Pacific Standard Time (Mexico)", 960, true, "(UTC-08:00) Baja California", + "Pacific Standard Time (Mexico)", 960, TRUE, "(UTC-08:00) Baja California", "Pacific Standard Time (Mexico)", "Pacific Daylight Time (Mexico)", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_4, 1 }, { - "Pacific Standard Time", 960, true, "(UTC-08:00) Pacific Time (US & Canada)", + "Pacific Standard Time", 960, TRUE, "(UTC-08:00) Pacific Time (US & Canada)", "Pacific Standard Time", "Pacific Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_5, 2 }, { - "US Mountain Standard Time", 1020, false, "(UTC-07:00) Arizona", + "US Mountain Standard Time", 1020, FALSE, "(UTC-07:00) Arizona", "US Mountain Standard Time", "US Mountain Daylight Time", NULL, 0 }, { - "Mountain Standard Time (Mexico)", 1020, true, "(UTC-07:00) Chihuahua, La Paz, Mazatlan", + "Mountain Standard Time (Mexico)", 1020, TRUE, "(UTC-07:00) Chihuahua, La Paz, Mazatlan", "Mountain Standard Time (Mexico)", "Mountain Daylight Time (Mexico)", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_7, 1 }, { - "Mountain Standard Time", 1020, true, "(UTC-07:00) Mountain Time (US & Canada)", + "Mountain Standard Time", 1020, TRUE, "(UTC-07:00) Mountain Time (US & Canada)", "Mountain Standard Time", "Mountain Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_8, 2 }, { - "Central America Standard Time", 1080, false, "(UTC-06:00) Central America", + "Central America Standard Time", 1080, FALSE, "(UTC-06:00) Central America", "Central America Standard Time", "Central America Daylight Time", NULL, 0 }, { - "Central Standard Time", 1080, true, "(UTC-06:00) Central Time (US & Canada)", + "Central Standard Time", 1080, TRUE, "(UTC-06:00) Central Time (US & Canada)", "Central Standard Time", "Central Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_10, 2 }, { - "Central Standard Time (Mexico)", 1080, true, "(UTC-06:00) Guadalajara, Mexico City, Monterrey", + "Central Standard Time (Mexico)", 1080, TRUE, "(UTC-06:00) Guadalajara, Mexico City, Monterrey", "Central Standard Time (Mexico)", "Central Daylight Time (Mexico)", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_11, 1 }, { - "Canada Central Standard Time", 1080, false, "(UTC-06:00) Saskatchewan", + "Canada Central Standard Time", 1080, FALSE, "(UTC-06:00) Saskatchewan", "Canada Central Standard Time", "Canada Central Daylight Time", NULL, 0 }, { - "SA Pacific Standard Time", 1140, false, "(UTC-05:00) Bogota, Lima, Quito", + "SA Pacific Standard Time", 1140, FALSE, "(UTC-05:00) Bogota, Lima, Quito", "SA Pacific Standard Time", "SA Pacific Daylight Time", NULL, 0 }, { - "Eastern Standard Time", 1140, true, "(UTC-05:00) Eastern Time (US & Canada)", + "Eastern Standard Time", 1140, TRUE, "(UTC-05:00) Eastern Time (US & Canada)", "Eastern Standard Time", "Eastern Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_14, 2 }, { - "US Eastern Standard Time", 1140, true, "(UTC-05:00) Indiana (East)", + "US Eastern Standard Time", 1140, TRUE, "(UTC-05:00) Indiana (East)", "US Eastern Standard Time", "US Eastern Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_15, 2 }, { - "Venezuela Standard Time", 1170, false, "(UTC-04:30) Caracas", + "Venezuela Standard Time", 1170, FALSE, "(UTC-04:30) Caracas", "Venezuela Standard Time", "Venezuela Daylight Time", NULL, 0 }, { - "Paraguay Standard Time", 1200, true, "(UTC-04:00) Asuncion", + "Paraguay Standard Time", 1200, TRUE, "(UTC-04:00) Asuncion", "Paraguay Standard Time", "Paraguay Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_17, 14 }, { - "Atlantic Standard Time", 1200, true, "(UTC-04:00) Atlantic Time (Canada)", + "Atlantic Standard Time", 1200, TRUE, "(UTC-04:00) Atlantic Time (Canada)", "Atlantic Standard Time", "Atlantic Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_18, 2 }, { - "Central Brazilian Standard Time", 1200, true, "(UTC-04:00) Cuiaba", + "Central Brazilian Standard Time", 1200, TRUE, "(UTC-04:00) Cuiaba", "Central Brazilian Standard Time", "Central Brazilian Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_19, 35 }, { - "SA Western Standard Time", 1200, false, "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", + "SA Western Standard Time", 1200, FALSE, "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", "SA Western Standard Time", "SA Western Daylight Time", NULL, 0 }, { - "Pacific SA Standard Time", 1200, true, "(UTC-04:00) Santiago", + "Pacific SA Standard Time", 1200, TRUE, "(UTC-04:00) Santiago", "Pacific SA Standard Time", "Pacific SA Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_21, 6 }, { - "Newfoundland Standard Time", 1230, true, "(UTC-03:30) Newfoundland", + "Newfoundland Standard Time", 1230, TRUE, "(UTC-03:30) Newfoundland", "Newfoundland Standard Time", "Newfoundland Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_22, 7 }, { - "E. South America Standard Time", 1260, true, "(UTC-03:00) Brasilia", + "E. South America Standard Time", 1260, TRUE, "(UTC-03:00) Brasilia", "E. South America Standard Time", "E. South America Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_23, 35 }, { - "Argentina Standard Time", 1260, true, "(UTC-03:00) Buenos Aires", + "Argentina Standard Time", 1260, TRUE, "(UTC-03:00) Buenos Aires", "Argentina Standard Time", "Argentina Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_24, 3 }, { - "SA Eastern Standard Time", 1260, false, "(UTC-03:00) Cayenne, Fortaleza", + "SA Eastern Standard Time", 1260, FALSE, "(UTC-03:00) Cayenne, Fortaleza", "SA Eastern Standard Time", "SA Eastern Daylight Time", NULL, 0 }, { - "Greenland Standard Time", 1260, true, "(UTC-03:00) Greenland", + "Greenland Standard Time", 1260, TRUE, "(UTC-03:00) Greenland", "Greenland Standard Time", "Greenland Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_26, 14 }, { - "Montevideo Standard Time", 1260, true, "(UTC-03:00) Montevideo", + "Montevideo Standard Time", 1260, TRUE, "(UTC-03:00) Montevideo", "Montevideo Standard Time", "Montevideo Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_27, 2 }, { - "Bahia Standard Time", 1260, true, "(UTC-03:00) Salvador", + "Bahia Standard Time", 1260, TRUE, "(UTC-03:00) Salvador", "Bahia Standard Time", "Bahia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_28, 30 }, { - "UTC-02", 1320, false, "(UTC-02:00) Coordinated Universal Time-02", + "UTC-02", 1320, FALSE, "(UTC-02:00) Coordinated Universal Time-02", "UTC-02", "UTC-02", NULL, 0 }, { - "Mid-Atlantic Standard Time", 1320, true, "(UTC-02:00) Mid-Atlantic", + "Mid-Atlantic Standard Time", 1320, TRUE, "(UTC-02:00) Mid-Atlantic", "Mid-Atlantic Standard Time", "Mid-Atlantic Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_30, 1 }, { - "Azores Standard Time", 1380, true, "(UTC-01:00) Azores", + "Azores Standard Time", 1380, TRUE, "(UTC-01:00) Azores", "Azores Standard Time", "Azores Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_31, 1 }, { - "Cape Verde Standard Time", 1380, false, "(UTC-01:00) Cape Verde Is.", + "Cape Verde Standard Time", 1380, FALSE, "(UTC-01:00) Cape Verde Is.", "Cape Verde Standard Time", "Cape Verde Daylight Time", NULL, 0 }, { - "Morocco Standard Time", 0, true, "(UTC) Casablanca", + "Morocco Standard Time", 0, TRUE, "(UTC) Casablanca", "Morocco Standard Time", "Morocco Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_33, 4 }, { - "UTC", 0, false, "(UTC) Coordinated Universal Time", + "UTC", 0, FALSE, "(UTC) Coordinated Universal Time", "Coordinated Universal Time", "Coordinated Universal Time", NULL, 0 }, { - "GMT Standard Time", 0, true, "(UTC) Dublin, Edinburgh, Lisbon, London", + "GMT Standard Time", 0, TRUE, "(UTC) Dublin, Edinburgh, Lisbon, London", "GMT Standard Time", "GMT Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_35, 1 }, { - "Greenwich Standard Time", 0, false, "(UTC) Monrovia, Reykjavik", + "Greenwich Standard Time", 0, FALSE, "(UTC) Monrovia, Reykjavik", "Greenwich Standard Time", "Greenwich Daylight Time", NULL, 0 }, { - "W. Europe Standard Time", 60, true, "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", + "W. Europe Standard Time", 60, TRUE, "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", "W. Europe Standard Time", "W. Europe Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_37, 1 }, { - "Central Europe Standard Time", 60, true, "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", + "Central Europe Standard Time", 60, TRUE, "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", "Central Europe Standard Time", "Central Europe Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_38, 1 }, { - "Romance Standard Time", 60, true, "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", + "Romance Standard Time", 60, TRUE, "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", "Romance Standard Time", "Romance Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_39, 1 }, { - "Central European Standard Time", 60, true, "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", + "Central European Standard Time", 60, TRUE, "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", "Central European Standard Time", "Central European Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_40, 1 }, { - "W. Central Africa Standard Time", 60, false, "(UTC+01:00) West Central Africa", + "W. Central Africa Standard Time", 60, FALSE, "(UTC+01:00) West Central Africa", "W. Central Africa Standard Time", "W. Central Africa Daylight Time", NULL, 0 }, { - "Namibia Standard Time", 60, true, "(UTC+01:00) Windhoek", + "Namibia Standard Time", 60, TRUE, "(UTC+01:00) Windhoek", "Namibia Standard Time", "Namibia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_42, 2 }, { - "Jordan Standard Time", 120, true, "(UTC+02:00) Amman", + "Jordan Standard Time", 120, TRUE, "(UTC+02:00) Amman", "Jordan Standard Time", "Jordan Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_43, 2 }, { - "GTB Standard Time", 120, true, "(UTC+02:00) Athens, Bucharest, Istanbul", + "GTB Standard Time", 120, TRUE, "(UTC+02:00) Athens, Bucharest, Istanbul", "GTB Standard Time", "GTB Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_44, 1 }, { - "Middle East Standard Time", 120, true, "(UTC+02:00) Beirut", + "Middle East Standard Time", 120, TRUE, "(UTC+02:00) Beirut", "Middle East Standard Time", "Middle East Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_45, 13 }, { - "Egypt Standard Time", 120, true, "(UTC+02:00) Cairo", + "Egypt Standard Time", 120, TRUE, "(UTC+02:00) Cairo", "Egypt Standard Time", "Egypt Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_46, 6 }, { - "Syria Standard Time", 120, true, "(UTC+02:00) Damascus", + "Syria Standard Time", 120, TRUE, "(UTC+02:00) Damascus", "Syria Standard Time", "Syria Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_47, 12 }, { - "South Africa Standard Time", 120, false, "(UTC+02:00) Harare, Pretoria", + "South Africa Standard Time", 120, FALSE, "(UTC+02:00) Harare, Pretoria", "South Africa Standard Time", "South Africa Daylight Time", NULL, 0 }, { - "FLE Standard Time", 120, true, "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", + "FLE Standard Time", 120, TRUE, "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", "FLE Standard Time", "FLE Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_49, 1 }, { - "Turkey Standard Time", 120, true, "(UTC+02:00) Istanbul", + "Turkey Standard Time", 120, TRUE, "(UTC+02:00) Istanbul", "Turkey Standard Time", "Turkey Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_50, 3 }, { - "Israel Standard Time", 120, true, "(UTC+02:00) Jerusalem", + "Israel Standard Time", 120, TRUE, "(UTC+02:00) Jerusalem", "Jerusalem Standard Time", "Jerusalem Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_51, 18 }, { - "E. Europe Standard Time", 120, true, "(UTC+02:00) Nicosia", + "E. Europe Standard Time", 120, TRUE, "(UTC+02:00) Nicosia", "E. Europe Standard Time", "E. Europe Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_52, 1 }, { - "Arabic Standard Time", 180, true, "(UTC+03:00) Baghdad", + "Arabic Standard Time", 180, TRUE, "(UTC+03:00) Baghdad", "Arabic Standard Time", "Arabic Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_53, 2 }, { - "Kaliningrad Standard Time", 180, true, "(UTC+03:00) Kaliningrad, Minsk", + "Kaliningrad Standard Time", 180, TRUE, "(UTC+03:00) Kaliningrad, Minsk", "Kaliningrad Standard Time", "Kaliningrad Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_54, 1 }, { - "Arab Standard Time", 180, false, "(UTC+03:00) Kuwait, Riyadh", + "Arab Standard Time", 180, FALSE, "(UTC+03:00) Kuwait, Riyadh", "Arab Standard Time", "Arab Daylight Time", NULL, 0 }, { - "E. Africa Standard Time", 180, false, "(UTC+03:00) Nairobi", + "E. Africa Standard Time", 180, FALSE, "(UTC+03:00) Nairobi", "E. Africa Standard Time", "E. Africa Daylight Time", NULL, 0 }, { - "Iran Standard Time", 210, true, "(UTC+03:30) Tehran", + "Iran Standard Time", 210, TRUE, "(UTC+03:30) Tehran", "Iran Standard Time", "Iran Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_57, 3 }, { - "Arabian Standard Time", 240, false, "(UTC+04:00) Abu Dhabi, Muscat", + "Arabian Standard Time", 240, FALSE, "(UTC+04:00) Abu Dhabi, Muscat", "Arabian Standard Time", "Arabian Daylight Time", NULL, 0 }, { - "Azerbaijan Standard Time", 240, true, "(UTC+04:00) Baku", + "Azerbaijan Standard Time", 240, TRUE, "(UTC+04:00) Baku", "Azerbaijan Standard Time", "Azerbaijan Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_59, 1 }, { - "Russian Standard Time", 240, true, "(UTC+04:00) Moscow, St. Petersburg, Volgograd", + "Russian Standard Time", 240, TRUE, "(UTC+04:00) Moscow, St. Petersburg, Volgograd", "Russian Standard Time", "Russian Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_60, 1 }, { - "Mauritius Standard Time", 240, true, "(UTC+04:00) Port Louis", + "Mauritius Standard Time", 240, TRUE, "(UTC+04:00) Port Louis", "Mauritius Standard Time", "Mauritius Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_61, 2 }, { - "Georgian Standard Time", 240, false, "(UTC+04:00) Tbilisi", + "Georgian Standard Time", 240, FALSE, "(UTC+04:00) Tbilisi", "Georgian Standard Time", "Georgian Daylight Time", NULL, 0 }, { - "Caucasus Standard Time", 240, true, "(UTC+04:00) Yerevan", + "Caucasus Standard Time", 240, TRUE, "(UTC+04:00) Yerevan", "Caucasus Standard Time", "Caucasus Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_63, 1 }, { - "Afghanistan Standard Time", 270, false, "(UTC+04:30) Kabul", + "Afghanistan Standard Time", 270, FALSE, "(UTC+04:30) Kabul", "Afghanistan Standard Time", "Afghanistan Daylight Time", NULL, 0 }, { - "Pakistan Standard Time", 300, true, "(UTC+05:00) Islamabad, Karachi", + "Pakistan Standard Time", 300, TRUE, "(UTC+05:00) Islamabad, Karachi", "Pakistan Standard Time", "Pakistan Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_65, 2 }, { - "West Asia Standard Time", 300, false, "(UTC+05:00) Tashkent", + "West Asia Standard Time", 300, FALSE, "(UTC+05:00) Tashkent", "West Asia Standard Time", "West Asia Daylight Time", NULL, 0 }, { - "India Standard Time", 330, false, "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", + "India Standard Time", 330, FALSE, "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", "India Standard Time", "India Daylight Time", NULL, 0 }, { - "Sri Lanka Standard Time", 330, false, "(UTC+05:30) Sri Jayawardenepura", + "Sri Lanka Standard Time", 330, FALSE, "(UTC+05:30) Sri Jayawardenepura", "Sri Lanka Standard Time", "Sri Lanka Daylight Time", NULL, 0 }, { - "Nepal Standard Time", 345, false, "(UTC+05:45) Kathmandu", + "Nepal Standard Time", 345, FALSE, "(UTC+05:45) Kathmandu", "Nepal Standard Time", "Nepal Daylight Time", NULL, 0 }, { - "Central Asia Standard Time", 360, false, "(UTC+06:00) Astana", + "Central Asia Standard Time", 360, FALSE, "(UTC+06:00) Astana", "Central Asia Standard Time", "Central Asia Daylight Time", NULL, 0 }, { - "Bangladesh Standard Time", 360, true, "(UTC+06:00) Dhaka", + "Bangladesh Standard Time", 360, TRUE, "(UTC+06:00) Dhaka", "Bangladesh Standard Time", "Bangladesh Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_71, 1 }, { - "Ekaterinburg Standard Time", 360, true, "(UTC+06:00) Ekaterinburg", + "Ekaterinburg Standard Time", 360, TRUE, "(UTC+06:00) Ekaterinburg", "Ekaterinburg Standard Time", "Ekaterinburg Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_72, 1 }, { - "Myanmar Standard Time", 390, false, "(UTC+06:30) Yangon (Rangoon)", + "Myanmar Standard Time", 390, FALSE, "(UTC+06:30) Yangon (Rangoon)", "Myanmar Standard Time", "Myanmar Daylight Time", NULL, 0 }, { - "SE Asia Standard Time", 420, false, "(UTC+07:00) Bangkok, Hanoi, Jakarta", + "SE Asia Standard Time", 420, FALSE, "(UTC+07:00) Bangkok, Hanoi, Jakarta", "SE Asia Standard Time", "SE Asia Daylight Time", NULL, 0 }, { - "N. Central Asia Standard Time", 420, true, "(UTC+07:00) Novosibirsk", + "N. Central Asia Standard Time", 420, TRUE, "(UTC+07:00) Novosibirsk", "N. Central Asia Standard Time", "N. Central Asia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_75, 1 }, { - "China Standard Time", 480, false, "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", + "China Standard Time", 480, FALSE, "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", "China Standard Time", "China Daylight Time", NULL, 0 }, { - "North Asia Standard Time", 480, true, "(UTC+08:00) Krasnoyarsk", + "North Asia Standard Time", 480, TRUE, "(UTC+08:00) Krasnoyarsk", "North Asia Standard Time", "North Asia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_77, 1 }, { - "Singapore Standard Time", 480, false, "(UTC+08:00) Kuala Lumpur, Singapore", + "Singapore Standard Time", 480, FALSE, "(UTC+08:00) Kuala Lumpur, Singapore", "Malay Peninsula Standard Time", "Malay Peninsula Daylight Time", NULL, 0 }, { - "W. Australia Standard Time", 480, true, "(UTC+08:00) Perth", + "W. Australia Standard Time", 480, TRUE, "(UTC+08:00) Perth", "W. Australia Standard Time", "W. Australia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_79, 4 }, { - "Taipei Standard Time", 480, false, "(UTC+08:00) Taipei", + "Taipei Standard Time", 480, FALSE, "(UTC+08:00) Taipei", "Taipei Standard Time", "Taipei Daylight Time", NULL, 0 }, { - "Ulaanbaatar Standard Time", 480, false, "(UTC+08:00) Ulaanbaatar", + "Ulaanbaatar Standard Time", 480, FALSE, "(UTC+08:00) Ulaanbaatar", "Ulaanbaatar Standard Time", "Ulaanbaatar Daylight Time", NULL, 0 }, { - "North Asia East Standard Time", 540, true, "(UTC+09:00) Irkutsk", + "North Asia East Standard Time", 540, TRUE, "(UTC+09:00) Irkutsk", "North Asia East Standard Time", "North Asia East Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_82, 1 }, { - "Tokyo Standard Time", 540, false, "(UTC+09:00) Osaka, Sapporo, Tokyo", + "Tokyo Standard Time", 540, FALSE, "(UTC+09:00) Osaka, Sapporo, Tokyo", "Tokyo Standard Time", "Tokyo Daylight Time", NULL, 0 }, { - "Korea Standard Time", 540, false, "(UTC+09:00) Seoul", + "Korea Standard Time", 540, FALSE, "(UTC+09:00) Seoul", "Korea Standard Time", "Korea Daylight Time", NULL, 0 }, { - "Cen. Australia Standard Time", 570, true, "(UTC+09:30) Adelaide", + "Cen. Australia Standard Time", 570, TRUE, "(UTC+09:30) Adelaide", "Cen. Australia Standard Time", "Cen. Australia Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_85, 2 }, { - "AUS Central Standard Time", 570, false, "(UTC+09:30) Darwin", + "AUS Central Standard Time", 570, FALSE, "(UTC+09:30) Darwin", "AUS Central Standard Time", "AUS Central Daylight Time", NULL, 0 }, { - "E. Australia Standard Time", 600, false, "(UTC+10:00) Brisbane", + "E. Australia Standard Time", 600, FALSE, "(UTC+10:00) Brisbane", "E. Australia Standard Time", "E. Australia Daylight Time", NULL, 0 }, { - "AUS Eastern Standard Time", 600, true, "(UTC+10:00) Canberra, Melbourne, Sydney", + "AUS Eastern Standard Time", 600, TRUE, "(UTC+10:00) Canberra, Melbourne, Sydney", "AUS Eastern Standard Time", "AUS Eastern Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_88, 2 }, { - "West Pacific Standard Time", 600, false, "(UTC+10:00) Guam, Port Moresby", + "West Pacific Standard Time", 600, FALSE, "(UTC+10:00) Guam, Port Moresby", "West Pacific Standard Time", "West Pacific Daylight Time", NULL, 0 }, { - "Tasmania Standard Time", 600, true, "(UTC+10:00) Hobart", + "Tasmania Standard Time", 600, TRUE, "(UTC+10:00) Hobart", "Tasmania Standard Time", "Tasmania Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_90, 2 }, { - "Yakutsk Standard Time", 600, true, "(UTC+10:00) Yakutsk", + "Yakutsk Standard Time", 600, TRUE, "(UTC+10:00) Yakutsk", "Yakutsk Standard Time", "Yakutsk Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_91, 1 }, { - "Central Pacific Standard Time", 660, false, "(UTC+11:00) Solomon Is., New Caledonia", + "Central Pacific Standard Time", 660, FALSE, "(UTC+11:00) Solomon Is., New Caledonia", "Central Pacific Standard Time", "Central Pacific Daylight Time", NULL, 0 }, { - "Vladivostok Standard Time", 660, true, "(UTC+11:00) Vladivostok", + "Vladivostok Standard Time", 660, TRUE, "(UTC+11:00) Vladivostok", "Vladivostok Standard Time", "Vladivostok Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_93, 1 }, { - "New Zealand Standard Time", 720, true, "(UTC+12:00) Auckland, Wellington", + "New Zealand Standard Time", 720, TRUE, "(UTC+12:00) Auckland, Wellington", "New Zealand Standard Time", "New Zealand Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_94, 3 }, { - "UTC+12", 720, false, "(UTC+12:00) Coordinated Universal Time+12", + "UTC+12", 720, FALSE, "(UTC+12:00) Coordinated Universal Time+12", "UTC+12", "UTC+12", NULL, 0 }, { - "Fiji Standard Time", 720, true, "(UTC+12:00) Fiji", + "Fiji Standard Time", 720, TRUE, "(UTC+12:00) Fiji", "Fiji Standard Time", "Fiji Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_96, 5 }, { - "Magadan Standard Time", 720, true, "(UTC+12:00) Magadan", + "Magadan Standard Time", 720, TRUE, "(UTC+12:00) Magadan", "Magadan Standard Time", "Magadan Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_97, 1 }, { - "Kamchatka Standard Time", 720, true, "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", + "Kamchatka Standard Time", 720, TRUE, "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", "Kamchatka Standard Time", "Kamchatka Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_98, 1 }, { - "Tonga Standard Time", 780, false, "(UTC+13:00) Nuku'alofa", + "Tonga Standard Time", 780, FALSE, "(UTC+13:00) Nuku'alofa", "Tonga Standard Time", "Tonga Daylight Time", NULL, 0 }, { - "Samoa Standard Time", 780, true, "(UTC+13:00) Samoa", + "Samoa Standard Time", 780, TRUE, "(UTC+13:00) Samoa", "Samoa Standard Time", "Samoa Daylight Time", (TIME_ZONE_RULE_ENTRY*) &TimeZoneRuleTable_100, 2 } @@ -1587,7 +1587,7 @@ boolean freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const if (strcmp(p, tzid) == 0) { free(list_copy); - return true; + return TRUE; } p = strtok(NULL, " "); @@ -1595,7 +1595,7 @@ boolean freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const free(list_copy); - return false; + return FALSE; } TIME_ZONE_ENTRY* freerdp_detect_windows_time_zone(uint32 bias) diff --git a/libfreerdp/rail/rail.c b/libfreerdp/rail/rail.c index 072205cf5..31f0e17a3 100644 --- a/libfreerdp/rail/rail.c +++ b/libfreerdp/rail/rail.c @@ -64,7 +64,7 @@ static void rail_WindowIcon(rdpContext* context, WINDOW_ORDER_INFO* orderInfo, W 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, diff --git a/libfreerdp/rail/window.c b/libfreerdp/rail/window.c index bfec8f62d..c462993b0 100644 --- a/libfreerdp/rail/window.c +++ b/libfreerdp/rail/window.c @@ -42,59 +42,59 @@ typedef struct _WINDOW_STYLE WINDOW_STYLE; static const 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 } }; static const 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) diff --git a/libfreerdp/rail/window_list.c b/libfreerdp/rail/window_list.c index 8f8e7c2c8..f705ca29a 100644 --- a/libfreerdp/rail/window_list.c +++ b/libfreerdp/rail/window_list.c @@ -38,10 +38,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) diff --git a/libfreerdp/utils/args.c b/libfreerdp/utils/args.c index 90ba448ad..c11412841 100644 --- a/libfreerdp/utils/args.c +++ b/libfreerdp/utils/args.c @@ -248,7 +248,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, if (strncmp("workarea", argv[index], 1) == 0) { - settings->workarea = true; + settings->workarea = TRUE; } else { @@ -276,11 +276,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("-f", argv[index]) == 0) { - settings->fullscreen = true; + settings->fullscreen = TRUE; } else if (strcmp("-D", argv[index]) == 0) { - settings->decorations = false; + settings->decorations = FALSE; } else if (strcmp("-T", argv[index]) == 0) { @@ -315,7 +315,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("-K", argv[index]) == 0) { - settings->grab_keyboard = false; + settings->grab_keyboard = FALSE; } else if (strcmp("-n", argv[index]) == 0) { @@ -330,15 +330,15 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("-o", argv[index]) == 0) { - settings->console_audio = true; + settings->console_audio = TRUE; } else if (strcmp("-0", argv[index]) == 0) { - settings->console_session = true; + settings->console_session = TRUE; } else if (strcmp("-z", argv[index]) == 0) { - settings->compression = true; + settings->compression = TRUE; } else if (strcmp("--ntlm", argv[index]) == 0) { @@ -351,31 +351,31 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--no-glyph-cache", argv[index]) == 0) { - settings->glyph_cache = false; + settings->glyph_cache = FALSE; } else if (strcmp("--no-osb", argv[index]) == 0) { - settings->offscreen_bitmap_cache = false; + settings->offscreen_bitmap_cache = FALSE; } else if (strcmp("--no-bmp-cache", argv[index]) == 0) { - settings->bitmap_cache = false; + settings->bitmap_cache = FALSE; } else if (strcmp("--no-auth", argv[index]) == 0) { - settings->authentication = false; + settings->authentication = FALSE; } else if (strcmp("--authonly", argv[index]) == 0) { - settings->authentication_only = true; + settings->authentication_only = TRUE; } else if (strcmp("--from-stdin", argv[index]) == 0) { - settings->from_stdin = true; + settings->from_stdin = TRUE; } else if (strcmp("--ignore-certificate", argv[index]) == 0) { - settings->ignore_certificate = true; + settings->ignore_certificate = TRUE; } else if (strcmp("--certificate-name", argv[index]) == 0) { @@ -390,8 +390,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--no-fastpath", argv[index]) == 0) { - settings->fastpath_input = false; - settings->fastpath_output = false; + settings->fastpath_input = FALSE; + settings->fastpath_output = FALSE; } else if (strcmp("--gdi", argv[index]) == 0) { @@ -403,11 +403,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } if (strncmp("sw", argv[index], 1) == 0) /* software */ { - settings->sw_gdi = true; + settings->sw_gdi = TRUE; } else if (strncmp("hw", argv[index], 1) == 0) /* hardware */ { - settings->sw_gdi = false; + settings->sw_gdi = FALSE; } else { @@ -423,25 +423,25 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing codec name\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->bitmap_cache_v3 = true; + settings->bitmap_cache_v3 = TRUE; if (strcmp("rfx", argv[index]) == 0) { printf("setting rfx\n"); settings->v3_codec_id = CODEC_ID_REMOTEFX; - settings->rfx_codec = true; + settings->rfx_codec = TRUE; } else if (strcmp("nsc", argv[index]) == 0) { printf("setting codec nsc\n"); settings->v3_codec_id = CODEC_ID_NSCODEC; - settings->ns_codec = true; + settings->ns_codec = TRUE; } #ifdef WITH_JPEG else if (strcmp("jpeg", argv[index]) == 0) { printf("setting codec jpeg\n"); settings->v3_codec_id = CODEC_ID_JPEG; - settings->jpeg_codec = true; + settings->jpeg_codec = TRUE; if (settings->jpeg_quality == 0) settings->jpeg_quality = 75; } @@ -455,7 +455,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, #ifdef WITH_JPEG else if (strcmp("--jpeg", argv[index]) == 0) { - settings->jpeg_codec = true; + settings->jpeg_codec = TRUE; settings->jpeg_quality = 75; } else if (strcmp("--jpegex", argv[index]) == 0) @@ -466,17 +466,17 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing codec name\n"); return FREERDP_ARGS_PARSE_FAILURE; } - settings->jpeg_codec = true; + settings->jpeg_codec = TRUE; settings->jpeg_quality = atoi(argv[index]); } #endif else if (strcmp("--rfx", argv[index]) == 0) { - settings->rfx_codec = true; - settings->fastpath_output = true; + settings->rfx_codec = TRUE; + settings->fastpath_output = TRUE; settings->color_depth = 32; settings->performance_flags = PERF_FLAG_NONE; - settings->large_pointer = true; + settings->large_pointer = TRUE; } else if (strcmp("--rfx-mode", argv[index]) == 0) { @@ -512,7 +512,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--nsc", argv[index]) == 0) { - settings->ns_codec = true; + settings->ns_codec = TRUE; } else if (strcmp("--dump-rfx", argv[index]) == 0) { @@ -523,8 +523,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, return FREERDP_ARGS_PARSE_FAILURE; } settings->dump_rfx_file = _strdup(argv[index]); - settings->dump_rfx = true; - settings->rfx_codec_only = true; + settings->dump_rfx = TRUE; + settings->rfx_codec_only = TRUE; } else if (strcmp("--play-rfx", argv[index]) == 0) { @@ -535,41 +535,41 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, return FREERDP_ARGS_PARSE_FAILURE; } settings->play_rfx_file = _strdup(argv[index]); - settings->play_rfx = true; + settings->play_rfx = TRUE; } else if (strcmp("--fonts", argv[index]) == 0) { - settings->smooth_fonts = true; + settings->smooth_fonts = TRUE; } else if (strcmp("--disable-wallpaper", argv[index]) == 0) { - settings->disable_wallpaper = true; + settings->disable_wallpaper = TRUE; } else if (strcmp("--disable-full-window-drag", argv[index]) == 0) { - settings->disable_full_window_drag = true; + settings->disable_full_window_drag = TRUE; } else if (strcmp("--disable-menu-animations", argv[index]) == 0) { - settings->disable_menu_animations = true; + settings->disable_menu_animations = TRUE; } else if (strcmp("--disable-theming", argv[index]) == 0) { - settings->disable_theming = true; + settings->disable_theming = TRUE; } else if (strcmp("--composition", argv[index]) == 0) { - settings->desktop_composition = true; + settings->desktop_composition = TRUE; } else if (strcmp("--no-motion", argv[index]) == 0) { - settings->mouse_motion = false; + settings->mouse_motion = FALSE; } else if (strcmp("--app", argv[index]) == 0) { - settings->remote_app = true; - settings->rail_langbar_supported = true; - settings->workarea = true; + settings->remote_app = TRUE; + settings->rail_langbar_supported = TRUE; + settings->workarea = TRUE; settings->performance_flags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG; } else if (strcmp("-x", argv[index]) == 0) @@ -623,15 +623,15 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--no-rdp", argv[index]) == 0) { - settings->rdp_security = false; + settings->rdp_security = FALSE; } else if (strcmp("--no-tls", argv[index]) == 0) { - settings->tls_security = false; + settings->tls_security = FALSE; } else if (strcmp("--no-nla", argv[index]) == 0) { - settings->nla_security = false; + settings->nla_security = FALSE; } else if (strcmp("--sec", argv[index]) == 0) { @@ -643,24 +643,24 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } if (strncmp("rdp", argv[index], 1) == 0) /* Standard RDP */ { - settings->rdp_security = true; - settings->tls_security = false; - settings->nla_security = false; - settings->encryption = true; + settings->rdp_security = TRUE; + settings->tls_security = FALSE; + settings->nla_security = FALSE; + settings->encryption = TRUE; settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; } else if (strncmp("tls", argv[index], 1) == 0) /* TLS */ { - settings->rdp_security = false; - settings->tls_security = true; - settings->nla_security = false; + settings->rdp_security = FALSE; + settings->tls_security = TRUE; + settings->nla_security = FALSE; } else if (strncmp("nla", argv[index], 1) == 0) /* NLA */ { - settings->rdp_security = false; - settings->tls_security = false; - settings->nla_security = true; + settings->rdp_security = FALSE; + settings->tls_security = FALSE; + settings->nla_security = TRUE; } else { @@ -670,11 +670,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--no-nego", argv[index]) == 0) { - settings->security_layer_negotiation = false; + settings->security_layer_negotiation = FALSE; } else if (strcmp("--tsg", argv[index]) == 0) { - settings->ts_gateway = true; + settings->ts_gateway = TRUE; index++; if (index == argc) { @@ -708,7 +708,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } plugin_data = NULL; if (strstr(argv[t], "rdpsnd")) - settings->audio_playback = true; + settings->audio_playback = TRUE; if (index < argc - 1 && strcmp("--data", argv[index + 1]) == 0) { index += 2; @@ -721,7 +721,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, plugin_data = (RDP_PLUGIN_DATA*) realloc(plugin_data, sizeof(RDP_PLUGIN_DATA) * (i + 2)); if (strstr(argv[t], "drdynvc") && strstr(argv[index], "audin")) - settings->audio_capture = true; + settings->audio_capture = TRUE; plugin_data[i].size = sizeof(RDP_PLUGIN_DATA); plugin_data[i].data[0] = NULL; @@ -789,7 +789,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else if (strcmp("--no-salted-checksum", argv[index]) == 0) { - settings->salted_checksum = false; + settings->salted_checksum = FALSE; } else if (strcmp("--pcid", argv[index]) == 0) { @@ -799,7 +799,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing preconnection id value\n"); return -1; } - settings->send_preconnection_pdu = true; + settings->send_preconnection_pdu = TRUE; settings->preconnection_id = atoi(argv[index]); } else if (strcmp("--pcb", argv[index]) == 0) @@ -810,7 +810,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, printf("missing preconnection blob value\n"); return -1; } - settings->send_preconnection_pdu = true; + settings->send_preconnection_pdu = TRUE; settings->preconnection_blob = _strdup(argv[index]); } else if (strcmp("--version", argv[index]) == 0) diff --git a/libfreerdp/utils/file.c b/libfreerdp/utils/file.c index 3be331a33..16ffed6b9 100644 --- a/libfreerdp/utils/file.c +++ b/libfreerdp/utils/file.c @@ -79,9 +79,9 @@ boolean freerdp_check_file_exists(char* file) struct stat stat_info; if (stat(file, &stat_info) != 0) - return false; + return FALSE; - return true; + return TRUE; } char* freerdp_get_home_path(rdpSettings* settings) @@ -208,12 +208,12 @@ char* freerdp_get_parent_path(char* base_path, int depth) boolean freerdp_path_contains_separator(char* path) { if (path == NULL) - return false; + return FALSE; if (strchr(path, PATH_SEPARATOR_CHR) == NULL) - return false; + return FALSE; - return true; + return TRUE; } /* detects if we are running from the source tree */ @@ -223,22 +223,22 @@ boolean freerdp_detect_development_mode(rdpSettings* settings) int depth = 0; char* current_path; char* development_path = NULL; - boolean development_mode = false; + boolean development_mode = FALSE; if (freerdp_check_file_exists(".git")) { depth = 0; - development_mode = true; + development_mode = TRUE; } else if (freerdp_check_file_exists(PARENT_PATH ".git")) { depth = 1; - development_mode = true; + development_mode = TRUE; } else if (freerdp_check_file_exists(PARENT_PATH PARENT_PATH ".git")) { depth = 2; - development_mode = true; + development_mode = TRUE; } current_path = freerdp_get_current_path(settings); diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index 5bc5e617e..cd65c8b8d 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -156,7 +156,7 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) * @param entry_name [IN] - name of the symbol to register for later loading * @param entry [IN] - function pointer to the entry function * - * @return true on success, otherwise false. + * @return TRUE on success, otherwise FALSE. */ boolean freerdp_register_static_plugin(const char* name, const char* entry_name, void* entry_addr) { @@ -165,7 +165,7 @@ boolean freerdp_register_static_plugin(const char* name, const char* entry_name, if (g_static_plugins_count >= MAX_STATIC_PLUGINS) { printf("freerdp_register_static_plugin: cannot register %s/%s", name, entry_name); - return false; + return FALSE; } /* add the static plugin to the vector */ @@ -174,7 +174,7 @@ boolean freerdp_register_static_plugin(const char* name, const char* entry_name, plugin->entry_name = entry_name; plugin->entry_addr = entry_addr; - return true; + return TRUE; } /** diff --git a/libfreerdp/utils/pcap.c b/libfreerdp/utils/pcap.c index 93dde00d7..7405125ef 100644 --- a/libfreerdp/utils/pcap.c +++ b/libfreerdp/utils/pcap.c @@ -118,36 +118,36 @@ void pcap_add_record(rdpPcap* pcap, void* data, uint32 length) boolean pcap_has_next_record(rdpPcap* pcap) { if (pcap->file_size - (ftell(pcap->fp)) <= 16) - return false; + return FALSE; - return true; + return TRUE; } boolean pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record) { - if (pcap_has_next_record(pcap) != true) - return false; + if (pcap_has_next_record(pcap) != TRUE) + return FALSE; pcap_read_record_header(pcap, &record->header); record->length = record->header.incl_len; - return true; + return TRUE; } boolean pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record) { fread(record->data, record->length, 1, pcap->fp); - return true; + return TRUE; } boolean pcap_get_next_record(rdpPcap* pcap, pcap_record* record) { - if (pcap_has_next_record(pcap) != true) - return false; + if (pcap_has_next_record(pcap) != TRUE) + return FALSE; pcap_read_record(pcap, record); - return true; + return TRUE; } rdpPcap* pcap_open(char* name, boolean write) diff --git a/server/Sample/sf_rdpsnd.c b/server/Sample/sf_rdpsnd.c index 6775dd3ba..22cc3c026 100644 --- a/server/Sample/sf_rdpsnd.c +++ b/server/Sample/sf_rdpsnd.c @@ -62,5 +62,5 @@ boolean sf_peer_rdpsnd_init(testPeerContext* context) context->rdpsnd->Initialize(context->rdpsnd); - return true; + return TRUE; } diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 4c2d3de61..ee68219ea 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -43,7 +43,7 @@ #include "sfreerdp.h" static char* test_pcap_file = NULL; -static boolean test_dump_rfx_realtime = true; +static boolean test_dump_rfx_realtime = TRUE; /* HL1, LH1, HH1, HL2, LH2, HH2, HL3, LH3, HH3, LL3 */ static const unsigned int test_quantization_values[] = @@ -329,7 +329,7 @@ static boolean test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_s { *old_sec = new_sec; *old_usec = new_usec; - return true; + return TRUE; } sec = new_sec - *old_sec; @@ -338,7 +338,7 @@ static boolean test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_s if (sec<0 || (sec==0 && usec<0)) { printf("Invalid time stamp detected.\n"); - return false; + return FALSE; } *old_sec = new_sec; @@ -356,7 +356,7 @@ static boolean test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_s if (usec > 0) freerdp_usleep(usec); - return true; + return TRUE; } void tf_peer_dump_rfx(freerdp_peer* client) @@ -370,7 +370,7 @@ void tf_peer_dump_rfx(freerdp_peer* client) s = stream_new(512); update = client->update; - client->update->pcap_rfx = pcap_open(test_pcap_file, false); + client->update->pcap_rfx = pcap_open(test_pcap_file, FALSE); pcap_rfx = client->update->pcap_rfx; if (pcap_rfx == NULL) @@ -389,7 +389,7 @@ void tf_peer_dump_rfx(freerdp_peer* client) pcap_get_next_record_content(pcap_rfx, &record); s->p = s->data + s->size; - if (test_dump_rfx_realtime && test_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == false) + if (test_dump_rfx_realtime && test_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == FALSE) break; update->SurfaceCommand(update->context, s); @@ -405,7 +405,7 @@ static void* tf_debug_channel_thread_func(void* arg) testPeerContext* context = (testPeerContext*) arg; freerdp_thread* thread = context->debug_channel_thread; - if (WTSVirtualChannelQuery(context->debug_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == true) + if (WTSVirtualChannelQuery(context->debug_channel, WTSVirtualFileHandle, &buffer, &bytes_returned) == TRUE) { fd = *((void**)buffer); WTSFreeMemory(buffer); @@ -426,7 +426,7 @@ static void* tf_debug_channel_thread_func(void* arg) stream_set_pos(s, 0); if (WTSVirtualChannelRead(context->debug_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) { if (bytes_returned == 0) break; @@ -434,7 +434,7 @@ static void* tf_debug_channel_thread_func(void* arg) stream_check_size(s, bytes_returned); if (WTSVirtualChannelRead(context->debug_channel, 0, stream_get_head(s), - stream_get_size(s), &bytes_returned) == false) + stream_get_size(s), &bytes_returned) == FALSE) { /* should not happen */ break; @@ -512,9 +512,9 @@ boolean tf_peer_post_connect(freerdp_peer* client) sf_peer_audin_init(context); /* Audio Input */ - /* Return false here would stop the execution of the peer mainloop. */ + /* Return FALSE here would stop the execution of the peer mainloop. */ - return true; + return TRUE; } boolean tf_peer_activate(freerdp_peer* client) @@ -522,11 +522,11 @@ boolean tf_peer_activate(freerdp_peer* client) testPeerContext* context = (testPeerContext*) client->context; rfx_context_reset(context->rfx_context); - context->activated = true; + context->activated = TRUE; if (test_pcap_file != NULL) { - client->update->dump_rfx = true; + client->update->dump_rfx = TRUE; tf_peer_dump_rfx(client); } else @@ -534,7 +534,7 @@ boolean tf_peer_activate(freerdp_peer* client) test_peer_draw_background(client); } - return true; + return TRUE; } void tf_peer_synchronize_event(rdpInput* input, uint32 flags) @@ -563,7 +563,7 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) client->settings->height = 480; } update->DesktopResize(update->context); - context->activated = false; + context->activated = FALSE; } else if ((flags & 0x4000) && code == 0x2E) /* 'c' key */ { @@ -581,12 +581,12 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) if (!context->audin_open) { context->audin->Open(context->audin); - context->audin_open = true; + context->audin_open = TRUE; } else { context->audin->Close(context->audin); - context->audin_open = false; + context->audin_open = FALSE; } } else if ((flags & 0x4000) && code == 0x1F) /* 's' key */ @@ -654,10 +654,10 @@ static void* test_peer_mainloop(void* arg) /* Initialize the real server settings here */ client->settings->cert_file = _strdup("server.crt"); client->settings->privatekey_file = _strdup("server.key"); - client->settings->nla_security = false; - client->settings->rfx_codec = true; - client->settings->suppress_output = true; - client->settings->refresh_rect = true; + client->settings->nla_security = FALSE; + client->settings->rfx_codec = TRUE; + client->settings->suppress_output = TRUE; + client->settings->refresh_rect = TRUE; client->PostConnect = tf_peer_post_connect; client->Activate = tf_peer_activate; @@ -680,7 +680,7 @@ static void* test_peer_mainloop(void* arg) { rcount = 0; - if (client->GetFileDescriptor(client, rfds, &rcount) != true) + if (client->GetFileDescriptor(client, rfds, &rcount) != TRUE) { printf("Failed to get FreeRDP file descriptor\n"); break; @@ -716,9 +716,9 @@ static void* test_peer_mainloop(void* arg) } } - if (client->CheckFileDescriptor(client) != true) + if (client->CheckFileDescriptor(client) != TRUE) break; - if (WTSVirtualChannelManagerCheckFileDescriptor(context->vcm) != true) + if (WTSVirtualChannelManagerCheckFileDescriptor(context->vcm) != TRUE) break; } @@ -754,7 +754,7 @@ static void test_server_mainloop(freerdp_listener* instance) { rcount = 0; - if (instance->GetFileDescriptor(instance, rfds, &rcount) != true) + if (instance->GetFileDescriptor(instance, rfds, &rcount) != TRUE) { printf("Failed to get FreeRDP file descriptor\n"); break; @@ -789,7 +789,7 @@ static void test_server_mainloop(freerdp_listener* instance) } } - if (instance->CheckFileDescriptor(instance) != true) + if (instance->CheckFileDescriptor(instance) != TRUE) { printf("Failed to check FreeRDP file descriptor\n"); break; @@ -814,7 +814,7 @@ int main(int argc, char* argv[]) test_pcap_file = argv[1]; if (argc > 2 && !strcmp(argv[2], "--fast")) - test_dump_rfx_realtime = false; + test_dump_rfx_realtime = FALSE; /* Open the server socket and start listening. */ if (instance->Open(instance, NULL, 3389) && diff --git a/server/Windows/wf_interface.c b/server/Windows/wf_interface.c index 1ef29ef75..3c225a69a 100644 --- a/server/Windows/wf_interface.c +++ b/server/Windows/wf_interface.c @@ -46,7 +46,7 @@ DWORD WINAPI wf_server_main_loop(LPVOID lpParam) { rcount = 0; - if (instance->GetFileDescriptor(instance, rfds, &rcount) != true) + if (instance->GetFileDescriptor(instance, rfds, &rcount) != TRUE) { printf("Failed to get FreeRDP file descriptor\n"); break; @@ -70,7 +70,7 @@ DWORD WINAPI wf_server_main_loop(LPVOID lpParam) select(max_fds + 1, &rfds_set, NULL, NULL, NULL); - if (instance->CheckFileDescriptor(instance) != true) + if (instance->CheckFileDescriptor(instance) != TRUE) { printf("Failed to check FreeRDP file descriptor\n"); break; diff --git a/server/Windows/wf_mirage.c b/server/Windows/wf_mirage.c index ed516aaa3..150a5caae 100644 --- a/server/Windows/wf_mirage.c +++ b/server/Windows/wf_mirage.c @@ -26,8 +26,8 @@ /* This function will iterate over the loaded display devices until it finds the mirror device we want to load. If found, it will then copy the registry -key corresponding to the device to the context and returns true. Otherwise -the function returns false. +key corresponding to the device to the context and returns TRUE. Otherwise +the function returns FALSE. */ BOOL wf_mirror_driver_find_display_device(wfInfo* context) { @@ -71,11 +71,11 @@ BOOL wf_mirror_driver_find_display_device(wfInfo* context) /** * This function will attempt to access the the windows registry using the device * key stored in the current context. It will attempt to read the value of the - * "Attach.ToDesktop" subkey and will return true if the value is already set to - * val. If unable to read the subkey, this function will return false. If the - * subkey is not set to val it will then attempt to set it to val and return true. If + * "Attach.ToDesktop" subkey and will return TRUE if the value is already set to + * val. If unable to read the subkey, this function will return FALSE. If the + * subkey is not set to val it will then attempt to set it to val and return TRUE. If * unsuccessful or an unexpected value is encountered, the function returns - * false. + * FALSE. */ BOOL wf_mirror_driver_display_device_attach(wfInfo* context, DWORD mode) @@ -165,8 +165,8 @@ void wf_mirror_driver_print_display_change_status(LONG status) /** * This function will attempt to apply the currently configured display settings - * in the registry to the display driver. It will return true if successful - * otherwise it returns false. + * in the registry to the display driver. It will return TRUE if successful + * otherwise it returns FALSE. * If unload is nonzero then the the driver will be asked to remove itself. */ diff --git a/server/Windows/wf_peer.c b/server/Windows/wf_peer.c index e7549f969..030786bc1 100644 --- a/server/Windows/wf_peer.c +++ b/server/Windows/wf_peer.c @@ -85,7 +85,7 @@ boolean wf_peer_post_connect(freerdp_peer* client) client->update->DesktopResize(client->update->context); } - return true; + return TRUE; } boolean wf_peer_activate(freerdp_peer* client) @@ -96,10 +96,10 @@ boolean wf_peer_activate(freerdp_peer* client) printf("PeerActivate\n"); wfi = context->info; - client->activated = true; + client->activated = TRUE; wf_update_peer_activate(wfi, context); - return true; + return TRUE; } boolean wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, boolean automatic) @@ -112,7 +112,7 @@ boolean wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, b identity->User, identity->Domain, identity->Password); } - return true; + return TRUE; } void wf_peer_synchronize_event(rdpInput* input, uint32 flags) @@ -144,7 +144,7 @@ DWORD WINAPI wf_peer_socket_listener(LPVOID lpParam) { rcount = 0; - if (client->GetFileDescriptor(client, rfds, &rcount) != true) + if (client->GetFileDescriptor(client, rfds, &rcount) != TRUE) { printf("Failed to get peer file descriptor\n"); break; @@ -202,9 +202,9 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam) wf_peer_init(client); settings = client->settings; - settings->rfx_codec = true; - settings->ns_codec = false; - settings->jpeg_codec = false; + settings->rfx_codec = TRUE; + settings->ns_codec = FALSE; + settings->jpeg_codec = FALSE; wf_peer_read_settings(client); client->PostConnect = wf_peer_post_connect; @@ -256,7 +256,7 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam) if (WaitForSingleObject(context->socketEvent, 0) == 0) { - if (client->CheckFileDescriptor(client) != true) + if (client->CheckFileDescriptor(client) != TRUE) { printf("Failed to check peer file descriptor\n"); context->socketClose = TRUE; diff --git a/server/Windows/wf_update.c b/server/Windows/wf_update.c index 536c5f512..90450752a 100644 --- a/server/Windows/wf_update.c +++ b/server/Windows/wf_update.c @@ -238,7 +238,7 @@ void wf_update_peer_deactivate(wfInfo* wfi, wfPeerContext* context) wf_mirror_driver_deactivate(wfi); } - client->activated = false; + client->activated = FALSE; wfi->activePeerCount--; printf("Deactivating Peer Updates: %d\n", wfi->activePeerCount); diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index 73a799632..9abcfddb7 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -36,12 +36,12 @@ void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code) { #ifdef WITH_XTEST unsigned int keycode; - boolean extended = false; + boolean extended = FALSE; xfPeerContext* xfp = (xfPeerContext*) input->context; xfInfo* xfi = xfp->info; if (flags & KBD_FLAGS_EXTENDED) - extended = true; + extended = TRUE; keycode = freerdp_keyboard_get_x11_keycode_from_rdp_scancode(code, extended); @@ -73,7 +73,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) #ifdef WITH_XTEST xfPeerContext* xfp = (xfPeerContext*) input->context; int button = 0; - boolean down = false; + boolean down = FALSE; xfInfo* xfi = xfp->info; pthread_mutex_lock(&(xfp->mutex)); @@ -81,10 +81,10 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) if (flags & PTR_FLAGS_WHEEL) { - boolean negative = false; + boolean negative = FALSE; if (flags & PTR_FLAGS_WHEEL_NEGATIVE) - negative = true; + negative = TRUE; button = (negative) ? 5 : 4; @@ -104,7 +104,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) button = 2; if (flags & PTR_FLAGS_DOWN) - down = true; + down = TRUE; if (button != 0) XTestFakeButtonEvent(xfi->display, button, down, 0); diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 9e4755c13..7c49530a9 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -179,7 +179,7 @@ xfInfo* xf_info_init() xfi = xnew(xfInfo); - //xfi->use_xshm = true; + //xfi->use_xshm = TRUE; xfi->display = XOpenDisplay(NULL); XInitThreads(); @@ -328,7 +328,7 @@ static boolean xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 ne { *old_sec = new_sec; *old_usec = new_usec; - return true; + return TRUE; } sec = new_sec - *old_sec; @@ -337,7 +337,7 @@ static boolean xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 ne if (sec < 0 || (sec == 0 && usec < 0)) { printf("Invalid time stamp detected.\n"); - return false; + return FALSE; } *old_sec = new_sec; @@ -355,7 +355,7 @@ static boolean xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 ne if (usec > 0) freerdp_usleep(usec); - return true; + return TRUE; } void xf_peer_dump_rfx(freerdp_peer* client) @@ -369,7 +369,7 @@ void xf_peer_dump_rfx(freerdp_peer* client) s = stream_new(512); update = client->update; - client->update->pcap_rfx = pcap_open(xf_pcap_file, false); + client->update->pcap_rfx = pcap_open(xf_pcap_file, FALSE); pcap_rfx = client->update->pcap_rfx; if (pcap_rfx == NULL) @@ -388,7 +388,7 @@ void xf_peer_dump_rfx(freerdp_peer* client) pcap_get_next_record_content(pcap_rfx, &record); s->p = s->data + s->size; - if (xf_pcap_dump_realtime && xf_peer_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == false) + if (xf_pcap_dump_realtime && xf_peer_sleep_tsdiff(&prev_seconds, &prev_useconds, record.header.ts_sec, record.header.ts_usec) == FALSE) break; update->SurfaceCommand(update->context, s); @@ -475,12 +475,12 @@ boolean xf_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) xfPeerContext* xfp = (xfPeerContext*) client->context; if (xfp->event_queue->pipe_fd[0] == -1) - return true; + return TRUE; rfds[*rcount] = (void *)(long) xfp->event_queue->pipe_fd[0]; (*rcount)++; - return true; + return TRUE; } boolean xf_peer_check_fds(freerdp_peer* client) @@ -493,8 +493,8 @@ boolean xf_peer_check_fds(freerdp_peer* client) xfp = (xfPeerContext*) client->context; xfi = xfp->info; - if (xfp->activated == false) - return true; + if (xfp->activated == FALSE) + return TRUE; event = xf_event_peek(xfp->event_queue); @@ -511,7 +511,7 @@ boolean xf_peer_check_fds(freerdp_peer* client) event = xf_event_pop(xfp->event_queue); invalid_region = xfp->hdc->hwnd->invalid; - if (invalid_region->null == false) + if (invalid_region->null == FALSE) { xf_peer_rfx_update(client, invalid_region->x, invalid_region->y, invalid_region->w, invalid_region->h); @@ -524,12 +524,12 @@ boolean xf_peer_check_fds(freerdp_peer* client) } } - return true; + return TRUE; } boolean xf_peer_capabilities(freerdp_peer* client) { - return true; + return TRUE; } boolean xf_peer_post_connect(freerdp_peer* client) @@ -572,10 +572,10 @@ boolean xf_peer_post_connect(freerdp_peer* client) client->settings->height = xfi->height; client->update->DesktopResize(client->update->context); - xfp->activated = false; + xfp->activated = FALSE; - /* Return false here would stop the execution of the peer mainloop. */ - return true; + /* Return FALSE here would stop the execution of the peer mainloop. */ + return TRUE; } boolean xf_peer_activate(freerdp_peer* client) @@ -583,11 +583,11 @@ boolean xf_peer_activate(freerdp_peer* client) xfPeerContext* xfp = (xfPeerContext*) client->context; rfx_context_reset(xfp->rfx_context); - xfp->activated = true; + xfp->activated = TRUE; if (xf_pcap_file != NULL) { - client->update->dump_rfx = true; + client->update->dump_rfx = TRUE; xf_peer_dump_rfx(client); } else @@ -596,7 +596,7 @@ boolean xf_peer_activate(freerdp_peer* client) xfp->activations++; } - return true; + return TRUE; } void* xf_peer_main_loop(void* arg) @@ -638,11 +638,11 @@ void* xf_peer_main_loop(void* arg) settings->cert_file = freerdp_construct_path(server_file_path, "server.crt"); settings->privatekey_file = freerdp_construct_path(server_file_path, "server.key"); - settings->nla_security = true; - settings->tls_security = false; - settings->rdp_security = false; + settings->nla_security = TRUE; + settings->tls_security = FALSE; + settings->rdp_security = FALSE; - settings->rfx_codec = true; + settings->rfx_codec = TRUE; client->Capabilities = xf_peer_capabilities; client->PostConnect = xf_peer_post_connect; @@ -656,12 +656,12 @@ void* xf_peer_main_loop(void* arg) { rcount = 0; - if (client->GetFileDescriptor(client, rfds, &rcount) != true) + if (client->GetFileDescriptor(client, rfds, &rcount) != TRUE) { printf("Failed to get FreeRDP file descriptor\n"); break; } - if (xf_peer_get_fds(client, rfds, &rcount) != true) + if (xf_peer_get_fds(client, rfds, &rcount) != TRUE) { printf("Failed to get xfreerdp file descriptor\n"); break; @@ -696,12 +696,12 @@ void* xf_peer_main_loop(void* arg) } } - if (client->CheckFileDescriptor(client) != true) + if (client->CheckFileDescriptor(client) != TRUE) { printf("Failed to check freerdp file descriptor\n"); break; } - if ((xf_peer_check_fds(client)) != true) + if ((xf_peer_check_fds(client)) != TRUE) { printf("Failed to check xfreerdp file descriptor\n"); break; diff --git a/server/X11/xfreerdp.c b/server/X11/xfreerdp.c index c244334b1..4a3af1ca8 100644 --- a/server/X11/xfreerdp.c +++ b/server/X11/xfreerdp.c @@ -36,7 +36,7 @@ #include "xfreerdp.h" char* xf_pcap_file = NULL; -boolean xf_pcap_dump_realtime = true; +boolean xf_pcap_dump_realtime = TRUE; void xf_server_main_loop(freerdp_listener* instance) { @@ -53,7 +53,7 @@ void xf_server_main_loop(freerdp_listener* instance) { rcount = 0; - if (instance->GetFileDescriptor(instance, rfds, &rcount) != true) + if (instance->GetFileDescriptor(instance, rfds, &rcount) != TRUE) { printf("Failed to get FreeRDP file descriptor\n"); break; @@ -88,7 +88,7 @@ void xf_server_main_loop(freerdp_listener* instance) } } - if (instance->CheckFileDescriptor(instance) != true) + if (instance->CheckFileDescriptor(instance) != TRUE) { printf("Failed to check FreeRDP file descriptor\n"); break; @@ -112,7 +112,7 @@ int main(int argc, char* argv[]) xf_pcap_file = argv[1]; if (argc > 2 && !strcmp(argv[2], "--fast")) - xf_pcap_dump_realtime = false; + xf_pcap_dump_realtime = FALSE; /* Open the server socket and start listening. */ if (instance->Open(instance, NULL, 3389)) From 1ed644786c480efc925ca541ab6b9be948a9f436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 02:38:39 -0400 Subject: [PATCH 36/43] freerdp: change boolean type to BOOL type --- channels/audin/client/alsa/audin_alsa.c | 6 +- channels/audin/client/audin_main.c | 8 +- channels/audin/client/audin_main.h | 4 +- channels/audin/client/pulse/audin_pulse.c | 6 +- channels/audin/server/audin.c | 18 +-- channels/cliprdr/client/cliprdr_format.c | 4 +- channels/cliprdr/client/cliprdr_main.h | 10 +- channels/disk/client/disk_file.c | 26 ++-- channels/disk/client/disk_file.h | 16 +-- channels/printer/client/printer_cups.c | 2 +- channels/printer/client/printer_main.h | 2 +- channels/printer/client/printer_win.c | 2 +- channels/rdpdr/client/devman.c | 2 +- channels/rdpdr/client/devman.h | 2 +- channels/rdpdr/client/rdpdr_main.c | 4 +- .../rdpsnd/client/MacAudio/rdpsnd_audio_q.c | 2 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 2 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 4 +- channels/rdpsnd/client/rdpsnd_main.c | 6 +- channels/rdpsnd/client/rdpsnd_main.h | 2 +- channels/rdpsnd/server/rdpsnd.c | 18 +-- channels/serial/client/serial_main.c | 4 +- channels/serial/client/serial_tty.c | 12 +- channels/serial/client/serial_tty.h | 6 +- channels/smartcard/client/scard_main.c | 6 +- channels/smartcard/client/scard_main.h | 4 +- channels/smartcard/client/scard_operations.c | 20 +-- channels/tsmf/client/alsa/tsmf_alsa.c | 8 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 24 ++-- .../tsmf/client/gstreamer/tsmf_gstreamer.c | 12 +- channels/tsmf/client/pulse/tsmf_pulse.c | 12 +- channels/tsmf/client/tsmf_audio.h | 6 +- channels/tsmf/client/tsmf_codec.c | 10 +- channels/tsmf/client/tsmf_codec.h | 4 +- channels/tsmf/client/tsmf_decoder.h | 6 +- channels/tsmf/client/tsmf_ifman.h | 2 +- channels/tsmf/client/tsmf_main.c | 2 +- channels/tsmf/client/tsmf_main.h | 2 +- channels/tsmf/client/tsmf_media.c | 4 +- channels/urbdrc/client/urbdrc_main.c | 2 +- client/DirectFB/df_event.c | 6 +- client/DirectFB/df_event.h | 2 +- client/DirectFB/dfreerdp.c | 12 +- client/Mac/MRDPRailView.h | 14 +- client/Mac/MRDPRailView.m | 2 +- client/Mac/MRDPView.h | 18 +-- client/Mac/MRDPView.m | 12 +- client/Sample/freerdp.c | 4 +- client/Windows/wf_cliprdr.c | 8 +- client/Windows/wf_cliprdr.h | 8 +- client/Windows/wf_event.c | 2 +- client/Windows/wf_gdi.c | 2 +- client/Windows/wf_graphics.c | 6 +- client/Windows/wf_rail.c | 2 +- client/Windows/wf_rail.h | 2 +- client/Windows/wfreerdp.c | 10 +- client/Windows/wfreerdp.h | 2 +- client/X11/xf_cliprdr.c | 22 +-- client/X11/xf_cliprdr.h | 8 +- client/X11/xf_event.c | 60 ++++---- client/X11/xf_event.h | 2 +- client/X11/xf_gdi.c | 4 +- client/X11/xf_graphics.c | 6 +- client/X11/xf_keyboard.c | 10 +- client/X11/xf_keyboard.h | 8 +- client/X11/xf_monitor.c | 2 +- client/X11/xf_monitor.h | 4 +- client/X11/xf_rail.c | 4 +- client/X11/xf_rail.h | 2 +- client/X11/xf_tsmf.c | 4 +- client/X11/xf_window.c | 24 ++-- client/X11/xf_window.h | 24 ++-- client/X11/xfreerdp.c | 20 +-- client/X11/xfreerdp.h | 36 ++--- cunit/test_freerdp.c | 2 +- include/freerdp/channels/channels.h | 4 +- include/freerdp/channels/wtsvc.h | 10 +- include/freerdp/codec/bitmap.h | 2 +- include/freerdp/codec/jpeg.h | 2 +- include/freerdp/codec/mppc_enc.h | 6 +- include/freerdp/codec/rfx.h | 2 +- include/freerdp/crypto/ber.h | 28 ++-- include/freerdp/crypto/crypto.h | 4 +- include/freerdp/crypto/der.h | 2 +- include/freerdp/crypto/er.h | 42 +++--- include/freerdp/crypto/nla.h | 2 +- include/freerdp/crypto/per.h | 22 +-- include/freerdp/crypto/tls.h | 10 +- include/freerdp/freerdp.h | 20 +-- include/freerdp/graphics.h | 12 +- include/freerdp/input.h | 2 +- include/freerdp/listener.h | 8 +- include/freerdp/locale/keyboard.h | 2 +- include/freerdp/peer.h | 24 ++-- include/freerdp/primary.h | 4 +- include/freerdp/rail.h | 16 +-- include/freerdp/rail/icon.h | 2 +- include/freerdp/rail/window_list.h | 2 +- include/freerdp/secondary.h | 6 +- include/freerdp/server/audin.h | 4 +- include/freerdp/server/rdpsnd.h | 8 +- include/freerdp/settings.h | 128 +++++++++--------- include/freerdp/types.h | 15 +- include/freerdp/update.h | 6 +- include/freerdp/utils/file.h | 6 +- include/freerdp/utils/load_plugin.h | 4 +- include/freerdp/utils/pcap.h | 12 +- include/freerdp/utils/tcp.h | 2 +- libfreerdp/cache/bitmap.c | 2 +- libfreerdp/channels/libchannels.c | 4 +- libfreerdp/channels/wtsvc.c | 24 ++-- libfreerdp/codec/bitmap.c | 4 +- libfreerdp/codec/include/bitmap.c | 4 +- libfreerdp/codec/jpeg.c | 8 +- libfreerdp/codec/mppc_enc.c | 6 +- libfreerdp/core/activation.c | 42 +++--- libfreerdp/core/activation.h | 42 +++--- libfreerdp/core/capabilities.c | 10 +- libfreerdp/core/capabilities.h | 8 +- libfreerdp/core/certificate.c | 10 +- libfreerdp/core/certificate.h | 6 +- libfreerdp/core/channel.c | 2 +- libfreerdp/core/channel.h | 2 +- libfreerdp/core/connection.c | 46 +++---- libfreerdp/core/connection.h | 34 ++--- libfreerdp/core/fastpath.c | 30 ++-- libfreerdp/core/fastpath.h | 10 +- libfreerdp/core/freerdp.c | 12 +- libfreerdp/core/gcc.c | 26 ++-- libfreerdp/core/gcc.h | 26 ++-- libfreerdp/core/graphics.c | 2 +- libfreerdp/core/info.c | 14 +- libfreerdp/core/info.h | 14 +- libfreerdp/core/input.c | 16 +-- libfreerdp/core/input.h | 2 +- libfreerdp/core/license.c | 6 +- libfreerdp/core/license.h | 6 +- libfreerdp/core/listener.c | 8 +- libfreerdp/core/mcs.c | 40 +++--- libfreerdp/core/mcs.h | 36 ++--- libfreerdp/core/nego.c | 34 ++--- libfreerdp/core/nego.h | 32 ++--- libfreerdp/core/orders.c | 18 +-- libfreerdp/core/orders.h | 8 +- libfreerdp/core/peer.c | 18 +-- libfreerdp/core/rdp.c | 28 ++-- libfreerdp/core/rdp.h | 26 ++-- libfreerdp/core/redirection.c | 6 +- libfreerdp/core/redirection.h | 4 +- libfreerdp/core/rpc.c | 14 +- libfreerdp/core/rpc.h | 16 +-- libfreerdp/core/rts.c | 12 +- libfreerdp/core/rts.h | 12 +- libfreerdp/core/security.c | 16 +-- libfreerdp/core/security.h | 14 +- libfreerdp/core/surface.c | 2 +- libfreerdp/core/surface.h | 2 +- libfreerdp/core/tcp.c | 8 +- libfreerdp/core/tcp.h | 8 +- libfreerdp/core/timezone.c | 2 +- libfreerdp/core/timezone.h | 2 +- libfreerdp/core/tpkt.c | 4 +- libfreerdp/core/tpkt.h | 2 +- libfreerdp/core/transport.c | 22 +-- libfreerdp/core/transport.h | 26 ++-- libfreerdp/core/tsg.c | 2 +- libfreerdp/core/tsg.h | 2 +- libfreerdp/core/update.c | 8 +- libfreerdp/core/update.h | 6 +- libfreerdp/crypto/ber.c | 26 ++-- libfreerdp/crypto/crypto.c | 8 +- libfreerdp/crypto/der.c | 4 +- libfreerdp/crypto/er.c | 40 +++--- libfreerdp/crypto/nla.c | 14 +- libfreerdp/crypto/per.c | 22 +-- libfreerdp/crypto/tls.c | 20 +-- libfreerdp/gdi/graphics.c | 6 +- libfreerdp/gdi/graphics.h | 2 +- libfreerdp/locale/keyboard.c | 2 +- libfreerdp/locale/keyboard_xkbfile.c | 4 +- libfreerdp/locale/locale.c | 2 +- libfreerdp/locale/timezone.c | 4 +- libfreerdp/rail/window.c | 2 +- libfreerdp/rail/window_list.c | 2 +- libfreerdp/utils/file.c | 8 +- libfreerdp/utils/load_plugin.c | 2 +- libfreerdp/utils/pcap.c | 10 +- libfreerdp/utils/tcp.c | 2 +- server/Sample/sf_rdpsnd.c | 2 +- server/Sample/sf_rdpsnd.h | 2 +- server/Sample/sfreerdp.c | 8 +- server/Sample/sfreerdp.h | 4 +- server/Windows/wf_peer.c | 6 +- server/Windows/wf_peer.h | 4 +- server/X11/xf_input.c | 6 +- server/X11/xf_peer.c | 14 +- server/X11/xf_peer.h | 2 +- server/X11/xfreerdp.c | 2 +- server/X11/xfreerdp.h | 2 +- 199 files changed, 1074 insertions(+), 1079 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index 50069d101..2e71da378 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -58,7 +58,7 @@ typedef struct _AudinALSADevice void* user_data; } AudinALSADevice; -static boolean audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_handle) +static BOOL audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_handle) { int error; snd_pcm_hw_params_t* hw_params; @@ -93,7 +93,7 @@ static boolean audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_h return TRUE; } -static boolean audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size) +static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size) { int frames; int cframes; @@ -239,7 +239,7 @@ static void audin_alsa_free(IAudinDevice* device) free(alsa); } -static boolean audin_alsa_format_supported(IAudinDevice* device, audinFormat* format) +static BOOL audin_alsa_format_supported(IAudinDevice* device, audinFormat* format) { switch (format->wFormatTag) { diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index d1c19033c..d0da0f914 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -219,7 +219,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac return error; } -static boolean audin_receive_wave_data(uint8* data, int size, void* user_data) +static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data) { int error; STREAM* out; @@ -436,7 +436,7 @@ static void audin_register_device_plugin(IWTSPlugin* pPlugin, IAudinDevice* devi audin->device = device; } -static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, RDP_PLUGIN_DATA* data) +static BOOL audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, RDP_PLUGIN_DATA* data) { char* fullname; PFREERDP_AUDIN_DEVICE_ENTRY entry; @@ -471,9 +471,9 @@ static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, R return TRUE; } -static boolean audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data) +static BOOL audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data) { - boolean ret; + BOOL ret; AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) pPlugin; RDP_PLUGIN_DATA default_data[2] = { { 0 }, { 0 } }; diff --git a/channels/audin/client/audin_main.h b/channels/audin/client/audin_main.h index 43728ef51..751005841 100644 --- a/channels/audin/client/audin_main.h +++ b/channels/audin/client/audin_main.h @@ -34,7 +34,7 @@ #define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -typedef boolean (*AudinReceive) (uint8* data, int size, void* user_data); +typedef BOOL (*AudinReceive) (uint8* data, int size, void* user_data); typedef struct audin_format audinFormat; struct audin_format @@ -52,7 +52,7 @@ typedef struct _IAudinDevice IAudinDevice; struct _IAudinDevice { void (*Open) (IAudinDevice* devplugin, AudinReceive receive, void* user_data); - boolean (*FormatSupported) (IAudinDevice* devplugin, audinFormat* format); + BOOL (*FormatSupported) (IAudinDevice* devplugin, audinFormat* format); void (*SetFormat) (IAudinDevice* devplugin, audinFormat* format, uint32 FramesPerPacket); void (*Close) (IAudinDevice* devplugin); void (*Free) (IAudinDevice* devplugin); diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 4628ac425..0c74f494a 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -80,7 +80,7 @@ static void audin_pulse_context_state_callback(pa_context* context, void* userda } } -static boolean audin_pulse_connect(IAudinDevice* device) +static BOOL audin_pulse_connect(IAudinDevice* device) { pa_context_state_t state; AudinPulseDevice* pulse = (AudinPulseDevice*) device; @@ -155,7 +155,7 @@ static void audin_pulse_free(IAudinDevice* device) free(pulse); } -static boolean audin_pulse_format_supported(IAudinDevice* device, audinFormat* format) +static BOOL audin_pulse_format_supported(IAudinDevice* device, audinFormat* format) { AudinPulseDevice* pulse = (AudinPulseDevice*) device; @@ -279,7 +279,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length { int frames; int cframes; - boolean ret; + BOOL ret; const void* data; const uint8* src; int encoded_size; diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 2d395e1b0..8d14abeeb 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -50,7 +50,7 @@ typedef struct _audin_server FREERDP_DSP_CONTEXT* dsp_context; - boolean opened; + BOOL opened; } audin_server; static void audin_server_select_format(audin_server_context* context, int client_format_index) @@ -73,7 +73,7 @@ static void audin_server_send_version(audin_server* audin, STREAM* s) WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static boolean audin_server_recv_version(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, uint32 length) { uint32 Version; @@ -120,7 +120,7 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s) WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static boolean audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 length) { int i; @@ -189,7 +189,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static boolean audin_server_recv_open_reply(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_open_reply(audin_server* audin, STREAM* s, uint32 length) { uint32 Result; @@ -202,7 +202,7 @@ static boolean audin_server_recv_open_reply(audin_server* audin, STREAM* s, uint return TRUE; } -static boolean audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length) { rdpsndFormat* format; int sbytes_per_sample; @@ -266,7 +266,7 @@ static void* audin_server_thread_func(void* arg) STREAM* s; void* buffer; uint8 MessageId; - boolean ready = FALSE; + BOOL ready = FALSE; uint32 bytes_returned = 0; audin_server* audin = (audin_server*) arg; freerdp_thread* thread = audin->audin_channel_thread; @@ -287,7 +287,7 @@ static void* audin_server_thread_func(void* arg) if (WTSVirtualChannelQuery(audin->audin_channel, WTSVirtualChannelReady, &buffer, &bytes_returned) == FALSE) break; - ready = *((boolean*)buffer); + ready = *((BOOL*)buffer); WTSFreeMemory(buffer); if (ready) break; @@ -366,7 +366,7 @@ static void* audin_server_thread_func(void* arg) return NULL; } -static boolean audin_server_open(audin_server_context* context) +static BOOL audin_server_open(audin_server_context* context) { audin_server* audin = (audin_server*) context; @@ -386,7 +386,7 @@ static boolean audin_server_open(audin_server_context* context) return FALSE; } -static boolean audin_server_close(audin_server_context* context) +static BOOL audin_server_close(audin_server_context* context) { audin_server* audin = (audin_server*) context; diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index 131135fa2..f60a46ccf 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -112,7 +112,7 @@ static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr) void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags) { int i; - boolean ascii; + BOOL ascii; int num_formats; CLIPRDR_FORMAT_NAME* format_name; @@ -198,7 +198,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL { int i; uint32 format; - boolean supported; + BOOL supported; CLIPRDR_FORMAT_NAME* format_name; RDP_CB_FORMAT_LIST_EVENT* cb_event; diff --git a/channels/cliprdr/client/cliprdr_main.h b/channels/cliprdr/client/cliprdr_main.h index 249ae4406..42d642013 100644 --- a/channels/cliprdr/client/cliprdr_main.h +++ b/channels/cliprdr/client/cliprdr_main.h @@ -35,11 +35,11 @@ typedef struct _CLIPRDR_FORMAT_NAME CLIPRDR_FORMAT_NAME; struct cliprdr_plugin { rdpSvcPlugin plugin; - boolean received_caps; - boolean use_long_format_names; - boolean stream_fileclip_enabled; - boolean fileclip_no_file_paths; - boolean can_lock_clipdata; + BOOL received_caps; + BOOL use_long_format_names; + BOOL stream_fileclip_enabled; + BOOL fileclip_no_file_paths; + BOOL can_lock_clipdata; CLIPRDR_FORMAT_NAME* format_names; int num_format_names; }; diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index cee593ef5..38c77f12e 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -55,7 +55,7 @@ #include "disk_file.h" -static boolean disk_file_wildcard_match(const char* pattern, const char* filename) +static BOOL disk_file_wildcard_match(const char* pattern, const char* filename) { const char *p = pattern, *f = filename; char c; @@ -121,13 +121,13 @@ static char* disk_file_combine_fullpath(const char* base_path, const char* path) return fullpath; } -static boolean disk_file_remove_dir(const char* path) +static BOOL disk_file_remove_dir(const char* path) { DIR* dir; char* p; struct STAT st; struct dirent* pdirent; - boolean ret = TRUE; + BOOL ret = TRUE; dir = opendir(path); @@ -200,15 +200,15 @@ static void disk_file_set_fullpath(DISK_FILE* file, char* fullpath) file->filename += 1; } -static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions) +static BOOL disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions) { struct STAT st; - boolean exists; + BOOL exists; #ifdef WIN32 const static int mode = _S_IREAD | _S_IWRITE ; #else const static int mode = S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH; - boolean largeFile = FALSE; + BOOL largeFile = FALSE; #endif int oflag = 0; @@ -346,7 +346,7 @@ void disk_file_free(DISK_FILE* file) free(file); } -boolean disk_file_seek(DISK_FILE* file, uint64 Offset) +BOOL disk_file_seek(DISK_FILE* file, uint64 Offset) { if (file->is_dir || file->fd == -1) return FALSE; @@ -357,7 +357,7 @@ boolean disk_file_seek(DISK_FILE* file, uint64 Offset) return TRUE; } -boolean disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length) +BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length) { ssize_t r; @@ -372,7 +372,7 @@ boolean disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length) return TRUE; } -boolean disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length) +BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length) { ssize_t r; @@ -391,7 +391,7 @@ boolean disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length) return TRUE; } -boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output) +BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output) { struct STAT st; @@ -442,7 +442,7 @@ boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, return TRUE; } -boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input) +BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input) { char* s; @@ -541,11 +541,11 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui return TRUE; } -boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, +BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, const char* path, STREAM* output) { int length; - boolean ret; + BOOL ret; WCHAR* ent_path; struct STAT st; struct dirent* ent; diff --git a/channels/disk/client/disk_file.h b/channels/disk/client/disk_file.h index f97696bd2..653959254 100644 --- a/channels/disk/client/disk_file.h +++ b/channels/disk/client/disk_file.h @@ -84,7 +84,7 @@ typedef struct _DISK_FILE DISK_FILE; struct _DISK_FILE { uint32 id; - boolean is_dir; + BOOL is_dir; int fd; int err; DIR* dir; @@ -92,19 +92,19 @@ struct _DISK_FILE char* fullpath; char* filename; char* pattern; - boolean delete_pending; + BOOL delete_pending; }; DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id, uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions); void disk_file_free(DISK_FILE* file); -boolean disk_file_seek(DISK_FILE* file, uint64 Offset); -boolean disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length); -boolean disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length); -boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output); -boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input); -boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, +BOOL disk_file_seek(DISK_FILE* file, uint64 Offset); +BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length); +BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length); +BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output); +BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input); +BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, const char* path, STREAM* output); #endif /* __DISK_FILE_H */ diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index 60fba2d87..bd8d4dca3 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -213,7 +213,7 @@ static void printer_cups_free_printer(rdpPrinter* printer) free(printer); } -static rdpPrinter* printer_cups_new_printer(rdpCupsPrinterDriver* cups_driver, const char* name, boolean is_default) +static rdpPrinter* printer_cups_new_printer(rdpCupsPrinterDriver* cups_driver, const char* name, BOOL is_default) { rdpCupsPrinter* cups_printer; diff --git a/channels/printer/client/printer_main.h b/channels/printer/client/printer_main.h index 3eeb81646..f21442fae 100644 --- a/channels/printer/client/printer_main.h +++ b/channels/printer/client/printer_main.h @@ -57,7 +57,7 @@ struct rdp_printer int id; char* name; char* driver; - boolean is_default; + BOOL is_default; pcCreatePrintJob CreatePrintJob; pcFindPrintJob FindPrintJob; diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index 91a3d5820..b1069fa4e 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -171,7 +171,7 @@ static void printer_win_free_printer(rdpPrinter* printer) free(printer); } -static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, const char* name, const wchar_t* drivername, boolean is_default) +static rdpPrinter* printer_win_new_printer(rdpWinPrinterDriver* win_driver, const char* name, const wchar_t* drivername, BOOL is_default) { rdpWinPrinter* win_printer; wchar_t wname[256]; diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index 5b810313e..9fd28c4c2 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -69,7 +69,7 @@ static void devman_register_device(DEVMAN* devman, DEVICE* device) DEBUG_SVC("device %d.%s registered", device->id, device->name); } -boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data) +BOOL devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data) { char* name; DEVICE_SERVICE_ENTRY_POINTS ep; diff --git a/channels/rdpdr/client/devman.h b/channels/rdpdr/client/devman.h index e9364f4d4..fb23f3987 100644 --- a/channels/rdpdr/client/devman.h +++ b/channels/rdpdr/client/devman.h @@ -23,7 +23,7 @@ DEVMAN* devman_new(rdpSvcPlugin* plugin); void devman_free(DEVMAN* devman); -boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data); +BOOL devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data); DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id); #endif /* FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H */ diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 9953bd0ad..91b7a2df0 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -147,7 +147,7 @@ static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* da } } -static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, boolean user_loggedon) +static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL user_loggedon) { int i; int pos; @@ -219,7 +219,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, boolean svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out); } -static boolean rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in) +static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in) { IRP* irp; diff --git a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c index f06dacde6..528ccda39 100644 --- a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c +++ b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c @@ -125,7 +125,7 @@ static void rdpsnd_audio_free(rdpsndDevicePlugin* device) { } -static boolean rdpsnd_audio_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) +static BOOL rdpsnd_audio_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) { switch (format->wFormatTag) { diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index 4eaf28ef5..4307b5fd7 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -264,7 +264,7 @@ static void rdpsnd_alsa_free(rdpsndDevicePlugin* device) free(alsa); } -static boolean rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) +static BOOL rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) { switch (format->wFormatTag) { diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index e0792e40c..2630796d4 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -80,7 +80,7 @@ static void rdpsnd_pulse_context_state_callback(pa_context* context, void* userd } } -static boolean rdpsnd_pulse_connect(rdpsndDevicePlugin* device) +static BOOL rdpsnd_pulse_connect(rdpsndDevicePlugin* device) { pa_context_state_t state; rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*) device; @@ -365,7 +365,7 @@ static void rdpsnd_pulse_free(rdpsndDevicePlugin* device) free(pulse); } -static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) +static BOOL rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndFormat* format) { rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)device; diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 88528c58d..742626705 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -53,13 +53,13 @@ struct rdpsnd_plugin int n_supported_formats; int current_format; - boolean expectingWave; + BOOL expectingWave; uint8 waveData[4]; uint16 waveDataSize; uint32 wTimeStamp; /* server timestamp */ uint32 wave_timestamp; /* client timestamp */ - boolean is_open; + BOOL is_open; uint32 close_timestamp; uint16 fixed_format; @@ -429,7 +429,7 @@ static void rdpsnd_register_device_plugin(rdpsndPlugin* rdpsnd, rdpsndDevicePlug rdpsnd->device = device; } -static boolean rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, RDP_PLUGIN_DATA* data) +static BOOL rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name, RDP_PLUGIN_DATA* data) { FREERDP_RDPSND_DEVICE_ENTRY_POINTS entryPoints; PFREERDP_RDPSND_DEVICE_ENTRY entry; diff --git a/channels/rdpsnd/client/rdpsnd_main.h b/channels/rdpsnd/client/rdpsnd_main.h index ace7fb8ed..8ea169421 100644 --- a/channels/rdpsnd/client/rdpsnd_main.h +++ b/channels/rdpsnd/client/rdpsnd_main.h @@ -26,7 +26,7 @@ typedef struct rdpsnd_plugin rdpsndPlugin; typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; -typedef boolean (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* format); +typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* format); typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value); diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index 78ee8e913..a3c75ed47 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -60,7 +60,7 @@ typedef struct _rdpsnd_server #define RDPSND_PDU_FINISH(_s) \ { \ - boolean _r; \ + BOOL _r; \ int _pos; \ _pos = stream_get_pos(_s); \ stream_set_pos(_s, 2); \ @@ -71,7 +71,7 @@ typedef struct _rdpsnd_server return _r; \ } -static boolean rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) +static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) { uint16 i; @@ -109,7 +109,7 @@ static boolean rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) RDPSND_PDU_FINISH(s); } -static boolean rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) +static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) { int i; @@ -226,7 +226,7 @@ static void* rdpsnd_server_thread_func(void* arg) return 0; } -static boolean rdpsnd_server_initialize(rdpsnd_server_context* context) +static BOOL rdpsnd_server_initialize(rdpsnd_server_context* context) { rdpsnd_server* rdpsnd = (rdpsnd_server*) context; @@ -297,10 +297,10 @@ static void rdpsnd_server_select_format(rdpsnd_server_context* context, int clie freerdp_dsp_context_reset_adpcm(rdpsnd->dsp_context); } -static boolean rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) +static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) { int size; - boolean r; + BOOL r; uint8* src; int frames; int fill_size; @@ -382,7 +382,7 @@ static boolean rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) return r; } -static boolean rdpsnd_server_send_samples(rdpsnd_server_context* context, const void* buf, int nframes) +static BOOL rdpsnd_server_send_samples(rdpsnd_server_context* context, const void* buf, int nframes) { int cframes; int cframesize; @@ -411,7 +411,7 @@ static boolean rdpsnd_server_send_samples(rdpsnd_server_context* context, const return TRUE; } -static boolean rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, int right) +static BOOL rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, int right) { rdpsnd_server* rdpsnd = (rdpsnd_server*) context; STREAM* s = rdpsnd->rdpsnd_pdu; @@ -424,7 +424,7 @@ static boolean rdpsnd_server_set_volume(rdpsnd_server_context* context, int left RDPSND_PDU_FINISH(s); } -static boolean rdpsnd_server_close(rdpsnd_server_context* context) +static BOOL rdpsnd_server_close(rdpsnd_server_context* context) { rdpsnd_server* rdpsnd = (rdpsnd_server*) context; STREAM* s = rdpsnd->rdpsnd_pdu; diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index fce689b7d..f58522033 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -75,7 +75,7 @@ struct _SERIAL_DEVICE static void serial_abort_single_io(SERIAL_DEVICE* serial, uint32 file_id, uint32 abort_io, uint32 io_status); static void serial_check_for_events(SERIAL_DEVICE* serial); static void serial_handle_async_irp(SERIAL_DEVICE* serial, IRP* irp); -static boolean serial_check_fds(SERIAL_DEVICE* serial); +static BOOL serial_check_fds(SERIAL_DEVICE* serial); static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) { @@ -696,7 +696,7 @@ static void serial_set_fds(SERIAL_DEVICE* serial) } } -static boolean serial_check_fds(SERIAL_DEVICE* serial) +static BOOL serial_check_fds(SERIAL_DEVICE* serial) { if (list_size(serial->pending_irps) == 0) return 1; diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index 693d0d71f..41599d91d 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -75,7 +75,7 @@ static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len); static void tty_set_termios(SERIAL_TTY* tty); -static boolean tty_get_termios(SERIAL_TTY* tty); +static BOOL tty_get_termios(SERIAL_TTY* tty); static int tty_get_error_status(); uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io) @@ -369,7 +369,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, return ret; } -boolean serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length) +BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length) { long timeout = 90; struct termios *ptermios; @@ -418,7 +418,7 @@ boolean serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length) return TRUE; } -boolean serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length) +BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length) { ssize_t r; uint32 event_txempty = Length; @@ -531,10 +531,10 @@ SERIAL_TTY* serial_tty_new(const char* path, uint32 id) return tty; } -boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result) +BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result) { int bytes; - boolean ret = FALSE; + BOOL ret = FALSE; DEBUG_SVC("in"); @@ -628,7 +628,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result) return ret; } -static boolean tty_get_termios(SERIAL_TTY* tty) +static BOOL tty_get_termios(SERIAL_TTY* tty) { speed_t speed; struct termios *ptermios; diff --git a/channels/serial/client/serial_tty.h b/channels/serial/client/serial_tty.h index 94aabcb4f..d2d788cf8 100644 --- a/channels/serial/client/serial_tty.h +++ b/channels/serial/client/serial_tty.h @@ -69,10 +69,10 @@ struct _SERIAL_TTY SERIAL_TTY* serial_tty_new(const char* path, uint32 id); void serial_tty_free(SERIAL_TTY* tty); -boolean serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length); -boolean serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length); +BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length); +BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length); uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io); -boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result); +BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result); #endif /* __SERIAL_TTY_H */ diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index 9a9c359e6..8023c8d7c 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -157,7 +157,7 @@ static COMPLETIONIDINFO* scard_mark_duplicate_id(SCARD_DEVICE* scard, uint32 Com return NULL; /* Either no items in the list or no match. */ } -static boolean scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 CompletionId) +static BOOL scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 CompletionId) { /* * Search from the end of the LIST for one outstanding "CompletionID" @@ -167,7 +167,7 @@ static boolean scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 Complet */ LIST_ITEM* item; COMPLETIONIDINFO* CompletionIdInfo; - boolean duplicate; + BOOL duplicate; for (item = scard->CompletionIds->tail; item; item = item->prev) { @@ -201,7 +201,7 @@ static void scard_irp_complete(IRP* irp) * to be in this file so that "scard_irp_request()" can reference it. */ int pos; - boolean duplicate; + BOOL duplicate; SCARD_DEVICE* scard = (SCARD_DEVICE*)irp->device; DEBUG_SVC("DeviceId %d FileId %d CompletionId %d", irp->device->id, irp->FileId, irp->CompletionId); diff --git a/channels/smartcard/client/scard_main.h b/channels/smartcard/client/scard_main.h index 4d009ddae..4844eeecf 100644 --- a/channels/smartcard/client/scard_main.h +++ b/channels/smartcard/client/scard_main.h @@ -84,7 +84,7 @@ struct _COMPLETIONIDINFO { uint32 ID; /* CompletionID */ - boolean duplicate; /* Indicates whether or not this + BOOL duplicate; /* Indicates whether or not this * CompletionID is a duplicate of an * earlier, outstanding, CompletionID. */ @@ -115,7 +115,7 @@ typedef struct _SCARD_DEVICE SCARD_DEVICE; #define DEBUG_SCARD(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -boolean scard_async_op(IRP*); +BOOL scard_async_op(IRP*); void scard_device_control(SCARD_DEVICE*, IRP*); #endif diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index 1d3318f2e..138676bd6 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -84,7 +84,7 @@ #define WIN_FILE_DEVICE_SMARTCARD 0x00000031 -static uint32 sc_output_string(IRP* irp, char *src, boolean wide) +static uint32 sc_output_string(IRP* irp, char *src, BOOL wide) { uint8* p; uint32 len; @@ -179,7 +179,7 @@ static void sc_output_buffer_start(IRP *irp, int length) sc_output_buffer_start_limit(irp, length, 0x7FFFFFFF); } -static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, boolean wide) +static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, BOOL wide) { char* buffer; int bufferSize; @@ -215,7 +215,7 @@ static void sc_input_repos(IRP* irp, uint32 read) stream_seek(irp->input, add); } -static void sc_input_reader_name(IRP* irp, char **dest, boolean wide) +static void sc_input_reader_name(IRP* irp, char **dest, BOOL wide) { uint32 dataLength; @@ -330,7 +330,7 @@ static uint32 handle_IsValidContext(IRP* irp) return rv; } -static uint32 handle_ListReaders(IRP* irp, boolean wide) +static uint32 handle_ListReaders(IRP* irp, BOOL wide) { uint32 len, rv; SCARDCONTEXT hContext; @@ -415,7 +415,7 @@ static uint32 handle_ListReaders(IRP* irp, boolean wide) return rv; } -static uint32 handle_GetStatusChange(IRP* irp, boolean wide) +static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) { LONG rv; SCARDCONTEXT hContext; @@ -546,7 +546,7 @@ static uint32 handle_Cancel(IRP *irp) return rv; } -static uint32 handle_Connect(IRP* irp, boolean wide) +static uint32 handle_Connect(IRP* irp, BOOL wide) { LONG rv; SCARDCONTEXT hContext; @@ -771,7 +771,7 @@ static uint32 handle_State(IRP* irp) return rv; } -static DWORD handle_Status(IRP *irp, boolean wide) +static DWORD handle_Status(IRP *irp, BOOL wide) { LONG rv; SCARDHANDLE hCard; @@ -1195,7 +1195,7 @@ typedef struct _SERVER_SCARD_ATRMASK } SERVER_SCARD_ATRMASK; -static uint32 handle_LocateCardsByATR(IRP* irp, boolean wide) +static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) { LONG rv; int i, j, k; @@ -1287,7 +1287,7 @@ static uint32 handle_LocateCardsByATR(IRP* irp, boolean wide) { for (j = 0, rsCur = readerStates; j < readerCount; j++, rsCur++) { - boolean equal = 1; + BOOL equal = 1; for (k = 0; k < cur->cbAtr; k++) { if ((curAtr->rgbAtr[k] & curAtr->rgbMask[k]) != @@ -1327,7 +1327,7 @@ static uint32 handle_LocateCardsByATR(IRP* irp, boolean wide) return rv; } -boolean scard_async_op(IRP* irp) +BOOL scard_async_op(IRP* irp) { uint32 ioctl_code; diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index 52906459d..4dcaa2450 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -48,7 +48,7 @@ typedef struct _TSMFALSAAudioDevice FREERDP_DSP_CONTEXT* dsp_context; } TSMFALSAAudioDevice; -static boolean tsmf_alsa_open_device(TSMFALSAAudioDevice* alsa) +static BOOL tsmf_alsa_open_device(TSMFALSAAudioDevice* alsa) { int error; @@ -63,7 +63,7 @@ static boolean tsmf_alsa_open_device(TSMFALSAAudioDevice* alsa) return TRUE; } -static boolean tsmf_alsa_open(ITSMFAudioDevice* audio, const char* device) +static BOOL tsmf_alsa_open(ITSMFAudioDevice* audio, const char* device) { TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio; @@ -80,7 +80,7 @@ static boolean tsmf_alsa_open(ITSMFAudioDevice* audio, const char* device) return tsmf_alsa_open_device(alsa); } -static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio, +static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample) { int error; @@ -147,7 +147,7 @@ static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio, return TRUE; } -static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) +static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) { int len; int error; diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index 3ad6268ad..6590f375d 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -55,7 +55,7 @@ typedef struct _TSMFFFmpegDecoder uint32 decoded_size_max; } TSMFFFmpegDecoder; -static boolean tsmf_ffmpeg_init_context(ITSMFDecoder* decoder) +static BOOL tsmf_ffmpeg_init_context(ITSMFDecoder* decoder) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -69,7 +69,7 @@ static boolean tsmf_ffmpeg_init_context(ITSMFDecoder* decoder) return TRUE; } -static boolean tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) +static BOOL tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -84,7 +84,7 @@ static boolean tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_ return TRUE; } -static boolean tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) +static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -106,7 +106,7 @@ static boolean tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_ return TRUE; } -static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) +static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; uint32 size; @@ -175,7 +175,7 @@ static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_ return TRUE; } -static boolean tsmf_ffmpeg_prepare(ITSMFDecoder* decoder) +static BOOL tsmf_ffmpeg_prepare(ITSMFDecoder* decoder) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -190,7 +190,7 @@ static boolean tsmf_ffmpeg_prepare(ITSMFDecoder* decoder) return TRUE; } -static boolean tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type) +static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -260,13 +260,13 @@ static boolean tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m return TRUE; } -static boolean tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int decoded; int len; AVFrame* frame; - boolean ret = TRUE; + BOOL 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); @@ -319,7 +319,7 @@ static boolean tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data return ret; } -static boolean tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int len; @@ -419,7 +419,7 @@ static boolean tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data return TRUE; } -static boolean tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -470,7 +470,7 @@ static uint32 tsmf_ffmpeg_get_decoded_format(ITSMFDecoder* decoder) } } -static boolean tsmf_ffmpeg_get_decoded_dimension(ITSMFDecoder* decoder, uint32* width, uint32* height) +static BOOL tsmf_ffmpeg_get_decoded_dimension(ITSMFDecoder* decoder, uint32* width, uint32* height) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -505,7 +505,7 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder) free(decoder); } -static boolean initialized = FALSE; +static BOOL initialized = FALSE; ITSMFDecoder* TSMFDecoderEntry(void) diff --git a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c index 9f110039d..caf476657 100644 --- a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c +++ b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c @@ -69,7 +69,7 @@ typedef struct _TSMFGstreamerDecoder GstElement *outsink; GstElement *aVolume; - boolean paused; + BOOL paused; uint64 last_sample_end_time; Display *disp; @@ -319,7 +319,7 @@ static int tsmf_gstreamer_pipeline_set_state(TSMFGstreamerDecoder * mdecoder, Gs return 0; } -static boolean tsmf_gstreamer_set_format(ITSMFDecoder * decoder, TS_AM_MEDIA_TYPE * media_type) +static BOOL tsmf_gstreamer_set_format(ITSMFDecoder * decoder, TS_AM_MEDIA_TYPE * media_type) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) @@ -680,7 +680,7 @@ static void tsmf_gstreamer_pipeline_send_end_of_stream(TSMFGstreamerDecoder * md #ifdef __arm__ /* code from TI to check whether OMX is being lock or not */ -static boolean tsmf_gstreamer_pipeline_omx_available() +static BOOL tsmf_gstreamer_pipeline_omx_available() { bool ret = TRUE; int shm_fd = 0; @@ -772,7 +772,7 @@ static void tsmf_gstreamer_clean_up(TSMFGstreamerDecoder * mdecoder) } -static boolean tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) +static BOOL tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) { if (!mdecoder) return FALSE; @@ -1036,7 +1036,7 @@ static boolean tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) out_pad = gst_element_get_static_pad(mdecoder->outconv, "sink"); - gboolean linkResult = FALSE; + gBOOL linkResult = FALSE; gst_bin_add(GST_BIN(mdecoder->outbin), mdecoder->outconv); gst_bin_add(GST_BIN(mdecoder->outbin), mdecoder->outsink); if (mdecoder->aVolume) @@ -1094,7 +1094,7 @@ static boolean tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) return TRUE; } -static boolean tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions, +static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions, uint64 start_time, uint64 end_time, uint64 duration) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index d4ba6e6b2..f4c91028f 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -67,7 +67,7 @@ static void tsmf_pulse_context_state_callback(pa_context* context, void* userdat } } -static boolean tsmf_pulse_connect(TSMFPulseAudioDevice* pulse) +static BOOL tsmf_pulse_connect(TSMFPulseAudioDevice* pulse) { pa_context_state_t state; @@ -114,7 +114,7 @@ static boolean tsmf_pulse_connect(TSMFPulseAudioDevice* pulse) } } -static boolean tsmf_pulse_open(ITSMFAudioDevice* audio, const char* device) +static BOOL tsmf_pulse_open(ITSMFAudioDevice* audio, const char* device) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; @@ -198,7 +198,7 @@ static void tsmf_pulse_stream_request_callback(pa_stream* stream, size_t length, pa_threaded_mainloop_signal(pulse->mainloop, 0); } -static boolean tsmf_pulse_close_stream(TSMFPulseAudioDevice* pulse) +static BOOL tsmf_pulse_close_stream(TSMFPulseAudioDevice* pulse) { if (!pulse->context || !pulse->stream) return FALSE; @@ -217,7 +217,7 @@ static boolean tsmf_pulse_close_stream(TSMFPulseAudioDevice* pulse) return TRUE; } -static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) +static BOOL tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) { pa_stream_state_t state; pa_buffer_attr buffer_attr = { 0 }; @@ -283,7 +283,7 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) } } -static boolean tsmf_pulse_set_format(ITSMFAudioDevice* audio, +static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; @@ -298,7 +298,7 @@ static boolean tsmf_pulse_set_format(ITSMFAudioDevice* audio, return tsmf_pulse_open_stream(pulse); } -static boolean tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) +static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; uint8* src; diff --git a/channels/tsmf/client/tsmf_audio.h b/channels/tsmf/client/tsmf_audio.h index ec8c04bcd..302053666 100644 --- a/channels/tsmf/client/tsmf_audio.h +++ b/channels/tsmf/client/tsmf_audio.h @@ -27,11 +27,11 @@ typedef struct _ITSMFAudioDevice ITSMFAudioDevice; struct _ITSMFAudioDevice { /* Open the audio device. */ - boolean (*Open) (ITSMFAudioDevice* audio, const char* device); + BOOL (*Open) (ITSMFAudioDevice* audio, const char* device); /* Set the audio data format. */ - boolean (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample); + BOOL (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample); /* Play audio data. */ - boolean (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size); + BOOL (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size); /* Get the latency of the last written sample, in 100ns */ uint64 (*GetLatency) (ITSMFAudioDevice* audio); /* Change the playback volume level */ diff --git a/channels/tsmf/client/tsmf_codec.c b/channels/tsmf/client/tsmf_codec.c index a45c41298..2a416ab28 100644 --- a/channels/tsmf/client/tsmf_codec.c +++ b/channels/tsmf/client/tsmf_codec.c @@ -284,7 +284,7 @@ static void tsmf_print_guid(const uint8* guid) } /* http://msdn.microsoft.com/en-us/library/dd318229.aspx */ -static uint32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s, boolean bypass) +static uint32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s, BOOL bypass) { uint32 biSize; uint32 biWidth; @@ -367,11 +367,11 @@ typedef struct tagVIDEOINFOHEADER { return 48; } -boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) +BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) { int i; uint32 cbFormat; - boolean ret = TRUE; + BOOL ret = TRUE; memset(mediatype, 0, sizeof(TS_AM_MEDIA_TYPE)); @@ -514,10 +514,10 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) return ret; } -boolean tsmf_codec_check_media_type(STREAM* s) +BOOL tsmf_codec_check_media_type(STREAM* s) { uint8* m; - boolean ret; + BOOL ret; TS_AM_MEDIA_TYPE mediatype; stream_get_mark(s, m); diff --git a/channels/tsmf/client/tsmf_codec.h b/channels/tsmf/client/tsmf_codec.h index 291aa97d4..b00c0895f 100644 --- a/channels/tsmf/client/tsmf_codec.h +++ b/channels/tsmf/client/tsmf_codec.h @@ -22,8 +22,8 @@ #include "tsmf_types.h" -boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s); -boolean tsmf_codec_check_media_type(STREAM* s); +BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s); +BOOL tsmf_codec_check_media_type(STREAM* s); #endif diff --git a/channels/tsmf/client/tsmf_decoder.h b/channels/tsmf/client/tsmf_decoder.h index 96c7353ae..d9d0cbe59 100644 --- a/channels/tsmf/client/tsmf_decoder.h +++ b/channels/tsmf/client/tsmf_decoder.h @@ -36,15 +36,15 @@ typedef struct _ITSMFDecoder ITSMFDecoder; struct _ITSMFDecoder { /* Set the decoder format. Return true if supported. */ - boolean (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type); + BOOL (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type); /* Decode a sample. */ - boolean (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions); + BOOL (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions); /* Get the decoded data */ uint8* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size); /* Get the pixel format of decoded video frame */ uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder); /* Get the width and height of decoded video frame */ - boolean (*GetDecodedDimension) (ITSMFDecoder* decoder, uint32* width, uint32* height); + BOOL (*GetDecodedDimension) (ITSMFDecoder* decoder, uint32* width, uint32* height); /* Free the decoder */ void (*Free) (ITSMFDecoder * decoder); /* Optional Contol function */ diff --git a/channels/tsmf/client/tsmf_ifman.h b/channels/tsmf/client/tsmf_ifman.h index 416276427..55108ed84 100644 --- a/channels/tsmf/client/tsmf_ifman.h +++ b/channels/tsmf/client/tsmf_ifman.h @@ -34,7 +34,7 @@ struct _TSMF_IFMAN STREAM* input; uint32 input_size; STREAM* output; - boolean output_pending; + BOOL output_pending; uint32 output_interface_id; }; diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index 3b038e7e4..a94dbe71a 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -96,7 +96,7 @@ void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback, stream_free(s); } -boolean tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, +BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, RDP_EVENT* event) { int error; diff --git a/channels/tsmf/client/tsmf_main.h b/channels/tsmf/client/tsmf_main.h index 8a4d7e33f..892992cbc 100644 --- a/channels/tsmf/client/tsmf_main.h +++ b/channels/tsmf/client/tsmf_main.h @@ -22,7 +22,7 @@ void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback, uint32 message_id, uint64 duration, uint32 data_size); -boolean tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, +BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, RDP_EVENT* event); #endif diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index a1d7f1b56..3e77c42ae 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -154,7 +154,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; + BOOL pending = FALSE; TSMF_PRESENTATION* presentation = stream->presentation; if (list_size(stream->sample_list) == 0) @@ -455,7 +455,7 @@ static void tsmf_sample_playback_audio(TSMF_SAMPLE* sample) static void tsmf_sample_playback(TSMF_SAMPLE* sample) { - boolean ret = FALSE; + BOOL ret = FALSE; uint32 width; uint32 height; uint32 pixfmt = 0; diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index 986afe8c7..2dd75c787 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -1031,7 +1031,7 @@ static int urbdrc_load_udevman_plugin(IWTSPlugin* pPlugin, const char* name, RDP static int urbdrc_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data) { - boolean ret; + BOOL ret; if (data->data[0] && (strcmp((char*)data->data[0], "urbdrc") == 0 || strstr((char*) data->data[0], "/urbdrc.") != NULL)) { diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index 9000aef1e..d0d54c4ff 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -154,7 +154,7 @@ void df_keyboard_init() } -void df_send_mouse_button_event(rdpInput* input, boolean down, uint32 button, uint16 x, uint16 y) +void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint16 x, uint16 y) { uint16 flags; @@ -188,7 +188,7 @@ void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16 input->MouseEvent(input, flags, x, y); } -void df_send_keyboard_event(rdpInput* input, boolean down, uint8 keycode, uint8 function) +void df_send_keyboard_event(rdpInput* input, BOOL down, uint8 keycode, uint8 function) { uint8 vkcode; RDP_SCANCODE rdp_scancode; @@ -205,7 +205,7 @@ void df_send_keyboard_event(rdpInput* input, boolean down, uint8 keycode, uint8 freerdp_input_send_keyboard_event_ex(input, down, rdp_scancode); } -boolean df_event_process(freerdp* instance, DFBEvent* event) +BOOL df_event_process(freerdp* instance, DFBEvent* event) { int flags; rdpGdi* gdi; diff --git a/client/DirectFB/df_event.h b/client/DirectFB/df_event.h index e55d6c61f..02ad95625 100644 --- a/client/DirectFB/df_event.h +++ b/client/DirectFB/df_event.h @@ -23,6 +23,6 @@ #include "dfreerdp.h" void df_keyboard_init(); -boolean df_event_process(freerdp* instance, DFBEvent* event); +BOOL df_event_process(freerdp* instance, DFBEvent* event); #endif /* __DF_EVENT_H */ diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index 10b25327d..2328c9748 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -85,7 +85,7 @@ void df_end_paint(rdpContext* context) dfi->primary->Blit(dfi->primary, dfi->surface, &(dfi->update_rect), dfi->update_rect.x, dfi->update_rect.y); } -boolean df_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) +BOOL df_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) { dfInfo* dfi; @@ -97,7 +97,7 @@ boolean df_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int return TRUE; } -boolean df_check_fds(freerdp* instance, fd_set* set) +BOOL df_check_fds(freerdp* instance, fd_set* set) { dfInfo* dfi; @@ -112,10 +112,10 @@ boolean df_check_fds(freerdp* instance, fd_set* set) return TRUE; } -boolean df_pre_connect(freerdp* instance) +BOOL df_pre_connect(freerdp* instance) { dfInfo* dfi; - boolean bitmap_cache; + BOOL bitmap_cache; dfContext* context; rdpSettings* settings; @@ -164,7 +164,7 @@ boolean df_pre_connect(freerdp* instance) return TRUE; } -boolean df_post_connect(freerdp* instance) +BOOL df_post_connect(freerdp* instance) { rdpGdi* gdi; dfInfo* dfi; @@ -231,7 +231,7 @@ static int df_process_plugin_args(rdpSettings* settings, const char* name, return 1; } -boolean df_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) +BOOL df_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) { printf("Certificate details:\n"); printf("\tSubject: %s\n", subject); diff --git a/client/Mac/MRDPRailView.h b/client/Mac/MRDPRailView.h index 68b6f1256..48a849db3 100644 --- a/client/Mac/MRDPRailView.h +++ b/client/Mac/MRDPRailView.h @@ -11,9 +11,9 @@ NSBitmapImageRep * bmiRep; NSPoint savedDragLocation; char * pixelData; - boolean mouseInClientArea; - boolean titleBarClicked; - boolean gestureEventInProgress; + BOOL mouseInClientArea; + BOOL titleBarClicked; + BOOL gestureEventInProgress; int width; int height; int savedWindowId; @@ -31,15 +31,15 @@ int kdcapslock; @public - boolean isMoveSizeInProgress; - boolean saveInitialDragLoc; - boolean skipMoveWindowOnce; + BOOL isMoveSizeInProgress; + BOOL saveInitialDragLoc; + BOOL skipMoveWindowOnce; int localMoveType; } @property (assign) MRDPRailWindow * mrdpRailWindow; @property (assign) int windowIndex; -@property (assign) boolean activateWindow; +@property (assign) BOOL activateWindow; - (void) windowDidMove:(NSNotification *) notification; - (void) updateDisplay; diff --git a/client/Mac/MRDPRailView.m b/client/Mac/MRDPRailView.m index 69e08200b..16f6f66c1 100644 --- a/client/Mac/MRDPRailView.m +++ b/client/Mac/MRDPRailView.m @@ -18,7 +18,7 @@ extern struct kkey g_keys[]; - (void) updateDisplay { - boolean moveWindow = NO; + BOOL moveWindow = NO; NSRect srcRectOuter; NSRect destRectOuter; diff --git a/client/Mac/MRDPView.h b/client/Mac/MRDPView.h index 46c281399..88e094cb1 100644 --- a/client/Mac/MRDPView.h +++ b/client/Mac/MRDPView.h @@ -43,13 +43,13 @@ // RAIL stuff MRDPWindow *currentWindow; NSPoint savedDragLocation; - boolean mouseInClientArea; - boolean isRemoteApp; - boolean firstCreateWindow; - boolean isMoveSizeInProgress; - boolean skipResizeOnce; - boolean saveInitialDragLoc; - boolean skipMoveWindowOnce; + BOOL mouseInClientArea; + BOOL isRemoteApp; + BOOL firstCreateWindow; + BOOL isMoveSizeInProgress; + BOOL skipResizeOnce; + BOOL saveInitialDragLoc; + BOOL skipMoveWindowOnce; // store state info for some keys int kdlshift; @@ -99,8 +99,8 @@ void pointer_set(rdpContext* context, rdpPointer* pointer); void pointer_setNull(rdpContext* context); void pointer_setDefault(rdpContext* context); int rdp_connect(); -boolean mac_pre_connect(freerdp *inst); -boolean mac_post_connect(freerdp *inst); +BOOL mac_pre_connect(freerdp *inst); +BOOL mac_post_connect(freerdp *inst); void mac_context_new(freerdp *inst, rdpContext *context); void mac_context_free(freerdp *inst, rdpContext *context); void mac_set_bounds(rdpContext *context, rdpBounds *bounds); diff --git a/client/Mac/MRDPView.m b/client/Mac/MRDPView.m index 289d644e4..f3ea097d2 100644 --- a/client/Mac/MRDPView.m +++ b/client/Mac/MRDPView.m @@ -1014,7 +1014,7 @@ int rdp_connect() * @return true if successful. false otherwise. ************************************************************************/ -boolean mac_pre_connect(freerdp *inst) +BOOL mac_pre_connect(freerdp *inst) { char *cptr; int len; @@ -1174,7 +1174,7 @@ boolean mac_pre_connect(freerdp *inst) // in order to achieve this, we need to modify the cmd line args entered by the user; if (g_mrdpview->isRemoteApp) { - boolean gotGeometry = NO; + BOOL gotGeometry = NO; // get dimensions of screen that has keyboard focus; // we use these dimensions when connecting to RDP server @@ -1238,7 +1238,7 @@ boolean mac_pre_connect(freerdp *inst) * ************************************************************************/ -boolean mac_post_connect(freerdp *inst) +BOOL mac_post_connect(freerdp *inst) { uint32 flags; rdpPointer rdp_pointer; @@ -1915,9 +1915,9 @@ void mac_process_rail_event(freerdp *inst, RDP_EVENT *event) void mac_rail_CreateWindow(rdpRail *rail, rdpWindow *window) { - boolean centerWindow = NO; - boolean moveWindow = NO; - boolean displayAsModal = NO; + BOOL centerWindow = NO; + BOOL moveWindow = NO; + BOOL displayAsModal = NO; NSMutableArray * ma = g_mrdpview->windows; // make sure window fits resolution diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 919a92655..3eefeb07b 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -144,7 +144,7 @@ void tf_process_channel_event(rdpChannels* channels, freerdp* instance) } } -boolean tf_pre_connect(freerdp* instance) +BOOL tf_pre_connect(freerdp* instance) { tfInfo* tfi; tfContext* context; @@ -184,7 +184,7 @@ boolean tf_pre_connect(freerdp* instance) return TRUE; } -boolean tf_post_connect(freerdp* instance) +BOOL tf_post_connect(freerdp* instance) { rdpGdi* gdi; diff --git a/client/Windows/wf_cliprdr.c b/client/Windows/wf_cliprdr.c index 6da40f7ae..470429c0d 100644 --- a/client/Windows/wf_cliprdr.c +++ b/client/Windows/wf_cliprdr.c @@ -83,22 +83,22 @@ void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event) } } -boolean wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +BOOL wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return TRUE; } -boolean wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +BOOL wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return TRUE; } -boolean wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +BOOL wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return TRUE; } -boolean wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +BOOL wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { return TRUE; } diff --git a/client/Windows/wf_cliprdr.h b/client/Windows/wf_cliprdr.h index 5e1398cf0..484c6dccf 100644 --- a/client/Windows/wf_cliprdr.h +++ b/client/Windows/wf_cliprdr.h @@ -24,10 +24,10 @@ void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman); void wf_cliprdr_uninit(wfInfo* wfi); void wf_process_cliprdr_event(wfInfo* wfi, RDP_EVENT* event); -boolean wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -boolean wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -boolean wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -boolean wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL wf_cliprdr_process_selection_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL wf_cliprdr_process_selection_request(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL wf_cliprdr_process_selection_clear(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); +BOOL wf_cliprdr_process_property_notify(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); void wf_cliprdr_check_owner(wfInfo* wfi); #endif /* __WF_CLIPRDR_H */ diff --git a/client/Windows/wf_event.c b/client/Windows/wf_event.c index e96816092..2f9c5142b 100644 --- a/client/Windows/wf_event.c +++ b/client/Windows/wf_event.c @@ -127,7 +127,7 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam int x, y, w, h; PAINTSTRUCT ps; rdpInput* input; - boolean processed; + BOOL processed; processed = TRUE; ptr = GetWindowLongPtr(hWnd, GWLP_USERDATA); diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index 537252b0d..76bd92c93 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -59,7 +59,7 @@ const uint8 wf_rop2_table[] = R2_WHITE, /* 1 */ }; -boolean wf_set_rop2(HDC hdc, int rop2) +BOOL wf_set_rop2(HDC hdc, int rop2) { if ((rop2 < 0x01) || (rop2 > 0x10)) { diff --git a/client/Windows/wf_graphics.c b/client/Windows/wf_graphics.c index 3cce037fd..650002885 100644 --- a/client/Windows/wf_graphics.c +++ b/client/Windows/wf_graphics.c @@ -143,7 +143,7 @@ void wf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) } void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, boolean compressed, int codec_id) + uint8* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id) { uint16 size; @@ -156,7 +156,7 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, if (compressed) { - boolean status; + BOOL status; status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp); @@ -175,7 +175,7 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, bitmap->bpp = bpp; } -void wf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, boolean primary) +void wf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) { wfInfo* wfi = ((wfContext*) context)->wfi; diff --git a/client/Windows/wf_rail.c b/client/Windows/wf_rail.c index 618110a70..0c383b3ed 100644 --- a/client/Windows/wf_rail.c +++ b/client/Windows/wf_rail.c @@ -41,7 +41,7 @@ void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 com { } -void wf_rail_send_activate(wfInfo* wfi, HWND window, boolean enabled) +void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled) { } diff --git a/client/Windows/wf_rail.h b/client/Windows/wf_rail.h index 2441c4c17..053b27c61 100644 --- a/client/Windows/wf_rail.h +++ b/client/Windows/wf_rail.h @@ -24,7 +24,7 @@ void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail); void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command); -void wf_rail_send_activate(wfInfo* wfi, HWND window, boolean enabled); +void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled); void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event); void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window); void wf_rail_end_local_move(wfInfo* wfi, rdpWindow *window); diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index 1b8624465..5686b5d30 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -139,7 +139,7 @@ void wf_hw_end_paint(rdpContext* context) } -boolean wf_pre_connect(freerdp* instance) +BOOL wf_pre_connect(freerdp* instance) { int i1; wfInfo* wfi; @@ -262,7 +262,7 @@ uint32 wfi_detect_cpu() return cpu_opt; } -boolean wf_post_connect(freerdp* instance) +BOOL wf_post_connect(freerdp* instance) { rdpGdi* gdi; wfInfo* wfi; @@ -395,7 +395,7 @@ boolean wf_post_connect(freerdp* instance) return TRUE; } -boolean wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) +BOOL wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) { #if 0 DWORD mode; @@ -441,12 +441,12 @@ void wf_process_channel_event(rdpChannels* channels, freerdp* instance) freerdp_event_free(event); } -boolean wf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) +BOOL wf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) { return TRUE; } -boolean wf_check_fds(freerdp* instance) +BOOL wf_check_fds(freerdp* instance) { return TRUE; } diff --git a/client/Windows/wfreerdp.h b/client/Windows/wfreerdp.h index 7827b2273..73875478e 100644 --- a/client/Windows/wfreerdp.h +++ b/client/Windows/wfreerdp.h @@ -88,7 +88,7 @@ struct wf_info RFX_CONTEXT* rfx_context; NSC_CONTEXT* nsc_context; - boolean sw_gdi; + BOOL sw_gdi; }; #endif diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 95afe041b..7e140daaf 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -65,11 +65,11 @@ struct clipboard_context /* client->server data */ Window owner; int request_index; - boolean sync; + BOOL sync; /* INCR mechanism */ Atom incr_atom; - boolean incr_starts; + BOOL incr_starts; uint8* incr_data; int incr_data_length; }; @@ -230,7 +230,7 @@ static void be2le(uint8* data, int size) } } -static boolean xf_cliprdr_is_self_owned(xfInfo* xfi) +static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi) { Atom type; uint32 id = 0; @@ -638,7 +638,7 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size) return outbuf; } -static void xf_cliprdr_process_requested_data(xfInfo* xfi, boolean has_data, uint8* data, int size) +static void xf_cliprdr_process_requested_data(xfInfo* xfi, BOOL has_data, uint8* data, int size) { uint8* outbuf; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -691,12 +691,12 @@ static void xf_cliprdr_process_requested_data(xfInfo* xfi, boolean has_data, uin xf_cliprdr_send_format_list(xfi); } -static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) +static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) { Atom type; int format; uint8* data = NULL; - boolean has_data = FALSE; + BOOL has_data = FALSE; unsigned long length, bytes_left, dummy; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -1039,7 +1039,7 @@ void xf_process_cliprdr_event(xfInfo* xfi, RDP_EVENT* event) } } -boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent) +BOOL xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent) { clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -1063,7 +1063,7 @@ boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent) } } -boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) +BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) { int i; int fmt; @@ -1072,7 +1072,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) XEvent* respond; uint32 alt_format; uint8* data = NULL; - boolean delay_respond; + BOOL delay_respond; unsigned long length, bytes_left; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -1174,7 +1174,7 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) return TRUE; } -boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent) +BOOL xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent) { clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -1186,7 +1186,7 @@ boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent) return TRUE; } -boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent) +BOOL xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent) { clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; diff --git a/client/X11/xf_cliprdr.h b/client/X11/xf_cliprdr.h index 3ad729e93..f5ec699b2 100644 --- a/client/X11/xf_cliprdr.h +++ b/client/X11/xf_cliprdr.h @@ -25,10 +25,10 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman); void xf_cliprdr_uninit(xfInfo* xfi); void xf_process_cliprdr_event(xfInfo* xfi, RDP_EVENT* event); -boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent); -boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent); -boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent); -boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent); +BOOL xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent); +BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent); +BOOL xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent); +BOOL xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent); void xf_cliprdr_check_owner(xfInfo* xfi); #ifdef WITH_DEBUG_X11_CLIPRDR diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index f2b4094eb..247ee783c 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -73,7 +73,7 @@ static const char* const X11_EVENT_STRINGS[] = }; #endif -static boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_Expose(xfInfo* xfi, XEvent* event, BOOL app) { int x, y; int w, h; @@ -105,13 +105,13 @@ static boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_VisibilityNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_VisibilityNotify(xfInfo* xfi, XEvent* event, BOOL app) { xfi->unobscured = event->xvisibility.state == VisibilityUnobscured; return TRUE; } -static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_MotionNotify(xfInfo* xfi, XEvent* event, BOOL app) { rdpInput* input; int x, y; @@ -150,13 +150,13 @@ static boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_ButtonPress(xfInfo* xfi, XEvent* event, BOOL app) { int x, y; int flags; Window childWindow; - boolean wheel; - boolean extended; + BOOL wheel; + BOOL extended; rdpInput* input; input = xfi->instance->input; @@ -253,12 +253,12 @@ static boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, BOOL app) { int x, y; int flags; Window childWindow; - boolean extended; + BOOL extended; rdpInput* input; input = xfi->instance->input; @@ -335,7 +335,7 @@ static boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_KeyPress(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_KeyPress(xfInfo* xfi, XEvent* event, BOOL app) { KeySym keysym; char str[256]; @@ -352,7 +352,7 @@ static boolean xf_event_KeyPress(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_KeyRelease(xfInfo* xfi, XEvent* event, BOOL app) { XEvent next_event; @@ -374,7 +374,7 @@ static boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_FocusIn(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_FocusIn(xfInfo* xfi, XEvent* event, BOOL app) { if (event->xfocus.mode == NotifyGrab) return TRUE; @@ -405,7 +405,7 @@ static boolean xf_event_FocusIn(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_FocusOut(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_FocusOut(xfInfo* xfi, XEvent* event, BOOL app) { if (event->xfocus.mode == NotifyUngrab) return TRUE; @@ -423,7 +423,7 @@ static boolean xf_event_FocusOut(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_MappingNotify(xfInfo* xfi, XEvent* event, BOOL app) { if (event->xmapping.request == MappingModifier) { @@ -434,7 +434,7 @@ static boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_ClientMessage(xfInfo* xfi, XEvent* event, BOOL app) { if ((event->xclient.message_type == xfi->WM_PROTOCOLS) && ((Atom) event->xclient.data.l[0] == xfi->WM_DELETE_WINDOW)) @@ -464,7 +464,7 @@ static boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_EnterNotify(xfInfo* xfi, XEvent* event, BOOL app) { if (app != TRUE) { @@ -495,7 +495,7 @@ static boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_LeaveNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_LeaveNotify(xfInfo* xfi, XEvent* event, BOOL app) { if (app != TRUE) { @@ -506,7 +506,7 @@ static boolean xf_event_LeaveNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, BOOL app) { rdpWindow* window; rdpRail* rail = ((rdpContext*) xfi->context)->rail; @@ -564,7 +564,7 @@ static boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app) return True; } -static boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_MapNotify(xfInfo* xfi, XEvent* event, BOOL app) { RECTANGLE_16 rect; rdpWindow* window; @@ -602,7 +602,7 @@ static boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, BOOL app) { rdpWindow* window; rdpUpdate* update = xfi->instance->update; @@ -632,7 +632,7 @@ static boolean xf_event_UnmapNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, BOOL app) { if (app != TRUE) { @@ -643,7 +643,7 @@ static boolean xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, BOOL app) { if (app != TRUE) { @@ -654,7 +654,7 @@ static boolean xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, boolean app return TRUE; } -static boolean xf_event_SelectionClear(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_SelectionClear(xfInfo* xfi, XEvent* event, BOOL app) { if (app != TRUE) { @@ -665,7 +665,7 @@ static boolean xf_event_SelectionClear(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) +static BOOL xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, BOOL app) { //This section handles sending the appropriate commands to the rail server //when the window has been minimized, maximized, restored locally @@ -683,10 +683,10 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) if ((((Atom)event->xproperty.atom == xfi->_NET_WM_STATE) && (event->xproperty.state != PropertyDelete)) || (((Atom)event->xproperty.atom == xfi->WM_STATE) && (event->xproperty.state != PropertyDelete))) { - boolean status; - boolean maxVert = FALSE; - boolean maxHorz = FALSE; - boolean minimized = FALSE; + BOOL status; + BOOL maxVert = FALSE; + BOOL maxHorz = FALSE; + BOOL minimized = FALSE; unsigned long nitems; unsigned long bytes; unsigned char* prop; @@ -765,7 +765,7 @@ static boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app) return TRUE; } -static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event) +static BOOL xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event) { if (! xfi->remote_app) return FALSE; @@ -850,9 +850,9 @@ static boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*e } -boolean xf_event_process(freerdp* instance, XEvent* event) +BOOL xf_event_process(freerdp* instance, XEvent* event) { - boolean status = TRUE; + BOOL status = TRUE; xfInfo* xfi = ((xfContext*) instance->context)->xfi; rdpRail* rail = ((rdpContext*) xfi->context)->rail; rdpWindow* window; diff --git a/client/X11/xf_event.h b/client/X11/xf_event.h index b35541432..f0ef8da57 100644 --- a/client/X11/xf_event.h +++ b/client/X11/xf_event.h @@ -24,7 +24,7 @@ #include "xfreerdp.h" -boolean xf_event_process(freerdp* instance, XEvent* event); +BOOL xf_event_process(freerdp* instance, XEvent* event); void xf_event_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...); #endif /* __XF_EVENT_H */ diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 711850d37..0a457fc35 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -55,7 +55,7 @@ static const uint8 xf_rop2_table[] = GXset /* 1 */ }; -boolean xf_set_rop2(xfInfo* xfi, int rop2) +BOOL xf_set_rop2(xfInfo* xfi, int rop2) { if ((rop2 < 0x01) || (rop2 > 0x10)) { @@ -67,7 +67,7 @@ boolean xf_set_rop2(xfInfo* xfi, int rop2) return TRUE; } -boolean xf_set_rop3(xfInfo* xfi, int rop3) +BOOL xf_set_rop3(xfInfo* xfi, int rop3) { int function = -1; diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index e51563ef0..5c3fa2128 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -113,7 +113,7 @@ void xf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, uint8* data, int width, int height, int bpp, int length, - boolean compressed, int codec_id) + BOOL compressed, int codec_id) { uint16 size; RFX_MESSAGE* msg; @@ -122,7 +122,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, int yindex; int xindex; xfInfo* xfi; - boolean status; + BOOL status; size = width * height * (bpp + 7) / 8; @@ -189,7 +189,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, bitmap->bpp = bpp; } -void xf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, boolean primary) +void xf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) { xfInfo* xfi = ((xfContext*) context)->xfi; diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 175d5ff9d..52d6e638f 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -40,7 +40,7 @@ void xf_kbd_init(xfInfo* xfi) void xf_kbd_clear(xfInfo* xfi) { - memset(xfi->pressed_keys, 0, 256 * sizeof(boolean)); + memset(xfi->pressed_keys, 0, 256 * sizeof(BOOL)); } void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym) @@ -75,13 +75,13 @@ void xf_kbd_release_all_keypress(xfInfo* xfi) } } -boolean xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym) +BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym) { KeyCode keycode = XKeysymToKeycode(xfi->display, keysym); return (xfi->pressed_keys[keycode] == keysym); } -void xf_kbd_send_key(xfInfo* xfi, boolean down, uint8 keycode) +void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode) { RDP_SCANCODE rdp_scancode; rdpInput* input; @@ -137,7 +137,7 @@ int xf_kbd_read_keyboard_state(xfInfo* xfi) return state; } -boolean xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym) +BOOL xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym) { int offset; int modifierpos, key, keysymMask = 0; @@ -194,7 +194,7 @@ void xf_kbd_focus_in(xfInfo* xfi) input->SynchronizeEvent(input, syncFlags); } -boolean xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) +BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym) { if (keysym == XK_Return) { diff --git a/client/X11/xf_keyboard.h b/client/X11/xf_keyboard.h index 699e5817e..cb01fc89f 100644 --- a/client/X11/xf_keyboard.h +++ b/client/X11/xf_keyboard.h @@ -29,12 +29,12 @@ void xf_kbd_clear(xfInfo* xfi); void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym); void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode); void xf_kbd_release_all_keypress(xfInfo* xfi); -boolean xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym); -void xf_kbd_send_key(xfInfo* xfi, boolean down, uint8 keycode); +BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym); +void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode); int xf_kbd_read_keyboard_state(xfInfo* xfi); -boolean xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym); +BOOL xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym); int xf_kbd_get_toggle_keys_state(xfInfo* xfi); void xf_kbd_focus_in(xfInfo* xfi); -boolean xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym); +BOOL xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym); #endif /* __XF_KEYBOARD_H */ diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index c026f2e3c..8d07b7126 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -35,7 +35,7 @@ /* See MSDN Section on Multiple Display Monitors: http://msdn.microsoft.com/en-us/library/dd145071 */ -boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) +BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) { int i; VIRTUAL_SCREEN* vscreen; diff --git a/client/X11/xf_monitor.h b/client/X11/xf_monitor.h index ba1fd6c68..42196f1da 100644 --- a/client/X11/xf_monitor.h +++ b/client/X11/xf_monitor.h @@ -27,7 +27,7 @@ struct _MONITOR_INFO { RECTANGLE_16 area; RECTANGLE_16 workarea; - boolean primary; + BOOL primary; }; typedef struct _MONITOR_INFO MONITOR_INFO; @@ -42,6 +42,6 @@ typedef struct _VIRTUAL_SCREEN VIRTUAL_SCREEN; #include "xfreerdp.h" -boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings); +BOOL xf_detect_monitors(xfInfo* xfi, rdpSettings* settings); #endif /* __XF_MONITOR_H */ diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index 10c340b91..fab540025 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -56,7 +56,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 { xfWindow* xfw; rdpWindow* window; - boolean intersect; + BOOL intersect; uint32 iwidth, iheight; sint32 ileft, itop; uint32 iright, ibottom; @@ -263,7 +263,7 @@ static void xf_send_rail_client_event(rdpChannels* channels, uint16 event_type, } } -void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled) +void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled) { rdpRail* rail; rdpChannels* channels; diff --git a/client/X11/xf_rail.h b/client/X11/xf_rail.h index fa8e67f8f..542a0fc19 100644 --- a/client/X11/xf_rail.h +++ b/client/X11/xf_rail.h @@ -25,7 +25,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail); void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command); -void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled); +void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled); void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event); void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window); void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window); diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index 199321582..85bad593f 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -180,7 +180,7 @@ void xf_tsmf_uninit(xfInfo* xfi) } } -static boolean +static BOOL xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt) { int i; @@ -204,7 +204,7 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT uint8* data2; uint32 pixfmt; uint32 xvpixfmt; - boolean converti420yv12 = FALSE; + BOOL converti420yv12 = FALSE; XvImage * image; int colorkey = 0; XShmSegmentInfo shminfo; diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 61b177562..3e92f2340 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -117,7 +117,7 @@ void xf_SendClientEvent(xfInfo* xfi, xfWindow* window, Atom atom, unsigned int n va_end(argp); } -void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen) +void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, BOOL fullscreen) { if (fullscreen) { @@ -132,7 +132,7 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen) /* http://tronche.com/gui/x/xlib/window-information/XGetWindowProperty.html */ -boolean xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, +BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, unsigned long* nitems, unsigned long* bytes, uint8** prop) { int status; @@ -158,9 +158,9 @@ boolean xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int leng return TRUE; } -boolean xf_GetCurrentDesktop(xfInfo* xfi) +BOOL xf_GetCurrentDesktop(xfInfo* xfi) { - boolean status; + BOOL status; unsigned long nitems; unsigned long bytes; unsigned char* prop; @@ -178,10 +178,10 @@ boolean xf_GetCurrentDesktop(xfInfo* xfi) return TRUE; } -boolean xf_GetWorkArea(xfInfo* xfi) +BOOL xf_GetWorkArea(xfInfo* xfi) { long* plong; - boolean status; + BOOL status; unsigned long nitems; unsigned long bytes; unsigned char* prop; @@ -213,7 +213,7 @@ boolean xf_GetWorkArea(xfInfo* xfi) return TRUE; } -void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, boolean show) +void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, BOOL show) { PropMotifWmHints hints; @@ -304,7 +304,7 @@ static void xf_SetWindowPID(xfInfo* xfi, xfWindow* window, pid_t pid) 32, PropModeReplace, (unsigned char *)&pid, 1); } -xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations) +xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, BOOL decorations) { xfWindow* window; XEvent xevent; @@ -651,7 +651,7 @@ void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window) void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height) { - boolean resize = FALSE; + BOOL resize = FALSE; if ((width * height) < 1) return; @@ -881,11 +881,11 @@ void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width, XFlush(xfi->display); } -boolean xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y) +BOOL xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y) { rdpWindow* wnd; - boolean clientArea = FALSE; - boolean windowArea = FALSE; + BOOL clientArea = FALSE; + BOOL windowArea = FALSE; wnd = xfw->window; diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h index b6809cd12..0888a885a 100644 --- a/client/X11/xf_window.h +++ b/client/X11/xf_window.h @@ -71,26 +71,26 @@ struct xf_window int width; int height; Window handle; - boolean fullscreen; - boolean decorations; + BOOL fullscreen; + BOOL decorations; rdpWindow* window; - boolean is_mapped; - boolean is_transient; + BOOL is_mapped; + BOOL is_transient; xfLocalMove local_move; uint8 rail_state; - boolean rail_ignore_configure; + BOOL rail_ignore_configure; }; void xf_ewmhints_init(xfInfo* xfi); -boolean xf_GetCurrentDesktop(xfInfo* xfi); -boolean xf_GetWorkArea(xfInfo* xfi); +BOOL xf_GetCurrentDesktop(xfInfo* xfi); +BOOL xf_GetWorkArea(xfInfo* xfi); -void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen); -void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, boolean show); +void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, BOOL fullscreen); +void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, BOOL show); void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window); -xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations); +xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, BOOL decorations); void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height); xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id); @@ -102,11 +102,11 @@ void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int n void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects); void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style); void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height); -boolean xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y); +BOOL xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y); void xf_DestroyWindow(xfInfo* xfi, xfWindow* window); rdpWindow* xf_rdpWindowFromWindow(xfInfo* xfi, Window wnd); -boolean xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, +BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, unsigned long* nitems, unsigned long* bytes, uint8** prop); void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int maxHeight, diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index f644be32f..58ab5cafa 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -226,7 +226,7 @@ void xf_hw_end_paint(rdpContext* context) void xf_hw_desktop_resize(rdpContext* context) { xfInfo* xfi; - boolean same; + BOOL same; rdpSettings* settings; xfi = ((xfContext*) context)->xfi; @@ -263,7 +263,7 @@ void xf_hw_desktop_resize(rdpContext* context) } } -boolean xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) +BOOL xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) { xfInfo* xfi = ((xfContext*) instance->context)->xfi; @@ -273,7 +273,7 @@ boolean xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int return TRUE; } -boolean xf_process_x_events(freerdp* instance) +BOOL xf_process_x_events(freerdp* instance) { XEvent xevent; xfInfo* xfi = ((xfContext*) instance->context)->xfi; @@ -351,7 +351,7 @@ void xf_toggle_fullscreen(xfInfo* xfi) XFreePixmap(xfi->display, contents); } -boolean xf_get_pixmap_info(xfInfo* xfi) +BOOL xf_get_pixmap_info(xfInfo* xfi) { int i; int vi_count; @@ -477,10 +477,10 @@ int _xf_error_handler(Display* d, XErrorEvent* ev) * @return TRUE if successful. FALSE otherwise. * Can exit with error code XF_EXIT_PARSE_ARGUMENTS if there is an error in the parameters. */ -boolean xf_pre_connect(freerdp* instance) +BOOL xf_pre_connect(freerdp* instance) { xfInfo* xfi; - boolean bitmap_cache; + BOOL bitmap_cache; rdpSettings* settings; int arg_parse_result; @@ -667,7 +667,7 @@ uint32 xf_detect_cpu() * It will be called only if the connection was initialized properly, and will continue the initialization based on the * newly created connection. */ -boolean xf_post_connect(freerdp* instance) +BOOL xf_post_connect(freerdp* instance) { #ifdef WITH_SSE2 uint32 cpu; @@ -810,7 +810,7 @@ boolean xf_post_connect(freerdp* instance) * @param domain - unused * @return TRUE if a password was successfully entered. See freerdp_passphrase_read() for more details. */ -boolean xf_authenticate(freerdp* instance, char** username, char** password, char** domain) +BOOL xf_authenticate(freerdp* instance, char** username, char** password, char** domain) { // FIXME: seems this callback may be called when 'username' is not known. // But it doesn't do anything to fix it... @@ -832,7 +832,7 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha * @param fingerprint * @return TRUE if the certificate is trusted. FALSE otherwise. */ -boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) +BOOL xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint) { char answer; @@ -1117,7 +1117,7 @@ int xfreerdp_run(freerdp* instance) memset(wfds, 0, sizeof(wfds)); memset(&timeout, 0, sizeof(struct timeval)); - boolean status = freerdp_connect(instance); + BOOL status = freerdp_connect(instance); /* Connection succeeded. --authonly ? */ if (instance->settings->authentication_only) { freerdp_disconnect(instance); diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 1f813cae7..ed51e9283 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -101,40 +101,40 @@ struct xf_info Colormap colormap; int screen_number; int scanline_pad; - boolean big_endian; - boolean fullscreen; - boolean grab_keyboard; - boolean unobscured; - boolean decorations; - boolean debug; + BOOL big_endian; + BOOL fullscreen; + BOOL grab_keyboard; + BOOL unobscured; + BOOL decorations; + BOOL debug; xfWindow* window; xfWorkArea workArea; int current_desktop; - boolean remote_app; - boolean disconnect; + BOOL remote_app; + BOOL disconnect; HCLRCONV clrconv; Window parent_window; HGDI_DC hdc; - boolean sw_gdi; + BOOL sw_gdi; uint8* primary_buffer; - boolean frame_begin; + BOOL frame_begin; uint16 frame_x1; uint16 frame_y1; uint16 frame_x2; uint16 frame_y2; - boolean focused; - boolean mouse_active; - boolean mouse_motion; - boolean suppress_output; - boolean fullscreen_toggle; + BOOL focused; + BOOL mouse_active; + BOOL mouse_motion; + BOOL suppress_output; + BOOL fullscreen_toggle; uint32 keyboard_layout_id; - boolean pressed_keys[256]; + BOOL pressed_keys[256]; XModifierKeymap* modifier_map; XSetWindowAttributes attribs; - boolean complex_regions; + BOOL complex_regions; VIRTUAL_SCREEN vscreen; uint8* bmp_codec_none; uint8* bmp_codec_nsc; @@ -170,7 +170,7 @@ struct xf_info void xf_create_window(xfInfo* xfi); void xf_toggle_fullscreen(xfInfo* xfi); -boolean xf_post_connect(freerdp* instance); +BOOL xf_post_connect(freerdp* instance); enum XF_EXIT_CODE { diff --git a/cunit/test_freerdp.c b/cunit/test_freerdp.c index 9c08ff6a5..045f3ab37 100644 --- a/cunit/test_freerdp.c +++ b/cunit/test_freerdp.c @@ -104,7 +104,7 @@ void assert_stream(STREAM* s, uint8* data, int length, const char* func, int lin } } -typedef boolean (*pInitTestSuite)(void); +typedef BOOL (*pInitTestSuite)(void); struct _test_suite { diff --git a/include/freerdp/channels/channels.h b/include/freerdp/channels/channels.h index b5b1d187a..61f0f4d5a 100644 --- a/include/freerdp/channels/channels.h +++ b/include/freerdp/channels/channels.h @@ -42,9 +42,9 @@ FREERDP_API int freerdp_channels_post_connect(rdpChannels* channels, freerdp* in FREERDP_API int freerdp_channels_data(freerdp* instance, int channel_id, void* data, int data_size, int flags, int total_size); FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, RDP_EVENT* event); -FREERDP_API boolean freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds, +FREERDP_API BOOL freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds, int* read_count, void** write_fds, int* write_count); -FREERDP_API boolean freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance); +FREERDP_API BOOL freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance); FREERDP_API RDP_EVENT* freerdp_channels_pop_event(rdpChannels* channels); FREERDP_API void freerdp_channels_close(rdpChannels* channels, freerdp* instance); diff --git a/include/freerdp/channels/wtsvc.h b/include/freerdp/channels/wtsvc.h index 535b93bfb..274eeb5cf 100644 --- a/include/freerdp/channels/wtsvc.h +++ b/include/freerdp/channels/wtsvc.h @@ -53,7 +53,7 @@ FREERDP_API WTSVirtualChannelManager* WTSCreateVirtualChannelManager(freerdp_pee FREERDP_API void WTSDestroyVirtualChannelManager(WTSVirtualChannelManager* vcm); FREERDP_API void WTSVirtualChannelManagerGetFileDescriptor(WTSVirtualChannelManager* vcm, void** fds, int* fds_count); -FREERDP_API boolean WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm); +FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm); /** * Opens a static or dynamic virtual channel and return the handle. If the @@ -76,7 +76,7 @@ FREERDP_API void* WTSVirtualChannelOpenEx( * Servers use this function to gain access to a virtual channel file handle * that can be used for asynchronous I/O. */ -FREERDP_API boolean WTSVirtualChannelQuery( +FREERDP_API BOOL WTSVirtualChannelQuery( /* __in */ void* hChannelHandle, /* __in */ WTS_VIRTUAL_CLASS WtsVirtualClass, /* __out */ void** ppBuffer, @@ -105,7 +105,7 @@ FREERDP_API void WTSFreeMemory( * The caller should use the file handle returned by WTSVirtualChannelQuery to * determine whether a packet has arrived. */ -FREERDP_API boolean WTSVirtualChannelRead( +FREERDP_API BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, /* __in */ uint32 TimeOut, /* __out */ uint8* Buffer, @@ -115,7 +115,7 @@ FREERDP_API boolean WTSVirtualChannelRead( /** * Writes data to the server end of a virtual channel. */ -FREERDP_API boolean WTSVirtualChannelWrite( +FREERDP_API BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, /* __in */ uint8* Buffer, /* __in */ uint32 Length, @@ -124,7 +124,7 @@ FREERDP_API boolean WTSVirtualChannelWrite( /** * Closes an open virtual channel handle. */ -FREERDP_API boolean WTSVirtualChannelClose( +FREERDP_API BOOL WTSVirtualChannelClose( /* __in */ void* hChannelHandle); #endif /* __FREERDP_WTSVC_H */ diff --git a/include/freerdp/codec/bitmap.h b/include/freerdp/codec/bitmap.h index bed673bdc..7a63fff13 100644 --- a/include/freerdp/codec/bitmap.h +++ b/include/freerdp/codec/bitmap.h @@ -23,6 +23,6 @@ #include #include -FREERDP_API boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp); +FREERDP_API BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp); #endif /* __BITMAP_H */ diff --git a/include/freerdp/codec/jpeg.h b/include/freerdp/codec/jpeg.h index e9e528348..881967965 100644 --- a/include/freerdp/codec/jpeg.h +++ b/include/freerdp/codec/jpeg.h @@ -22,7 +22,7 @@ #include -boolean +BOOL jpeg_decompress(uint8* input, uint8* output, int width, int height, int size, int bpp); #endif /* __BITMAP_H */ diff --git a/include/freerdp/codec/mppc_enc.h b/include/freerdp/codec/mppc_enc.h index a41a7013d..32f348b0f 100644 --- a/include/freerdp/codec/mppc_enc.h +++ b/include/freerdp/codec/mppc_enc.h @@ -42,9 +42,9 @@ struct rdp_mppc_enc uint16* hash_table; }; -FREERDP_API boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len); -FREERDP_API boolean compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len); -FREERDP_API boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len); +FREERDP_API BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len); +FREERDP_API BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len); +FREERDP_API BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len); FREERDP_API struct rdp_mppc_enc* mppc_enc_new(int protocol_type); FREERDP_API void mppc_enc_free(struct rdp_mppc_enc* enc); diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index 3a7920845..ef9f42ccf 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -93,7 +93,7 @@ struct _RFX_CONTEXT /* temporary data within a frame */ uint32 frame_idx; - boolean header_processed; + BOOL header_processed; uint8 num_quants; uint32* quants; uint8 quant_idx_y; diff --git a/include/freerdp/crypto/ber.h b/include/freerdp/crypto/ber.h index 482398297..26558ae63 100644 --- a/include/freerdp/crypto/ber.h +++ b/include/freerdp/crypto/ber.h @@ -55,30 +55,30 @@ FREERDP_API void ber_read_length(STREAM* s, int* length); FREERDP_API int ber_write_length(STREAM* s, int length); FREERDP_API int _ber_skip_length(int length); FREERDP_API int ber_get_content_length(int length); -FREERDP_API boolean ber_read_universal_tag(STREAM* s, uint8 tag, boolean pc); -FREERDP_API void ber_write_universal_tag(STREAM* s, uint8 tag, boolean pc); -FREERDP_API boolean ber_read_application_tag(STREAM* s, uint8 tag, int* length); +FREERDP_API BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc); +FREERDP_API void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc); +FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length); FREERDP_API void ber_write_application_tag(STREAM* s, uint8 tag, int length); -FREERDP_API boolean ber_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API boolean ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); +FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length); +FREERDP_API BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); FREERDP_API void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count); -FREERDP_API boolean ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc); -FREERDP_API int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc); +FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc); +FREERDP_API int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc); FREERDP_API int ber_skip_contextual_tag(int length); -FREERDP_API boolean ber_read_sequence_tag(STREAM* s, int* length); +FREERDP_API BOOL ber_read_sequence_tag(STREAM* s, int* length); FREERDP_API int ber_write_sequence_tag(STREAM* s, int length); FREERDP_API int ber_skip_sequence(int length); FREERDP_API int ber_skip_sequence_tag(int length); -FREERDP_API boolean ber_read_bit_string(STREAM* s, int* length, uint8* padding); +FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding); FREERDP_API void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length); -FREERDP_API boolean ber_read_octet_string_tag(STREAM* s, int* length); +FREERDP_API BOOL ber_read_octet_string_tag(STREAM* s, int* length); FREERDP_API int ber_write_octet_string_tag(STREAM* s, int length); FREERDP_API int ber_skip_octet_string(int length); -FREERDP_API boolean ber_read_boolean(STREAM* s, boolean* value); -FREERDP_API void ber_write_boolean(STREAM* s, boolean value); -FREERDP_API boolean ber_read_integer(STREAM* s, uint32* value); +FREERDP_API BOOL ber_read_BOOL(STREAM* s, BOOL* value); +FREERDP_API void ber_write_BOOL(STREAM* s, BOOL value); +FREERDP_API BOOL ber_read_integer(STREAM* s, uint32* value); FREERDP_API int ber_write_integer(STREAM* s, uint32 value); -FREERDP_API boolean ber_read_integer_length(STREAM* s, int* length); +FREERDP_API BOOL ber_read_integer_length(STREAM* s, int* length); FREERDP_API int ber_skip_integer(uint32 value); #endif /* FREERDP_CRYPTO_BER_H */ diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index e57431f77..73ee40774 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -125,9 +125,9 @@ FREERDP_API char* crypto_cert_issuer(X509* xcert); FREERDP_API void crypto_cert_print_info(X509* xcert); FREERDP_API void crypto_cert_free(CryptoCert cert); -FREERDP_API boolean x509_verify_certificate(CryptoCert cert, char* certificate_store_path); +FREERDP_API BOOL x509_verify_certificate(CryptoCert cert, char* certificate_store_path); FREERDP_API rdpCertificateData* crypto_get_certificate_data(X509* xcert, char* hostname); -FREERDP_API boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength); +FREERDP_API BOOL crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength); #define TSSK_KEY_LENGTH 64 extern const uint8 tssk_modulus[]; diff --git a/include/freerdp/crypto/der.h b/include/freerdp/crypto/der.h index 725a400e2..13537c7bf 100644 --- a/include/freerdp/crypto/der.h +++ b/include/freerdp/crypto/der.h @@ -30,7 +30,7 @@ FREERDP_API int der_skip_octet_string(int length); FREERDP_API int der_skip_sequence_tag(int length); FREERDP_API int der_write_sequence_tag(STREAM* s, int length); FREERDP_API int der_skip_contextual_tag(int length); -FREERDP_API int der_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc); +FREERDP_API int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc); FREERDP_API void der_write_octet_string(STREAM* s, uint8* oct_str, int length); #endif /* FREERDP_CRYPTO_DER_H */ diff --git a/include/freerdp/crypto/er.h b/include/freerdp/crypto/er.h index e2bb49da8..9ad53a642 100644 --- a/include/freerdp/crypto/er.h +++ b/include/freerdp/crypto/er.h @@ -55,34 +55,34 @@ #define ER_PC(_pc) (_pc ? ER_CONSTRUCT : ER_PRIMITIVE) FREERDP_API void er_read_length(STREAM* s, int* length); -FREERDP_API int er_write_length(STREAM* s, int length, boolean flag); +FREERDP_API int er_write_length(STREAM* s, int length, BOOL flag); FREERDP_API int _er_skip_length(int length); FREERDP_API int er_get_content_length(int length); -FREERDP_API boolean er_read_universal_tag(STREAM* s, uint8 tag, boolean pc); -FREERDP_API void er_write_universal_tag(STREAM* s, uint8 tag, boolean pc); -FREERDP_API boolean er_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API void er_write_application_tag(STREAM* s, uint8 tag, int length, boolean flag); -FREERDP_API boolean er_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API boolean er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); -FREERDP_API void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, boolean flag); -FREERDP_API boolean er_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc); -FREERDP_API int er_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc, boolean flag); +FREERDP_API BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc); +FREERDP_API void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc); +FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length); +FREERDP_API void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag); +FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length); +FREERDP_API BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); +FREERDP_API void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag); +FREERDP_API BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc); +FREERDP_API int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag); FREERDP_API int er_skip_contextual_tag(int length); -FREERDP_API boolean er_read_sequence_tag(STREAM* s, int* length); -FREERDP_API int er_write_sequence_tag(STREAM* s, int length, boolean flag); +FREERDP_API BOOL er_read_sequence_tag(STREAM* s, int* length); +FREERDP_API int er_write_sequence_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_sequence(int length); FREERDP_API int er_skip_sequence_tag(int length); -FREERDP_API boolean er_read_bit_string(STREAM* s, int* length, uint8* padding); -FREERDP_API boolean er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, boolean flag); -FREERDP_API boolean er_read_octet_string(STREAM* s, int* length); -FREERDP_API void er_write_octet_string(STREAM* s, uint8* oct_str, int length, boolean flag); -FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, boolean flag); +FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding); +FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag); +FREERDP_API BOOL er_read_octet_string(STREAM* s, int* length); +FREERDP_API void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag); +FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_octet_string(int length); -FREERDP_API boolean er_read_boolean(STREAM* s, boolean* value); -FREERDP_API void er_write_boolean(STREAM* s, boolean value); -FREERDP_API boolean er_read_integer(STREAM* s, uint32* value); +FREERDP_API BOOL er_read_BOOL(STREAM* s, BOOL* value); +FREERDP_API void er_write_BOOL(STREAM* s, BOOL value); +FREERDP_API BOOL er_read_integer(STREAM* s, uint32* value); FREERDP_API int er_write_integer(STREAM* s, sint32 value); -FREERDP_API boolean er_read_integer_length(STREAM* s, int* length); +FREERDP_API BOOL er_read_integer_length(STREAM* s, int* length); FREERDP_API int er_skip_integer(sint32 value); #endif /* FREERDP_CRYPTO_ER_H */ diff --git a/include/freerdp/crypto/nla.h b/include/freerdp/crypto/nla.h index 7e0a08b93..6e1434664 100644 --- a/include/freerdp/crypto/nla.h +++ b/include/freerdp/crypto/nla.h @@ -36,7 +36,7 @@ typedef struct rdp_credssp rdpCredssp; struct rdp_credssp { rdpTls* tls; - boolean server; + BOOL server; int send_seq_num; int recv_seq_num; freerdp* instance; diff --git a/include/freerdp/crypto/per.h b/include/freerdp/crypto/per.h index 07aa7e605..d03e32240 100644 --- a/include/freerdp/crypto/per.h +++ b/include/freerdp/crypto/per.h @@ -23,27 +23,27 @@ #include #include -FREERDP_API boolean per_read_length(STREAM* s, uint16* length); +FREERDP_API BOOL per_read_length(STREAM* s, uint16* length); FREERDP_API void per_write_length(STREAM* s, int length); -FREERDP_API boolean per_read_choice(STREAM* s, uint8* choice); +FREERDP_API BOOL per_read_choice(STREAM* s, uint8* choice); FREERDP_API void per_write_choice(STREAM* s, uint8 choice); -FREERDP_API boolean per_read_selection(STREAM* s, uint8* selection); +FREERDP_API BOOL per_read_selection(STREAM* s, uint8* selection); FREERDP_API void per_write_selection(STREAM* s, uint8 selection); -FREERDP_API boolean per_read_number_of_sets(STREAM* s, uint8* number); +FREERDP_API BOOL per_read_number_of_sets(STREAM* s, uint8* number); FREERDP_API void per_write_number_of_sets(STREAM* s, uint8 number); -FREERDP_API boolean per_read_padding(STREAM* s, int length); +FREERDP_API BOOL per_read_padding(STREAM* s, int length); FREERDP_API void per_write_padding(STREAM* s, int length); -FREERDP_API boolean per_read_integer(STREAM* s, uint32* integer); -FREERDP_API boolean per_read_integer16(STREAM* s, uint16* integer, uint16 min); +FREERDP_API BOOL per_read_integer(STREAM* s, uint32* integer); +FREERDP_API BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min); FREERDP_API void per_write_integer(STREAM* s, uint32 integer); FREERDP_API void per_write_integer16(STREAM* s, uint16 integer, uint16 min); -FREERDP_API boolean per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); +FREERDP_API BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); FREERDP_API void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count); FREERDP_API void per_write_object_identifier(STREAM* s, uint8 oid[6]); -FREERDP_API boolean per_read_object_identifier(STREAM* s, uint8 oid[6]); -FREERDP_API boolean per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min); +FREERDP_API BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]); +FREERDP_API BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min); FREERDP_API void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min); -FREERDP_API boolean per_read_numeric_string(STREAM* s, int min); +FREERDP_API BOOL per_read_numeric_string(STREAM* s, int min); FREERDP_API void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min); #endif /* FREERDP_CRYPTO_PER_H */ diff --git a/include/freerdp/crypto/tls.h b/include/freerdp/crypto/tls.h index c271202e2..105d05186 100644 --- a/include/freerdp/crypto/tls.h +++ b/include/freerdp/crypto/tls.h @@ -43,9 +43,9 @@ struct rdp_tls rdpCertificateStore* certificate_store; }; -FREERDP_API boolean tls_connect(rdpTls* tls); -FREERDP_API boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file); -FREERDP_API boolean tls_disconnect(rdpTls* tls); +FREERDP_API BOOL tls_connect(rdpTls* tls); +FREERDP_API BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file); +FREERDP_API BOOL tls_disconnect(rdpTls* tls); FREERDP_API int tls_read(rdpTls* tls, uint8* data, int length); FREERDP_API int tls_write(rdpTls* tls, uint8* data, int length); @@ -53,11 +53,11 @@ FREERDP_API int tls_write(rdpTls* tls, uint8* data, int length); FREERDP_API int tls_read_all(rdpTls* tls, uint8* data, int length); FREERDP_API int tls_write_all(rdpTls* tls, uint8* data, int length); -FREERDP_API boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname); +FREERDP_API BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname); FREERDP_API void tls_print_certificate_error(char* hostname, char* fingerprint); FREERDP_API void tls_print_certificate_name_mismatch_error(char* hostname, char* common_name, char** alt_names, int alt_names_count); -FREERDP_API boolean tls_print_error(char* func, SSL* connection, int value); +FREERDP_API BOOL tls_print_error(char* func, SSL* connection, int value); FREERDP_API rdpTls* tls_new(rdpSettings* settings); FREERDP_API void tls_free(rdpTls* tls); diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 6296f79fa..3200e3c4e 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -48,11 +48,11 @@ extern "C" { typedef void (*pContextNew)(freerdp* instance, rdpContext* context); typedef void (*pContextFree)(freerdp* instance, rdpContext* context); -typedef boolean (*pPreConnect)(freerdp* instance); -typedef boolean (*pPostConnect)(freerdp* instance); -typedef boolean (*pAuthenticate)(freerdp* instance, char** username, char** password, char** domain); -typedef boolean (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint); -typedef boolean (*pVerifyChangedCertificate)(freerdp* instance, char* subject, char* issuer, char* new_fingerprint, char* old_fingerprint); +typedef BOOL (*pPreConnect)(freerdp* instance); +typedef BOOL (*pPostConnect)(freerdp* instance); +typedef BOOL (*pAuthenticate)(freerdp* instance, char** username, char** password, char** domain); +typedef BOOL (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint); +typedef BOOL (*pVerifyChangedCertificate)(freerdp* instance, char* subject, char* issuer, char* new_fingerprint, char* old_fingerprint); typedef int (*pSendChannelData)(freerdp* instance, int channelId, uint8* data, int size); typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size); @@ -184,12 +184,12 @@ struct rdp_freerdp FREERDP_API void freerdp_context_new(freerdp* instance); FREERDP_API void freerdp_context_free(freerdp* instance); -FREERDP_API boolean freerdp_connect(freerdp* instance); -FREERDP_API boolean freerdp_shall_disconnect(freerdp* instance); -FREERDP_API boolean freerdp_disconnect(freerdp* instance); +FREERDP_API BOOL freerdp_connect(freerdp* instance); +FREERDP_API BOOL freerdp_shall_disconnect(freerdp* instance); +FREERDP_API BOOL freerdp_disconnect(freerdp* instance); -FREERDP_API boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount); -FREERDP_API boolean freerdp_check_fds(freerdp* instance); +FREERDP_API BOOL freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount); +FREERDP_API BOOL freerdp_check_fds(freerdp* instance); FREERDP_API uint32 freerdp_error_info(freerdp* instance); diff --git a/include/freerdp/graphics.h b/include/freerdp/graphics.h index 24a98ba20..907fac1b6 100644 --- a/include/freerdp/graphics.h +++ b/include/freerdp/graphics.h @@ -36,8 +36,8 @@ typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Paint)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Decompress)(rdpContext* context, rdpBitmap* bitmap, uint8* data, int width, int height, int bpp, int length, - boolean compressed, int codec_id); -typedef void (*pBitmap_SetSurface)(rdpContext* context, rdpBitmap* bitmap, boolean primary); + BOOL compressed, int codec_id); +typedef void (*pBitmap_SetSurface)(rdpContext* context, rdpBitmap* bitmap, BOOL primary); struct rdp_bitmap { @@ -61,8 +61,8 @@ struct rdp_bitmap uint8* data; /* 25 */ uint32 paddingB[32 - 26]; /* 26 */ - boolean compressed; /* 32 */ - boolean ephemeral; /* 33 */ + BOOL compressed; /* 32 */ + BOOL ephemeral; /* 33 */ uint32 paddingC[64 - 34]; /* 34 */ }; @@ -71,11 +71,11 @@ FREERDP_API void Bitmap_New(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Register(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, boolean compressed); + uint8* data, int width, int height, int bpp, int length, BOOL compressed); FREERDP_API void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, uint16 left, uint16 top, uint16 right, uint16 bottom); FREERDP_API void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, uint16 height); -FREERDP_API void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, boolean primary); +FREERDP_API void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary); /* Pointer Class */ diff --git a/include/freerdp/input.h b/include/freerdp/input.h index fecf17003..0275f0957 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -76,7 +76,7 @@ struct rdp_input FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags); FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, boolean down, uint32 rdp_scancode); +FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode); FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); diff --git a/include/freerdp/listener.h b/include/freerdp/listener.h index c5b95f9cd..120c09ac5 100644 --- a/include/freerdp/listener.h +++ b/include/freerdp/listener.h @@ -31,10 +31,10 @@ typedef struct rdp_freerdp_listener freerdp_listener; extern "C" { #endif -typedef boolean (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, uint16 port); -typedef boolean (*psListenerOpenLocal)(freerdp_listener* instance, const char* path); -typedef boolean (*psListenerGetFileDescriptor)(freerdp_listener* instance, void** rfds, int* rcount); -typedef boolean (*psListenerCheckFileDescriptor)(freerdp_listener* instance); +typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, uint16 port); +typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance, const char* path); +typedef BOOL (*psListenerGetFileDescriptor)(freerdp_listener* instance, void** rfds, int* rcount); +typedef BOOL (*psListenerCheckFileDescriptor)(freerdp_listener* instance); typedef void (*psListenerClose)(freerdp_listener* instance); typedef void (*psPeerAccepted)(freerdp_listener* instance, freerdp_peer* client); diff --git a/include/freerdp/locale/keyboard.h b/include/freerdp/locale/keyboard.h index 3daeee602..7a83e2155 100644 --- a/include/freerdp/locale/keyboard.h +++ b/include/freerdp/locale/keyboard.h @@ -202,7 +202,7 @@ FREERDP_API uint32 freerdp_keyboard_init(uint32 keyboardLayoutId); FREERDP_API RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types); FREERDP_API const char* freerdp_keyboard_get_layout_name_from_id(uint32 keyboardLayoutId); FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(uint32 keycode); -FREERDP_API uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, boolean extended); +FREERDP_API uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, BOOL extended); FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(uint32 vkcode); #endif /* __FREERDP_LOCALE_KEYBOARD_H */ diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index 64c10312d..cfa211282 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -31,15 +31,15 @@ typedef void (*psPeerContextNew)(freerdp_peer* client, rdpContext* context); typedef void (*psPeerContextFree)(freerdp_peer* client, rdpContext* context); -typedef boolean (*psPeerInitialize)(freerdp_peer* client); -typedef boolean (*psPeerGetFileDescriptor)(freerdp_peer* client, void** rfds, int* rcount); -typedef boolean (*psPeerCheckFileDescriptor)(freerdp_peer* client); -typedef boolean (*psPeerClose)(freerdp_peer* client); +typedef BOOL (*psPeerInitialize)(freerdp_peer* client); +typedef BOOL (*psPeerGetFileDescriptor)(freerdp_peer* client, void** rfds, int* rcount); +typedef BOOL (*psPeerCheckFileDescriptor)(freerdp_peer* client); +typedef BOOL (*psPeerClose)(freerdp_peer* client); typedef void (*psPeerDisconnect)(freerdp_peer* client); -typedef boolean (*psPeerCapabilities)(freerdp_peer* client); -typedef boolean (*psPeerPostConnect)(freerdp_peer* client); -typedef boolean (*psPeerActivate)(freerdp_peer* client); -typedef boolean (*psPeerLogon)(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, boolean automatic); +typedef BOOL (*psPeerCapabilities)(freerdp_peer* client); +typedef BOOL (*psPeerPostConnect)(freerdp_peer* client); +typedef BOOL (*psPeerActivate)(freerdp_peer* client); +typedef BOOL (*psPeerLogon)(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic); typedef int (*psPeerSendChannelData)(freerdp_peer* client, int channelId, uint8* data, int size); typedef int (*psPeerReceiveChannelData)(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size); @@ -73,10 +73,10 @@ struct rdp_freerdp_peer psPeerReceiveChannelData ReceiveChannelData; uint32 ack_frame_id; - boolean local; - boolean connected; - boolean activated; - boolean authenticated; + BOOL local; + BOOL connected; + BOOL activated; + BOOL authenticated; SEC_WINNT_AUTH_IDENTITY identity; }; diff --git a/include/freerdp/primary.h b/include/freerdp/primary.h index dc55f3746..fcec1bf80 100644 --- a/include/freerdp/primary.h +++ b/include/freerdp/primary.h @@ -56,7 +56,7 @@ struct _ORDER_INFO sint32 deltaBoundTop; sint32 deltaBoundRight; sint32 deltaBoundBottom; - boolean deltaCoordinates; + BOOL deltaCoordinates; }; typedef struct _ORDER_INFO ORDER_INFO; @@ -330,7 +330,7 @@ struct _FAST_INDEX_ORDER sint32 opTop; sint32 opRight; sint32 opBottom; - boolean opaqueRect; + BOOL opaqueRect; sint32 x; sint32 y; uint32 cbData; diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index db8832bcb..6e971369b 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -201,23 +201,23 @@ struct _RAIL_SYSPARAM_ORDER { uint32 param; uint32 params; - boolean dragFullWindows; - boolean keyboardCues; - boolean keyboardPref; - boolean mouseButtonSwap; + BOOL dragFullWindows; + BOOL keyboardCues; + BOOL keyboardPref; + BOOL mouseButtonSwap; RECTANGLE_16 workArea; RECTANGLE_16 displayChange; RECTANGLE_16 taskbarPos; HIGH_CONTRAST highContrast; - boolean setScreenSaveActive; - boolean setScreenSaveSecure; + BOOL setScreenSaveActive; + BOOL setScreenSaveSecure; }; typedef struct _RAIL_SYSPARAM_ORDER RAIL_SYSPARAM_ORDER; struct _RAIL_ACTIVATE_ORDER { uint32 windowId; - boolean enabled; + BOOL enabled; }; typedef struct _RAIL_ACTIVATE_ORDER RAIL_ACTIVATE_ORDER; @@ -261,7 +261,7 @@ typedef struct _RAIL_MINMAXINFO_ORDER RAIL_MINMAXINFO_ORDER; struct _RAIL_LOCALMOVESIZE_ORDER { uint32 windowId; - boolean isMoveSizeStart; + BOOL isMoveSizeStart; uint16 moveSizeType; uint16 posX; uint16 posY; diff --git a/include/freerdp/rail/icon.h b/include/freerdp/rail/icon.h index 0e8c0283b..05a0c7cf8 100644 --- a/include/freerdp/rail/icon.h +++ b/include/freerdp/rail/icon.h @@ -34,7 +34,7 @@ typedef struct rdp_icon_cache rdpIconCache; struct rdp_icon { ICON_INFO* entry; - boolean big; + BOOL big; void* extra; }; diff --git a/include/freerdp/rail/window_list.h b/include/freerdp/rail/window_list.h index a61b54678..a9e6ba13b 100644 --- a/include/freerdp/rail/window_list.h +++ b/include/freerdp/rail/window_list.h @@ -39,7 +39,7 @@ struct rdp_window_list }; FREERDP_API void window_list_rewind(rdpWindowList* list); -FREERDP_API boolean window_list_has_next(rdpWindowList* list); +FREERDP_API BOOL window_list_has_next(rdpWindowList* list); FREERDP_API rdpWindow* window_list_get_next(rdpWindowList* list); FREERDP_API rdpWindow* window_list_get_by_id(rdpWindowList* list, uint32 windowId); diff --git a/include/freerdp/secondary.h b/include/freerdp/secondary.h index b2cce52d7..0a22bd416 100644 --- a/include/freerdp/secondary.h +++ b/include/freerdp/secondary.h @@ -74,7 +74,7 @@ struct _CACHE_BITMAP_ORDER uint32 bitmapHeight; uint32 bitmapLength; uint32 cacheIndex; - boolean compressed; + BOOL compressed; uint8 bitmapComprHdr[8]; uint8* bitmapDataStream; }; @@ -91,7 +91,7 @@ struct _CACHE_BITMAP_V2_ORDER uint32 bitmapHeight; uint32 bitmapLength; uint32 cacheIndex; - boolean compressed; + BOOL compressed; uint32 cbCompFirstRowSize; uint32 cbCompMainBodySize; uint32 cbScanWidth; @@ -210,7 +210,7 @@ struct rdp_secondary_update /* internal */ - boolean glyph_v2; + BOOL glyph_v2; CACHE_BITMAP_ORDER cache_bitmap_order; CACHE_BITMAP_V2_ORDER cache_bitmap_v2_order; CACHE_BITMAP_V3_ORDER cache_bitmap_v3_order; diff --git a/include/freerdp/server/audin.h b/include/freerdp/server/audin.h index 07a1a36c0..2d32b3f56 100644 --- a/include/freerdp/server/audin.h +++ b/include/freerdp/server/audin.h @@ -26,8 +26,8 @@ typedef struct _audin_server_context audin_server_context; typedef void (*psAudinServerSelectFormat)(audin_server_context* context, int client_format_index); -typedef boolean (*psAudinServerOpen)(audin_server_context* context); -typedef boolean (*psAudinServerClose)(audin_server_context* context); +typedef BOOL (*psAudinServerOpen)(audin_server_context* context); +typedef BOOL (*psAudinServerClose)(audin_server_context* context); typedef void (*psAudinServerOpening)(audin_server_context* context); typedef void (*psAudinServerOpenResult)(audin_server_context* context, uint32 result); diff --git a/include/freerdp/server/rdpsnd.h b/include/freerdp/server/rdpsnd.h index 8288fdb92..1042ce288 100644 --- a/include/freerdp/server/rdpsnd.h +++ b/include/freerdp/server/rdpsnd.h @@ -25,11 +25,11 @@ typedef struct _rdpsnd_server_context rdpsnd_server_context; -typedef boolean (*psRdpsndServerInitialize)(rdpsnd_server_context* context); +typedef BOOL (*psRdpsndServerInitialize)(rdpsnd_server_context* context); typedef void (*psRdpsndServerSelectFormat)(rdpsnd_server_context* context, int client_format_index); -typedef boolean (*psRdpsndServerSendSamples)(rdpsnd_server_context* context, const void* buf, int nframes); -typedef boolean (*psRdpsndServerSetVolume)(rdpsnd_server_context* context, int left, int right); -typedef boolean (*psRdpsndServerClose)(rdpsnd_server_context* context); +typedef BOOL (*psRdpsndServerSendSamples)(rdpsnd_server_context* context, const void* buf, int nframes); +typedef BOOL (*psRdpsndServerSetVolume)(rdpsnd_server_context* context, int left, int right); +typedef BOOL (*psRdpsndServerClose)(rdpsnd_server_context* context); typedef void (*psRdpsndServerActivated)(rdpsnd_server_context* context); diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index ad85c9f91..f497cf97e 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -188,7 +188,7 @@ struct rdp_channel char name[8]; /* ui sets */ int options; /* ui sets */ int channel_id; /* core sets */ - boolean joined; /* client has joined the channel */ + BOOL joined; /* client has joined the channel */ void* handle; /* just for ui */ }; typedef struct rdp_channel rdpChannel; @@ -213,7 +213,7 @@ typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO; struct _BITMAP_CACHE_V2_CELL_INFO { uint32 numEntries; - boolean persistent; + BOOL persistent; }; typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO; @@ -268,14 +268,14 @@ struct rdp_settings ALIGN64 uint32 selected_protocol; /* 26 */ ALIGN64 uint32 encryption_method; /* 27 */ ALIGN64 uint32 encryption_level; /* 28 */ - ALIGN64 boolean authentication; /* 29 */ + ALIGN64 BOOL authentication; /* 29 */ ALIGN64 uint32 negotiationFlags; /* 30 */ - ALIGN64 boolean security_layer_negotiation; /* 31 */ + ALIGN64 BOOL security_layer_negotiation; /* 31 */ uint64 paddingB[48 - 32]; /* 32 */ /* Connection Settings */ ALIGN64 uint32 port; /* 48 */ - ALIGN64 boolean ipv6; /* 49 */ + ALIGN64 BOOL ipv6; /* 49 */ ALIGN64 char* hostname; /* 50 */ ALIGN64 char* username; /* 51 */ ALIGN64 char* password; /* 52 */ @@ -284,33 +284,33 @@ struct rdp_settings ALIGN64 char* directory; /* 55 */ ALIGN64 char* ip_address; /* 56 */ ALIGN64 char* client_dir; /* 57 */ - ALIGN64 boolean autologon; /* 58 */ - ALIGN64 boolean compression; /* 59 */ + ALIGN64 BOOL autologon; /* 58 */ + ALIGN64 BOOL compression; /* 59 */ ALIGN64 uint32 performance_flags; /* 60 */ ALIGN64 BYTE* password_cookie; /* 61 */ ALIGN64 DWORD password_cookie_length; /* 62 */ ALIGN64 char* kerberos_kdc; /* 63 */ ALIGN64 char* kerberos_realm; /* 64 */ - ALIGN64 boolean ts_gateway; /* 65 */ + ALIGN64 BOOL ts_gateway; /* 65 */ ALIGN64 char* tsg_hostname; /* 66 */ ALIGN64 char* tsg_username; /* 67 */ ALIGN64 char* tsg_password; /* 68 */ - ALIGN64 boolean local; /* 69 */ - ALIGN64 boolean authentication_only; /* 70 */ - ALIGN64 boolean from_stdin; /* 71 */ - ALIGN64 boolean send_preconnection_pdu; /* 72 */ + ALIGN64 BOOL local; /* 69 */ + ALIGN64 BOOL authentication_only; /* 70 */ + ALIGN64 BOOL from_stdin; /* 71 */ + ALIGN64 BOOL send_preconnection_pdu; /* 72 */ ALIGN64 uint32 preconnection_id; /* 73 */ ALIGN64 char* preconnection_blob; /* 74 */ uint64 paddingC[80 - 75]; /* 75 */ /* User Interface Parameters */ - ALIGN64 boolean sw_gdi; /* 80 */ - ALIGN64 boolean workarea; /* 81 */ - ALIGN64 boolean fullscreen; /* 82 */ - ALIGN64 boolean grab_keyboard; /* 83 */ - ALIGN64 boolean decorations; /* 84 */ + ALIGN64 BOOL sw_gdi; /* 80 */ + ALIGN64 BOOL workarea; /* 81 */ + ALIGN64 BOOL fullscreen; /* 82 */ + ALIGN64 BOOL grab_keyboard; /* 83 */ + ALIGN64 BOOL decorations; /* 84 */ ALIGN64 uint32 percent_screen; /* 85 */ - ALIGN64 boolean mouse_motion; /* 86 */ + ALIGN64 BOOL mouse_motion; /* 86 */ ALIGN64 char* window_title; /* 87 */ ALIGN64 uint64 parent_window_xid; /* 88 */ uint64 paddingD[112 - 89]; /* 89 */ @@ -320,38 +320,38 @@ struct rdp_settings ALIGN64 uint32 share_id; /* 113 */ ALIGN64 uint32 pdu_source; /* 114 */ ALIGN64 void* unused115; /* 115 */ - ALIGN64 boolean server_mode; /* 116 */ + ALIGN64 BOOL server_mode; /* 116 */ ALIGN64 char* config_path; /* 117 */ ALIGN64 char* current_path; /* 118 */ ALIGN64 char* development_path; /* 119 */ - ALIGN64 boolean development_mode; /* 120 */ + ALIGN64 BOOL development_mode; /* 120 */ uint64 paddingE[144 - 121]; /* 121 */ /* Security */ - ALIGN64 boolean encryption; /* 144 */ - ALIGN64 boolean tls_security; /* 145 */ - ALIGN64 boolean nla_security; /* 146 */ - ALIGN64 boolean rdp_security; /* 147 */ + ALIGN64 BOOL encryption; /* 144 */ + ALIGN64 BOOL tls_security; /* 145 */ + ALIGN64 BOOL nla_security; /* 146 */ + ALIGN64 BOOL rdp_security; /* 147 */ ALIGN64 uint32 ntlm_version; /* 148 */ - ALIGN64 boolean salted_checksum; /* 149 */ + ALIGN64 BOOL salted_checksum; /* 149 */ uint64 paddingF[160 - 150]; /* 150 */ /* Session */ - ALIGN64 boolean console_audio; /* 160 */ - ALIGN64 boolean console_session; /* 161 */ + ALIGN64 BOOL console_audio; /* 160 */ + ALIGN64 BOOL console_session; /* 161 */ ALIGN64 uint32 redirected_session_id; /* 162 */ - ALIGN64 boolean audio_playback; /* 163 */ - ALIGN64 boolean audio_capture; /* 164 */ + ALIGN64 BOOL audio_playback; /* 163 */ + ALIGN64 BOOL audio_capture; /* 164 */ uint64 paddingG[176 - 165]; /* 165 */ /* Output Control */ - ALIGN64 boolean refresh_rect; /* 176 */ - ALIGN64 boolean suppress_output; /* 177 */ - ALIGN64 boolean desktop_resize; /* 178 */ + ALIGN64 BOOL refresh_rect; /* 176 */ + ALIGN64 BOOL suppress_output; /* 177 */ + ALIGN64 BOOL desktop_resize; /* 178 */ uint64 paddingH[192 - 179]; /* 179 */ /* Reconnection */ - ALIGN64 boolean auto_reconnection; /* 192 */ + ALIGN64 BOOL auto_reconnection; /* 192 */ ALIGN64 ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */ ALIGN64 ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */ uint64 paddingI[208 - 195]; /* 195 */ @@ -364,18 +364,18 @@ struct rdp_settings ALIGN64 uint32 os_major_type; /* 216 */ ALIGN64 uint32 os_minor_type; /* 217 */ ALIGN64 uint32 vc_chunk_size; /* 218 */ - ALIGN64 boolean sound_beeps; /* 219 */ - ALIGN64 boolean smooth_fonts; /* 220 */ - ALIGN64 boolean frame_marker; /* 221 */ - ALIGN64 boolean fastpath_input; /* 222 */ - ALIGN64 boolean fastpath_output; /* 223 */ + ALIGN64 BOOL sound_beeps; /* 219 */ + ALIGN64 BOOL smooth_fonts; /* 220 */ + ALIGN64 BOOL frame_marker; /* 221 */ + ALIGN64 BOOL fastpath_input; /* 222 */ + ALIGN64 BOOL fastpath_output; /* 223 */ ALIGN64 uint8* received_caps; /* 224 */ ALIGN64 uint8* order_support; /* 225 */ - ALIGN64 boolean surface_commands; /* 226 */ - ALIGN64 boolean disable_wallpaper; /* 227 */ - ALIGN64 boolean disable_full_window_drag; /* 228 */ - ALIGN64 boolean disable_menu_animations; /* 229 */ - ALIGN64 boolean disable_theming; /* 230 */ + ALIGN64 BOOL surface_commands; /* 226 */ + ALIGN64 BOOL disable_wallpaper; /* 227 */ + ALIGN64 BOOL disable_full_window_drag; /* 228 */ + ALIGN64 BOOL disable_menu_animations; /* 229 */ + ALIGN64 BOOL disable_theming; /* 230 */ ALIGN64 uint32 connection_type; /* 231 */ ALIGN64 uint32 multifrag_max_request_size; /* 232 */ uint64 paddingK[248 - 233]; /* 233 */ @@ -389,7 +389,7 @@ struct rdp_settings ALIGN64 DWORD server_random_length; /* 253 */ ALIGN64 BYTE* server_certificate; /* 254 */ ALIGN64 DWORD server_certificate_length; /* 255 */ - ALIGN64 boolean ignore_certificate; /* 256 */ + ALIGN64 BOOL ignore_certificate; /* 256 */ ALIGN64 rdpCertificate* server_cert; /* 257 */ ALIGN64 char* rdp_key_file; /* 258 */ ALIGN64 rdpKey* server_key; /* 259 */ @@ -397,73 +397,73 @@ struct rdp_settings uint64 paddingL[280 - 261]; /* 261 */ /* Codecs */ - ALIGN64 boolean rfx_codec; /* 280 */ - ALIGN64 boolean ns_codec; /* 281 */ + ALIGN64 BOOL rfx_codec; /* 280 */ + ALIGN64 BOOL ns_codec; /* 281 */ ALIGN64 uint32 rfx_codec_id; /* 282 */ ALIGN64 uint32 ns_codec_id; /* 283 */ ALIGN64 uint32 rfx_codec_mode; /* 284 */ - ALIGN64 boolean frame_acknowledge; /* 285 */ - ALIGN64 boolean jpeg_codec; /* 286 */ + ALIGN64 BOOL frame_acknowledge; /* 285 */ + ALIGN64 BOOL jpeg_codec; /* 286 */ ALIGN64 uint32 jpeg_codec_id; /* 287 */ ALIGN64 uint32 jpeg_quality; /* 288 */ ALIGN64 uint32 v3_codec_id; /* 289 */ - ALIGN64 boolean rfx_codec_only; /* 290 */ + ALIGN64 BOOL rfx_codec_only; /* 290 */ uint64 paddingM[296 - 291]; /* 291 */ /* Recording */ - ALIGN64 boolean dump_rfx; /* 296 */ - ALIGN64 boolean play_rfx; /* 297 */ + ALIGN64 BOOL dump_rfx; /* 296 */ + ALIGN64 BOOL play_rfx; /* 297 */ ALIGN64 char* dump_rfx_file; /* 298 */ ALIGN64 char* play_rfx_file; /* 299 */ uint64 paddingN[312 - 300]; /* 300 */ /* RemoteApp */ - ALIGN64 boolean remote_app; /* 312 */ + ALIGN64 BOOL remote_app; /* 312 */ ALIGN64 uint32 num_icon_caches; /* 313 */ ALIGN64 uint32 num_icon_cache_entries; /* 314 */ - ALIGN64 boolean rail_langbar_supported; /* 315 */ + ALIGN64 BOOL rail_langbar_supported; /* 315 */ uint64 paddingO[320 - 316]; /* 316 */ /* Pointer */ - ALIGN64 boolean large_pointer; /* 320 */ - ALIGN64 boolean color_pointer; /* 321 */ + ALIGN64 BOOL large_pointer; /* 320 */ + ALIGN64 BOOL color_pointer; /* 321 */ ALIGN64 uint32 pointer_cache_size; /* 322 */ uint64 paddingP[328 - 323]; /* 323 */ /* Bitmap Cache */ - ALIGN64 boolean bitmap_cache; /* 328 */ - ALIGN64 boolean bitmap_cache_v3; /* 329 */ - ALIGN64 boolean persistent_bitmap_cache; /* 330 */ + ALIGN64 BOOL bitmap_cache; /* 328 */ + ALIGN64 BOOL bitmap_cache_v3; /* 329 */ + ALIGN64 BOOL persistent_bitmap_cache; /* 330 */ ALIGN64 uint32 bitmapCacheV2NumCells; /* 331 */ ALIGN64 BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */ uint64 paddingQ[344 - 333]; /* 333 */ /* Offscreen Bitmap Cache */ - ALIGN64 boolean offscreen_bitmap_cache; /* 344 */ + ALIGN64 BOOL offscreen_bitmap_cache; /* 344 */ ALIGN64 uint32 offscreen_bitmap_cache_size; /* 345 */ ALIGN64 uint32 offscreen_bitmap_cache_entries; /* 346 */ uint64 paddingR[352 - 347]; /* 347 */ /* Glyph Cache */ - ALIGN64 boolean glyph_cache; /* 352 */ + ALIGN64 BOOL glyph_cache; /* 352 */ ALIGN64 uint32 glyphSupportLevel; /* 353 */ ALIGN64 GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */ ALIGN64 GLYPH_CACHE_DEFINITION* fragCache; /* 355 */ uint64 paddingS[360 - 356]; /* 356 */ /* Draw Nine Grid */ - ALIGN64 boolean draw_nine_grid; /* 360 */ + ALIGN64 BOOL draw_nine_grid; /* 360 */ ALIGN64 uint32 draw_nine_grid_cache_size; /* 361 */ ALIGN64 uint32 draw_nine_grid_cache_entries; /* 362 */ uint64 paddingT[368 - 363]; /* 363 */ /* Draw GDI+ */ - ALIGN64 boolean draw_gdi_plus; /* 368 */ - ALIGN64 boolean draw_gdi_plus_cache; /* 369 */ + ALIGN64 BOOL draw_gdi_plus; /* 368 */ + ALIGN64 BOOL draw_gdi_plus_cache; /* 369 */ uint64 paddingU[376 - 370]; /* 370 */ /* Desktop Composition */ - ALIGN64 boolean desktop_composition; /* 376 */ + ALIGN64 BOOL desktop_composition; /* 376 */ uint64 paddingV[384 - 377]; /* 377 */ /* Channels */ diff --git a/include/freerdp/types.h b/include/freerdp/types.h index 89dda14b2..b6905c522 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -72,29 +72,24 @@ typedef signed long long sint64; #include #ifdef _WIN32 -#define boolean BOOLEAN +#define BOOL BOOLEAN #else -typedef int boolean; +typedef int BOOL; #endif #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 +#define BOOL BOOLEAN #else -typedef int boolean; +typedef int BOOL; #endif -#endif /* __bool_TRUE_FALSE_are_defined */ - #else /* ifdef __cplusplus */ #ifndef TRUE @@ -105,7 +100,7 @@ typedef int boolean; #define FALSE 0 #endif -typedef int boolean; +typedef int BOOL; #endif /* __cplusplus */ diff --git a/include/freerdp/update.h b/include/freerdp/update.h index fa52bb69b..e96832673 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -53,7 +53,7 @@ struct _BITMAP_DATA uint32 cbScanWidth; uint32 cbUncompressedSize; uint8* bitmapDataStream; - boolean compressed; + BOOL compressed; }; typedef struct _BITMAP_DATA BITMAP_DATA; @@ -181,8 +181,8 @@ struct rdp_update /* internal */ - boolean dump_rfx; - boolean play_rfx; + BOOL dump_rfx; + BOOL play_rfx; rdpPcap* pcap_rfx; BITMAP_UPDATE bitmap_update; diff --git a/include/freerdp/utils/file.h b/include/freerdp/utils/file.h index 2d063fa0a..9eee16248 100644 --- a/include/freerdp/utils/file.h +++ b/include/freerdp/utils/file.h @@ -25,15 +25,15 @@ #include FREERDP_API void freerdp_mkdir(char* path); -FREERDP_API boolean freerdp_check_file_exists(char* file); +FREERDP_API BOOL freerdp_check_file_exists(char* file); FREERDP_API char* freerdp_get_home_path(rdpSettings* settings); FREERDP_API char* freerdp_get_config_path(rdpSettings* settings); FREERDP_API char* freerdp_get_current_path(rdpSettings* settings); FREERDP_API char* freerdp_construct_path(char* base_path, char* relative_path); FREERDP_API char* freerdp_append_shared_library_suffix(char* file_path); FREERDP_API char* freerdp_get_parent_path(char* base_path, int depth); -FREERDP_API boolean freerdp_path_contains_separator(char* path); -FREERDP_API boolean freerdp_detect_development_mode(rdpSettings* settings); +FREERDP_API BOOL freerdp_path_contains_separator(char* path); +FREERDP_API BOOL freerdp_detect_development_mode(rdpSettings* settings); FREERDP_API void freerdp_detect_paths(rdpSettings* settings); #endif /* __FILE_UTILS_H */ diff --git a/include/freerdp/utils/load_plugin.h b/include/freerdp/utils/load_plugin.h index d1d840d15..0cd24a149 100644 --- a/include/freerdp/utils/load_plugin.h +++ b/include/freerdp/utils/load_plugin.h @@ -25,11 +25,11 @@ FREERDP_API void* freerdp_open_library(const char* file); FREERDP_API void* freerdp_get_library_symbol(void* library, const char* name); -FREERDP_API boolean freerdp_close_library(void* library); +FREERDP_API BOOL freerdp_close_library(void* library); FREERDP_API void* freerdp_load_library_symbol(const char* file, const char* name); FREERDP_API void* freerdp_load_plugin(const char* name, const char* entry_name); FREERDP_API void* freerdp_load_channel_plugin(rdpSettings* settings, const char* name, const char* entry_name); -FREERDP_API boolean freerdp_register_static_plugin(const char* name, const char* entry_name, void* entry_addr); +FREERDP_API BOOL freerdp_register_static_plugin(const char* name, const char* entry_name, void* entry_addr); FREERDP_API void* freerdp_load_static_plugin(const char* name, const char* entry_name); #endif /* __LOAD_PLUGIN_UTILS_H */ diff --git a/include/freerdp/utils/pcap.h b/include/freerdp/utils/pcap.h index b8344e68e..667a0c5e5 100644 --- a/include/freerdp/utils/pcap.h +++ b/include/freerdp/utils/pcap.h @@ -58,7 +58,7 @@ struct rdp_pcap { FILE* fp; char* name; - boolean write; + BOOL write; int file_size; int record_count; pcap_header header; @@ -68,14 +68,14 @@ struct rdp_pcap }; typedef struct rdp_pcap rdpPcap; -FREERDP_API rdpPcap* pcap_open(char* name, boolean write); +FREERDP_API rdpPcap* pcap_open(char* name, BOOL write); FREERDP_API void pcap_close(rdpPcap* pcap); FREERDP_API void pcap_add_record(rdpPcap* pcap, void* data, uint32 length); -FREERDP_API boolean pcap_has_next_record(rdpPcap* pcap); -FREERDP_API boolean pcap_get_next_record(rdpPcap* pcap, pcap_record* record); -FREERDP_API boolean pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record); -FREERDP_API boolean pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record); +FREERDP_API BOOL pcap_has_next_record(rdpPcap* pcap); +FREERDP_API BOOL pcap_get_next_record(rdpPcap* pcap, pcap_record* record); +FREERDP_API BOOL pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record); +FREERDP_API BOOL pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record); FREERDP_API void pcap_flush(rdpPcap* pcap); #endif /* __UTILS_PCAP_H */ diff --git a/include/freerdp/utils/tcp.h b/include/freerdp/utils/tcp.h index d8aefffed..4c486b541 100644 --- a/include/freerdp/utils/tcp.h +++ b/include/freerdp/utils/tcp.h @@ -28,7 +28,7 @@ FREERDP_API int freerdp_tcp_read(int sockfd, uint8* data, int length); FREERDP_API int freerdp_tcp_write(int sockfd, uint8* data, int length); FREERDP_API int freerdp_tcp_disconnect(int sockfd); -FREERDP_API int freerdp_tcp_set_no_delay(int sockfd, boolean no_delay); +FREERDP_API int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay); FREERDP_API int freerdp_wsa_startup(); FREERDP_API int freerdp_wsa_cleanup(); diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 2f73efeef..2aec2e332 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -162,7 +162,7 @@ void update_gdi_bitmap_update(rdpContext* context, BITMAP_UPDATE* bitmap_update) int i; rdpBitmap* bitmap; BITMAP_DATA* bitmap_data; - boolean reused = TRUE; + BOOL reused = TRUE; rdpCache* cache = context->cache; if (cache->bitmap->bitmap == NULL) diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index f47376aa5..0b62a9103 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -949,7 +949,7 @@ static void freerdp_channels_process_sync(rdpChannels* channels, freerdp* instan /** * called only from main thread */ -boolean freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds, +BOOL freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** read_fds, int* read_count, void** write_fds, int* write_count) { wait_obj_get_fds(channels->signal, read_fds, read_count); @@ -959,7 +959,7 @@ boolean freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void* /** * called only from main thread */ -boolean freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance) +BOOL freerdp_channels_check_fds(rdpChannels* channels, freerdp* instance) { if (wait_obj_is_set(channels->signal)) { diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index f0200c439..c6ab04346 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -357,7 +357,7 @@ static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8* static int WTSReceiveChannelData(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size) { int i; - boolean result = FALSE; + BOOL result = FALSE; rdpPeerChannel* channel; for (i = 0; i < client->settings->num_channels; i++) @@ -444,9 +444,9 @@ void WTSVirtualChannelManagerGetFileDescriptor(WTSVirtualChannelManager* vcm, } } -boolean WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) +BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) { - boolean result = TRUE; + BOOL result = TRUE; wts_data_item* item; rdpPeerChannel* channel; uint32 dynvc_caps; @@ -569,16 +569,16 @@ void* WTSVirtualChannelOpenEx( return channel; } -boolean WTSVirtualChannelQuery( +BOOL WTSVirtualChannelQuery( /* __in */ void* hChannelHandle, /* __in */ WTS_VIRTUAL_CLASS WtsVirtualClass, /* __out */ void** ppBuffer, /* __out */ uint32* pBytesReturned) { - boolean bval; + BOOL bval; void* fds[10]; int fds_count = 0; - boolean result = FALSE; + BOOL result = FALSE; rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle; switch (WtsVirtualClass) @@ -615,9 +615,9 @@ boolean WTSVirtualChannelQuery( break; } } - *ppBuffer = malloc(sizeof(boolean)); - memcpy(*ppBuffer, &bval, sizeof(boolean)); - *pBytesReturned = sizeof(boolean); + *ppBuffer = malloc(sizeof(BOOL)); + memcpy(*ppBuffer, &bval, sizeof(BOOL)); + *pBytesReturned = sizeof(BOOL); break; default: @@ -632,7 +632,7 @@ void WTSFreeMemory( free(pMemory); } -boolean WTSVirtualChannelRead( +BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, /* __in */ uint32 TimeOut, /* __out */ uint8* Buffer, @@ -671,7 +671,7 @@ boolean WTSVirtualChannelRead( return TRUE; } -boolean WTSVirtualChannelWrite( +BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, /* __in */ uint8* Buffer, /* __in */ uint32 Length, @@ -749,7 +749,7 @@ boolean WTSVirtualChannelWrite( return TRUE; } -boolean WTSVirtualChannelClose( +BOOL WTSVirtualChannelClose( /* __in */ void* hChannelHandle) { STREAM* s; diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index 2908b8920..ff39207a4 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -384,7 +384,7 @@ static int process_raw_plane(uint8* srcData, int width, int height, uint8* dstDa * 4 byte bitmap decompress * RDP6_BITMAP_STREAM */ -static boolean bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int height, int size) +static BOOL bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int height, int size) { int RLE; int code; @@ -439,7 +439,7 @@ static boolean bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int /** * bitmap decompression routine */ -boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp) +BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp) { uint8 * TmpBfr; diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index f2a0056ab..b6d702aeb 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -260,8 +260,8 @@ void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer, PIXEL temp; PIXEL fgPel = WHITE_PIXEL; - boolean fInsertFgPel = FALSE; - boolean fFirstLine = TRUE; + BOOL fInsertFgPel = FALSE; + BOOL fFirstLine = TRUE; uint8 bitmask; PIXEL pixelA, pixelB; diff --git a/libfreerdp/codec/jpeg.c b/libfreerdp/codec/jpeg.c index bd590ee10..ad00b75a5 100644 --- a/libfreerdp/codec/jpeg.c +++ b/libfreerdp/codec/jpeg.c @@ -44,7 +44,7 @@ static void my_init_source(j_decompress_ptr cinfo) } /*****************************************************************************/ -static boolean my_fill_input_buffer(j_decompress_ptr cinfo) +static BOOL my_fill_input_buffer(j_decompress_ptr cinfo) { struct mydata_decomp* md; @@ -60,7 +60,7 @@ static void my_skip_input_data(j_decompress_ptr cinfo, long num_bytes) } /*****************************************************************************/ -static boolean my_resync_to_restart(j_decompress_ptr cinfo, int desired) +static BOOL my_resync_to_restart(j_decompress_ptr cinfo, int desired) { return 1; } @@ -123,7 +123,7 @@ do_decompress(char* comp_data, int comp_data_bytes, } /* jpeg decompress */ -boolean +BOOL jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp) { int lwidth; @@ -150,7 +150,7 @@ jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, #else -boolean +BOOL jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp) { return 0; diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index e2e34111b..59cbc25b4 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -499,7 +499,7 @@ void mppc_enc_free(struct rdp_mppc_enc* enc) * @return TRUE on success, FALSE on failure */ -boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) { if ((enc == NULL) || (srcData == NULL) || (len <= 0) || (len > enc->buf_len)) return FALSE; @@ -525,7 +525,7 @@ boolean compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @return TRUE on success, FALSE on failure */ -boolean compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) { /* RDP 4.0 encoding not yet implemented */ return FALSE; @@ -541,7 +541,7 @@ boolean compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @return TRUE on success, FALSE on failure */ -boolean compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) { char* outputBuffer; /* points to enc->outputBuffer */ char* hptr_end; /* points to end of history data */ diff --git a/libfreerdp/core/activation.c b/libfreerdp/core/activation.c index 19bebd2d6..dd1f49e2b 100644 --- a/libfreerdp/core/activation.c +++ b/libfreerdp/core/activation.c @@ -40,7 +40,7 @@ void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings) stream_write_uint16(s, settings->pdu_source); /* targetUser (2 bytes) */ } -boolean rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s) { if (rdp->settings->server_mode) return rdp_recv_server_synchronize_pdu(rdp, s); @@ -48,13 +48,13 @@ boolean rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s) return rdp_recv_client_synchronize_pdu(rdp, s); } -boolean rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU; return TRUE; } -boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp) +BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp) { STREAM* s; @@ -66,7 +66,7 @@ boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp) return TRUE; } -boolean rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) { uint16 messageType; @@ -86,7 +86,7 @@ boolean rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp) +BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp) { STREAM* s; @@ -97,7 +97,7 @@ boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id); } -boolean rdp_recv_control_pdu(STREAM* s, uint16* action) +BOOL rdp_recv_control_pdu(STREAM* s, uint16* action) { if (stream_get_left(s) < 8) return FALSE; @@ -116,7 +116,7 @@ void rdp_write_client_control_pdu(STREAM* s, uint16 action) stream_write_uint32(s, 0); /* controlId (4 bytes) */ } -boolean rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) { uint16 action; @@ -136,7 +136,7 @@ boolean rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) +BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) { STREAM* s; @@ -151,7 +151,7 @@ boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) return TRUE; } -boolean rdp_send_server_control_granted_pdu(rdpRdp* rdp) +BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp) { STREAM* s; @@ -166,7 +166,7 @@ boolean rdp_send_server_control_granted_pdu(rdpRdp* rdp) return TRUE; } -boolean rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action) +BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action) { STREAM* s; @@ -201,7 +201,7 @@ void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings) /* entries */ } -boolean rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp) +BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp) { STREAM* s; @@ -211,7 +211,7 @@ boolean rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_BITMAP_CACHE_PERSISTENT_LIST, rdp->mcs->user_id); } -boolean rdp_recv_client_font_list_pdu(STREAM* s) +BOOL rdp_recv_client_font_list_pdu(STREAM* s) { if (stream_get_left(s) < 8) return FALSE; @@ -227,7 +227,7 @@ void rdp_write_client_font_list_pdu(STREAM* s, uint16 flags) stream_write_uint16(s, 50); /* entrySize (2 bytes) */ } -boolean rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags) +BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags) { STREAM* s; @@ -237,7 +237,7 @@ boolean rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_LIST, rdp->mcs->user_id); } -boolean rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s) { if (rdp->settings->server_mode) return rdp_recv_server_font_map_pdu(rdp, s); @@ -245,13 +245,13 @@ boolean rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s) return rdp_recv_client_font_map_pdu(rdp, s); } -boolean rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU; return TRUE; } -boolean rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU; @@ -263,7 +263,7 @@ boolean rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_send_server_font_map_pdu(rdpRdp* rdp) +BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp) { STREAM* s; @@ -277,7 +277,7 @@ boolean rdp_send_server_font_map_pdu(rdpRdp* rdp) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_MAP, rdp->mcs->user_id); } -boolean rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) { uint16 lengthSourceDescriptor; @@ -305,7 +305,7 @@ boolean rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_send_deactivate_all(rdpRdp* rdp) +BOOL rdp_send_deactivate_all(rdpRdp* rdp) { STREAM* s; @@ -318,7 +318,7 @@ boolean rdp_send_deactivate_all(rdpRdp* rdp) return rdp_send_pdu(rdp, s, PDU_TYPE_DEACTIVATE_ALL, rdp->mcs->user_id); } -boolean rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s) { uint16 action; @@ -332,7 +332,7 @@ boolean rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s) { if (!rdp_recv_client_font_list_pdu(s)) return FALSE; diff --git a/libfreerdp/core/activation.h b/libfreerdp/core/activation.h index b3e0ac091..563832e03 100644 --- a/libfreerdp/core/activation.h +++ b/libfreerdp/core/activation.h @@ -38,28 +38,28 @@ #define FONTLIST_FIRST 0x0001 #define FONTLIST_LAST 0x0002 -boolean rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s); -boolean rdp_send_deactivate_all(rdpRdp* rdp); +BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_deactivate_all(rdpRdp* rdp); -boolean rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp); -boolean rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp); -boolean rdp_recv_control_pdu(STREAM* s, uint16* action); -boolean rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp); -boolean rdp_send_server_control_granted_pdu(rdpRdp* rdp); -boolean rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action); -boolean rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp); -boolean rdp_recv_client_font_list_pdu(STREAM* s); -boolean rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags); -boolean rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_send_server_font_map_pdu(rdpRdp* rdp); +BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp); +BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp); +BOOL rdp_recv_control_pdu(STREAM* s, uint16* action); +BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp); +BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp); +BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action); +BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp); +BOOL rdp_recv_client_font_list_pdu(STREAM* s); +BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags); +BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp); -boolean rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s); #endif /* __ACTIVATION_H */ diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 3f0f0f85a..c5018f91f 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -1686,7 +1686,7 @@ void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE); } -boolean rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCapabilities) +BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCapabilities) { uint16 type; uint16 length; @@ -1843,7 +1843,7 @@ boolean rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 number return TRUE; } -boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) { uint16 length; uint16 channelId; @@ -1966,7 +1966,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings) stream_write_uint32(s, 0); /* sessionId */ } -boolean rdp_send_demand_active(rdpRdp* rdp) +BOOL rdp_send_demand_active(rdpRdp* rdp) { STREAM* s; @@ -1981,7 +1981,7 @@ boolean rdp_send_demand_active(rdpRdp* rdp) return TRUE; } -boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) { uint16 length; uint16 channelId; @@ -2154,7 +2154,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings) stream_set_mark(s, em); } -boolean rdp_send_confirm_active(rdpRdp* rdp) +BOOL rdp_send_confirm_active(rdpRdp* rdp) { STREAM* s; diff --git a/libfreerdp/core/capabilities.h b/libfreerdp/core/capabilities.h index e7778a6bf..69c2c9353 100644 --- a/libfreerdp/core/capabilities.h +++ b/libfreerdp/core/capabilities.h @@ -163,11 +163,11 @@ #define CLW_ENTROPY_RLGR1 0x01 #define CLW_ENTROPY_RLGR3 0x04 -boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s); void rdp_write_demand_active(STREAM* s, rdpSettings* settings); -boolean rdp_send_demand_active(rdpRdp* rdp); -boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_demand_active(rdpRdp* rdp); +BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s); void rdp_write_confirm_active(STREAM* s, rdpSettings* settings); -boolean rdp_send_confirm_active(rdpRdp* rdp); +BOOL rdp_send_confirm_active(rdpRdp* rdp); #endif /* __CAPABILITIES_H */ diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 37a702fc9..8870cee26 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -248,7 +248,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain) } } -static boolean certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, uint32 length) +static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, uint32 length) { uint8 magic[4]; uint32 keylen; @@ -279,7 +279,7 @@ static boolean certificate_process_server_public_key(rdpCertificate* certificate return TRUE; } -static boolean certificate_process_server_public_signature(rdpCertificate* certificate, uint8* sigdata, int sigdatalen, STREAM* s, uint32 siglen) +static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, uint8* sigdata, int sigdatalen, STREAM* s, uint32 siglen) { int i, sum; CryptoMd5 md5ctx; @@ -340,7 +340,7 @@ static boolean certificate_process_server_public_signature(rdpCertificate* certi * @param s stream */ -boolean certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s) +BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s) { uint32 dwSigAlgId; uint32 dwKeyAlgId; @@ -410,7 +410,7 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific * @param s stream */ -boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s) +BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s) { int i; uint32 certLength; @@ -458,7 +458,7 @@ boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certifica * @param length certificate length */ -boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length) +BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length) { STREAM* s; uint32 dwVersion; diff --git a/libfreerdp/core/certificate.h b/libfreerdp/core/certificate.h index efd897ffa..387846b1f 100644 --- a/libfreerdp/core/certificate.h +++ b/libfreerdp/core/certificate.h @@ -47,9 +47,9 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info); rdpX509CertChain* certificate_new_x509_certificate_chain(uint32 count); void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain); -boolean certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s); -boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s); -boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length); +BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s); +BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s); +BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length); rdpCertificate* certificate_new(); void certificate_free(rdpCertificate* certificate); diff --git a/libfreerdp/core/channel.c b/libfreerdp/core/channel.c index 8cb582b3d..893371d4e 100644 --- a/libfreerdp/core/channel.c +++ b/libfreerdp/core/channel.c @@ -34,7 +34,7 @@ #include "rdp.h" #include "channel.h" -boolean freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size) +BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size) { STREAM* s; uint32 flags; diff --git a/libfreerdp/core/channel.h b/libfreerdp/core/channel.h index f33c52cb1..bdc4c2207 100644 --- a/libfreerdp/core/channel.h +++ b/libfreerdp/core/channel.h @@ -20,7 +20,7 @@ #ifndef __CHANNEL_H #define __CHANNEL_H -boolean freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size); +BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size); void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id); void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id); diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 4885145a2..701cdb82b 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -68,7 +68,7 @@ * @return true if the connection succeeded. FALSE otherwise. */ -boolean rdp_client_connect(rdpRdp* rdp) +BOOL rdp_client_connect(rdpRdp* rdp) { rdpSettings* settings = rdp->settings; @@ -123,12 +123,12 @@ boolean rdp_client_connect(rdpRdp* rdp) return TRUE; } -boolean rdp_client_disconnect(rdpRdp* rdp) +BOOL rdp_client_disconnect(rdpRdp* rdp) { return transport_disconnect(rdp->transport); } -boolean rdp_client_redirect(rdpRdp* rdp) +BOOL rdp_client_redirect(rdpRdp* rdp) { rdpSettings* settings = rdp->settings; rdpRedirection* redirection = rdp->redirection; @@ -202,7 +202,7 @@ boolean rdp_client_redirect(rdpRdp* rdp) return rdp_client_connect(rdp); } -static boolean rdp_client_establish_keys(rdpRdp* rdp) +static BOOL rdp_client_establish_keys(rdpRdp* rdp) { uint8 client_random[CLIENT_RANDOM_LENGTH]; uint8 crypt_client_random[256 + 8]; @@ -265,7 +265,7 @@ static boolean rdp_client_establish_keys(rdpRdp* rdp) return TRUE; } -static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) +static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) { uint8 client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */ uint8 crypt_client_random[256 + 8]; @@ -337,7 +337,7 @@ static boolean rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s) +BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s) { if (!mcs_recv_connect_response(rdp->mcs, s)) { @@ -356,7 +356,7 @@ boolean rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s) +BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s) { if (!mcs_recv_attach_user_confirm(rdp->mcs, s)) return FALSE; @@ -369,11 +369,11 @@ boolean rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s) +BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s) { int i; uint16 channel_id; - boolean all_joined = TRUE; + BOOL all_joined = TRUE; if (!mcs_recv_channel_join_confirm(rdp->mcs, s, &channel_id)) return FALSE; @@ -435,7 +435,7 @@ boolean rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s) +BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s) { if (!license_recv(rdp->license, s)) return FALSE; @@ -454,7 +454,7 @@ boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) +BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) { uint8* mark; uint16 width; @@ -501,7 +501,7 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_client_connect_finalize(rdpRdp* rdp) +BOOL rdp_client_connect_finalize(rdpRdp* rdp) { /** * [MS-RDPBCGR] 1.3.1.1 - 8. @@ -523,9 +523,9 @@ boolean rdp_client_connect_finalize(rdpRdp* rdp) return TRUE; } -boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) { - boolean status; + BOOL status; rdpSettings* settings = rdp->settings; transport_set_blocking_mode(rdp->transport, TRUE); @@ -586,7 +586,7 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s) { int i; @@ -610,7 +610,7 @@ boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s) { if (!mcs_recv_erect_domain_request(rdp->mcs, s)) return FALSE; @@ -620,7 +620,7 @@ boolean rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s) { if (!mcs_recv_attach_user_request(rdp->mcs, s)) return FALSE; @@ -633,11 +633,11 @@ boolean rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s) { int i; uint16 channel_id; - boolean all_joined = TRUE; + BOOL all_joined = TRUE; if (!mcs_recv_channel_join_request(rdp->mcs, s, &channel_id)) return FALSE; @@ -665,7 +665,7 @@ boolean rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s) { if (!rdp_server_establish_keys(rdp, s)) @@ -676,7 +676,7 @@ boolean rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s) { if (!rdp_recv_client_info(rdp, s)) @@ -690,7 +690,7 @@ boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s) +BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s) { if (!rdp_recv_confirm_active(rdp, s)) return FALSE; @@ -707,7 +707,7 @@ boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_server_reactivate(rdpRdp* rdp) +BOOL rdp_server_reactivate(rdpRdp* rdp) { if (!rdp_send_deactivate_all(rdp)) return FALSE; diff --git a/libfreerdp/core/connection.h b/libfreerdp/core/connection.h index 283a0c0d0..e29232822 100644 --- a/libfreerdp/core/connection.h +++ b/libfreerdp/core/connection.h @@ -45,23 +45,23 @@ enum CONNECTION_STATE CONNECTION_STATE_ACTIVE }; -boolean rdp_client_connect(rdpRdp* rdp); -boolean rdp_client_redirect(rdpRdp* rdp); -boolean rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s); -boolean rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s); -boolean rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s); -boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s); -boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s); -boolean rdp_client_connect_finalize(rdpRdp* rdp); +BOOL rdp_client_connect(rdpRdp* rdp); +BOOL rdp_client_redirect(rdpRdp* rdp); +BOOL rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s); +BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s); +BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s); +BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s); +BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s); +BOOL rdp_client_connect_finalize(rdpRdp* rdp); -boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s); -boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s); -boolean rdp_server_reactivate(rdpRdp* rdp); +BOOL rdp_server_accept_nego(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_client_keys(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s); +BOOL rdp_server_reactivate(rdpRdp* rdp); #endif /* __CONNECTION_H */ diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index f5f9c3e32..86f4f29f3 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -143,7 +143,7 @@ uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s) return length - stream_get_length(s); } -static boolean fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s) +static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; uint16 numberOrders; @@ -187,7 +187,7 @@ static void fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s) stream_seek_uint16(s); /* size (2 bytes), must be set to zero */ } -static boolean fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32 size, STREAM* s) +static BOOL fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32 size, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; rdpContext* context = fastpath->rdp->update->context; @@ -257,7 +257,7 @@ static boolean fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uin return TRUE; } -static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) +static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) { uint16 size; int next_pos; @@ -338,7 +338,7 @@ static boolean fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) return TRUE; } -boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) +BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; @@ -358,7 +358,7 @@ boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) return TRUE; } -static boolean fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode) +static BOOL fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode) { uint8 eventHeader; @@ -373,7 +373,7 @@ static boolean fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, ui return TRUE; } -static boolean fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) { uint16 flags; uint16 code; @@ -397,7 +397,7 @@ static boolean fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* return TRUE; } -static boolean fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) { uint16 pointerFlags; uint16 xPos; @@ -415,7 +415,7 @@ static boolean fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, return TRUE; } -static boolean fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) { uint16 pointerFlags; uint16 xPos; @@ -433,14 +433,14 @@ static boolean fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s return TRUE; } -static boolean fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) { IFCALL(fastpath->rdp->input->SynchronizeEvent, fastpath->rdp->input, eventFlags); return TRUE; } -static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) { uint16 unicodeCode; uint16 flags; @@ -461,7 +461,7 @@ static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* return TRUE; } -static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) +static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) { uint8 eventFlags; uint8 eventCode; @@ -504,7 +504,7 @@ static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) return TRUE; } -boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) +BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) { uint8 i; @@ -564,7 +564,7 @@ STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 e return s; } -boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) +BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) { rdpRdp *rdp; uint16 length; @@ -631,7 +631,7 @@ STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath) return s; } -boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s) +BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s) { rdpRdp* rdp; uint8* bm; @@ -647,7 +647,7 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM int pdu_data_bytes; int dlen; int bytes_to_crypt; - boolean result; + BOOL result; uint16 pduLength; uint16 maxLength; uint32 totalLength; diff --git a/libfreerdp/core/fastpath.h b/libfreerdp/core/fastpath.h index 56ba81d48..d7104cbb5 100644 --- a/libfreerdp/core/fastpath.h +++ b/libfreerdp/core/fastpath.h @@ -105,16 +105,16 @@ struct rdp_fastpath uint16 fastpath_header_length(STREAM* s); uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s); uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s); -boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s); -boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s); +BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s); +BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s); STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode); -boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s); +BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s); STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath); -boolean fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s); +BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s); -boolean fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId); +BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId); rdpFastPath* fastpath_new(rdpRdp* rdp); void fastpath_free(rdpFastPath* fastpath); diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index 1eff2af8b..8738346a2 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -47,11 +47,11 @@ * @return TRUE if successful. FALSE otherwise. * */ -boolean freerdp_connect(freerdp* instance) +BOOL freerdp_connect(freerdp* instance) { rdpRdp* rdp; rdpSettings* settings; - boolean status = FALSE; + BOOL status = FALSE; /* We always set the return code to 0 before we start the connect sequence*/ connectErrorCode = 0; @@ -157,7 +157,7 @@ boolean freerdp_connect(freerdp* instance) return status; } -boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) +BOOL freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount) { rdpRdp* rdp; @@ -167,7 +167,7 @@ boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds return TRUE; } -boolean freerdp_check_fds(freerdp* instance) +BOOL freerdp_check_fds(freerdp* instance) { int status; rdpRdp* rdp; @@ -187,7 +187,7 @@ static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* d return rdp_send_channel_data(instance->context->rdp, channel_id, data, size); } -boolean freerdp_disconnect(freerdp* instance) +BOOL freerdp_disconnect(freerdp* instance) { rdpRdp* rdp; @@ -197,7 +197,7 @@ boolean freerdp_disconnect(freerdp* instance) return TRUE; } -boolean freerdp_shall_disconnect(freerdp* instance) +BOOL freerdp_shall_disconnect(freerdp* instance) { return instance->context->rdp->disconnect; } diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index d59010031..d466ca4a3 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -138,7 +138,7 @@ uint8 h221_sc_key[4] = "McDn"; * @param settings rdp settings */ -boolean gcc_read_conference_create_request(STREAM* s, rdpSettings* settings) +BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings) { uint16 length; uint8 choice; @@ -223,7 +223,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data) per_write_octet_string(s, user_data->data, stream_get_length(user_data), 0); /* array of client data blocks */ } -boolean gcc_read_conference_create_response(STREAM* s, rdpSettings* settings) +BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings) { uint16 length; uint32 tag; @@ -306,7 +306,7 @@ void gcc_write_conference_create_response(STREAM* s, STREAM* user_data) per_write_octet_string(s, user_data->data, stream_get_length(user_data), 0); /* array of server data blocks */ } -boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length) +BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length) { uint16 type; uint16 blockLength; @@ -368,7 +368,7 @@ void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings) gcc_write_client_monitor_data(s, settings); } -boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length) +BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length) { uint16 type; uint16 offset = 0; @@ -429,7 +429,7 @@ void gcc_write_server_data_blocks(STREAM* s, rdpSettings* settings) gcc_write_server_security_data(s, settings); } -boolean gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length) +BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length) { stream_read_uint16(s, *type); /* type */ stream_read_uint16(s, *length); /* length */ @@ -464,7 +464,7 @@ void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length) * @param settings rdp settings */ -boolean gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLength) { char* str; uint32 version; @@ -722,7 +722,7 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write_uint32(s, settings->selected_protocol); /* serverSelectedProtocol */ } -boolean gcc_read_server_core_data(STREAM* s, rdpSettings* settings) +BOOL gcc_read_server_core_data(STREAM* s, rdpSettings* settings) { uint32 version; uint32 clientRequestedProtocols; @@ -753,7 +753,7 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -boolean gcc_read_client_security_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, uint16 blockLength) { if (blockLength < 8) return FALSE; @@ -795,7 +795,7 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings) } } -boolean gcc_read_server_security_data(STREAM* s, rdpSettings* settings) +BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings) { uint8* data; uint32 length; @@ -1023,7 +1023,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -boolean gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 blockLength) { int i; @@ -1077,7 +1077,7 @@ void gcc_write_client_network_data(STREAM* s, rdpSettings* settings) } } -boolean gcc_read_server_network_data(STREAM* s, rdpSettings* settings) +BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings) { int i; uint16 MCSChannelId; @@ -1130,7 +1130,7 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -boolean gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, uint16 blockLength) { uint32 flags; @@ -1174,7 +1174,7 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -boolean gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 blockLength) { printf("CS_MONITOR\n"); return TRUE; diff --git a/libfreerdp/core/gcc.h b/libfreerdp/core/gcc.h index 7f61403e1..1726c9b53 100644 --- a/libfreerdp/core/gcc.h +++ b/libfreerdp/core/gcc.h @@ -81,31 +81,31 @@ /* Monitor Flags */ #define MONITOR_PRIMARY 0x00000001 -boolean gcc_read_conference_create_request(STREAM* s, rdpSettings* settings); +BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings); void gcc_write_conference_create_request(STREAM* s, STREAM* user_data); -boolean gcc_read_conference_create_response(STREAM* s, rdpSettings* settings); +BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings); void gcc_write_conference_create_response(STREAM* s, STREAM* user_data); -boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length); +BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length); void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings); -boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length); +BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length); void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings); -boolean gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length); +BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length); void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length); -boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 blockLength); void gcc_write_client_core_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_server_core_data(STREAM* s, rdpSettings *settings); +BOOL gcc_read_server_core_data(STREAM* s, rdpSettings *settings); void gcc_write_server_core_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength); void gcc_write_client_security_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_server_security_data(STREAM* s, rdpSettings *settings); +BOOL gcc_read_server_security_data(STREAM* s, rdpSettings *settings); void gcc_write_server_security_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 blockLength); void gcc_write_client_network_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_server_network_data(STREAM* s, rdpSettings *settings); +BOOL gcc_read_server_network_data(STREAM* s, rdpSettings *settings); void gcc_write_server_network_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 blockLength); void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings); -boolean gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength); void gcc_write_client_monitor_data(STREAM* s, rdpSettings *settings); #endif /* __GCC_H */ diff --git a/libfreerdp/core/graphics.c b/libfreerdp/core/graphics.c index cc574ce9a..fce81082d 100644 --- a/libfreerdp/core/graphics.c +++ b/libfreerdp/core/graphics.c @@ -77,7 +77,7 @@ void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, } /* static method */ -void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, boolean primary) +void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) { context->graphics->Bitmap_Prototype->SetSurface(context, bitmap, primary); } diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index 4960896ce..445678f11 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -67,7 +67,7 @@ void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) * @param settings settings */ -boolean rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) +BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) { ARC_CS_PRIVATE_PACKET* autoReconnectCookie; autoReconnectCookie = settings->client_auto_reconnect_cookie; @@ -108,7 +108,7 @@ void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) * @param settings settings */ -boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) +BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) { uint16 clientAddressFamily; uint16 cbClientAddress; @@ -216,7 +216,7 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) * @param settings settings */ -boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings) +BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings) { uint32 flags; uint16 cbDomain; @@ -315,7 +315,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) int cbAlternateShell; WCHAR* workingDir; int cbWorkingDir; - boolean usedPasswordCookie = FALSE; + BOOL usedPasswordCookie = FALSE; flags = INFO_MOUSE | INFO_UNICODE | @@ -418,7 +418,7 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) * @param s stream */ -boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s) { uint16 length; uint16 channelId; @@ -457,7 +457,7 @@ boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s) * @param rdp RDP module */ -boolean rdp_send_client_info(rdpRdp* rdp) +BOOL rdp_send_client_info(rdpRdp* rdp) { STREAM* s; @@ -535,7 +535,7 @@ void rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s) stream_seek(s, 570); /* pad */ } -boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s) { uint32 infoType; diff --git a/libfreerdp/core/info.h b/libfreerdp/core/info.h index f7df7ae54..fa3d0f1a1 100644 --- a/libfreerdp/core/info.h +++ b/libfreerdp/core/info.h @@ -73,18 +73,18 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time); void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time); void rdp_get_client_time_zone(STREAM* s, rdpSettings* settings); -boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings); +BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings); void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings); void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings); -boolean rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings); +BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings); void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings); void rdp_write_auto_reconnect_cookie(STREAM* s, rdpSettings* settings); -boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings); +BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings); void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings); -boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings); +BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings); void rdp_write_info_packet(STREAM* s, rdpSettings* settings); -boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s); -boolean rdp_send_client_info(rdpRdp* rdp); -boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_client_info(rdpRdp* rdp); +BOOL rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s); #endif /* __INFO_H */ diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 587e742f7..683840094 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -202,7 +202,7 @@ void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uin fastpath_send_input_pdu(rdp->fastpath, s); } -static boolean input_recv_sync_event(rdpInput* input, STREAM* s) +static BOOL input_recv_sync_event(rdpInput* input, STREAM* s) { uint32 toggleFlags; @@ -217,7 +217,7 @@ static boolean input_recv_sync_event(rdpInput* input, STREAM* s) return TRUE; } -static boolean input_recv_keyboard_event(rdpInput* input, STREAM* s) +static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s) { uint16 keyboardFlags, keyCode; @@ -233,7 +233,7 @@ static boolean input_recv_keyboard_event(rdpInput* input, STREAM* s) return TRUE; } -static boolean input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) +static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) { uint16 keyboardFlags, unicodeCode; @@ -262,7 +262,7 @@ static boolean input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) return TRUE; } -static boolean input_recv_mouse_event(rdpInput* input, STREAM* s) +static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s) { uint16 pointerFlags, xPos, yPos; @@ -278,7 +278,7 @@ static boolean input_recv_mouse_event(rdpInput* input, STREAM* s) return TRUE; } -static boolean input_recv_extended_mouse_event(rdpInput* input, STREAM* s) +static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s) { uint16 pointerFlags, xPos, yPos; @@ -294,7 +294,7 @@ static boolean input_recv_extended_mouse_event(rdpInput* input, STREAM* s) return TRUE; } -static boolean input_recv_event(rdpInput* input, STREAM* s) +static BOOL input_recv_event(rdpInput* input, STREAM* s) { uint16 messageType; @@ -341,7 +341,7 @@ static boolean input_recv_event(rdpInput* input, STREAM* s) return TRUE; } -boolean input_recv(rdpInput* input, STREAM* s) +BOOL input_recv(rdpInput* input, STREAM* s) { uint16 i, numberEvents; @@ -396,7 +396,7 @@ void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 cod IFCALL(input->KeyboardEvent, input, flags, code); } -void freerdp_input_send_keyboard_event_ex(rdpInput* input, boolean down, uint32 rdp_scancode) +void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode) { freerdp_input_send_keyboard_event(input, (RDP_SCANCODE_EXTENDED(rdp_scancode) ? KBD_FLAGS_EXTENDED : 0) | diff --git a/libfreerdp/core/input.h b/libfreerdp/core/input.h index cf1b2a51f..791969560 100644 --- a/libfreerdp/core/input.h +++ b/libfreerdp/core/input.h @@ -49,7 +49,7 @@ void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, u void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -boolean input_recv(rdpInput* input, STREAM* s); +BOOL input_recv(rdpInput* input, STREAM* s); void input_register_client_callbacks(rdpInput* input); diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 0ab8b23bd..8e3781d47 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -127,7 +127,7 @@ STREAM* license_send_stream_init(rdpLicense* license) * @param s stream */ -boolean license_send(rdpLicense* license, STREAM* s, uint8 type) +BOOL license_send(rdpLicense* license, STREAM* s, uint8 type) { int length; uint8 flags; @@ -170,7 +170,7 @@ boolean license_send(rdpLicense* license, STREAM* s, uint8 type) * @param s stream */ -boolean license_recv(rdpLicense* license, STREAM* s) +BOOL license_recv(rdpLicense* license, STREAM* s) { uint16 length; uint16 channelId; @@ -873,7 +873,7 @@ void license_send_platform_challenge_response_packet(rdpLicense* license) * @param license license module */ -boolean license_send_valid_client_error_packet(rdpLicense* license) +BOOL license_send_valid_client_error_packet(rdpLicense* license) { STREAM* s; diff --git a/libfreerdp/core/license.h b/libfreerdp/core/license.h index 49102f433..f90412ffc 100644 --- a/libfreerdp/core/license.h +++ b/libfreerdp/core/license.h @@ -156,8 +156,8 @@ struct rdp_license SCOPE_LIST* scope_list; }; -boolean license_recv(rdpLicense* license, STREAM* s); -boolean license_send(rdpLicense* license, STREAM* s, uint8 type); +BOOL license_recv(rdpLicense* license, STREAM* s); +BOOL license_send(rdpLicense* license, STREAM* s, uint8 type); STREAM* license_send_stream_init(rdpLicense* license); void license_generate_randoms(rdpLicense* license); @@ -191,7 +191,7 @@ void license_send_new_license_request_packet(rdpLicense* license); void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data); void license_send_platform_challenge_response_packet(rdpLicense* license); -boolean license_send_valid_client_error_packet(rdpLicense* license); +BOOL license_send_valid_client_error_packet(rdpLicense* license); rdpLicense* license_new(rdpRdp* rdp); void license_free(rdpLicense* license); diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index 8dbb99d42..ba268a6d7 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -73,7 +73,7 @@ static const char *inet_ntop(int af, const void* src, char* dst, socklen_t cnt) #endif #endif -static boolean freerdp_listener_open(freerdp_listener* instance, const char* bind_address, uint16 port) +static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, uint16 port) { rdpListener* listener = (rdpListener*) instance->listener; int status; @@ -171,7 +171,7 @@ static boolean freerdp_listener_open(freerdp_listener* instance, const char* bin return (listener->num_sockfds > 0 ? TRUE : FALSE); } -static boolean freerdp_listener_open_local(freerdp_listener* instance, const char* path) +static BOOL freerdp_listener_open_local(freerdp_listener* instance, const char* path) { #ifndef _WIN32 int status; @@ -235,7 +235,7 @@ static void freerdp_listener_close(freerdp_listener* instance) listener->num_sockfds = 0; } -static boolean freerdp_listener_get_fds(freerdp_listener* instance, void** rfds, int* rcount) +static BOOL freerdp_listener_get_fds(freerdp_listener* instance, void** rfds, int* rcount) { int i; rdpListener* listener = (rdpListener*) instance->listener; @@ -252,7 +252,7 @@ static boolean freerdp_listener_get_fds(freerdp_listener* instance, void** rfds, return TRUE; } -static boolean freerdp_listener_check_fds(freerdp_listener* instance) +static BOOL freerdp_listener_check_fds(freerdp_listener* instance) { int i; void* sin_addr; diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index 15238c418..ee95a03f1 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -189,7 +189,7 @@ static const char* const mcs_result_enumerated[] = * @return */ -boolean mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length) +BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length) { uint8 choice; enum DomainMCSPDU MCSPDU; @@ -252,7 +252,7 @@ static void mcs_init_domain_parameters(DomainParameters* domainParameters, * @param domainParameters domain parameters */ -boolean mcs_read_domain_parameters(STREAM* s, DomainParameters* domainParameters) +BOOL mcs_read_domain_parameters(STREAM* s, DomainParameters* domainParameters) { int length; ber_read_sequence_tag(s, &length); @@ -321,10 +321,10 @@ void mcs_print_domain_parameters(DomainParameters* domainParameters) * @param s stream */ -boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s) +BOOL mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s) { int length; - boolean upwardFlag; + BOOL upwardFlag; tpkt_read_header(s); @@ -345,7 +345,7 @@ boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s) stream_seek(s, length); /* upwardFlag (BOOLEAN) */ - if (!ber_read_boolean(s, &upwardFlag)) + if (!ber_read_BOOL(s, &upwardFlag)) return FALSE; /* targetParameters (DomainParameters) */ @@ -388,7 +388,7 @@ void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data) ber_write_octet_string(tmps, calledDomainSelector, sizeof(calledDomainSelector)); /* upwardFlag (BOOLEAN) */ - ber_write_boolean(tmps, TRUE); + ber_write_BOOL(tmps, TRUE); /* targetParameters (DomainParameters) */ mcs_write_domain_parameters(tmps, &mcs->targetParameters); @@ -442,7 +442,7 @@ void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data) * @param mcs mcs module */ -boolean mcs_send_connect_initial(rdpMcs* mcs) +BOOL mcs_send_connect_initial(rdpMcs* mcs) { STREAM* s; int length; @@ -485,7 +485,7 @@ boolean mcs_send_connect_initial(rdpMcs* mcs) * @param mcs mcs module */ -boolean mcs_recv_connect_response(rdpMcs* mcs, STREAM* s) +BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s) { int length; uint8 result; @@ -520,7 +520,7 @@ boolean mcs_recv_connect_response(rdpMcs* mcs, STREAM* s) * @param mcs mcs module */ -boolean mcs_send_connect_response(rdpMcs* mcs) +BOOL mcs_send_connect_response(rdpMcs* mcs) { STREAM* s; int length; @@ -563,7 +563,7 @@ boolean mcs_send_connect_response(rdpMcs* mcs) * @param s stream */ -boolean mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s) +BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s) { uint16 length; enum DomainMCSPDU MCSPDU; @@ -581,7 +581,7 @@ boolean mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s) * @param mcs */ -boolean mcs_send_erect_domain_request(rdpMcs* mcs) +BOOL mcs_send_erect_domain_request(rdpMcs* mcs) { STREAM* s; uint16 length = 12; @@ -605,7 +605,7 @@ boolean mcs_send_erect_domain_request(rdpMcs* mcs) * @param s stream */ -boolean mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s) +BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s) { uint16 length; enum DomainMCSPDU MCSPDU; @@ -623,7 +623,7 @@ boolean mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s) * @param mcs mcs module */ -boolean mcs_send_attach_user_request(rdpMcs* mcs) +BOOL mcs_send_attach_user_request(rdpMcs* mcs) { STREAM* s; uint16 length = 8; @@ -643,7 +643,7 @@ boolean mcs_send_attach_user_request(rdpMcs* mcs) * @param mcs mcs module */ -boolean mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s) +BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s) { uint16 length; uint8 result; @@ -665,7 +665,7 @@ boolean mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s) * @param mcs mcs module */ -boolean mcs_send_attach_user_confirm(rdpMcs* mcs) +BOOL mcs_send_attach_user_confirm(rdpMcs* mcs) { STREAM* s; uint16 length = 11; @@ -690,7 +690,7 @@ boolean mcs_send_attach_user_confirm(rdpMcs* mcs) * @param s stream */ -boolean mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id) +BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id) { uint16 length; enum DomainMCSPDU MCSPDU; @@ -717,7 +717,7 @@ boolean mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id * @param channel_id channel id */ -boolean mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id) +BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id) { STREAM* s; uint16 length = 12; @@ -740,7 +740,7 @@ boolean mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id) * @param mcs mcs module */ -boolean mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id) +BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id) { uint16 length; uint8 result; @@ -766,7 +766,7 @@ boolean mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id * @param mcs mcs module */ -boolean mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) +BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) { STREAM* s; uint16 length = 15; @@ -789,7 +789,7 @@ boolean mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) * @param mcs mcs module */ -boolean mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs) +BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs) { STREAM* s; uint16 length = 9; diff --git a/libfreerdp/core/mcs.h b/libfreerdp/core/mcs.h index 763bd1460..820606368 100644 --- a/libfreerdp/core/mcs.h +++ b/libfreerdp/core/mcs.h @@ -119,8 +119,8 @@ struct rdp_mcs DomainParameters minimumParameters; DomainParameters maximumParameters; - boolean user_channel_joined; - boolean global_channel_joined; + BOOL user_channel_joined; + BOOL global_channel_joined; }; typedef struct rdp_mcs rdpMcs; @@ -132,22 +132,22 @@ typedef struct rdp_mcs rdpMcs; void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data); void mcs_write_connect_response(STREAM* s, rdpMcs* mcs, STREAM* user_data); -boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s); -boolean mcs_send_connect_initial(rdpMcs* mcs); -boolean mcs_recv_connect_response(rdpMcs* mcs, STREAM* s); -boolean mcs_send_connect_response(rdpMcs* mcs); -boolean mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s); -boolean mcs_send_erect_domain_request(rdpMcs* mcs); -boolean mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s); -boolean mcs_send_attach_user_request(rdpMcs* mcs); -boolean mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s); -boolean mcs_send_attach_user_confirm(rdpMcs* mcs); -boolean mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id); -boolean mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id); -boolean mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id); -boolean mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id); -boolean mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs); -boolean mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length); +BOOL mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s); +BOOL mcs_send_connect_initial(rdpMcs* mcs); +BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s); +BOOL mcs_send_connect_response(rdpMcs* mcs); +BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s); +BOOL mcs_send_erect_domain_request(rdpMcs* mcs); +BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s); +BOOL mcs_send_attach_user_request(rdpMcs* mcs); +BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s); +BOOL mcs_send_attach_user_confirm(rdpMcs* mcs); +BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id); +BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id); +BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id); +BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id); +BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs); +BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length); void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, uint16 length, uint8 options); rdpMcs* mcs_new(rdpTransport* transport); diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index 0091649f2..61faf114a 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -51,7 +51,7 @@ static const char PROTOCOL_SECURITY_STRINGS[3][4] = "NLA" }; -boolean nego_security_connect(rdpNego* nego); +BOOL nego_security_connect(rdpNego* nego); /** * Negotiate protocol security and connect. @@ -59,7 +59,7 @@ boolean nego_security_connect(rdpNego* nego); * @return */ -boolean nego_connect(rdpNego* nego) +BOOL nego_connect(rdpNego* nego) { if (nego->state == NEGO_STATE_INITIAL) { @@ -147,7 +147,7 @@ boolean nego_connect(rdpNego* nego) } /* connect to selected security layer */ -boolean nego_security_connect(rdpNego* nego) +BOOL nego_security_connect(rdpNego* nego) { if(!nego->tcp_connected) { @@ -184,7 +184,7 @@ boolean nego_security_connect(rdpNego* nego) * @return */ -boolean nego_tcp_connect(rdpNego* nego) +BOOL nego_tcp_connect(rdpNego* nego) { if (!nego->tcp_connected) nego->tcp_connected = transport_connect(nego->transport, nego->hostname, nego->port); @@ -198,7 +198,7 @@ boolean nego_tcp_connect(rdpNego* nego) * @return */ -boolean nego_transport_connect(rdpNego* nego) +BOOL nego_transport_connect(rdpNego* nego) { nego_tcp_connect(nego); @@ -231,7 +231,7 @@ int nego_transport_disconnect(rdpNego* nego) * @return */ -boolean nego_send_preconnection_pdu(rdpNego* nego) +BOOL nego_send_preconnection_pdu(rdpNego* nego) { STREAM* s; uint32 cbSize; @@ -393,7 +393,7 @@ void nego_attempt_rdp(rdpNego* nego) * @param nego */ -boolean nego_recv_response(rdpNego* nego) +BOOL nego_recv_response(rdpNego* nego) { STREAM* s = transport_recv_stream_init(nego->transport, 1024); @@ -411,7 +411,7 @@ boolean nego_recv_response(rdpNego* nego) * @param extra nego pointer */ -boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra) +BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra) { uint8 li; uint8 type; @@ -480,7 +480,7 @@ boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra) * @param s stream */ -boolean nego_read_request(rdpNego* nego, STREAM* s) +BOOL nego_read_request(rdpNego* nego, STREAM* s) { uint8 li; uint8 c; @@ -557,7 +557,7 @@ void nego_send(rdpNego* nego) * @param nego */ -boolean nego_send_negotiation_request(rdpNego* nego) +BOOL nego_send_negotiation_request(rdpNego* nego) { STREAM* s; int length; @@ -696,13 +696,13 @@ void nego_process_negotiation_failure(rdpNego* nego, STREAM* s) * @param nego */ -boolean nego_send_negotiation_response(rdpNego* nego) +BOOL nego_send_negotiation_response(rdpNego* nego) { STREAM* s; uint8* bm; uint8* em; int length; - boolean status; + BOOL status; rdpSettings* settings; status = TRUE; @@ -853,7 +853,7 @@ void nego_set_target(rdpNego* nego, char* hostname, int port) * @param enable_rdp whether to enable security layer negotiation (TRUE for enabled, FALSE for disabled) */ -void nego_set_negotiation_enabled(rdpNego* nego, boolean security_layer_negotiation_enabled) +void nego_set_negotiation_enabled(rdpNego* nego, BOOL security_layer_negotiation_enabled) { DEBUG_NEGO("Enabling security layer negotiation: %s", security_layer_negotiation_enabled ? "TRUE" : "FALSE"); nego->security_layer_negotiation_enabled = security_layer_negotiation_enabled; @@ -865,7 +865,7 @@ void nego_set_negotiation_enabled(rdpNego* nego, boolean security_layer_negotiat * @param enable_rdp whether to enable normal RDP protocol (TRUE for enabled, FALSE for disabled) */ -void nego_enable_rdp(rdpNego* nego, boolean enable_rdp) +void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp) { DEBUG_NEGO("Enabling RDP security: %s", enable_rdp ? "TRUE" : "FALSE"); nego->enabled_protocols[PROTOCOL_RDP] = enable_rdp; @@ -876,7 +876,7 @@ void nego_enable_rdp(rdpNego* nego, boolean enable_rdp) * @param nego pointer to the negotiation structure * @param enable_tls whether to enable TLS + RDP protocol (TRUE for enabled, FALSE for disabled) */ -void nego_enable_tls(rdpNego* nego, boolean enable_tls) +void nego_enable_tls(rdpNego* nego, BOOL enable_tls) { DEBUG_NEGO("Enabling TLS security: %s", enable_tls ? "TRUE" : "FALSE"); nego->enabled_protocols[PROTOCOL_TLS] = enable_tls; @@ -889,7 +889,7 @@ void nego_enable_tls(rdpNego* nego, boolean enable_tls) * @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) +void nego_enable_nla(rdpNego* nego, BOOL enable_nla) { DEBUG_NEGO("Enabling NLA security: %s", enable_nla ? "TRUE" : "FALSE"); nego->enabled_protocols[PROTOCOL_NLA] = enable_nla; @@ -925,7 +925,7 @@ void nego_set_cookie(rdpNego* nego, char* cookie) * @param send_pcpdu */ -void nego_set_send_preconnection_pdu(rdpNego* nego, boolean send_pcpdu) +void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL send_pcpdu) { nego->send_preconnection_pdu = send_pcpdu; } diff --git a/libfreerdp/core/nego.h b/libfreerdp/core/nego.h index 20a81a244..ce8bcd13a 100644 --- a/libfreerdp/core/nego.h +++ b/libfreerdp/core/nego.h @@ -81,54 +81,54 @@ struct rdp_nego char* cookie; BYTE* RoutingToken; DWORD RoutingTokenLength; - boolean send_preconnection_pdu; + BOOL send_preconnection_pdu; uint32 preconnection_id; char* preconnection_blob; NEGO_STATE state; - boolean tcp_connected; - boolean security_connected; + BOOL tcp_connected; + BOOL security_connected; uint32 selected_protocol; uint32 requested_protocols; - boolean security_layer_negotiation_enabled; + BOOL security_layer_negotiation_enabled; uint8 enabled_protocols[3]; rdpTransport* transport; }; typedef struct rdp_nego rdpNego; -boolean nego_connect(rdpNego* nego); +BOOL nego_connect(rdpNego* nego); -boolean nego_send_preconnection_pdu(rdpNego* nego); +BOOL nego_send_preconnection_pdu(rdpNego* nego); void nego_attempt_nla(rdpNego* nego); void nego_attempt_tls(rdpNego* nego); void nego_attempt_rdp(rdpNego* nego); void nego_send(rdpNego* nego); -boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra); -boolean nego_recv_response(rdpNego* nego); -boolean nego_read_request(rdpNego* nego, STREAM* s); +BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra); +BOOL nego_recv_response(rdpNego* nego); +BOOL nego_read_request(rdpNego* nego, STREAM* s); -boolean nego_send_negotiation_request(rdpNego* nego); +BOOL nego_send_negotiation_request(rdpNego* nego); void nego_process_negotiation_request(rdpNego* nego, STREAM* s); void nego_process_negotiation_response(rdpNego* nego, STREAM* s); void nego_process_negotiation_failure(rdpNego* nego, STREAM* s); -boolean nego_send_negotiation_response(rdpNego* nego); +BOOL nego_send_negotiation_response(rdpNego* nego); rdpNego* nego_new(struct rdp_transport * transport); void nego_free(rdpNego* nego); void nego_init(rdpNego* nego); void nego_set_target(rdpNego* nego, char* hostname, int port); -void nego_set_negotiation_enabled(rdpNego* nego, boolean security_layer_negotiation_enabled); -void nego_enable_rdp(rdpNego* nego, boolean enable_rdp); -void nego_enable_nla(rdpNego* nego, boolean enable_nla); -void nego_enable_tls(rdpNego* nego, boolean enable_tls); +void nego_set_negotiation_enabled(rdpNego* nego, BOOL security_layer_negotiation_enabled); +void nego_enable_rdp(rdpNego* nego, BOOL enable_rdp); +void nego_enable_nla(rdpNego* nego, BOOL enable_nla); +void nego_enable_tls(rdpNego* nego, BOOL enable_tls); void nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken, DWORD RoutingTokenLength); void nego_set_cookie(rdpNego* nego, char* cookie); -void nego_set_send_preconnection_pdu(rdpNego* nego, boolean send_pcpdu); +void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL send_pcpdu); void nego_set_preconnection_id(rdpNego* nego, uint32 id); void nego_set_preconnection_blob(rdpNego* nego, char* blob); diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index c96c3feb4..5ef0d24a1 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -142,7 +142,7 @@ static const uint8 BMF_BPP[] = 0, 1, 0, 8, 16, 24, 32 }; -static INLINE void update_read_coord(STREAM* s, sint32* coord, boolean delta) +static INLINE void update_read_coord(STREAM* s, sint32* coord, BOOL delta) { sint8 lsi8; sint16 lsi16; @@ -218,7 +218,7 @@ static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) { uint8 byte; - boolean negative; + BOOL negative; stream_read_uint8(s, byte); @@ -1201,7 +1201,7 @@ void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O /* Secondary Drawing Orders */ -void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, boolean compressed, uint16 flags) +void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags) { stream_read_uint8(s, cache_bitmap_order->cacheId); /* cacheId (1 byte) */ stream_seek_uint8(s); /* pad1Octet (1 byte) */ @@ -1230,7 +1230,7 @@ void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_ cache_bitmap_order->compressed = compressed; } -void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, boolean compressed, uint16 flags) +void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags) { uint8 bitsPerPixelId; @@ -1285,7 +1285,7 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b cache_bitmap_v2_order->compressed = compressed; } -void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, boolean compressed, uint16 flags) +void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags) { uint8 bitsPerPixelId; BITMAP_DATA_EX* bitmapData; @@ -1446,7 +1446,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord int i; int size; uint8 iBitmapFormat; - boolean compressed = FALSE; + BOOL compressed = FALSE; stream_read_uint8(s, cache_brush_order->index); /* cacheEntry (1 byte) */ @@ -1512,7 +1512,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap) { uint16 flags; - boolean deleteListPresent; + BOOL deleteListPresent; OFFSCREEN_DELETE_LIST* deleteList; stream_read_uint16(s, flags); /* flags (2 bytes) */ @@ -1702,7 +1702,7 @@ void update_read_bounds(STREAM* s, rdpBounds* bounds) update_read_coord(s, &bounds->bottom, TRUE); } -boolean update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) +BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) { ORDER_INFO* orderInfo; rdpContext* context = update->context; @@ -2028,7 +2028,7 @@ void update_recv_altsec_order(rdpUpdate* update, STREAM* s, uint8 flags) } } -boolean update_recv_order(rdpUpdate* update, STREAM* s) +BOOL update_recv_order(rdpUpdate* update, STREAM* s) { uint8 controlFlags; diff --git a/libfreerdp/core/orders.h b/libfreerdp/core/orders.h index d04c4cff6..c6b7e2d17 100644 --- a/libfreerdp/core/orders.h +++ b/libfreerdp/core/orders.h @@ -184,7 +184,7 @@ #define CG_GLYPH_UNICODE_PRESENT 0x0010 -boolean update_recv_order(rdpUpdate* update, STREAM* s); +BOOL update_recv_order(rdpUpdate* update, STREAM* s); void update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt); void update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt); @@ -209,9 +209,9 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O void update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc); void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb); -void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, boolean compressed, uint16 flags); -void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, boolean compressed, uint16 flags); -void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, boolean compressed, uint16 flags); +void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags); +void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags); +void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags); void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags); void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags); void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags); diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index 60b306202..7feae92cf 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -26,7 +26,7 @@ #include "peer.h" -static boolean freerdp_peer_initialize(freerdp_peer* client) +static BOOL freerdp_peer_initialize(freerdp_peer* client) { client->context->rdp->settings->server_mode = TRUE; client->context->rdp->settings->frame_acknowledge = 0; @@ -42,7 +42,7 @@ static boolean freerdp_peer_initialize(freerdp_peer* client) return TRUE; } -static boolean freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) +static BOOL freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) { rfds[*rcount] = (void*)(long)(client->context->rdp->transport->tcp->sockfd); (*rcount)++; @@ -50,7 +50,7 @@ static boolean freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcou return TRUE; } -static boolean freerdp_peer_check_fds(freerdp_peer* client) +static BOOL freerdp_peer_check_fds(freerdp_peer* client) { int status; rdpRdp* rdp; @@ -65,7 +65,7 @@ static boolean freerdp_peer_check_fds(freerdp_peer* client) return TRUE; } -static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) +static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s) { uint8 type; uint16 length; @@ -153,7 +153,7 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s) return TRUE; } -static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) +static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) { rdpRdp* rdp; uint16 length; @@ -212,7 +212,7 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) return TRUE; } -static boolean peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s) +static BOOL peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s) { rdpRdp* rdp; uint16 length; @@ -236,7 +236,7 @@ static boolean peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s) return fastpath_recv_inputs(fastpath, s); } -static boolean peer_recv_pdu(freerdp_peer* client, STREAM* s) +static BOOL peer_recv_pdu(freerdp_peer* client, STREAM* s) { if (tpkt_verify_header(s)) return peer_recv_tpkt_pdu(client, s); @@ -244,7 +244,7 @@ static boolean peer_recv_pdu(freerdp_peer* client, STREAM* s) return peer_recv_fastpath_pdu(client, s); } -static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extra) +static BOOL peer_recv_callback(rdpTransport* transport, STREAM* s, void* extra) { freerdp_peer* client = (freerdp_peer*) extra; rdpRdp* rdp = client->context->rdp; @@ -333,7 +333,7 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr return TRUE; } -static boolean freerdp_peer_close(freerdp_peer* client) +static BOOL freerdp_peer_close(freerdp_peer* client) { /** * [MS-RDPBCGR] 1.3.1.4.2 User-Initiated Disconnection Sequence on Server diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index e71c48e6e..207ec7436 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -96,7 +96,7 @@ void rdp_write_security_header(STREAM* s, uint16 flags) stream_write_uint16(s, 0); /* flagsHi (unused) */ } -boolean rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id) +BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id) { /* Share Control Header */ stream_read_uint16(s, *length); /* totalLength */ @@ -125,7 +125,7 @@ void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint1 stream_write_uint16(s, channel_id); /* pduSource */ } -boolean rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, +BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, uint8 *compressed_type, uint16 *compressed_len) { if (stream_get_left(s) < 12) @@ -222,7 +222,7 @@ STREAM* rdp_data_pdu_init(rdpRdp* rdp) * @param channel_id channel id */ -boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id) +BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id) { uint16 initiator; enum DomainMCSPDU MCSPDU; @@ -385,7 +385,7 @@ static uint32 rdp_get_sec_bytes(rdpRdp* rdp) * @param channel_id channel id */ -boolean rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id) +BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id) { uint16 length; uint32 sec_bytes; @@ -410,7 +410,7 @@ boolean rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id) return TRUE; } -boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id) +BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id) { uint16 length; uint32 sec_bytes; @@ -437,7 +437,7 @@ boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id) return TRUE; } -boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id) +BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id) { uint16 length; uint32 sec_bytes; @@ -473,7 +473,7 @@ void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s) rdp_print_errinfo(rdp->errorInfo); } -boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) { uint8 type; uint16 length; @@ -607,7 +607,7 @@ boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) { uint16 type; uint16 length; @@ -637,7 +637,7 @@ boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) * @param length int */ -boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) +BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) { uint8 cmac[8], wmac[8]; @@ -701,7 +701,7 @@ boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) * @param s stream */ -static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) +static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) { uint16 length; uint16 pduType; @@ -784,7 +784,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) return TRUE; } -static boolean rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) +static BOOL rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { uint16 length; rdpFastPath* fastpath; @@ -806,7 +806,7 @@ static boolean rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) return fastpath_recv_updates(rdp->fastpath, s); } -static boolean rdp_recv_pdu(rdpRdp* rdp, STREAM* s) +static BOOL rdp_recv_pdu(rdpRdp* rdp, STREAM* s) { if (tpkt_verify_header(s)) return rdp_recv_tpkt_pdu(rdp, s); @@ -829,7 +829,7 @@ void rdp_recv(rdpRdp* rdp) rdp_recv_pdu(rdp, s); } -static boolean rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra) +static BOOL rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra) { rdpRdp* rdp = (rdpRdp*) extra; @@ -893,7 +893,7 @@ int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size) * @param rdp RDP module * @param blocking blocking mode */ -void rdp_set_blocking_mode(rdpRdp* rdp, boolean blocking) +void rdp_set_blocking_mode(rdpRdp* rdp, BOOL blocking) { rdp->transport->recv_callback = rdp_recv_callback; rdp->transport->recv_extra = rdp; diff --git a/libfreerdp/core/rdp.h b/libfreerdp/core/rdp.h index 50fb58a74..1ff51dd7a 100644 --- a/libfreerdp/core/rdp.h +++ b/libfreerdp/core/rdp.h @@ -141,8 +141,8 @@ struct rdp_rdp struct crypto_des3_struct* fips_decrypt; struct crypto_hmac_struct* fips_hmac; uint32 sec_flags; - boolean do_crypt; - boolean do_secure_checksum; + BOOL do_crypt; + BOOL do_secure_checksum; uint8 sign_key[16]; uint8 decrypt_key[16]; uint8 encrypt_key[16]; @@ -154,40 +154,40 @@ struct rdp_rdp uint8 fips_decrypt_key[24]; uint32 errorInfo; uint32 finalize_sc_pdus; - boolean disconnect; + BOOL disconnect; }; void rdp_read_security_header(STREAM* s, uint16* flags); void rdp_write_security_header(STREAM* s, uint16 flags); -boolean rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id); +BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id); void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id); -boolean rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, +BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, uint8 *compressed_type, uint16 *compressed_len); void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id); STREAM* rdp_send_stream_init(rdpRdp* rdp); -boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id); +BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id); void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id); STREAM* rdp_pdu_init(rdpRdp* rdp); -boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id); +BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id); STREAM* rdp_data_pdu_init(rdpRdp* rdp); -boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id); -boolean rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id); +BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s); -boolean rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id); +BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id); void rdp_recv(rdpRdp* rdp); int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size); -boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s); -void rdp_set_blocking_mode(rdpRdp* rdp, boolean blocking); +void rdp_set_blocking_mode(rdpRdp* rdp, BOOL blocking); int rdp_check_fds(rdpRdp* rdp); rdpRdp* rdp_new(freerdp* instance); @@ -199,6 +199,6 @@ void rdp_free(rdpRdp* rdp); #define DEBUG_RDP(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags); +BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags); #endif /* __RDP_H */ diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index b9669f155..a16dd596e 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -59,7 +59,7 @@ void rdp_print_redirection_flags(uint32 flags) printf("}\n"); } -boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) { uint16 flags; uint16 length; @@ -164,13 +164,13 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) return rdp_client_redirect(rdp); } -boolean rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s) { rdp_recv_server_redirection_pdu(rdp, s); return TRUE; } -boolean rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s) +BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s) { stream_seek_uint16(s); /* pad2Octets (2 bytes) */ rdp_recv_server_redirection_pdu(rdp, s); diff --git a/libfreerdp/core/redirection.h b/libfreerdp/core/redirection.h index cd69aef46..d57b6980d 100644 --- a/libfreerdp/core/redirection.h +++ b/libfreerdp/core/redirection.h @@ -61,8 +61,8 @@ struct rdp_redirection }; typedef struct rdp_redirection rdpRedirection; -boolean rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s); -boolean rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s); +BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s); rdpRedirection* redirection_new(); void redirection_free(rdpRedirection* redirection); diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index c1b0f2544..bef70f0f6 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -33,7 +33,7 @@ #include "rpc.h" -boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, char* domain, char* password) +BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality, char* user, char* domain, char* password) { SECURITY_STATUS status; @@ -95,7 +95,7 @@ boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, cha return TRUE; } -boolean ntlm_authenticate(rdpNtlm* ntlm) +BOOL ntlm_authenticate(rdpNtlm* ntlm) { SECURITY_STATUS status; @@ -209,7 +209,7 @@ STREAM* rpc_ntlm_http_request(rdpRpc* rpc, SecBuffer* ntlm_token, int content_le return s; } -boolean rpc_ntlm_http_out_connect(rdpRpc* rpc) +BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc) { STREAM* s; int ntlm_token_length; @@ -259,7 +259,7 @@ boolean rpc_ntlm_http_out_connect(rdpRpc* rpc) return TRUE; } -boolean rpc_ntlm_http_in_connect(rdpRpc* rpc) +BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc) { STREAM* s; int ntlm_token_length; @@ -357,7 +357,7 @@ int rpc_in_write(rdpRpc* rpc, uint8* data, int length) return status; } -boolean rpc_send_bind_pdu(rdpRpc* rpc) +BOOL rpc_send_bind_pdu(rdpRpc* rpc) { STREAM* pdu; rpcconn_bind_hdr_t* bind_pdu; @@ -530,7 +530,7 @@ int rpc_recv_bind_ack_pdu(rdpRpc* rpc) return status; } -boolean rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) +BOOL rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) { STREAM* pdu; STREAM* s = stream_new(0); @@ -861,7 +861,7 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) return read; } -boolean rpc_connect(rdpRpc* rpc) +BOOL rpc_connect(rdpRpc* rpc) { rpc->tls_in = rpc->transport->tls_in; rpc->tls_out = rpc->transport->tls_out; diff --git a/libfreerdp/core/rpc.h b/libfreerdp/core/rpc.h index c75f8c393..03bf81cfe 100644 --- a/libfreerdp/core/rpc.h +++ b/libfreerdp/core/rpc.h @@ -538,12 +538,12 @@ struct rdp_ntlm PSecBuffer pBuffer; SecBuffer inputBuffer; SecBuffer outputBuffer; - boolean haveContext; - boolean haveInputBuffer; + BOOL haveContext; + BOOL haveInputBuffer; SecBufferDesc inputBufferDesc; SecBufferDesc outputBufferDesc; CredHandle credentials; - boolean confidentiality; + BOOL confidentiality; SecPkgInfo* pPackageInfo; SecurityFunctionTable* table; SEC_WINNT_AUTH_IDENTITY identity; @@ -662,18 +662,18 @@ struct rdp_rpc RpcVirtualConnection* VirtualConnection; }; -boolean ntlm_authenticate(rdpNtlm* ntlm); +BOOL ntlm_authenticate(rdpNtlm* ntlm); -boolean ntlm_client_init(rdpNtlm* ntlm, boolean confidentiality, char* user, char* domain, char* password); +BOOL ntlm_client_init(rdpNtlm* ntlm, BOOL confidentiality, char* user, char* domain, char* password); void ntlm_client_uninit(rdpNtlm* ntlm); rdpNtlm* ntlm_new(); void ntlm_free(rdpNtlm* ntlm); -boolean rpc_connect(rdpRpc* rpc); +BOOL rpc_connect(rdpRpc* rpc); -boolean rpc_ntlm_http_out_connect(rdpRpc* rpc); -boolean rpc_ntlm_http_in_connect(rdpRpc* rpc); +BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc); +BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc); void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header); diff --git a/libfreerdp/core/rts.c b/libfreerdp/core/rts.c index 2f2fe40dc..edb3aa6ec 100644 --- a/libfreerdp/core/rts.c +++ b/libfreerdp/core/rts.c @@ -45,7 +45,7 @@ * */ -boolean rts_connect(rdpRpc* rpc) +BOOL rts_connect(rdpRpc* rpc) { int status; RTS_PDU rts_pdu; @@ -357,7 +357,7 @@ void rpc_generate_cookie(uint8* cookie) RAND_pseudo_bytes(cookie, 16); } -boolean rts_send_CONN_A1_pdu(rdpRpc* rpc) +BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; @@ -404,7 +404,7 @@ boolean rts_send_CONN_A1_pdu(rdpRpc* rpc) return TRUE; } -boolean rts_send_CONN_B1_pdu(rdpRpc* rpc) +BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; @@ -453,7 +453,7 @@ boolean rts_send_CONN_B1_pdu(rdpRpc* rpc) return TRUE; } -boolean rts_send_keep_alive_pdu(rdpRpc* rpc) +BOOL rts_send_keep_alive_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; @@ -486,7 +486,7 @@ boolean rts_send_keep_alive_pdu(rdpRpc* rpc) return TRUE; } -boolean rts_send_flow_control_ack_pdu(rdpRpc* rpc) +BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; @@ -530,7 +530,7 @@ boolean rts_send_flow_control_ack_pdu(rdpRpc* rpc) return TRUE; } -boolean rts_send_ping_pdu(rdpRpc* rpc) +BOOL rts_send_ping_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; diff --git a/libfreerdp/core/rts.h b/libfreerdp/core/rts.h index 449c0e2b3..b162dbe04 100644 --- a/libfreerdp/core/rts.h +++ b/libfreerdp/core/rts.h @@ -113,7 +113,7 @@ struct _rts_pdu }; typedef struct _rts_pdu RTS_PDU; -boolean rts_connect(rdpRpc* rpc); +BOOL rts_connect(rdpRpc* rpc); void rts_pdu_header_read(STREAM* s, RTS_PDU_HEADER* header); void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header); @@ -149,11 +149,11 @@ void rts_destination_command_write(STREAM* s, uint32 Destination); void rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, STREAM* s); void rts_ping_traffic_sent_notify_command_write(STREAM* s, uint32 PingTrafficSent); -boolean rts_send_CONN_A1_pdu(rdpRpc* rpc); -boolean rts_send_CONN_B1_pdu(rdpRpc* rpc); -boolean rts_send_keep_alive_pdu(rdpRpc* rpc); -boolean rts_send_flow_control_ack_pdu(rdpRpc* rpc); -boolean rts_send_ping_pdu(rdpRpc* rpc); +BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc); +BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc); +BOOL rts_send_keep_alive_pdu(rdpRpc* rpc); +BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc); +BOOL rts_send_ping_pdu(rdpRpc* rpc); int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu); diff --git a/libfreerdp/core/security.c b/libfreerdp/core/security.c index cfa7c0042..8c7bf4cda 100644 --- a/libfreerdp/core/security.c +++ b/libfreerdp/core/security.c @@ -255,7 +255,7 @@ void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* outp memcpy(output, md5_digest, 8); } -void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, boolean encryption, uint8* output) +void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output) { CryptoMd5 md5; CryptoSha1 sha1; @@ -345,7 +345,7 @@ static void fips_expand_key_bits(uint8* in, uint8* out) out[i] = fips_oddparity_table[fips_reverse_table[out[i]]]; } -boolean security_establish_keys(uint8* client_random, rdpRdp* rdp) +BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp) { uint8 pre_master_secret[48]; uint8 master_secret[48]; @@ -435,7 +435,7 @@ boolean security_establish_keys(uint8* client_random, rdpRdp* rdp) return TRUE; } -boolean security_key_update(uint8* key, uint8* update_key, int key_len) +BOOL security_key_update(uint8* key, uint8* update_key, int key_len) { uint8 sha1h[CRYPTO_SHA1_DIGEST_LENGTH]; CryptoMd5 md5; @@ -465,7 +465,7 @@ boolean security_key_update(uint8* key, uint8* update_key, int key_len) return TRUE; } -boolean security_encrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp) { if (rdp->encrypt_use_count >= 4096) { @@ -480,7 +480,7 @@ boolean security_encrypt(uint8* data, int length, rdpRdp* rdp) return TRUE; } -boolean security_decrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp) { if (rdp->decrypt_use_count >= 4096) { @@ -510,20 +510,20 @@ void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp memmove(output, buf, 8); } -boolean security_fips_encrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp) { crypto_des3_encrypt(rdp->fips_encrypt, length, data, data); rdp->encrypt_use_count++; return TRUE; } -boolean security_fips_decrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp) { crypto_des3_decrypt(rdp->fips_decrypt, length, data, data); return TRUE; } -boolean security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp) +BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp) { uint8 buf[20]; uint8 use_count_le[4]; diff --git a/libfreerdp/core/security.h b/libfreerdp/core/security.h index 5f7d9b87c..8747d56f4 100644 --- a/libfreerdp/core/security.h +++ b/libfreerdp/core/security.h @@ -33,15 +33,15 @@ void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_ra void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output); void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* output); -void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, boolean encryption, uint8* output); -boolean security_establish_keys(uint8* client_random, rdpRdp* rdp); +void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output); +BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp); -boolean security_encrypt(uint8* data, int length, rdpRdp* rdp); -boolean security_decrypt(uint8* data, int length, rdpRdp* rdp); +BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp); +BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp); void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp); -boolean security_fips_encrypt(uint8* data, int length, rdpRdp* rdp); -boolean security_fips_decrypt(uint8* data, int length, rdpRdp* rdp); -boolean security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp); +BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp); +BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp); +BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp); #endif /* __SECURITY_H */ diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c index e0509711f..8738feaa3 100644 --- a/libfreerdp/core/surface.c +++ b/libfreerdp/core/surface.c @@ -76,7 +76,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s) return 6; } -boolean update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s) +BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s) { uint8* mark; uint16 cmdType; diff --git a/libfreerdp/core/surface.h b/libfreerdp/core/surface.h index 354971e06..00c34337c 100644 --- a/libfreerdp/core/surface.h +++ b/libfreerdp/core/surface.h @@ -33,7 +33,7 @@ enum SURFCMD_CMDTYPE CMDTYPE_STREAM_SURFACE_BITS = 0x0006 }; -boolean update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s); +BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s); void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd); void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId); diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index b8ee68751..fe0a6e056 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -117,7 +117,7 @@ void tcp_get_mac_address(rdpTcp * tcp) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); */ } -boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) +BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) { uint32 option_value; socklen_t option_len; @@ -170,7 +170,7 @@ int tcp_write(rdpTcp* tcp, uint8* data, int length) return freerdp_tcp_write(tcp->sockfd, data, length); } -boolean tcp_disconnect(rdpTcp* tcp) +BOOL tcp_disconnect(rdpTcp* tcp) { freerdp_tcp_disconnect(tcp->sockfd); tcp->sockfd = -1; @@ -178,7 +178,7 @@ boolean tcp_disconnect(rdpTcp* tcp) return TRUE; } -boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking) +BOOL tcp_set_blocking_mode(rdpTcp* tcp, BOOL blocking) { #ifndef _WIN32 int flags; @@ -210,7 +210,7 @@ boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking) return TRUE; } -boolean tcp_set_keep_alive_mode(rdpTcp* tcp) +BOOL tcp_set_keep_alive_mode(rdpTcp* tcp) { #ifndef _WIN32 uint32 option_value; diff --git a/libfreerdp/core/tcp.h b/libfreerdp/core/tcp.h index ced110d7e..fbdb1440f 100644 --- a/libfreerdp/core/tcp.h +++ b/libfreerdp/core/tcp.h @@ -44,12 +44,12 @@ struct rdp_tcp #endif }; -boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port); -boolean tcp_disconnect(rdpTcp* tcp); +BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port); +BOOL tcp_disconnect(rdpTcp* tcp); int tcp_read(rdpTcp* tcp, uint8* data, int length); int tcp_write(rdpTcp* tcp, uint8* data, int length); -boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking); -boolean tcp_set_keep_alive_mode(rdpTcp* tcp); +BOOL tcp_set_blocking_mode(rdpTcp* tcp, BOOL blocking); +BOOL tcp_set_keep_alive_mode(rdpTcp* tcp); rdpTcp* tcp_new(rdpSettings* settings); void tcp_free(rdpTcp* tcp); diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index f6675106e..1844bed80 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -74,7 +74,7 @@ void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time) * @param settings settings */ -boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) +BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) { char* str; TIME_ZONE_INFO* clientTimeZone; diff --git a/libfreerdp/core/timezone.h b/libfreerdp/core/timezone.h index 8be62d4fb..0bdff4fcb 100644 --- a/libfreerdp/core/timezone.h +++ b/libfreerdp/core/timezone.h @@ -33,7 +33,7 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time); void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time); void rdp_get_client_time_zone(STREAM* s, rdpSettings* settings); -boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings); +BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings); void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings); #ifdef WITH_DEBUG_TIMEZONE diff --git a/libfreerdp/core/tpkt.c b/libfreerdp/core/tpkt.c index 24d5dee81..5d6e17342 100644 --- a/libfreerdp/core/tpkt.c +++ b/libfreerdp/core/tpkt.c @@ -60,10 +60,10 @@ /** * Verify if a packet has valid TPKT header.\n * @param s - * @return boolean + * @return BOOL */ -boolean tpkt_verify_header(STREAM* s) +BOOL tpkt_verify_header(STREAM* s) { uint8 version; diff --git a/libfreerdp/core/tpkt.h b/libfreerdp/core/tpkt.h index d7f3d5c93..ae0db9fef 100644 --- a/libfreerdp/core/tpkt.h +++ b/libfreerdp/core/tpkt.h @@ -27,7 +27,7 @@ #define TPKT_HEADER_LENGTH 4 -boolean tpkt_verify_header(STREAM* s); +BOOL tpkt_verify_header(STREAM* s); uint16 tpkt_read_header(STREAM* s); void tpkt_write_header(STREAM* s, uint16 length); diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 9627dc34c..21bc13f4e 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -70,7 +70,7 @@ void transport_attach(rdpTransport* transport, int sockfd) transport->tcp->sockfd = sockfd; } -boolean transport_disconnect(rdpTransport* transport) +BOOL transport_disconnect(rdpTransport* transport) { if (transport->layer == TRANSPORT_LAYER_TLS) tls_disconnect(transport->tls); @@ -78,14 +78,14 @@ boolean transport_disconnect(rdpTransport* transport) return tcp_disconnect(transport->tcp); } -boolean transport_connect_rdp(rdpTransport* transport) +BOOL transport_connect_rdp(rdpTransport* transport) { /* RDP encryption */ return TRUE; } -boolean transport_connect_tls(rdpTransport* transport) +BOOL transport_connect_tls(rdpTransport* transport) { if (transport->tls == NULL) transport->tls = tls_new(transport->settings); @@ -106,7 +106,7 @@ boolean transport_connect_tls(rdpTransport* transport) return TRUE; } -boolean transport_connect_nla(rdpTransport* transport) +BOOL transport_connect_nla(rdpTransport* transport) { freerdp* instance; rdpSettings* settings; @@ -155,7 +155,7 @@ boolean transport_connect_nla(rdpTransport* transport) return TRUE; } -boolean transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16 port) +BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16 port) { rdpTsg* tsg = tsg_new(transport); @@ -184,9 +184,9 @@ boolean transport_tsg_connect(rdpTransport* transport, const char* hostname, uin return TRUE; } -boolean transport_connect(rdpTransport* transport, const char* hostname, uint16 port) +BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port) { - boolean status = FALSE; + BOOL status = FALSE; rdpSettings* settings = transport->settings; if (transport->settings->ts_gateway) @@ -210,14 +210,14 @@ boolean transport_connect(rdpTransport* transport, const char* hostname, uint16 return status; } -boolean transport_accept_rdp(rdpTransport* transport) +BOOL transport_accept_rdp(rdpTransport* transport) { /* RDP encryption */ return TRUE; } -boolean transport_accept_tls(rdpTransport* transport) +BOOL transport_accept_tls(rdpTransport* transport) { if (transport->tls == NULL) transport->tls = tls_new(transport->settings); @@ -231,7 +231,7 @@ boolean transport_accept_tls(rdpTransport* transport) return TRUE; } -boolean transport_accept_nla(rdpTransport* transport) +BOOL transport_accept_nla(rdpTransport* transport) { freerdp* instance; rdpSettings* settings; @@ -487,7 +487,7 @@ int transport_check_fds(rdpTransport** ptransport) return 0; } -boolean transport_set_blocking_mode(rdpTransport* transport, boolean blocking) +BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking) { transport->blocking = blocking; return tcp_set_blocking_mode(transport->tcp, blocking); diff --git a/libfreerdp/core/transport.h b/libfreerdp/core/transport.h index 8d4a85f72..3c2641088 100644 --- a/libfreerdp/core/transport.h +++ b/libfreerdp/core/transport.h @@ -43,7 +43,7 @@ typedef struct rdp_transport rdpTransport; #include #include -typedef boolean (*TransportRecv) (rdpTransport* transport, STREAM* stream, void* extra); +typedef BOOL (*TransportRecv) (rdpTransport* transport, STREAM* stream, void* extra); struct rdp_transport { @@ -64,27 +64,27 @@ struct rdp_transport STREAM* recv_buffer; TransportRecv recv_callback; struct wait_obj* recv_event; - boolean blocking; - boolean process_single_pdu; /* process single pdu in transport_check_fds */ + BOOL blocking; + BOOL process_single_pdu; /* process single pdu in transport_check_fds */ }; STREAM* transport_recv_stream_init(rdpTransport* transport, int size); STREAM* transport_send_stream_init(rdpTransport* transport, int size); -boolean transport_connect(rdpTransport* transport, const char* hostname, uint16 port); +BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port); void transport_attach(rdpTransport* transport, int sockfd); -boolean transport_disconnect(rdpTransport* transport); -boolean transport_connect_rdp(rdpTransport* transport); -boolean transport_connect_tls(rdpTransport* transport); -boolean transport_connect_nla(rdpTransport* transport); -boolean transport_connect_tsg(rdpTransport* transport); -boolean transport_accept_rdp(rdpTransport* transport); -boolean transport_accept_tls(rdpTransport* transport); -boolean transport_accept_nla(rdpTransport* transport); +BOOL transport_disconnect(rdpTransport* transport); +BOOL transport_connect_rdp(rdpTransport* transport); +BOOL transport_connect_tls(rdpTransport* transport); +BOOL transport_connect_nla(rdpTransport* transport); +BOOL transport_connect_tsg(rdpTransport* transport); +BOOL transport_accept_rdp(rdpTransport* transport); +BOOL transport_accept_tls(rdpTransport* transport); +BOOL transport_accept_nla(rdpTransport* transport); int transport_read(rdpTransport* transport, STREAM* s); int transport_write(rdpTransport* transport, STREAM* s); void transport_get_fds(rdpTransport* transport, void** rfds, int* rcount); int transport_check_fds(rdpTransport** ptransport); -boolean transport_set_blocking_mode(rdpTransport* transport, boolean blocking); +BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking); rdpTransport* transport_new(rdpSettings* settings); void transport_free(rdpTransport* transport); diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index e901b7fb9..80c15a716 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -453,7 +453,7 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, return length; } -boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) +BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) { uint8* data; uint32 length; diff --git a/libfreerdp/core/tsg.h b/libfreerdp/core/tsg.h index 624ad1b47..4fcbb12b3 100644 --- a/libfreerdp/core/tsg.h +++ b/libfreerdp/core/tsg.h @@ -241,7 +241,7 @@ typedef struct _TSG_PACKET DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, uint32* lengths); -boolean tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port); +BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port); int tsg_write(rdpTsg* tsg, uint8* data, uint32 length); int tsg_read(rdpTsg* tsg, uint8* data, uint32 length); diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index e98bc9348..9825fb987 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -36,7 +36,7 @@ static const char* const UPDATE_TYPE_STRINGS[] = }; */ -boolean update_recv_orders(rdpUpdate* update, STREAM* s) +BOOL update_recv_orders(rdpUpdate* update, STREAM* s) { uint16 numberOrders; @@ -261,7 +261,7 @@ void update_recv_pointer(rdpUpdate* update, STREAM* s) } } -boolean update_recv(rdpUpdate* update, STREAM* s) +BOOL update_recv(rdpUpdate* update, STREAM* s) { uint16 updateType; rdpContext* context = update->context; @@ -544,7 +544,7 @@ static void update_send_pointer_cached(rdpContext* context, POINTER_CACHED_UPDAT fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_CACHED, s); } -boolean update_read_refresh_rect(rdpUpdate* update, STREAM* s) +BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s) { int index; uint8 numberOfAreas; @@ -573,7 +573,7 @@ boolean update_read_refresh_rect(rdpUpdate* update, STREAM* s) return TRUE; } -boolean update_read_suppress_output(rdpUpdate* update, STREAM* s) +BOOL update_read_suppress_output(rdpUpdate* update, STREAM* s) { uint8 allowDisplayUpdates; diff --git a/libfreerdp/core/update.h b/libfreerdp/core/update.h index 8af08f3d7..32c2d1c89 100644 --- a/libfreerdp/core/update.h +++ b/libfreerdp/core/update.h @@ -44,7 +44,7 @@ void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_upda void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_update); void update_recv_play_sound(rdpUpdate* update, STREAM* s); void update_recv_pointer(rdpUpdate* update, STREAM* s); -boolean update_recv(rdpUpdate* update, STREAM* s); +BOOL update_recv(rdpUpdate* update, STREAM* s); void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_position); void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system); @@ -52,8 +52,8 @@ void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color); void update_read_pointer_new(STREAM* s, POINTER_NEW_UPDATE* pointer_new); void update_read_pointer_cached(STREAM* s, POINTER_CACHED_UPDATE* pointer_cached); -boolean update_read_refresh_rect(rdpUpdate* update, STREAM* s); -boolean update_read_suppress_output(rdpUpdate* update, STREAM* s); +BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s); +BOOL update_read_suppress_output(rdpUpdate* update, STREAM* s); void update_register_server_callbacks(rdpUpdate* update); void update_register_client_callbacks(rdpUpdate* update); diff --git a/libfreerdp/crypto/ber.c b/libfreerdp/crypto/ber.c index 14dc2e3f8..b45b6f432 100644 --- a/libfreerdp/crypto/ber.c +++ b/libfreerdp/crypto/ber.c @@ -88,7 +88,7 @@ int ber_get_content_length(int length) * @return */ -boolean ber_read_universal_tag(STREAM* s, uint8 tag, boolean pc) +BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) { uint8 byte; @@ -107,7 +107,7 @@ boolean ber_read_universal_tag(STREAM* s, uint8 tag, boolean pc) * @param pc primitive (FALSE) or constructed (TRUE) */ -void ber_write_universal_tag(STREAM* s, uint8 tag, boolean pc) +void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) { stream_write_uint8(s, (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag)); } @@ -119,7 +119,7 @@ void ber_write_universal_tag(STREAM* s, uint8 tag, boolean pc) * @param length length */ -boolean ber_read_application_tag(STREAM* s, uint8 tag, int* length) +BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length) { uint8 byte; @@ -172,7 +172,7 @@ void ber_write_application_tag(STREAM* s, uint8 tag, int length) } } -boolean ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc) +BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) { uint8 byte; @@ -189,7 +189,7 @@ boolean ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc) return TRUE; } -int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc) +int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc) { stream_write_uint8(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)); return ber_write_length(s, length) + 1; @@ -200,7 +200,7 @@ int ber_skip_contextual_tag(int length) return _ber_skip_length(length) + 1; } -boolean ber_read_sequence_tag(STREAM* s, int* length) +BOOL ber_read_sequence_tag(STREAM* s, int* length) { uint8 byte; @@ -236,7 +236,7 @@ int ber_skip_sequence_tag(int length) return 1 + _ber_skip_length(length); } -boolean ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) { int length; @@ -262,7 +262,7 @@ void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count) stream_write_uint8(s, enumerated); } -boolean ber_read_bit_string(STREAM* s, int* length, uint8* padding) +BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding) { ber_read_universal_tag(s, BER_TAG_BIT_STRING, FALSE); ber_read_length(s, length); @@ -285,7 +285,7 @@ void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length) stream_write(s, oct_str, length); } -boolean ber_read_octet_string_tag(STREAM* s, int* length) +BOOL ber_read_octet_string_tag(STREAM* s, int* length) { ber_read_universal_tag(s, BER_TAG_OCTET_STRING, FALSE); ber_read_length(s, length); @@ -310,7 +310,7 @@ int ber_skip_octet_string(int length) * @param value */ -boolean ber_read_boolean(STREAM* s, boolean* value) +BOOL ber_read_BOOL(STREAM* s, BOOL* value) { int length; uint8 v; @@ -331,14 +331,14 @@ boolean ber_read_boolean(STREAM* s, boolean* value) * @param value */ -void ber_write_boolean(STREAM* s, boolean value) +void ber_write_BOOL(STREAM* s, BOOL value) { ber_write_universal_tag(s, BER_TAG_BOOLEAN, FALSE); ber_write_length(s, 1); stream_write_uint8(s, (value == TRUE) ? 0xFF : 0); } -boolean ber_read_integer(STREAM* s, uint32* value) +BOOL ber_read_integer(STREAM* s, uint32* value) { int length; @@ -427,7 +427,7 @@ int ber_skip_integer(uint32 value) return 0; } -boolean ber_read_integer_length(STREAM* s, int* length) +BOOL ber_read_integer_length(STREAM* s, int* length) { ber_read_universal_tag(s, BER_TAG_INTEGER, FALSE); ber_read_length(s, length); diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index 1907c4cc7..bb6fb8fcf 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -166,11 +166,11 @@ void crypto_cert_free(CryptoCert cert) free(cert); } -boolean crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength) +BOOL crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength) { BYTE* ptr; int length; - boolean status = TRUE; + BOOL status = TRUE; EVP_PKEY* pkey = NULL; pkey = X509_get_pubkey(cert->px509); @@ -439,10 +439,10 @@ char* crypto_cert_issuer(X509* xcert) return crypto_print_name(X509_get_issuer_name(xcert)); } -boolean x509_verify_certificate(CryptoCert cert, char* certificate_store_path) +BOOL x509_verify_certificate(CryptoCert cert, char* certificate_store_path) { X509_STORE_CTX* csc; - boolean status = FALSE; + BOOL status = FALSE; X509_STORE* cert_ctx = NULL; X509_LOOKUP* lookup = NULL; X509* xcert = cert->px509; diff --git a/libfreerdp/crypto/der.c b/libfreerdp/crypto/der.c index 59c2a7ff9..feb91565f 100644 --- a/libfreerdp/crypto/der.c +++ b/libfreerdp/crypto/der.c @@ -69,13 +69,13 @@ int der_skip_contextual_tag(int length) return _der_skip_length(length) + 1; } -int der_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc) +int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc) { stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); return der_write_length(s, length) + 1; } -void der_write_universal_tag(STREAM* s, uint8 tag, boolean pc) +void der_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) { stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); } diff --git a/libfreerdp/crypto/er.c b/libfreerdp/crypto/er.c index 18f11c8d7..ec540a295 100644 --- a/libfreerdp/crypto/er.c +++ b/libfreerdp/crypto/er.c @@ -53,7 +53,7 @@ void er_read_length(STREAM* s, int* length) * @param length length */ -int er_write_length(STREAM* s, int length, boolean flag) +int er_write_length(STREAM* s, int length, BOOL flag) { if (flag) return der_write_length(s, length); @@ -84,7 +84,7 @@ int er_get_content_length(int length) * @return */ -boolean er_read_universal_tag(STREAM* s, uint8 tag, boolean pc) +BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) { uint8 byte; @@ -103,7 +103,7 @@ boolean er_read_universal_tag(STREAM* s, uint8 tag, boolean pc) * @param pc primitive (FALSE) or constructed (TRUE) */ -void er_write_universal_tag(STREAM* s, uint8 tag, boolean pc) +void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) { stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); } @@ -115,7 +115,7 @@ void er_write_universal_tag(STREAM* s, uint8 tag, boolean pc) * @param length length */ -boolean er_read_application_tag(STREAM* s, uint8 tag, int* length) +BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length) { uint8 byte; @@ -153,7 +153,7 @@ boolean er_read_application_tag(STREAM* s, uint8 tag, int* length) * @param length length */ -void er_write_application_tag(STREAM* s, uint8 tag, int length, boolean flag) +void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag) { if (tag > 30) { @@ -168,7 +168,7 @@ void er_write_application_tag(STREAM* s, uint8 tag, int length, boolean flag) } } -boolean er_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc) +BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) { uint8 byte; @@ -185,7 +185,7 @@ boolean er_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc) return TRUE; } -int er_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc, boolean flag) +int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag) { stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); return er_write_length(s, length, flag) + 1; @@ -196,7 +196,7 @@ int er_skip_contextual_tag(int length) return _er_skip_length(length) + 1; } -boolean er_read_sequence_tag(STREAM* s, int* length) +BOOL er_read_sequence_tag(STREAM* s, int* length) { uint8 byte; @@ -216,7 +216,7 @@ boolean er_read_sequence_tag(STREAM* s, int* length) * @param length length */ -int er_write_sequence_tag(STREAM* s, int length, boolean flag) +int er_write_sequence_tag(STREAM* s, int length, BOOL flag) { stream_write_uint8(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE)); return er_write_length(s, length, flag) + 1; @@ -232,7 +232,7 @@ int er_skip_sequence_tag(int length) return 1 + _er_skip_length(length); } -boolean er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) { int length; @@ -251,14 +251,14 @@ boolean er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) return TRUE; } -void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, boolean flag) +void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag) { er_write_universal_tag(s, ER_TAG_ENUMERATED, FALSE); er_write_length(s, 1, flag); stream_write_uint8(s, enumerated); } -boolean er_read_bit_string(STREAM* s, int* length, uint8* padding) +BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding) { er_read_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_read_length(s, length); @@ -267,7 +267,7 @@ boolean er_read_bit_string(STREAM* s, int* length, uint8* padding) return TRUE; } -boolean er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, boolean flag) +BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag) { er_write_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_write_length(s, length, flag); @@ -275,7 +275,7 @@ boolean er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, boolean return TRUE; } -boolean er_read_octet_string(STREAM* s, int* length) +BOOL er_read_octet_string(STREAM* s, int* length) { if(!er_read_universal_tag(s, ER_TAG_OCTET_STRING, FALSE)) return FALSE; @@ -291,14 +291,14 @@ boolean er_read_octet_string(STREAM* s, int* length) * @param length string length */ -void er_write_octet_string(STREAM* s, uint8* oct_str, int length, boolean flag) +void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag) { er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); er_write_length(s, length, flag); stream_write(s, oct_str, length); } -int er_write_octet_string_tag(STREAM* s, int length, boolean flag) +int er_write_octet_string_tag(STREAM* s, int length, BOOL flag) { er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); er_write_length(s, length, flag); @@ -316,7 +316,7 @@ int er_skip_octet_string(int length) * @param value */ -boolean er_read_boolean(STREAM* s, boolean* value) +BOOL er_read_BOOL(STREAM* s, BOOL* value) { int length; uint8 v; @@ -337,14 +337,14 @@ boolean er_read_boolean(STREAM* s, boolean* value) * @param value */ -void er_write_boolean(STREAM* s, boolean value) +void er_write_BOOL(STREAM* s, BOOL value) { er_write_universal_tag(s, ER_TAG_BOOLEAN, FALSE); er_write_length(s, 1, FALSE); stream_write_uint8(s, (value == TRUE) ? 0xFF : 0); } -boolean er_read_integer(STREAM* s, uint32* value) +BOOL er_read_integer(STREAM* s, uint32* value) { int length; @@ -426,7 +426,7 @@ int er_skip_integer(sint32 value) return 0; } -boolean er_read_integer_length(STREAM* s, int* length) +BOOL er_read_integer_length(STREAM* s, int* length) { er_read_universal_tag(s, ER_TAG_INTEGER, FALSE); er_read_length(s, length); diff --git a/libfreerdp/crypto/nla.c b/libfreerdp/crypto/nla.c index 111ed9040..fb3e155a9 100644 --- a/libfreerdp/crypto/nla.c +++ b/libfreerdp/crypto/nla.c @@ -119,7 +119,7 @@ int credssp_ntlm_client_init(rdpCredssp* credssp) { if (instance->Authenticate) { - boolean proceed = instance->Authenticate(instance, + BOOL proceed = instance->Authenticate(instance, &settings->username, &settings->password, &settings->domain); if (!proceed) return 0; @@ -183,9 +183,9 @@ int credssp_client_authenticate(rdpCredssp* credssp) SecBuffer output_buffer; SecBufferDesc input_buffer_desc; SecBufferDesc output_buffer_desc; - boolean have_context; - boolean have_input_buffer; - boolean have_pub_key_auth; + BOOL have_context; + BOOL have_input_buffer; + BOOL have_pub_key_auth; sspi_GlobalInit(); @@ -385,9 +385,9 @@ int credssp_server_authenticate(rdpCredssp* credssp) SecBuffer output_buffer; SecBufferDesc input_buffer_desc; SecBufferDesc output_buffer_desc; - boolean have_context; - boolean have_input_buffer; - boolean have_pub_key_auth; + BOOL have_context; + BOOL have_input_buffer; + BOOL have_pub_key_auth; sspi_GlobalInit(); diff --git a/libfreerdp/crypto/per.c b/libfreerdp/crypto/per.c index 403807495..3d858f439 100644 --- a/libfreerdp/crypto/per.c +++ b/libfreerdp/crypto/per.c @@ -30,7 +30,7 @@ * @return */ -boolean per_read_length(STREAM* s, uint16* length) +BOOL per_read_length(STREAM* s, uint16* length) { uint8 byte; @@ -78,7 +78,7 @@ void per_write_length(STREAM* s, int length) * @return */ -boolean per_read_choice(STREAM* s, uint8* choice) +BOOL per_read_choice(STREAM* s, uint8* choice) { if (stream_get_left(s) < 1) return FALSE; @@ -105,7 +105,7 @@ void per_write_choice(STREAM* s, uint8 choice) * @return */ -boolean per_read_selection(STREAM* s, uint8* selection) +BOOL per_read_selection(STREAM* s, uint8* selection) { if (stream_get_left(s) < 1) return FALSE; @@ -132,7 +132,7 @@ void per_write_selection(STREAM* s, uint8 selection) * @return */ -boolean per_read_number_of_sets(STREAM* s, uint8* number) +BOOL per_read_number_of_sets(STREAM* s, uint8* number) { if (stream_get_left(s) < 1) return FALSE; @@ -158,7 +158,7 @@ void per_write_number_of_sets(STREAM* s, uint8 number) * @param length */ -boolean per_read_padding(STREAM* s, int length) +BOOL per_read_padding(STREAM* s, int length) { if (stream_get_left(s) < length) return FALSE; @@ -188,7 +188,7 @@ void per_write_padding(STREAM* s, int length) * @return */ -boolean per_read_integer(STREAM* s, uint32* integer) +BOOL per_read_integer(STREAM* s, uint32* integer) { uint16 length; @@ -241,7 +241,7 @@ void per_write_integer(STREAM* s, uint32 integer) * @return */ -boolean per_read_integer16(STREAM* s, uint16* integer, uint16 min) +BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min) { if (stream_get_left(s) < 2) return FALSE; @@ -276,7 +276,7 @@ void per_write_integer16(STREAM* s, uint16 integer, uint16 min) * @return */ -boolean per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) { if (stream_get_left(s) < 1) return FALSE; @@ -310,7 +310,7 @@ void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count) * @return */ -boolean per_read_object_identifier(STREAM* s, uint8 oid[6]) +BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]) { uint8 t12; uint16 length; @@ -387,7 +387,7 @@ void per_write_string(STREAM* s, uint8* str, int length) * @return */ -boolean per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min) +BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min) { int i; uint16 mlength; @@ -443,7 +443,7 @@ void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min) * @param min minimum string length */ -boolean per_read_numeric_string(STREAM* s, int min) +BOOL per_read_numeric_string(STREAM* s, int min) { int length; uint16 mlength; diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index f1ee966d2..f05067905 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -26,7 +26,7 @@ #include -static CryptoCert tls_get_certificate(rdpTls* tls, boolean peer) +static CryptoCert tls_get_certificate(rdpTls* tls, BOOL peer) { CryptoCert cert; X509* server_cert; @@ -56,7 +56,7 @@ static void tls_free_certificate(CryptoCert cert) free(cert); } -boolean tls_connect(rdpTls* tls) +BOOL tls_connect(rdpTls* tls) { CryptoCert cert; long options = 0; @@ -153,7 +153,7 @@ boolean tls_connect(rdpTls* tls) return TRUE; } -boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file) +BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file) { CryptoCert cert; long options = 0; @@ -279,7 +279,7 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi return TRUE; } -boolean tls_disconnect(rdpTls* tls) +BOOL tls_disconnect(rdpTls* tls) { if (tls->ssl) SSL_shutdown(tls->ssl); @@ -381,7 +381,7 @@ static void tls_errors(const char *prefix) printf("%s: %s\n", prefix, ERR_error_string(error, NULL)); } -boolean tls_print_error(char* func, SSL* connection, int value) +BOOL tls_print_error(char* func, SSL* connection, int value) { switch (SSL_get_error(connection, value)) { @@ -414,7 +414,7 @@ boolean tls_print_error(char* func, SSL* connection, int value) } } -boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) +BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) { int match; int index; @@ -423,9 +423,9 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) char** alt_names = NULL; int alt_names_count = 0; int* alt_names_lengths = NULL; - boolean certificate_status; - boolean hostname_match = FALSE; - boolean verification_status = FALSE; + BOOL certificate_status; + BOOL hostname_match = FALSE; + BOOL verification_status = FALSE; rdpCertificateData* certificate_data; /* ignore certificate verification if user explicitly required it (discouraged) */ @@ -495,7 +495,7 @@ boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname) char* subject; char* fingerprint; freerdp* instance = (freerdp*) tls->settings->instance; - boolean accept_certificate = FALSE; + BOOL accept_certificate = FALSE; issuer = crypto_cert_issuer(cert->px509); subject = crypto_cert_subject(cert->px509); diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index f915564e5..6886f7409 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -94,7 +94,7 @@ void gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, uint8* data, int width, int height, int bpp, int length, - boolean compressed, int codec_id) + BOOL compressed, int codec_id) { uint16 size; RFX_MESSAGE* msg; @@ -103,7 +103,7 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, int yindex; int xindex; rdpGdi* gdi; - boolean status; + BOOL status; size = width * height * (bpp + 7) / 8; @@ -174,7 +174,7 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, bitmap->bpp = bpp; } -void gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, boolean primary) +void gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) { rdpGdi* gdi = context->gdi; diff --git a/libfreerdp/gdi/graphics.h b/libfreerdp/gdi/graphics.h index 968c1652e..796d97d96 100644 --- a/libfreerdp/gdi/graphics.h +++ b/libfreerdp/gdi/graphics.h @@ -29,7 +29,7 @@ void gdi_Bitmap_New(rdpContext* context, rdpBitmap* bitmap); void gdi_Bitmap_Free(rdpContext* context, rdpBitmap* bitmap); void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, uint8* data, int width, int height, int bpp, int length, - boolean compressed, int codec_id); + BOOL compressed, int codec_id); void gdi_register_graphics(rdpGraphics* graphics); #endif /* __GDI_GRAPHICS_H */ diff --git a/libfreerdp/locale/keyboard.c b/libfreerdp/locale/keyboard.c index a967ef2df..91252f45b 100644 --- a/libfreerdp/locale/keyboard.c +++ b/libfreerdp/locale/keyboard.c @@ -99,7 +99,7 @@ RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(uint32 keycode) return X11_KEYCODE_TO_RDP_SCANCODE[keycode]; } -uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, boolean extended) +uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, BOOL extended) { if (extended) return RDP_SCANCODE_TO_X11_KEYCODE[scancode][1]; diff --git a/libfreerdp/locale/keyboard_xkbfile.c b/libfreerdp/locale/keyboard_xkbfile.c index 74a7b0221..d2a02bf66 100644 --- a/libfreerdp/locale/keyboard_xkbfile.c +++ b/libfreerdp/locale/keyboard_xkbfile.c @@ -271,9 +271,9 @@ uint32 detect_keyboard_layout_from_xkbfile(void* display) int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]) { int i, j; - boolean found; + BOOL found; XkbDescPtr xkb; - boolean status = FALSE; + BOOL status = FALSE; if (display && (xkb = XkbGetMap(display, 0, XkbUseCoreKbd))) { diff --git a/libfreerdp/locale/locale.c b/libfreerdp/locale/locale.c index 035001b88..ee1f0bfc9 100644 --- a/libfreerdp/locale/locale.c +++ b/libfreerdp/locale/locale.c @@ -629,7 +629,7 @@ static const LOCALE_KEYBOARD_LAYOUTS LOCALE_KEYBOARD_LAYOUTS_TABLE[] = { XHOSA, { 0x00000409, 0x00000409, 0x0, 0x0, 0x0 } }, }; -boolean freerdp_get_system_language_and_country_codes(char* language, char* country) +BOOL freerdp_get_system_language_and_country_codes(char* language, char* country) { int dot; int underscore; diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 704433574..757ca2531 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -65,7 +65,7 @@ struct _TIME_ZONE_ENTRY { const char* Id; uint32 Bias; - boolean SupportsDST; + BOOL SupportsDST; const char* DisplayName; const char* StandardName; const char* DaylightName; @@ -1573,7 +1573,7 @@ char* freerdp_get_unix_timezone_identifier() #endif } -boolean freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const char* list) +BOOL freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const char* list) { char* p; char* list_copy; diff --git a/libfreerdp/rail/window.c b/libfreerdp/rail/window.c index c462993b0..5bfc9c722 100644 --- a/libfreerdp/rail/window.c +++ b/libfreerdp/rail/window.c @@ -36,7 +36,7 @@ struct _WINDOW_STYLE { uint32 style; const char* name; - boolean multi; + BOOL multi; }; typedef struct _WINDOW_STYLE WINDOW_STYLE; diff --git a/libfreerdp/rail/window_list.c b/libfreerdp/rail/window_list.c index f705ca29a..f225b5cb1 100644 --- a/libfreerdp/rail/window_list.c +++ b/libfreerdp/rail/window_list.c @@ -33,7 +33,7 @@ void window_list_rewind(rdpWindowList* list) list->iterator = list->head; } -boolean window_list_has_next(rdpWindowList* list) +BOOL window_list_has_next(rdpWindowList* list) { if (list->iterator != NULL) { diff --git a/libfreerdp/utils/file.c b/libfreerdp/utils/file.c index 16ffed6b9..4da37e791 100644 --- a/libfreerdp/utils/file.c +++ b/libfreerdp/utils/file.c @@ -74,7 +74,7 @@ void freerdp_mkdir(char* path) #endif } -boolean freerdp_check_file_exists(char* file) +BOOL freerdp_check_file_exists(char* file) { struct stat stat_info; @@ -205,7 +205,7 @@ char* freerdp_get_parent_path(char* base_path, int depth) return path; } -boolean freerdp_path_contains_separator(char* path) +BOOL freerdp_path_contains_separator(char* path) { if (path == NULL) return FALSE; @@ -218,12 +218,12 @@ boolean freerdp_path_contains_separator(char* path) /* detects if we are running from the source tree */ -boolean freerdp_detect_development_mode(rdpSettings* settings) +BOOL freerdp_detect_development_mode(rdpSettings* settings) { int depth = 0; char* current_path; char* development_path = NULL; - boolean development_mode = FALSE; + BOOL development_mode = FALSE; if (freerdp_check_file_exists(".git")) { diff --git a/libfreerdp/utils/load_plugin.c b/libfreerdp/utils/load_plugin.c index cd65c8b8d..be5b958e5 100644 --- a/libfreerdp/utils/load_plugin.c +++ b/libfreerdp/utils/load_plugin.c @@ -158,7 +158,7 @@ void* freerdp_load_plugin(const char* name, const char* entry_name) * * @return TRUE on success, otherwise FALSE. */ -boolean freerdp_register_static_plugin(const char* name, const char* entry_name, void* entry_addr) +BOOL freerdp_register_static_plugin(const char* name, const char* entry_name, void* entry_addr) { staticPlugin* plugin; diff --git a/libfreerdp/utils/pcap.c b/libfreerdp/utils/pcap.c index 7405125ef..3984c96b4 100644 --- a/libfreerdp/utils/pcap.c +++ b/libfreerdp/utils/pcap.c @@ -115,7 +115,7 @@ void pcap_add_record(rdpPcap* pcap, void* data, uint32 length) record->header.ts_usec = tp.tv_usec; } -boolean pcap_has_next_record(rdpPcap* pcap) +BOOL pcap_has_next_record(rdpPcap* pcap) { if (pcap->file_size - (ftell(pcap->fp)) <= 16) return FALSE; @@ -123,7 +123,7 @@ boolean pcap_has_next_record(rdpPcap* pcap) return TRUE; } -boolean pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record) +BOOL pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record) { if (pcap_has_next_record(pcap) != TRUE) return FALSE; @@ -134,13 +134,13 @@ boolean pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record) return TRUE; } -boolean pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record) +BOOL pcap_get_next_record_content(rdpPcap* pcap, pcap_record* record) { fread(record->data, record->length, 1, pcap->fp); return TRUE; } -boolean pcap_get_next_record(rdpPcap* pcap, pcap_record* record) +BOOL pcap_get_next_record(rdpPcap* pcap, pcap_record* record) { if (pcap_has_next_record(pcap) != TRUE) return FALSE; @@ -150,7 +150,7 @@ boolean pcap_get_next_record(rdpPcap* pcap, pcap_record* record) return TRUE; } -rdpPcap* pcap_open(char* name, boolean write) +rdpPcap* pcap_open(char* name, BOOL write) { rdpPcap* pcap; diff --git a/libfreerdp/utils/tcp.c b/libfreerdp/utils/tcp.c index 9825548e8..99b287e5b 100644 --- a/libfreerdp/utils/tcp.c +++ b/libfreerdp/utils/tcp.c @@ -183,7 +183,7 @@ int freerdp_tcp_disconnect(int sockfd) return 0; } -int freerdp_tcp_set_no_delay(int sockfd, boolean no_delay) +int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay) { uint32 option_value; socklen_t option_len; diff --git a/server/Sample/sf_rdpsnd.c b/server/Sample/sf_rdpsnd.c index 22cc3c026..ff901fef6 100644 --- a/server/Sample/sf_rdpsnd.c +++ b/server/Sample/sf_rdpsnd.c @@ -44,7 +44,7 @@ static void sf_peer_rdpsnd_activated(rdpsnd_server_context* context) printf("RDPSND Activated\n"); } -boolean sf_peer_rdpsnd_init(testPeerContext* context) +BOOL sf_peer_rdpsnd_init(testPeerContext* context) { context->rdpsnd = rdpsnd_server_context_new(context->vcm); context->rdpsnd->data = context; diff --git a/server/Sample/sf_rdpsnd.h b/server/Sample/sf_rdpsnd.h index f9ebef8a5..ce2875f17 100644 --- a/server/Sample/sf_rdpsnd.h +++ b/server/Sample/sf_rdpsnd.h @@ -26,7 +26,7 @@ #include "sfreerdp.h" -boolean sf_peer_rdpsnd_init(testPeerContext* context); +BOOL sf_peer_rdpsnd_init(testPeerContext* context); #endif /* SF_RDPSND_H */ diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index ee68219ea..82479b92f 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -43,7 +43,7 @@ #include "sfreerdp.h" static char* test_pcap_file = NULL; -static boolean test_dump_rfx_realtime = TRUE; +static BOOL test_dump_rfx_realtime = TRUE; /* HL1, LH1, HH1, HL2, LH2, HH2, HL3, LH3, HH3, LL3 */ static const unsigned int test_quantization_values[] = @@ -321,7 +321,7 @@ static void test_peer_draw_icon(freerdp_peer* client, int x, int y) test_peer_end_frame(client); } -static boolean test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) +static BOOL test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) { sint32 sec, usec; @@ -452,7 +452,7 @@ static void* tf_debug_channel_thread_func(void* arg) return 0; } -boolean tf_peer_post_connect(freerdp_peer* client) +BOOL tf_peer_post_connect(freerdp_peer* client) { int i; testPeerContext* context = (testPeerContext*) client->context; @@ -517,7 +517,7 @@ boolean tf_peer_post_connect(freerdp_peer* client) return TRUE; } -boolean tf_peer_activate(freerdp_peer* client) +BOOL tf_peer_activate(freerdp_peer* client) { testPeerContext* context = (testPeerContext*) client->context; diff --git a/server/Sample/sfreerdp.h b/server/Sample/sfreerdp.h index 35994d9fc..2ef6c1f64 100644 --- a/server/Sample/sfreerdp.h +++ b/server/Sample/sfreerdp.h @@ -42,12 +42,12 @@ struct test_peer_context int icon_height; int icon_x; int icon_y; - boolean activated; + BOOL activated; WTSVirtualChannelManager* vcm; void* debug_channel; freerdp_thread* debug_channel_thread; audin_server_context* audin; - boolean audin_open; + BOOL audin_open; uint32 frame_id; rdpsnd_server_context* rdpsnd; }; diff --git a/server/Windows/wf_peer.c b/server/Windows/wf_peer.c index 030786bc1..df134f5eb 100644 --- a/server/Windows/wf_peer.c +++ b/server/Windows/wf_peer.c @@ -57,7 +57,7 @@ void wf_peer_init(freerdp_peer* client) freerdp_peer_context_new(client); } -boolean wf_peer_post_connect(freerdp_peer* client) +BOOL wf_peer_post_connect(freerdp_peer* client) { HDC hdc; wfInfo* wfi; @@ -88,7 +88,7 @@ boolean wf_peer_post_connect(freerdp_peer* client) return TRUE; } -boolean wf_peer_activate(freerdp_peer* client) +BOOL wf_peer_activate(freerdp_peer* client) { wfInfo* wfi; wfPeerContext* context = (wfPeerContext*) client->context; @@ -102,7 +102,7 @@ boolean wf_peer_activate(freerdp_peer* client) return TRUE; } -boolean wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, boolean automatic) +BOOL wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic) { printf("PeerLogon\n"); diff --git a/server/Windows/wf_peer.h b/server/Windows/wf_peer.h index 7a5270fad..fb8a74c16 100644 --- a/server/Windows/wf_peer.h +++ b/server/Windows/wf_peer.h @@ -34,8 +34,8 @@ void wf_peer_init(freerdp_peer* client); void wf_dxgi_encode(freerdp_peer* client, UINT timeout); void wf_rfx_encode(freerdp_peer* client); -boolean wf_peer_post_connect(freerdp_peer* client); -boolean wf_peer_activate(freerdp_peer* client); +BOOL wf_peer_post_connect(freerdp_peer* client); +BOOL wf_peer_activate(freerdp_peer* client); void wf_peer_synchronize_event(rdpInput* input, uint32 flags); diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index 9abcfddb7..c1afbcae5 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -36,7 +36,7 @@ void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code) { #ifdef WITH_XTEST unsigned int keycode; - boolean extended = FALSE; + BOOL extended = FALSE; xfPeerContext* xfp = (xfPeerContext*) input->context; xfInfo* xfi = xfp->info; @@ -73,7 +73,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) #ifdef WITH_XTEST xfPeerContext* xfp = (xfPeerContext*) input->context; int button = 0; - boolean down = FALSE; + BOOL down = FALSE; xfInfo* xfi = xfp->info; pthread_mutex_lock(&(xfp->mutex)); @@ -81,7 +81,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) if (flags & PTR_FLAGS_WHEEL) { - boolean negative = FALSE; + BOOL negative = FALSE; if (flags & PTR_FLAGS_WHEEL_NEGATIVE) negative = TRUE; diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 7c49530a9..36d062e3f 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -41,7 +41,7 @@ #include extern char* xf_pcap_file; -extern boolean xf_pcap_dump_realtime; +extern BOOL xf_pcap_dump_realtime; #include "xf_event.h" #include "xf_input.h" @@ -320,7 +320,7 @@ void xf_peer_live_rfx(freerdp_peer* client) pthread_create(&(xfp->thread), 0, xf_monitor_updates, (void*) client); } -static boolean xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) +static BOOL xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) { sint32 sec, usec; @@ -470,7 +470,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh update->SurfaceBits(update->context, cmd); } -boolean xf_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) +BOOL xf_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) { xfPeerContext* xfp = (xfPeerContext*) client->context; @@ -483,7 +483,7 @@ boolean xf_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount) return TRUE; } -boolean xf_peer_check_fds(freerdp_peer* client) +BOOL xf_peer_check_fds(freerdp_peer* client) { xfInfo* xfi; xfEvent* event; @@ -527,12 +527,12 @@ boolean xf_peer_check_fds(freerdp_peer* client) return TRUE; } -boolean xf_peer_capabilities(freerdp_peer* client) +BOOL xf_peer_capabilities(freerdp_peer* client) { return TRUE; } -boolean xf_peer_post_connect(freerdp_peer* client) +BOOL xf_peer_post_connect(freerdp_peer* client) { xfInfo* xfi; xfPeerContext* xfp; @@ -578,7 +578,7 @@ boolean xf_peer_post_connect(freerdp_peer* client) return TRUE; } -boolean xf_peer_activate(freerdp_peer* client) +BOOL xf_peer_activate(freerdp_peer* client) { xfPeerContext* xfp = (xfPeerContext*) client->context; diff --git a/server/X11/xf_peer.h b/server/X11/xf_peer.h index b93c8d94a..5e023513d 100644 --- a/server/X11/xf_peer.h +++ b/server/X11/xf_peer.h @@ -42,7 +42,7 @@ struct xf_peer_context xfInfo* info; int activations; pthread_t thread; - boolean activated; + BOOL activated; pthread_mutex_t mutex; RFX_CONTEXT* rfx_context; xfEventQueue* event_queue; diff --git a/server/X11/xfreerdp.c b/server/X11/xfreerdp.c index 4a3af1ca8..d6a28d806 100644 --- a/server/X11/xfreerdp.c +++ b/server/X11/xfreerdp.c @@ -36,7 +36,7 @@ #include "xfreerdp.h" char* xf_pcap_file = NULL; -boolean xf_pcap_dump_realtime = TRUE; +BOOL xf_pcap_dump_realtime = TRUE; void xf_server_main_loop(freerdp_listener* instance) { diff --git a/server/X11/xfreerdp.h b/server/X11/xfreerdp.h index 1d3844a8a..2fe8659dc 100644 --- a/server/X11/xfreerdp.h +++ b/server/X11/xfreerdp.h @@ -57,7 +57,7 @@ struct xf_info int scanline_pad; int bytesPerPixel; HCLRCONV clrconv; - boolean use_xshm; + BOOL use_xshm; XImage* fb_image; Pixmap fb_pixmap; From 1bf8a4551976fdebebbe024e9d4099419848066c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 03:01:37 -0400 Subject: [PATCH 37/43] freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16 --- channels/audin/client/alsa/audin_alsa.c | 12 +- channels/audin/client/audin_main.c | 38 +- channels/audin/client/audin_main.h | 14 +- channels/audin/client/pulse/audin_pulse.c | 8 +- channels/audin/server/audin.c | 42 +- channels/cliprdr/client/cliprdr_format.c | 20 +- channels/cliprdr/client/cliprdr_format.h | 8 +- channels/cliprdr/client/cliprdr_main.c | 40 +- channels/cliprdr/client/cliprdr_main.h | 2 +- channels/disk/client/disk_file.c | 24 +- channels/disk/client/disk_file.h | 6 +- channels/disk/client/disk_main.c | 18 +- channels/drdynvc/client/drdynvc_main.c | 36 +- channels/drdynvc/client/drdynvc_main.h | 2 +- channels/drdynvc/client/dvcman.c | 6 +- channels/drdynvc/client/dvcman.h | 2 +- channels/parallel/client/parallel_main.c | 10 +- channels/printer/client/printer_cups.c | 2 +- channels/printer/client/printer_main.c | 8 +- channels/printer/client/printer_main.h | 2 +- channels/printer/client/printer_win.c | 2 +- channels/rail/client/rail_main.c | 2 +- channels/rail/client/rail_main.h | 2 +- channels/rail/client/rail_orders.c | 120 +-- channels/rdpdr/client/irp.c | 4 +- channels/rdpdr/client/rdpdr_capabilities.c | 48 +- channels/rdpdr/client/rdpdr_main.c | 48 +- channels/rdpdr/client/rdpdr_main.h | 6 +- .../rdpsnd/client/MacAudio/rdpsnd_audio_q.c | 2 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 8 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 4 +- channels/rdpsnd/client/rdpsnd_main.c | 128 +-- channels/rdpsnd/client/rdpsnd_main.h | 2 +- channels/rdpsnd/server/rdpsnd.c | 82 +- channels/serial/client/serial_main.c | 10 +- channels/serial/client/serial_tty.c | 28 +- channels/serial/client/serial_tty.h | 12 +- channels/smartcard/client/scard_main.c | 2 +- channels/smartcard/client/scard_operations.c | 14 +- channels/tsmf/client/alsa/tsmf_alsa.c | 8 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 28 +- .../tsmf/client/gstreamer/tsmf_gstreamer.c | 2 +- channels/tsmf/client/pulse/tsmf_pulse.c | 4 +- channels/tsmf/client/tsmf_audio.h | 2 +- channels/tsmf/client/tsmf_codec.c | 16 +- channels/tsmf/client/tsmf_decoder.h | 6 +- channels/tsmf/client/tsmf_ifman.c | 16 +- channels/tsmf/client/tsmf_ifman.h | 2 +- channels/tsmf/client/tsmf_main.c | 10 +- channels/tsmf/client/tsmf_media.c | 14 +- channels/tsmf/client/tsmf_media.h | 6 +- channels/tsmf/client/tsmf_types.h | 2 +- channels/urbdrc/client/data_transfer.c | 304 +++---- channels/urbdrc/client/isoch_queue.h | 2 +- channels/urbdrc/client/searchman.c | 4 +- channels/urbdrc/client/searchman.h | 8 +- channels/urbdrc/client/urbdrc_main.c | 32 +- channels/urbdrc/client/urbdrc_main.h | 48 +- channels/urbdrc/libusb/libusb_udevice.c | 74 +- channels/urbdrc/libusb/libusb_udevice.h | 8 +- channels/urbdrc/libusb/libusb_udevman.c | 12 +- channels/urbdrc/libusb/request_queue.c | 4 +- channels/urbdrc/libusb/request_queue.h | 6 +- client/DirectFB/df_event.c | 18 +- client/DirectFB/df_graphics.c | 2 +- client/DirectFB/dfreerdp.c | 2 +- client/Mac/MRDPCursor.h | 2 +- client/Mac/MRDPRailView.h | 2 +- client/Mac/MRDPView.h | 10 +- client/Sample/freerdp.c | 2 +- client/Windows/wf_event.c | 4 +- client/Windows/wf_gdi.c | 24 +- client/Windows/wf_gdi.h | 2 +- client/Windows/wf_graphics.c | 14 +- client/Windows/wf_graphics.h | 4 +- client/Windows/wf_rail.c | 2 +- client/Windows/wf_rail.h | 2 +- client/Windows/wfreerdp.c | 2 +- client/Windows/wfreerdp.h | 6 +- client/X11/xf_cliprdr.c | 118 +-- client/X11/xf_event.c | 4 +- client/X11/xf_gdi.c | 16 +- client/X11/xf_graphics.c | 16 +- client/X11/xf_keyboard.c | 6 +- client/X11/xf_keyboard.h | 6 +- client/X11/xf_rail.c | 10 +- client/X11/xf_rail.h | 2 +- client/X11/xf_tsmf.c | 4 +- client/X11/xf_window.c | 14 +- client/X11/xf_window.h | 6 +- client/X11/xfreerdp.c | 8 +- client/X11/xfreerdp.h | 14 +- cunit/test_bitmap.c | 48 +- cunit/test_cliprdr.c | 16 +- cunit/test_color.c | 8 +- cunit/test_drdynvc.c | 4 +- cunit/test_freerdp.c | 4 +- cunit/test_freerdp.h | 2 +- cunit/test_gcc.c | 22 +- cunit/test_gdi.c | 198 ++--- cunit/test_license.c | 52 +- cunit/test_mcs.c | 6 +- cunit/test_mppc.c | 4 +- cunit/test_mppc_enc.c | 8 +- cunit/test_nsc.c | 14 +- cunit/test_ntlm.c | 74 +- cunit/test_orders.c | 50 +- cunit/test_pcap.c | 6 +- cunit/test_rail.c | 62 +- cunit/test_rfx.c | 30 +- include/freerdp/altsec.h | 18 +- include/freerdp/channels/rdpsnd.h | 12 +- include/freerdp/channels/wtsvc.h | 4 +- include/freerdp/client/cliprdr.h | 6 +- include/freerdp/client/tsmf.h | 24 +- include/freerdp/codec/bitmap.h | 2 +- include/freerdp/codec/color.h | 18 +- include/freerdp/codec/jpeg.h | 2 +- include/freerdp/codec/mppc_dec.h | 18 +- include/freerdp/codec/mppc_enc.h | 8 +- include/freerdp/codec/nsc.h | 26 +- include/freerdp/codec/rfx.h | 58 +- include/freerdp/crypto/ber.h | 22 +- include/freerdp/crypto/crypto.h | 50 +- include/freerdp/crypto/der.h | 4 +- include/freerdp/crypto/er.h | 24 +- include/freerdp/crypto/per.h | 32 +- include/freerdp/crypto/tls.h | 8 +- include/freerdp/dvc.h | 6 +- include/freerdp/freerdp.h | 4 +- include/freerdp/gdi/16bpp.h | 2 +- include/freerdp/gdi/8bpp.h | 2 +- include/freerdp/gdi/bitmap.h | 14 +- include/freerdp/gdi/gdi.h | 34 +- include/freerdp/gdi/pen.h | 4 +- include/freerdp/graphics.h | 16 +- include/freerdp/input.h | 16 +- include/freerdp/listener.h | 2 +- include/freerdp/peer.h | 4 +- include/freerdp/pointer.h | 4 +- include/freerdp/primary.h | 12 +- include/freerdp/rail.h | 48 +- include/freerdp/rail/icon.h | 8 +- include/freerdp/rail/rail.h | 2 +- include/freerdp/rail/window.h | 8 +- include/freerdp/scancode.h | 2 +- include/freerdp/secondary.h | 18 +- include/freerdp/settings.h | 38 +- include/freerdp/types.h | 79 +- include/freerdp/update.h | 14 +- include/freerdp/utils/dsp.h | 20 +- include/freerdp/utils/event.h | 2 +- include/freerdp/utils/hexdump.h | 2 +- include/freerdp/utils/msusb.h | 104 +-- include/freerdp/utils/pcap.h | 4 +- include/freerdp/utils/rail.h | 2 +- include/freerdp/utils/stream.h | 42 +- include/freerdp/utils/tcp.h | 4 +- include/freerdp/window.h | 6 +- libfreerdp/cache/bitmap.c | 6 +- libfreerdp/cache/brush.c | 4 +- libfreerdp/cache/glyph.c | 18 +- libfreerdp/cache/offscreen.c | 2 +- libfreerdp/channels/wtsvc.c | 40 +- libfreerdp/channels/wtsvc.h | 8 +- libfreerdp/codec/bitmap.c | 68 +- libfreerdp/codec/color.c | 210 ++--- libfreerdp/codec/include/bitmap.c | 16 +- libfreerdp/codec/jpeg.c | 4 +- libfreerdp/codec/mppc_dec.c | 102 +-- libfreerdp/codec/mppc_enc.c | 20 +- libfreerdp/codec/nsc.c | 54 +- libfreerdp/codec/nsc_encode.c | 106 +-- libfreerdp/codec/nsc_encode.h | 2 +- libfreerdp/codec/nsc_sse2.c | 44 +- libfreerdp/codec/nsc_types.h | 2 +- libfreerdp/codec/rfx.c | 238 +++--- libfreerdp/codec/rfx_bitstream.h | 8 +- libfreerdp/codec/rfx_decode.c | 44 +- libfreerdp/codec/rfx_decode.h | 4 +- libfreerdp/codec/rfx_differential.c | 12 +- libfreerdp/codec/rfx_differential.h | 4 +- libfreerdp/codec/rfx_dwt.c | 20 +- libfreerdp/codec/rfx_dwt.h | 4 +- libfreerdp/codec/rfx_encode.c | 80 +- libfreerdp/codec/rfx_encode.h | 4 +- libfreerdp/codec/rfx_neon.c | 46 +- libfreerdp/codec/rfx_pool.c | 2 +- libfreerdp/codec/rfx_quantization.c | 14 +- libfreerdp/codec/rfx_quantization.h | 4 +- libfreerdp/codec/rfx_rlgr.c | 16 +- libfreerdp/codec/rfx_rlgr.h | 4 +- libfreerdp/codec/rfx_sse2.c | 68 +- libfreerdp/codec/rfx_types.h | 16 +- libfreerdp/core/activation.c | 98 +-- libfreerdp/core/activation.h | 6 +- libfreerdp/core/capabilities.c | 756 +++++++++--------- libfreerdp/core/certificate.c | 28 +- libfreerdp/core/certificate.h | 2 +- libfreerdp/core/channel.c | 6 +- libfreerdp/core/channel.h | 6 +- libfreerdp/core/connection.c | 32 +- libfreerdp/core/fastpath.c | 168 ++-- libfreerdp/core/fastpath.h | 16 +- libfreerdp/core/freerdp.c | 4 +- libfreerdp/core/gcc.c | 170 ++-- libfreerdp/core/gcc.h | 14 +- libfreerdp/core/graphics.c | 4 +- libfreerdp/core/http.c | 8 +- libfreerdp/core/info.c | 80 +- libfreerdp/core/input.c | 118 +-- libfreerdp/core/input.h | 16 +- libfreerdp/core/license.c | 94 +-- libfreerdp/core/license.h | 36 +- libfreerdp/core/listener.c | 2 +- libfreerdp/core/mcs.c | 56 +- libfreerdp/core/mcs.h | 14 +- libfreerdp/core/nego.c | 78 +- libfreerdp/core/nego.h | 2 +- libfreerdp/core/orders.c | 520 ++++++------ libfreerdp/core/orders.h | 14 +- libfreerdp/core/peer.c | 24 +- libfreerdp/core/rdp.c | 142 ++-- libfreerdp/core/rdp.h | 44 +- libfreerdp/core/redirection.c | 12 +- libfreerdp/core/rpc.c | 62 +- libfreerdp/core/rpc.h | 302 +++---- libfreerdp/core/rts.c | 96 +-- libfreerdp/core/rts.h | 28 +- libfreerdp/core/security.c | 106 +-- libfreerdp/core/security.h | 28 +- libfreerdp/core/surface.c | 50 +- libfreerdp/core/surface.h | 2 +- libfreerdp/core/tcp.c | 12 +- libfreerdp/core/tcp.h | 8 +- libfreerdp/core/timezone.c | 32 +- libfreerdp/core/tpdu.c | 48 +- libfreerdp/core/tpdu.h | 16 +- libfreerdp/core/tpkt.c | 22 +- libfreerdp/core/tpkt.h | 4 +- libfreerdp/core/transport.c | 6 +- libfreerdp/core/transport.h | 2 +- libfreerdp/core/tsg.c | 20 +- libfreerdp/core/tsg.h | 10 +- libfreerdp/core/update.c | 174 ++-- libfreerdp/core/window.c | 62 +- libfreerdp/crypto/ber.c | 96 +-- libfreerdp/crypto/crypto.c | 70 +- libfreerdp/crypto/der.c | 22 +- libfreerdp/crypto/er.c | 90 +-- libfreerdp/crypto/nla.c | 2 +- libfreerdp/crypto/per.c | 124 +-- libfreerdp/crypto/tls.c | 8 +- libfreerdp/gdi/16bpp.c | 230 +++--- libfreerdp/gdi/32bpp.c | 16 +- libfreerdp/gdi/8bpp.c | 136 ++-- libfreerdp/gdi/bitmap.c | 26 +- libfreerdp/gdi/gdi.c | 30 +- libfreerdp/gdi/gdi.h | 2 +- libfreerdp/gdi/graphics.c | 18 +- libfreerdp/gdi/graphics.h | 4 +- libfreerdp/gdi/pen.c | 6 +- libfreerdp/gdi/shape.c | 4 +- libfreerdp/locale/timezone.c | 16 +- libfreerdp/rail/icon.c | 6 +- libfreerdp/utils/args.c | 4 +- libfreerdp/utils/bitmap.c | 10 +- libfreerdp/utils/dsp.c | 178 ++--- libfreerdp/utils/event.c | 8 +- libfreerdp/utils/hexdump.c | 4 +- libfreerdp/utils/msusb.c | 58 +- libfreerdp/utils/rail.c | 26 +- libfreerdp/utils/stream.c | 6 +- libfreerdp/utils/tcp.c | 4 +- scripts/LECHash.c | 24 +- scripts/LOMHash.c | 24 +- server/Sample/sfreerdp.c | 24 +- server/Sample/sfreerdp.h | 4 +- server/Windows/wf_info.c | 4 +- server/Windows/wf_info.h | 2 +- server/Windows/wf_input.c | 8 +- server/Windows/wf_input.h | 8 +- server/Windows/wf_interface.c | 2 +- server/Windows/wf_update.c | 6 +- server/X11/xf_input.c | 8 +- server/X11/xf_input.h | 8 +- server/X11/xf_peer.c | 6 +- 287 files changed, 4735 insertions(+), 4782 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index 2e71da378..baeec2edd 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -51,7 +51,7 @@ typedef struct _AudinALSADevice freerdp_thread* thread; - uint8* buffer; + BYTE* buffer; int buffer_frames; AudinReceive receive; @@ -93,13 +93,13 @@ static BOOL audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_hand return TRUE; } -static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size) +static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, int size) { int frames; int cframes; int ret = 0; int encoded_size; - uint8* encoded_data; + BYTE* encoded_data; int rbytes_per_frame; int tbytes_per_frame; @@ -173,7 +173,7 @@ static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int siz static void* audin_alsa_thread_func(void* arg) { int error; - uint8* buffer; + BYTE* buffer; int rbytes_per_frame; int tbytes_per_frame; snd_pcm_t* capture_handle = NULL; @@ -183,9 +183,9 @@ static void* audin_alsa_thread_func(void* arg) rbytes_per_frame = alsa->actual_channels * alsa->bytes_per_channel; tbytes_per_frame = alsa->target_channels * alsa->bytes_per_channel; - alsa->buffer = (uint8*) xzalloc(tbytes_per_frame * alsa->frames_per_packet); + alsa->buffer = (BYTE*) xzalloc(tbytes_per_frame * alsa->frames_per_packet); alsa->buffer_frames = 0; - buffer = (uint8*) xzalloc(rbytes_per_frame * alsa->frames_per_packet); + buffer = (BYTE*) xzalloc(rbytes_per_frame * alsa->frames_per_packet); freerdp_dsp_context_reset_adpcm(alsa->dsp_context); do { diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index d0da0f914..6d6f397d3 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -74,8 +74,8 @@ struct _AUDIN_PLUGIN AUDIN_LISTENER_CALLBACK* listener_callback; /* Parsed plugin data */ - uint16 fixed_format; - uint16 fixed_channel; + UINT16 fixed_format; + UINT16 fixed_channel; uint32 fixed_rate; /* Device interface */ @@ -94,7 +94,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S DEBUG_DVC("Version=%d", Version); out = stream_new(5); - stream_write_uint8(out, MSG_SNDIN_VERSION); + stream_write_BYTE(out, MSG_SNDIN_VERSION); stream_write_uint32(out, Version); error = callback->channel->Write(callback->channel, stream_get_length(s), stream_get_head(s), NULL); stream_free(out); @@ -104,7 +104,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S static int audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCallback) { - uint8 out_data[1]; + BYTE out_data[1]; AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; out_data[0] = MSG_SNDIN_DATA_INCOMING; @@ -116,7 +116,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin; uint32 i; - uint8* fm; + BYTE* fm; int error; STREAM* out; uint32 NumFormats; @@ -141,13 +141,13 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S for (i = 0; i < NumFormats; i++) { stream_get_mark(s, fm); - stream_read_uint16(s, format.wFormatTag); - stream_read_uint16(s, format.nChannels); + stream_read_UINT16(s, format.wFormatTag); + stream_read_UINT16(s, format.nChannels); stream_read_uint32(s, format.nSamplesPerSec); stream_seek_uint32(s); /* nAvgBytesPerSec */ - stream_read_uint16(s, format.nBlockAlign); - stream_read_uint16(s, format.wBitsPerSample); - stream_read_uint16(s, format.cbSize); + stream_read_UINT16(s, format.nBlockAlign); + stream_read_UINT16(s, format.wBitsPerSample); + stream_read_UINT16(s, format.cbSize); format.data = stream_get_tail(s); stream_seek(s, format.cbSize); @@ -179,7 +179,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S cbSizeFormatsPacket = stream_get_pos(out); stream_set_pos(out, 0); - stream_write_uint8(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */ + stream_write_BYTE(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */ stream_write_uint32(out, callback->formats_count); /* NumFormats (4 bytes) */ stream_write_uint32(out, cbSizeFormatsPacket); /* cbSizeFormatsPacket (4 bytes) */ @@ -196,7 +196,7 @@ static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCall AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; out = stream_new(5); - stream_write_uint8(out, MSG_SNDIN_FORMATCHANGE); + stream_write_BYTE(out, MSG_SNDIN_FORMATCHANGE); stream_write_uint32(out, NewFormat); error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL); stream_free(out); @@ -211,7 +211,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; out = stream_new(5); - stream_write_uint8(out, MSG_SNDIN_OPEN_REPLY); + stream_write_BYTE(out, MSG_SNDIN_OPEN_REPLY); stream_write_uint32(out, Result); error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL); stream_free(out); @@ -219,7 +219,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac return error; } -static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data) +static BOOL audin_receive_wave_data(BYTE* data, int size, void* user_data) { int error; STREAM* out; @@ -231,7 +231,7 @@ static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data) return FALSE; out = stream_new(size + 1); - stream_write_uint8(out, MSG_SNDIN_DATA); + stream_write_BYTE(out, MSG_SNDIN_DATA); stream_write(out, data, size); error = callback->channel->Write(callback->channel, stream_get_length(out), stream_get_head(out), NULL); stream_free(out); @@ -305,16 +305,16 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb return 0; } -static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* pBuffer) +static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* pBuffer) { int error; STREAM* s; - uint8 MessageId; + BYTE MessageId; s = stream_new(0); stream_attach(s, pBuffer, cbSize); - stream_read_uint8(s, MessageId); + stream_read_BYTE(s, MessageId); DEBUG_DVC("MessageId=0x%x", MessageId); @@ -365,7 +365,7 @@ static int audin_on_close(IWTSVirtualChannelCallback* pChannelCallback) } static int audin_on_new_channel_connection(IWTSListenerCallback* pListenerCallback, - IWTSVirtualChannel* pChannel, uint8* Data, int* pbAccept, + IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept, IWTSVirtualChannelCallback** ppCallback) { AUDIN_CHANNEL_CALLBACK* callback; diff --git a/channels/audin/client/audin_main.h b/channels/audin/client/audin_main.h index 751005841..60bfbcd25 100644 --- a/channels/audin/client/audin_main.h +++ b/channels/audin/client/audin_main.h @@ -34,18 +34,18 @@ #define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -typedef BOOL (*AudinReceive) (uint8* data, int size, void* user_data); +typedef BOOL (*AudinReceive) (BYTE* data, int size, void* user_data); typedef struct audin_format audinFormat; struct audin_format { - uint16 wFormatTag; - uint16 nChannels; + UINT16 wFormatTag; + UINT16 nChannels; uint32 nSamplesPerSec; - uint16 nBlockAlign; - uint16 wBitsPerSample; - uint16 cbSize; - uint8* data; + UINT16 nBlockAlign; + UINT16 wBitsPerSample; + UINT16 cbSize; + BYTE* data; }; typedef struct _IAudinDevice IAudinDevice; diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 0c74f494a..3b86afac5 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -48,7 +48,7 @@ typedef struct _AudinPulseDevice FREERDP_DSP_CONTEXT* dsp_context; int bytes_per_frame; - uint8* buffer; + BYTE* buffer; int buffer_frames; AudinReceive receive; @@ -281,9 +281,9 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length int cframes; BOOL ret; const void* data; - const uint8* src; + const BYTE* src; int encoded_size; - uint8* encoded_data; + BYTE* encoded_data; AudinPulseDevice* pulse = (AudinPulseDevice*) userdata; pa_stream_peek(stream, &data, &length); @@ -291,7 +291,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length DEBUG_DVC("length %d frames %d", (int) length, frames); - src = (const uint8*) data; + src = (const BYTE*) data; while (frames > 0) { cframes = pulse->frames_per_packet - pulse->buffer_frames; diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 8d14abeeb..92987902e 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -68,7 +68,7 @@ static void audin_server_select_format(audin_server_context* context, int client static void audin_server_send_version(audin_server* audin, STREAM* s) { - stream_write_uint8(s, MSG_SNDIN_VERSION); + stream_write_BYTE(s, MSG_SNDIN_VERSION); stream_write_uint32(s, 1); /* Version (4 bytes) */ WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } @@ -92,7 +92,7 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s) uint32 nAvgBytesPerSec; stream_set_pos(s, 0); - stream_write_uint8(s, MSG_SNDIN_FORMATS); + stream_write_BYTE(s, MSG_SNDIN_FORMATS); stream_write_uint32(s, audin->context.num_server_formats); /* NumFormats (4 bytes) */ stream_write_uint32(s, 0); /* cbSizeFormatsPacket (4 bytes), client-to-server only */ @@ -102,13 +102,13 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s) audin->context.server_formats[i].nChannels * audin->context.server_formats[i].wBitsPerSample / 8; stream_check_size(s, 18); - stream_write_uint16(s, audin->context.server_formats[i].wFormatTag); - stream_write_uint16(s, audin->context.server_formats[i].nChannels); + stream_write_UINT16(s, audin->context.server_formats[i].wFormatTag); + stream_write_UINT16(s, audin->context.server_formats[i].nChannels); stream_write_uint32(s, audin->context.server_formats[i].nSamplesPerSec); stream_write_uint32(s, nAvgBytesPerSec); - stream_write_uint16(s, audin->context.server_formats[i].nBlockAlign); - stream_write_uint16(s, audin->context.server_formats[i].wBitsPerSample); - stream_write_uint16(s, audin->context.server_formats[i].cbSize); + stream_write_UINT16(s, audin->context.server_formats[i].nBlockAlign); + stream_write_UINT16(s, audin->context.server_formats[i].wBitsPerSample); + stream_write_UINT16(s, audin->context.server_formats[i].cbSize); if (audin->context.server_formats[i].cbSize) { stream_check_size(s, audin->context.server_formats[i].cbSize); @@ -144,13 +144,13 @@ static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 len return FALSE; } - stream_read_uint16(s, audin->context.client_formats[i].wFormatTag); - stream_read_uint16(s, audin->context.client_formats[i].nChannels); + stream_read_UINT16(s, audin->context.client_formats[i].wFormatTag); + stream_read_UINT16(s, audin->context.client_formats[i].nChannels); stream_read_uint32(s, audin->context.client_formats[i].nSamplesPerSec); stream_seek_uint32(s); /* nAvgBytesPerSec */ - stream_read_uint16(s, audin->context.client_formats[i].nBlockAlign); - stream_read_uint16(s, audin->context.client_formats[i].wBitsPerSample); - stream_read_uint16(s, audin->context.client_formats[i].cbSize); + stream_read_UINT16(s, audin->context.client_formats[i].nBlockAlign); + stream_read_UINT16(s, audin->context.client_formats[i].wBitsPerSample); + stream_read_UINT16(s, audin->context.client_formats[i].cbSize); if (audin->context.client_formats[i].cbSize > 0) { stream_seek(s, audin->context.client_formats[i].cbSize); @@ -170,7 +170,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) audin->opened = TRUE; stream_set_pos(s, 0); - stream_write_uint8(s, MSG_SNDIN_OPEN); + stream_write_BYTE(s, MSG_SNDIN_OPEN); stream_write_uint32(s, audin->context.frames_per_packet); /* FramesPerPacket (4 bytes) */ stream_write_uint32(s, audin->context.selected_client_format); /* initialFormat (4 bytes) */ /* @@ -178,13 +178,13 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) * The second format specify the format that SHOULD be used to capture data from * the actual audio input device. */ - stream_write_uint16(s, 1); /* wFormatTag = PCM */ - stream_write_uint16(s, 2); /* nChannels */ + stream_write_UINT16(s, 1); /* wFormatTag = PCM */ + stream_write_UINT16(s, 2); /* nChannels */ stream_write_uint32(s, 44100); /* nSamplesPerSec */ stream_write_uint32(s, 44100 * 2 * 2); /* nAvgBytesPerSec */ - stream_write_uint16(s, 4); /* nBlockAlign */ - stream_write_uint16(s, 16); /* wBitsPerSample */ - stream_write_uint16(s, 0); /* cbSize */ + stream_write_UINT16(s, 4); /* nBlockAlign */ + stream_write_UINT16(s, 16); /* wBitsPerSample */ + stream_write_UINT16(s, 0); /* cbSize */ WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } @@ -207,7 +207,7 @@ static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length rdpsndFormat* format; int sbytes_per_sample; int sbytes_per_frame; - uint8* src; + BYTE* src; int size; int frames; @@ -265,7 +265,7 @@ static void* audin_server_thread_func(void* arg) void* fd; STREAM* s; void* buffer; - uint8 MessageId; + BYTE MessageId; BOOL ready = FALSE; uint32 bytes_returned = 0; audin_server* audin = (audin_server*) arg; @@ -324,7 +324,7 @@ static void* audin_server_thread_func(void* arg) if (bytes_returned < 1) continue; - stream_read_uint8(s, MessageId); + stream_read_BYTE(s, MessageId); bytes_returned--; switch (MessageId) { diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index f60a46ccf..d079dee4e 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -109,7 +109,7 @@ static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr) cliprdr_packet_send(cliprdr, s); } -void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags) +void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags) { int i; BOOL ascii; @@ -153,10 +153,10 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3 } } -void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags) +void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags) { int allocated_formats = 8; - uint8* end_mark; + BYTE* end_mark; CLIPRDR_FORMAT_NAME* format_name; stream_get_mark(s, end_mark); @@ -167,7 +167,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 while (stream_get_left(s) >= 6) { - uint8* p; + BYTE* p; int name_len; if (cliprdr->num_format_names >= allocated_formats) @@ -194,7 +194,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 } } -void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags) +void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) { int i; uint32 format; @@ -207,7 +207,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL if (dataLen > 0) { - cb_event->raw_format_data = (uint8*) malloc(dataLen); + cb_event->raw_format_data = (BYTE*) malloc(dataLen); memcpy(cb_event->raw_format_data, stream_get_tail(s), dataLen); cb_event->raw_format_data_size = dataLen; } @@ -286,7 +286,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL cliprdr_send_format_list_response(cliprdr); } -void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags) +void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) { /* where is this documented? */ #if 0 @@ -300,7 +300,7 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uin #endif } -void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags) +void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) { RDP_CB_DATA_REQUEST_EVENT* cb_event; @@ -341,7 +341,7 @@ void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DA cliprdr_packet_send(cliprdr, s); } -void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags) +void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) { RDP_CB_DATA_RESPONSE_EVENT* cb_event; @@ -351,7 +351,7 @@ void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uin if (dataLen > 0) { cb_event->size = dataLen; - cb_event->data = (uint8*) malloc(dataLen); + cb_event->data = (BYTE*) malloc(dataLen); memcpy(cb_event->data, stream_get_tail(s), dataLen); } diff --git a/channels/cliprdr/client/cliprdr_format.h b/channels/cliprdr/client/cliprdr_format.h index e4580a8fd..df0424007 100644 --- a/channels/cliprdr/client/cliprdr_format.h +++ b/channels/cliprdr/client/cliprdr_format.h @@ -22,13 +22,13 @@ #define __CLIPRDR_FORMAT_H void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event); -void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); -void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); +void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); +void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); -void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); +void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event); void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event); -void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); +void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); #endif /* __CLIPRDR_FORMAT_H */ diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index e59a7c5a7..101c2fa9e 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -55,13 +55,13 @@ static const char* const CB_MSG_TYPE_STRINGS[] = "CB_UNLOCK_CLIPDATA" }; -STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen) +STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen) { STREAM* s; s = stream_new(dataLen + 8); - stream_write_uint16(s, msgType); - stream_write_uint16(s, msgFlags); + stream_write_UINT16(s, msgType); + stream_write_UINT16(s, msgFlags); /* Write actual length after the entire packet has been constructed. */ stream_seek(s, 4); @@ -132,22 +132,22 @@ static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s cliprdr->received_caps = TRUE; } -static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags) +static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags) { int i; - uint16 lengthCapability; - uint16 cCapabilitiesSets; - uint16 capabilitySetType; + UINT16 lengthCapability; + UINT16 cCapabilitiesSets; + UINT16 capabilitySetType; - stream_read_uint16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */ - stream_seek_uint16(s); /* pad1 (2 bytes) */ + stream_read_UINT16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */ + stream_seek_UINT16(s); /* pad1 (2 bytes) */ DEBUG_CLIPRDR("cCapabilitiesSets %d", cCapabilitiesSets); for (i = 0; i < cCapabilitiesSets; i++) { - stream_read_uint16(s, capabilitySetType); /* capabilitySetType (2 bytes) */ - stream_read_uint16(s, lengthCapability); /* lengthCapability (2 bytes) */ + stream_read_UINT16(s, capabilitySetType); /* capabilitySetType (2 bytes) */ + stream_read_UINT16(s, lengthCapability); /* lengthCapability (2 bytes) */ switch (capabilitySetType) { @@ -173,17 +173,17 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr) flags = CB_USE_LONG_FORMAT_NAMES; - stream_write_uint16(s, 1); /* cCapabilitiesSets */ - stream_write_uint16(s, 0); /* pad1 */ - stream_write_uint16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */ - stream_write_uint16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */ + stream_write_UINT16(s, 1); /* cCapabilitiesSets */ + stream_write_UINT16(s, 0); /* pad1 */ + stream_write_UINT16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */ + stream_write_UINT16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */ stream_write_uint32(s, CB_CAPS_VERSION_2); /* version */ stream_write_uint32(s, flags); /* generalFlags */ cliprdr_packet_send(cliprdr, s); } -static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags) +static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags) { RDP_EVENT* event; @@ -196,13 +196,13 @@ static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uin static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* s) { - uint16 msgType; - uint16 msgFlags; + UINT16 msgType; + UINT16 msgFlags; uint32 dataLen; cliprdrPlugin* cliprdr = (cliprdrPlugin*) plugin; - stream_read_uint16(s, msgType); - stream_read_uint16(s, msgFlags); + stream_read_UINT16(s, msgType); + stream_read_UINT16(s, msgFlags); stream_read_uint32(s, dataLen); DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d", diff --git a/channels/cliprdr/client/cliprdr_main.h b/channels/cliprdr/client/cliprdr_main.h index 42d642013..6daf7d42e 100644 --- a/channels/cliprdr/client/cliprdr_main.h +++ b/channels/cliprdr/client/cliprdr_main.h @@ -45,7 +45,7 @@ struct cliprdr_plugin }; typedef struct cliprdr_plugin cliprdrPlugin; -STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen); +STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen); void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out); #ifdef WITH_DEBUG_CLIPRDR diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index 38c77f12e..f513c2268 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -357,7 +357,7 @@ BOOL disk_file_seek(DISK_FILE* file, uint64 Offset) return TRUE; } -BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length) +BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length) { ssize_t r; @@ -372,7 +372,7 @@ BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length) return TRUE; } -BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length) +BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length) { ssize_t r; @@ -421,8 +421,8 @@ BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STR stream_write_uint64(output, st.st_size); /* AllocationSize */ stream_write_uint64(output, st.st_size); /* EndOfFile */ stream_write_uint32(output, st.st_nlink); /* NumberOfLinks */ - stream_write_uint8(output, file->delete_pending ? 1 : 0); /* DeletePending */ - stream_write_uint8(output, file->is_dir ? 1 : 0); /* Directory */ + stream_write_BYTE(output, file->delete_pending ? 1 : 0); /* DeletePending */ + stream_write_BYTE(output, file->is_dir ? 1 : 0); /* Directory */ /* Reserved(2), MUST NOT be added! */ break; @@ -502,15 +502,15 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3 /* http://msdn.microsoft.com/en-us/library/cc232098.aspx */ /* http://msdn.microsoft.com/en-us/library/cc241371.aspx */ if (Length) - stream_read_uint8(input, file->delete_pending); + stream_read_BYTE(input, file->delete_pending); else file->delete_pending = 1; break; case FileRenameInformation: /* http://msdn.microsoft.com/en-us/library/cc232085.aspx */ - stream_seek_uint8(input); /* ReplaceIfExists */ - stream_seek_uint8(input); /* RootDirectory */ + stream_seek_BYTE(input); /* ReplaceIfExists */ + stream_seek_BYTE(input); /* RootDirectory */ stream_read_uint32(input, FileNameLength); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(input), &s, FileNameLength / 2); @@ -541,7 +541,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3 return TRUE; } -BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, +BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery, const char* path, STREAM* output) { int length; @@ -555,7 +555,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 if (!file->dir) { stream_write_uint32(output, 0); /* Length */ - stream_write_uint8(output, 0); /* Padding */ + stream_write_BYTE(output, 0); /* Padding */ return FALSE; } @@ -592,7 +592,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 { DEBUG_SVC(" pattern %s not found.", file->pattern); stream_write_uint32(output, 0); /* Length */ - stream_write_uint8(output, 0); /* Padding */ + stream_write_BYTE(output, 0); /* Padding */ return FALSE; } @@ -664,7 +664,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ stream_write_uint32(output, length); /* FileNameLength */ stream_write_uint32(output, 0); /* EaSize */ - stream_write_uint8(output, 0); /* ShortNameLength */ + stream_write_BYTE(output, 0); /* ShortNameLength */ /* Reserved(1), MUST NOT be added! */ stream_write_zero(output, 24); /* ShortName */ stream_write(output, ent_path, length); @@ -682,7 +682,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 default: stream_write_uint32(output, 0); /* Length */ - stream_write_uint8(output, 0); /* Padding */ + stream_write_BYTE(output, 0); /* Padding */ DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass); ret = FALSE; break; diff --git a/channels/disk/client/disk_file.h b/channels/disk/client/disk_file.h index 653959254..b0c9a4e50 100644 --- a/channels/disk/client/disk_file.h +++ b/channels/disk/client/disk_file.h @@ -100,11 +100,11 @@ DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id, void disk_file_free(DISK_FILE* file); BOOL disk_file_seek(DISK_FILE* file, uint64 Offset); -BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length); -BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length); +BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length); +BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length); BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output); BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input); -BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery, +BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery, const char* path, STREAM* output); #endif /* __DISK_FILE_H */ diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index 73b906525..0a13571d5 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -122,7 +122,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) char* path; uint32 FileId; DISK_FILE* file; - uint8 Information; + BYTE Information; uint32 DesiredAccess; uint32 CreateDisposition; uint32 CreateOptions; @@ -184,7 +184,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) } stream_write_uint32(irp->output, FileId); - stream_write_uint8(irp->output, Information); + stream_write_BYTE(irp->output, Information); free(path); @@ -221,7 +221,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) DISK_FILE* file; uint32 Length; uint64 Offset; - uint8* buffer = NULL; + BYTE* buffer = NULL; stream_read_uint32(irp->input, Length); stream_read_uint64(irp->input, Offset); @@ -244,7 +244,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) } else { - buffer = (uint8*) malloc(Length); + buffer = (BYTE*) malloc(Length); if (!disk_file_read(file, buffer, &Length)) { irp->IoStatus = STATUS_UNSUCCESSFUL; @@ -312,7 +312,7 @@ static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp) } stream_write_uint32(irp->output, Length); - stream_write_uint8(irp->output, 0); /* Padding */ + stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); } @@ -406,7 +406,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* VolumeCreationTime */ stream_write_uint32(output, svfst.f_fsid); /* VolumeSerialNumber */ stream_write_uint32(output, length); /* VolumeLabelLength */ - stream_write_uint8(output, 0); /* SupportsObjects */ + stream_write_BYTE(output, 0); /* SupportsObjects */ /* Reserved(1), MUST NOT be added! */ stream_write(output, outStr, length); /* VolumeLabel (Unicode) */ free(outStr); @@ -470,12 +470,12 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp) { char* path; DISK_FILE* file; - uint8 InitialQuery; + BYTE InitialQuery; uint32 PathLength; uint32 FsInformationClass; stream_read_uint32(irp->input, FsInformationClass); - stream_read_uint8(irp->input, InitialQuery); + stream_read_BYTE(irp->input, InitialQuery); stream_read_uint32(irp->input, PathLength); stream_seek(irp->input, 23); /* Padding */ @@ -675,7 +675,7 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na disk->device.data = stream_new(length + 1); for (i = 0; i <= length; i++) - stream_write_uint8(disk->device.data, name[i] < 0 ? '_' : name[i]); + stream_write_BYTE(disk->device.data, name[i] < 0 ? '_' : name[i]); disk->path = path; disk->files = list_new(); diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index c1cca1e01..692f28a92 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -64,12 +64,12 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val) if (val <= 0xFF) { cb = 0; - stream_write_uint8(stream, val); + stream_write_BYTE(stream, val); } else if (val <= 0xFFFF) { cb = 1; - stream_write_uint16(stream, val); + stream_write_UINT16(stream, val); } else { @@ -79,7 +79,7 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val) return cb; } -int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, uint32 data_size) +int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, BYTE* data, uint32 data_size) { STREAM* data_out; uint32 pos = 0; @@ -101,7 +101,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui { pos = stream_get_pos(data_out); stream_set_pos(data_out, 0); - stream_write_uint8(data_out, 0x40 | cbChId); + stream_write_BYTE(data_out, 0x40 | cbChId); stream_set_pos(data_out, pos); error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out); } @@ -109,7 +109,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui { pos = stream_get_pos(data_out); stream_set_pos(data_out, 0); - stream_write_uint8(data_out, 0x30 | cbChId); + stream_write_BYTE(data_out, 0x30 | cbChId); stream_set_pos(data_out, pos); stream_write(data_out, data, data_size); error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out); @@ -120,7 +120,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui cbLen = drdynvc_write_variable_uint(data_out, data_size); pos = stream_get_pos(data_out); stream_set_pos(data_out, 0); - stream_write_uint8(data_out, 0x20 | cbChId | (cbLen << 2)); + stream_write_BYTE(data_out, 0x20 | cbChId | (cbLen << 2)); stream_set_pos(data_out, pos); chunk_len = CHANNEL_CHUNK_LENGTH - pos; stream_write(data_out, data, chunk_len); @@ -136,7 +136,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui pos = stream_get_pos(data_out); stream_set_pos(data_out, 0); - stream_write_uint8(data_out, 0x30 | cbChId); + stream_write_BYTE(data_out, 0x30 | cbChId); stream_set_pos(data_out, pos); chunk_len = data_size; @@ -177,17 +177,17 @@ static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, in DEBUG_DVC("Sp=%d cbChId=%d", Sp, cbChId); stream_seek(s, 1); /* pad */ - stream_read_uint16(s, drdynvc->version); + stream_read_UINT16(s, drdynvc->version); if (drdynvc->version == 2) { - stream_read_uint16(s, drdynvc->PriorityCharge0); - stream_read_uint16(s, drdynvc->PriorityCharge1); - stream_read_uint16(s, drdynvc->PriorityCharge2); - stream_read_uint16(s, drdynvc->PriorityCharge3); + stream_read_UINT16(s, drdynvc->PriorityCharge0); + stream_read_UINT16(s, drdynvc->PriorityCharge1); + stream_read_UINT16(s, drdynvc->PriorityCharge2); + stream_read_UINT16(s, drdynvc->PriorityCharge3); } data_out = stream_new(4); - stream_write_uint16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */ - stream_write_uint16(data_out, drdynvc->version); + stream_write_UINT16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */ + stream_write_UINT16(data_out, drdynvc->version); error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out); if (error != CHANNEL_RC_OK) { @@ -206,10 +206,10 @@ static uint32 drdynvc_read_variable_uint(STREAM* stream, int cbLen) switch (cbLen) { case 0: - stream_read_uint8(stream, val); + stream_read_BYTE(stream, val); break; case 1: - stream_read_uint16(stream, val); + stream_read_UINT16(stream, val); break; default: stream_read_uint32(stream, val); @@ -232,7 +232,7 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb error = dvcman_create_channel(drdynvc->channel_mgr, ChannelId, (char*)stream_get_tail(s)); data_out = stream_new(pos + 4); - stream_write_uint8(data_out, 0x10 | cbChId); + stream_write_BYTE(data_out, 0x10 | cbChId); stream_set_pos(s, 1); stream_copy(data_out, s, pos - 1); @@ -304,7 +304,7 @@ static void drdynvc_process_receive(rdpSvcPlugin* plugin, STREAM* s) int Sp; int cbChId; - stream_read_uint8(s, value); + stream_read_BYTE(s, value); Cmd = (value & 0xf0) >> 4; Sp = (value & 0x0c) >> 2; cbChId = (value & 0x03) >> 0; diff --git a/channels/drdynvc/client/drdynvc_main.h b/channels/drdynvc/client/drdynvc_main.h index 2226c3fde..70892626e 100644 --- a/channels/drdynvc/client/drdynvc_main.h +++ b/channels/drdynvc/client/drdynvc_main.h @@ -24,7 +24,7 @@ typedef struct drdynvc_plugin drdynvcPlugin; -int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, uint8* data, uint32 data_size); +int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, BYTE* data, uint32 data_size); int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event); #endif diff --git a/channels/drdynvc/client/dvcman.c b/channels/drdynvc/client/dvcman.c index 53418ae93..c0d496e07 100644 --- a/channels/drdynvc/client/dvcman.c +++ b/channels/drdynvc/client/dvcman.c @@ -241,7 +241,7 @@ int dvcman_load_plugin(IWTSVirtualChannelManager* pChannelMgr, RDP_PLUGIN_DATA* pDVCPluginEntry((IDRDYNVC_ENTRY_POINTS*) &entryPoints); } - data = (RDP_PLUGIN_DATA*)(((uint8*) data) + data->size); + data = (RDP_PLUGIN_DATA*)(((BYTE*) data) + data->size); } return 0; @@ -303,7 +303,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr) return 0; } -static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, uint8* pBuffer, void* pReserved) +static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, BYTE* pBuffer, void* pReserved) { int status; DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel; @@ -424,7 +424,7 @@ int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, ui return 0; } -int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size) +int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size) { int error = 0; DVCMAN_CHANNEL* channel; diff --git a/channels/drdynvc/client/dvcman.h b/channels/drdynvc/client/dvcman.h index 6f68b5429..95d5a119b 100644 --- a/channels/drdynvc/client/dvcman.h +++ b/channels/drdynvc/client/dvcman.h @@ -30,7 +30,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr); int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName); int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId); int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length); -int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size); +int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size); #endif diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index 9f5f3fd5f..9f55bf03b 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -104,7 +104,7 @@ static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp) } stream_write_uint32(irp->output, parallel->id); - stream_write_uint8(irp->output, 0); + stream_write_BYTE(irp->output, 0); free(path); @@ -128,12 +128,12 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) uint32 Length; uint64 Offset; ssize_t status; - uint8* buffer = NULL; + BYTE* buffer = NULL; stream_read_uint32(irp->input, Length); stream_read_uint64(irp->input, Offset); - buffer = (uint8*) malloc(Length); + buffer = (BYTE*) malloc(Length); status = read(parallel->file, irp->output->p, Length); @@ -195,7 +195,7 @@ static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp) } stream_write_uint32(irp->output, Length); - stream_write_uint8(irp->output, 0); /* Padding */ + stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); } @@ -330,7 +330,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) parallel->device.data = stream_new(length + 1); for (i = 0; i <= length; i++) - stream_write_uint8(parallel->device.data, name[i] < 0 ? '_' : name[i]); + stream_write_BYTE(parallel->device.data, name[i] < 0 ? '_' : name[i]); parallel->path = path; diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index bd8d4dca3..40b71f598 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -77,7 +77,7 @@ static void printer_cups_get_printjob_name(char* buf, int size) t->tm_hour, t->tm_min, t->tm_sec); } -static void printer_cups_write_printjob(rdpPrintJob* printjob, uint8* data, int size) +static void printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int size) { rdpCupsPrintJob* cups_printjob = (rdpCupsPrintJob*)printjob; diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 2b63203c7..ac20f1d5f 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -135,7 +135,7 @@ static void printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp) } stream_write_uint32(irp->output, Length); - stream_write_uint8(irp->output, 0); /* Padding */ + stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); } @@ -241,7 +241,7 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri int PrintNameLen; WCHAR* PrintName; uint32 CachedFieldsLen; - uint8* CachedPrinterConfigData; + BYTE* CachedPrinterConfigData; PRINTER_DEVICE* printer_dev; port = malloc(10); @@ -278,9 +278,9 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri stream_write_uint32(printer_dev->device.data, PrintNameLen + 2); stream_write_uint32(printer_dev->device.data, CachedFieldsLen); stream_write(printer_dev->device.data, DriverName, DriverNameLen); - stream_write_uint16(printer_dev->device.data, 0); + stream_write_UINT16(printer_dev->device.data, 0); stream_write(printer_dev->device.data, PrintName, PrintNameLen); - stream_write_uint16(printer_dev->device.data, 0); + stream_write_UINT16(printer_dev->device.data, 0); if (CachedFieldsLen > 0) { diff --git a/channels/printer/client/printer_main.h b/channels/printer/client/printer_main.h index f21442fae..a2c70ee30 100644 --- a/channels/printer/client/printer_main.h +++ b/channels/printer/client/printer_main.h @@ -64,7 +64,7 @@ struct rdp_printer pcFreePrinter Free; }; -typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, uint8* data, int size); +typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, BYTE* data, int size); typedef void (*pcClosePrintJob) (rdpPrintJob* printjob); struct rdp_print_job diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index b1069fa4e..35e7bac88 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -82,7 +82,7 @@ static void printer_win_get_printjob_name(char* buf, int size) } -static void printer_win_write_printjob(rdpPrintJob* printjob, uint8* data, int size) +static void printer_win_write_printjob(rdpPrintJob* printjob, BYTE* data, int size) { rdpWinPrintJob* win_printjob = (rdpWinPrintJob*)printjob; diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index da3fee87f..aa9c85d2b 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -58,7 +58,7 @@ static void on_free_rail_channel_event(RDP_EVENT* event) } } -void rail_send_channel_event(void* rail_object, uint16 event_type, void* param) +void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param) { void * payload = NULL; RDP_EVENT* out_event = NULL; diff --git a/channels/rail/client/rail_main.h b/channels/rail/client/rail_main.h index 484aa6ccb..ec9fc1f97 100644 --- a/channels/rail/client/rail_main.h +++ b/channels/rail/client/rail_main.h @@ -56,7 +56,7 @@ struct rail_plugin }; typedef struct rail_plugin railPlugin; -void rail_send_channel_event(void* rail_object, uint16 event_type, void* param); +void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param); void rail_send_channel_data(void* rail_object, void* data, size_t length); #ifdef WITH_DEBUG_RAIL diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index 2c4303a17..34ab88bf4 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -85,20 +85,20 @@ void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_ length = freerdp_AsciiToUnicodeAlloc(string, &buffer, 0) * 2; - unicode_string->string = (uint8*) buffer; - unicode_string->length = (uint16) length; + unicode_string->string = (BYTE*) buffer; + unicode_string->length = (UINT16) length; } -void rail_read_pdu_header(STREAM* s, uint16* orderType, uint16* orderLength) +void rail_read_pdu_header(STREAM* s, UINT16* orderType, UINT16* orderLength) { - stream_read_uint16(s, *orderType); /* orderType (2 bytes) */ - stream_read_uint16(s, *orderLength); /* orderLength (2 bytes) */ + stream_read_UINT16(s, *orderType); /* orderType (2 bytes) */ + stream_read_UINT16(s, *orderLength); /* orderLength (2 bytes) */ } -void rail_write_pdu_header(STREAM* s, uint16 orderType, uint16 orderLength) +void rail_write_pdu_header(STREAM* s, UINT16 orderType, UINT16 orderLength) { - stream_write_uint16(s, orderType); /* orderType (2 bytes) */ - stream_write_uint16(s, orderLength); /* orderLength (2 bytes) */ + stream_write_UINT16(s, orderType); /* orderType (2 bytes) */ + stream_write_UINT16(s, orderLength); /* orderLength (2 bytes) */ } STREAM* rail_pdu_init(int length) @@ -109,9 +109,9 @@ STREAM* rail_pdu_init(int length) return s; } -void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, uint16 orderType) +void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType) { - uint16 orderLength; + UINT16 orderLength; orderLength = stream_get_length(s); stream_set_pos(s, 0); @@ -141,18 +141,18 @@ void rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake) void rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result) { - stream_read_uint16(s, exec_result->flags); /* flags (2 bytes) */ - stream_read_uint16(s, exec_result->execResult); /* execResult (2 bytes) */ + stream_read_UINT16(s, exec_result->flags); /* flags (2 bytes) */ + stream_read_UINT16(s, exec_result->execResult); /* execResult (2 bytes) */ stream_read_uint32(s, exec_result->rawResult); /* rawResult (4 bytes) */ - stream_seek_uint16(s); /* padding (2 bytes) */ + stream_seek_UINT16(s); /* padding (2 bytes) */ rail_read_unicode_string(s, &exec_result->exeOrFile); /* exeOrFile */ } void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) { - uint8 body; + BYTE body; stream_read_uint32(s, sysparam->param); /* systemParam (4 bytes) */ - stream_read_uint8(s, body); /* body (1 byte) */ + stream_read_BYTE(s, body); /* body (1 byte) */ switch (sysparam->param) { @@ -172,27 +172,27 @@ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) void rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo) { stream_read_uint32(s, minmaxinfo->windowId); /* windowId (4 bytes) */ - stream_read_uint16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */ - stream_read_uint16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */ - stream_read_uint16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */ - stream_read_uint16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */ - stream_read_uint16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */ - stream_read_uint16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */ - stream_read_uint16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */ - stream_read_uint16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */ + stream_read_UINT16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */ } void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize) { - uint16 isMoveSizeStart; + UINT16 isMoveSizeStart; stream_read_uint32(s, localmovesize->windowId); /* windowId (4 bytes) */ - stream_read_uint16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */ + stream_read_UINT16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */ localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? TRUE : FALSE; - stream_read_uint16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */ - stream_read_uint16(s, localmovesize->posX); /* posX (2 bytes) */ - stream_read_uint16(s, localmovesize->posY); /* posY (2 bytes) */ + stream_read_UINT16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */ + stream_read_UINT16(s, localmovesize->posX); /* posX (2 bytes) */ + stream_read_UINT16(s, localmovesize->posY); /* posY (2 bytes) */ } void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp) @@ -221,10 +221,10 @@ void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec) { - stream_write_uint16(s, exec->flags); /* flags (2 bytes) */ - stream_write_uint16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */ - stream_write_uint16(s, exec->workingDir.length); /* workingDirLength (2 bytes) */ - stream_write_uint16(s, exec->arguments.length); /* argumentsLength (2 bytes) */ + stream_write_UINT16(s, exec->flags); /* flags (2 bytes) */ + stream_write_UINT16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */ + stream_write_UINT16(s, exec->workingDir.length); /* workingDirLength (2 bytes) */ + stream_write_UINT16(s, exec->arguments.length); /* argumentsLength (2 bytes) */ rail_write_unicode_string_value(s, &exec->exeOrFile); /* exeOrFile */ rail_write_unicode_string_value(s, &exec->workingDir); /* workingDir */ rail_write_unicode_string_value(s, &exec->arguments); /* arguments */ @@ -232,50 +232,50 @@ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec) void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) { - uint8 body; + BYTE body; stream_write_uint32(s, sysparam->param); /* systemParam (4 bytes) */ switch (sysparam->param) { case SPI_SET_DRAG_FULL_WINDOWS: body = sysparam->dragFullWindows; - stream_write_uint8(s, body); + stream_write_BYTE(s, body); break; case SPI_SET_KEYBOARD_CUES: body = sysparam->keyboardCues; - stream_write_uint8(s, body); + stream_write_BYTE(s, body); break; case SPI_SET_KEYBOARD_PREF: body = sysparam->keyboardPref; - stream_write_uint8(s, body); + stream_write_BYTE(s, body); break; case SPI_SET_MOUSE_BUTTON_SWAP: body = sysparam->mouseButtonSwap; - stream_write_uint8(s, body); + stream_write_BYTE(s, body); break; case SPI_SET_WORK_AREA: - stream_write_uint16(s, sysparam->workArea.left); /* left (2 bytes) */ - stream_write_uint16(s, sysparam->workArea.top); /* top (2 bytes) */ - stream_write_uint16(s, sysparam->workArea.right); /* right (2 bytes) */ - stream_write_uint16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, sysparam->workArea.left); /* left (2 bytes) */ + stream_write_UINT16(s, sysparam->workArea.top); /* top (2 bytes) */ + stream_write_UINT16(s, sysparam->workArea.right); /* right (2 bytes) */ + stream_write_UINT16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */ break; case SPI_DISPLAY_CHANGE: - stream_write_uint16(s, sysparam->displayChange.left); /* left (2 bytes) */ - stream_write_uint16(s, sysparam->displayChange.top); /* top (2 bytes) */ - stream_write_uint16(s, sysparam->displayChange.right); /* right (2 bytes) */ - stream_write_uint16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, sysparam->displayChange.left); /* left (2 bytes) */ + stream_write_UINT16(s, sysparam->displayChange.top); /* top (2 bytes) */ + stream_write_UINT16(s, sysparam->displayChange.right); /* right (2 bytes) */ + stream_write_UINT16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */ break; case SPI_TASKBAR_POS: - stream_write_uint16(s, sysparam->taskbarPos.left); /* left (2 bytes) */ - stream_write_uint16(s, sysparam->taskbarPos.top); /* top (2 bytes) */ - stream_write_uint16(s, sysparam->taskbarPos.right); /* right (2 bytes) */ - stream_write_uint16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, sysparam->taskbarPos.left); /* left (2 bytes) */ + stream_write_UINT16(s, sysparam->taskbarPos.top); /* top (2 bytes) */ + stream_write_UINT16(s, sysparam->taskbarPos.right); /* right (2 bytes) */ + stream_write_UINT16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */ break; case SPI_SET_HIGH_CONTRAST: @@ -286,25 +286,25 @@ void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate) { - uint8 enabled; + BYTE enabled; stream_write_uint32(s, activate->windowId); /* windowId (4 bytes) */ enabled = activate->enabled; - stream_write_uint8(s, enabled); /* enabled (1 byte) */ + stream_write_BYTE(s, enabled); /* enabled (1 byte) */ } void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu) { stream_write_uint32(s, sysmenu->windowId); /* windowId (4 bytes) */ - stream_write_uint16(s, sysmenu->left); /* left (2 bytes) */ - stream_write_uint16(s, sysmenu->top); /* top (2 bytes) */ + stream_write_UINT16(s, sysmenu->left); /* left (2 bytes) */ + stream_write_UINT16(s, sysmenu->top); /* top (2 bytes) */ } void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand) { stream_write_uint32(s, syscommand->windowId); /* windowId (4 bytes) */ - stream_write_uint16(s, syscommand->command); /* command (2 bytes) */ + stream_write_UINT16(s, syscommand->command); /* command (2 bytes) */ } void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event) @@ -317,10 +317,10 @@ void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* no void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move) { stream_write_uint32(s, window_move->windowId); /* windowId (4 bytes) */ - stream_write_uint16(s, window_move->left); /* left (2 bytes) */ - stream_write_uint16(s, window_move->top); /* top (2 bytes) */ - stream_write_uint16(s, window_move->right); /* right (2 bytes) */ - stream_write_uint16(s, window_move->bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, window_move->left); /* left (2 bytes) */ + stream_write_UINT16(s, window_move->top); /* top (2 bytes) */ + stream_write_UINT16(s, window_move->right); /* right (2 bytes) */ + stream_write_UINT16(s, window_move->bottom); /* bottom (2 bytes) */ } void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req) @@ -418,8 +418,8 @@ void rail_recv_langbar_info_order(rdpRailOrder* rail_order, STREAM* s) void rail_order_recv(rdpRailOrder* rail_order, STREAM* s) { - uint16 orderType; - uint16 orderLength; + UINT16 orderType; + UINT16 orderLength; rail_read_pdu_header(s, &orderType, &orderLength); diff --git a/channels/rdpdr/client/irp.c b/channels/rdpdr/client/irp.c index 0a3fea4e3..3b20ee8da 100644 --- a/channels/rdpdr/client/irp.c +++ b/channels/rdpdr/client/irp.c @@ -90,8 +90,8 @@ IRP* irp_new(DEVMAN* devman, STREAM* data_in) irp->input = data_in; irp->output = stream_new(256); - stream_write_uint16(irp->output, RDPDR_CTYP_CORE); - stream_write_uint16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION); + stream_write_UINT16(irp->output, RDPDR_CTYP_CORE); + stream_write_UINT16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION); stream_write_uint32(irp->output, DeviceId); stream_write_uint32(irp->output, irp->CompletionId); stream_seek_uint32(irp->output); /* IoStatus */ diff --git a/channels/rdpdr/client/rdpdr_capabilities.c b/channels/rdpdr/client/rdpdr_capabilities.c index a54052cce..4b1656841 100644 --- a/channels/rdpdr/client/rdpdr_capabilities.c +++ b/channels/rdpdr/client/rdpdr_capabilities.c @@ -33,10 +33,10 @@ #include "rdpdr_capabilities.h" /* Output device redirection capability set header */ -static void rdpdr_write_capset_header(STREAM* data_out, uint16 capabilityType, uint16 capabilityLength, uint32 version) +static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, uint32 version) { - stream_write_uint16(data_out, capabilityType); - stream_write_uint16(data_out, capabilityLength); + stream_write_UINT16(data_out, capabilityType); + stream_write_UINT16(data_out, capabilityLength); stream_write_uint32(data_out, version); } @@ -47,8 +47,8 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out) stream_write_uint32(data_out, 0); /* osType, ignored on receipt */ stream_write_uint32(data_out, 0); /* osVersion, unused and must be set to zero */ - stream_write_uint16(data_out, 1); /* protocolMajorVersion, must be set to 1 */ - stream_write_uint16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */ + stream_write_UINT16(data_out, 1); /* protocolMajorVersion, must be set to 1 */ + stream_write_UINT16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */ stream_write_uint32(data_out, 0x0000FFFF); /* ioCode1 */ stream_write_uint32(data_out, 0); /* ioCode2, must be set to zero, reserved for future use */ stream_write_uint32(data_out, RDPDR_DEVICE_REMOVE_PDUS | RDPDR_CLIENT_DISPLAY_NAME_PDU | RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */ @@ -60,9 +60,9 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out) /* Process device direction general capability set */ static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 capabilityLength; + UINT16 capabilityLength; - stream_read_uint16(data_in, capabilityLength); + stream_read_UINT16(data_in, capabilityLength); stream_seek(data_in, capabilityLength - 4); } @@ -75,9 +75,9 @@ static void rdpdr_write_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_out) /* Process printer direction capability set */ static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 capabilityLength; + UINT16 capabilityLength; - stream_read_uint16(data_in, capabilityLength); + stream_read_UINT16(data_in, capabilityLength); stream_seek(data_in, capabilityLength - 4); } @@ -90,9 +90,9 @@ static void rdpdr_write_port_capset(rdpdrPlugin* rdpdr, STREAM* data_out) /* Process port redirection capability set */ static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 capabilityLength; + UINT16 capabilityLength; - stream_read_uint16(data_in, capabilityLength); + stream_read_UINT16(data_in, capabilityLength); stream_seek(data_in, capabilityLength - 4); } @@ -105,9 +105,9 @@ static void rdpdr_write_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_out) /* Process drive redirection capability set */ static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 capabilityLength; + UINT16 capabilityLength; - stream_read_uint16(data_in, capabilityLength); + stream_read_UINT16(data_in, capabilityLength); stream_seek(data_in, capabilityLength - 4); } @@ -120,24 +120,24 @@ static void rdpdr_write_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_out) /* Process smartcard redirection capability set */ static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 capabilityLength; + UINT16 capabilityLength; - stream_read_uint16(data_in, capabilityLength); + stream_read_UINT16(data_in, capabilityLength); stream_seek(data_in, capabilityLength - 4); } void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 i; - uint16 numCapabilities; - uint16 capabilityType; + UINT16 i; + UINT16 numCapabilities; + UINT16 capabilityType; - stream_read_uint16(data_in, numCapabilities); + stream_read_UINT16(data_in, numCapabilities); stream_seek(data_in, 2); /* pad (2 bytes) */ for(i = 0; i < numCapabilities; i++) { - stream_read_uint16(data_in, capabilityType); + stream_read_UINT16(data_in, capabilityType); switch (capabilityType) { @@ -174,11 +174,11 @@ void rdpdr_send_capability_response(rdpdrPlugin* rdpdr) data_out = stream_new(256); - stream_write_uint16(data_out, RDPDR_CTYP_CORE); - stream_write_uint16(data_out, PAKID_CORE_CLIENT_CAPABILITY); + stream_write_UINT16(data_out, RDPDR_CTYP_CORE); + stream_write_UINT16(data_out, PAKID_CORE_CLIENT_CAPABILITY); - stream_write_uint16(data_out, 5); /* numCapabilities */ - stream_write_uint16(data_out, 0); /* pad */ + stream_write_UINT16(data_out, 5); /* numCapabilities */ + stream_write_UINT16(data_out, 0); /* pad */ rdpdr_write_general_capset(rdpdr, data_out); rdpdr_write_printer_capset(rdpdr, data_out); diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 91b7a2df0..ea7ee87ce 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -67,14 +67,14 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin) devman_load_device_service(rdpdr->devman, data); } - data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size); + data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size); } } static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* data_in) { - stream_read_uint16(data_in, rdpdr->versionMajor); - stream_read_uint16(data_in, rdpdr->versionMinor); + stream_read_UINT16(data_in, rdpdr->versionMajor); + stream_read_UINT16(data_in, rdpdr->versionMinor); stream_read_uint32(data_in, rdpdr->clientID); DEBUG_SVC("version %d.%d clientID %d", rdpdr->versionMajor, rdpdr->versionMinor, rdpdr->clientID); @@ -86,11 +86,11 @@ static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr) data_out = stream_new(12); - stream_write_uint16(data_out, RDPDR_CTYP_CORE); - stream_write_uint16(data_out, PAKID_CORE_CLIENTID_CONFIRM); + stream_write_UINT16(data_out, RDPDR_CTYP_CORE); + stream_write_UINT16(data_out, PAKID_CORE_CLIENTID_CONFIRM); - stream_write_uint16(data_out, rdpdr->versionMajor); - stream_write_uint16(data_out, rdpdr->versionMinor); + stream_write_UINT16(data_out, rdpdr->versionMajor); + stream_write_UINT16(data_out, rdpdr->versionMinor); stream_write_uint32(data_out, (uint32) rdpdr->clientID); svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out); @@ -109,14 +109,14 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr) data_out = stream_new(16 + computerNameLenW + 2); - stream_write_uint16(data_out, RDPDR_CTYP_CORE); - stream_write_uint16(data_out, PAKID_CORE_CLIENT_NAME); + stream_write_UINT16(data_out, RDPDR_CTYP_CORE); + stream_write_UINT16(data_out, PAKID_CORE_CLIENT_NAME); stream_write_uint32(data_out, 1); /* unicodeFlag, 0 for ASCII and 1 for Unicode */ stream_write_uint32(data_out, 0); /* codePage, must be set to zero */ stream_write_uint32(data_out, computerNameLenW + 2); /* computerNameLen, including null terminator */ stream_write(data_out, computerNameW, computerNameLenW); - stream_write_uint16(data_out, 0); /* null terminator */ + stream_write_UINT16(data_out, 0); /* null terminator */ free(computerNameW); @@ -125,12 +125,12 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr) static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* data_in) { - uint16 versionMajor; - uint16 versionMinor; + UINT16 versionMajor; + UINT16 versionMinor; uint32 clientID; - stream_read_uint16(data_in, versionMajor); - stream_read_uint16(data_in, versionMinor); + stream_read_UINT16(data_in, versionMajor); + stream_read_UINT16(data_in, versionMinor); stream_read_uint32(data_in, clientID); if (versionMajor != rdpdr->versionMajor || versionMinor != rdpdr->versionMinor) @@ -151,7 +151,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use { int i; int pos; - uint8 c; + BYTE c; uint32 count; int data_len; int count_pos; @@ -161,8 +161,8 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use data_out = stream_new(256); - stream_write_uint16(data_out, RDPDR_CTYP_CORE); - stream_write_uint16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE); + stream_write_UINT16(data_out, RDPDR_CTYP_CORE); + stream_write_UINT16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE); count_pos = stream_get_pos(data_out); count = 0; @@ -190,12 +190,12 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use for (i = 0; i < 8; i++) { - stream_peek_uint8(data_out, c); + stream_peek_BYTE(data_out, c); if (c > 0x7F) - stream_write_uint8(data_out, '_'); + stream_write_BYTE(data_out, '_'); else - stream_seek_uint8(data_out); + stream_seek_BYTE(data_out); } stream_write_uint32(data_out, data_len); @@ -235,14 +235,14 @@ static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in) static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in) { - uint16 component; - uint16 packetID; + UINT16 component; + UINT16 packetID; uint32 deviceID; uint32 status; rdpdrPlugin* rdpdr = (rdpdrPlugin*) plugin; - stream_read_uint16(data_in, component); - stream_read_uint16(data_in, packetID); + stream_read_UINT16(data_in, component); + stream_read_UINT16(data_in, packetID); if (component == RDPDR_CTYP_CORE) { diff --git a/channels/rdpdr/client/rdpdr_main.h b/channels/rdpdr/client/rdpdr_main.h index ef93f744e..c988a3169 100644 --- a/channels/rdpdr/client/rdpdr_main.h +++ b/channels/rdpdr/client/rdpdr_main.h @@ -32,9 +32,9 @@ struct rdpdr_plugin DEVMAN* devman; - uint16 versionMajor; - uint16 versionMinor; - uint16 clientID; + UINT16 versionMajor; + UINT16 versionMinor; + UINT16 clientID; char computerName[256]; }; diff --git a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c index 528ccda39..1f0c61e5e 100644 --- a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c +++ b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c @@ -150,7 +150,7 @@ static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value) { } -static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size) +static void rdpsnd_audio_play(rdpsndDevicePlugin* device, BYTE* data, int size) { rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device; AudioQueueBufferRef aq_buf_ref; diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index 4307b5fd7..aadb8085c 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -321,16 +321,16 @@ static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, uint32 value) } } -static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, uint8* data, int size) +static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, BYTE* data, int size) { - uint8* src; + BYTE* src; int len; int status; int frames; int rbytes_per_frame; int sbytes_per_frame; - uint8* pindex; - uint8* end; + BYTE* pindex; + BYTE* end; rdpsndAlsaPlugin* alsa = (rdpsndAlsaPlugin*) device; if (alsa->out_handle == 0) diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index 2630796d4..aeabe087f 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -453,11 +453,11 @@ static void rdpsnd_pulse_set_volume(rdpsndDevicePlugin* device, uint32 value) pa_threaded_mainloop_unlock(pulse->mainloop); } -static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, uint8* data, int size) +static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, BYTE* data, int size) { int len; int ret; - uint8* src; + BYTE* src; rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*) device; if (!pulse->stream) diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 742626705..7fba7bfa8 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -48,22 +48,22 @@ struct rdpsnd_plugin LIST* data_out_list; - uint8 cBlockNo; + BYTE cBlockNo; rdpsndFormat* supported_formats; int n_supported_formats; int current_format; BOOL expectingWave; - uint8 waveData[4]; - uint16 waveDataSize; + BYTE waveData[4]; + UINT16 waveDataSize; uint32 wTimeStamp; /* server timestamp */ uint32 wave_timestamp; /* client timestamp */ BOOL is_open; uint32 close_timestamp; - uint16 fixed_format; - uint16 fixed_channel; + UINT16 fixed_format; + UINT16 fixed_channel; uint32 fixed_rate; int latency; @@ -132,7 +132,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin) static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd) { - uint16 i; + UINT16 i; for (i = 0; i < rdpsnd->n_supported_formats; i++) free(rdpsnd->supported_formats[i].data); @@ -146,15 +146,15 @@ static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd) of client supported formats */ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in) { - uint16 wNumberOfFormats; - uint16 nFormat; - uint16 wVersion; + UINT16 wNumberOfFormats; + UINT16 nFormat; + UINT16 wVersion; STREAM* data_out; rdpsndFormat* out_formats; - uint16 n_out_formats; + UINT16 n_out_formats; rdpsndFormat* format; - uint8* format_mark; - uint8* data_mark; + BYTE* format_mark; + BYTE* data_mark; int pos; rdpsnd_free_supported_formats(rdpsnd); @@ -162,11 +162,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in stream_seek_uint32(data_in); /* dwFlags */ stream_seek_uint32(data_in); /* dwVolume */ stream_seek_uint32(data_in); /* dwPitch */ - stream_seek_uint16(data_in); /* wDGramPort */ - stream_read_uint16(data_in, wNumberOfFormats); - stream_read_uint8(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */ - stream_read_uint16(data_in, wVersion); - stream_seek_uint8(data_in); /* bPad */ + stream_seek_UINT16(data_in); /* wDGramPort */ + stream_read_UINT16(data_in, wNumberOfFormats); + stream_read_BYTE(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */ + stream_read_UINT16(data_in, wVersion); + stream_seek_BYTE(data_in); /* bPad */ DEBUG_SVC("wNumberOfFormats %d wVersion %d", wNumberOfFormats, wVersion); if (wNumberOfFormats < 1) @@ -179,29 +179,29 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in n_out_formats = 0; data_out = stream_new(24); - stream_write_uint8(data_out, SNDC_FORMATS); /* msgType */ - stream_write_uint8(data_out, 0); /* bPad */ - stream_seek_uint16(data_out); /* BodySize */ + stream_write_BYTE(data_out, SNDC_FORMATS); /* msgType */ + stream_write_BYTE(data_out, 0); /* bPad */ + stream_seek_UINT16(data_out); /* BodySize */ stream_write_uint32(data_out, TSSNDCAPS_ALIVE | TSSNDCAPS_VOLUME); /* dwFlags */ stream_write_uint32(data_out, 0xFFFFFFFF); /* dwVolume */ stream_write_uint32(data_out, 0); /* dwPitch */ - stream_write_uint16_be(data_out, 0); /* wDGramPort */ - stream_seek_uint16(data_out); /* wNumberOfFormats */ - stream_write_uint8(data_out, 0); /* cLastBlockConfirmed */ - stream_write_uint16(data_out, 6); /* wVersion */ - stream_write_uint8(data_out, 0); /* bPad */ + stream_write_UINT16_be(data_out, 0); /* wDGramPort */ + stream_seek_UINT16(data_out); /* wNumberOfFormats */ + stream_write_BYTE(data_out, 0); /* cLastBlockConfirmed */ + stream_write_UINT16(data_out, 6); /* wVersion */ + stream_write_BYTE(data_out, 0); /* bPad */ for (nFormat = 0; nFormat < wNumberOfFormats; nFormat++) { stream_get_mark(data_in, format_mark); format = &out_formats[n_out_formats]; - stream_read_uint16(data_in, format->wFormatTag); - stream_read_uint16(data_in, format->nChannels); + stream_read_UINT16(data_in, format->wFormatTag); + stream_read_UINT16(data_in, format->nChannels); stream_read_uint32(data_in, format->nSamplesPerSec); stream_seek_uint32(data_in); /* nAvgBytesPerSec */ - stream_read_uint16(data_in, format->nBlockAlign); - stream_read_uint16(data_in, format->wBitsPerSample); - stream_read_uint16(data_in, format->cbSize); + stream_read_UINT16(data_in, format->nBlockAlign); + stream_read_UINT16(data_in, format->wBitsPerSample); + stream_read_UINT16(data_in, format->cbSize); stream_get_mark(data_in, data_mark); stream_seek(data_in, format->cbSize); format->data = NULL; @@ -244,9 +244,9 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in pos = stream_get_pos(data_out); stream_set_pos(data_out, 2); - stream_write_uint16(data_out, pos - 4); + stream_write_UINT16(data_out, pos - 4); stream_set_pos(data_out, 18); - stream_write_uint16(data_out, n_out_formats); + stream_write_UINT16(data_out, n_out_formats); stream_set_pos(data_out, pos); svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out); @@ -254,11 +254,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in if (wVersion >= 6) { data_out = stream_new(8); - stream_write_uint8(data_out, SNDC_QUALITYMODE); /* msgType */ - stream_write_uint8(data_out, 0); /* bPad */ - stream_write_uint16(data_out, 4); /* BodySize */ - stream_write_uint16(data_out, HIGH_QUALITY); /* wQualityMode */ - stream_write_uint16(data_out, 0); /* Reserved */ + stream_write_BYTE(data_out, SNDC_QUALITYMODE); /* msgType */ + stream_write_BYTE(data_out, 0); /* bPad */ + stream_write_UINT16(data_out, 4); /* BodySize */ + stream_write_UINT16(data_out, HIGH_QUALITY); /* wQualityMode */ + stream_write_UINT16(data_out, 0); /* Reserved */ svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out); } @@ -267,30 +267,30 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in /* server is getting a feel of the round trip time */ static void rdpsnd_process_message_training(rdpsndPlugin* rdpsnd, STREAM* data_in) { - uint16 wTimeStamp; - uint16 wPackSize; + UINT16 wTimeStamp; + UINT16 wPackSize; STREAM* data_out; - stream_read_uint16(data_in, wTimeStamp); - stream_read_uint16(data_in, wPackSize); + stream_read_UINT16(data_in, wTimeStamp); + stream_read_UINT16(data_in, wPackSize); data_out = stream_new(8); - stream_write_uint8(data_out, SNDC_TRAINING); /* msgType */ - stream_write_uint8(data_out, 0); /* bPad */ - stream_write_uint16(data_out, 4); /* BodySize */ - stream_write_uint16(data_out, wTimeStamp); - stream_write_uint16(data_out, wPackSize); + stream_write_BYTE(data_out, SNDC_TRAINING); /* msgType */ + stream_write_BYTE(data_out, 0); /* bPad */ + stream_write_UINT16(data_out, 4); /* BodySize */ + stream_write_UINT16(data_out, wTimeStamp); + stream_write_UINT16(data_out, wPackSize); svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out); } -static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, uint16 BodySize) +static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, UINT16 BodySize) { - uint16 wFormatNo; + UINT16 wFormatNo; - stream_read_uint16(data_in, rdpsnd->wTimeStamp); - stream_read_uint16(data_in, wFormatNo); - stream_read_uint8(data_in, rdpsnd->cBlockNo); + stream_read_UINT16(data_in, rdpsnd->wTimeStamp); + stream_read_UINT16(data_in, wFormatNo); + stream_read_BYTE(data_in, rdpsnd->cBlockNo); stream_seek(data_in, 3); /* bPad */ stream_read(data_in, rdpsnd->waveData, 4); rdpsnd->waveDataSize = BodySize - 8; @@ -320,7 +320,7 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_ /* header is not removed from data in this function */ static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in) { - uint16 wTimeStamp; + UINT16 wTimeStamp; uint32 delay_ms; uint32 process_ms; struct data_out_item* item; @@ -344,12 +344,12 @@ static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in) item = xnew(struct data_out_item); item->data_out = stream_new(8); - stream_write_uint8(item->data_out, SNDC_WAVECONFIRM); - stream_write_uint8(item->data_out, 0); - stream_write_uint16(item->data_out, 4); - stream_write_uint16(item->data_out, wTimeStamp); - stream_write_uint8(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */ - stream_write_uint8(item->data_out, 0); /* bPad */ + stream_write_BYTE(item->data_out, SNDC_WAVECONFIRM); + stream_write_BYTE(item->data_out, 0); + stream_write_UINT16(item->data_out, 4); + stream_write_UINT16(item->data_out, wTimeStamp); + stream_write_BYTE(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */ + stream_write_BYTE(item->data_out, 0); /* bPad */ item->out_timestamp = rdpsnd->wave_timestamp + delay_ms; list_enqueue(rdpsnd->data_out_list, item); @@ -378,8 +378,8 @@ static void rdpsnd_process_message_setvolume(rdpsndPlugin* rdpsnd, STREAM* data_ static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in) { rdpsndPlugin* rdpsnd = (rdpsndPlugin*)plugin; - uint8 msgType; - uint16 BodySize; + BYTE msgType; + UINT16 BodySize; if (rdpsnd->expectingWave) { @@ -388,9 +388,9 @@ static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in) return; } - stream_read_uint8(data_in, msgType); /* msgType */ - stream_seek_uint8(data_in); /* bPad */ - stream_read_uint16(data_in, BodySize); + stream_read_BYTE(data_in, msgType); /* msgType */ + stream_seek_BYTE(data_in); /* bPad */ + stream_read_UINT16(data_in, BodySize); DEBUG_SVC("msgType %d BodySize %d", msgType, BodySize); @@ -503,7 +503,7 @@ static void rdpsnd_process_connect(rdpSvcPlugin* plugin) while (data && data->size > 0) { rdpsnd_process_plugin_data(rdpsnd, data); - data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size); + data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size); } if (rdpsnd->device == NULL) diff --git a/channels/rdpsnd/client/rdpsnd_main.h b/channels/rdpsnd/client/rdpsnd_main.h index 8ea169421..1ca778428 100644 --- a/channels/rdpsnd/client/rdpsnd_main.h +++ b/channels/rdpsnd/client/rdpsnd_main.h @@ -30,7 +30,7 @@ typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* for typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value); -typedef void (*pcPlay) (rdpsndDevicePlugin* device, uint8* data, int size); +typedef void (*pcPlay) (rdpsndDevicePlugin* device, BYTE* data, int size); typedef void (*pcStart) (rdpsndDevicePlugin* device); typedef void (*pcClose) (rdpsndDevicePlugin* device); typedef void (*pcFree) (rdpsndDevicePlugin* device); diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index a3c75ed47..2427044f8 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -42,7 +42,7 @@ typedef struct _rdpsnd_server STREAM* rdpsnd_pdu; FREERDP_DSP_CONTEXT* dsp_context; - uint8* out_buffer; + BYTE* out_buffer; int out_buffer_size; int out_frames; int out_pending_frames; @@ -53,9 +53,9 @@ typedef struct _rdpsnd_server #define RDPSND_PDU_INIT(_s, _msgType) \ { \ - stream_write_uint8(_s, _msgType); \ - stream_write_uint8(_s, 0); \ - stream_seek_uint16(_s); \ + stream_write_BYTE(_s, _msgType); \ + stream_write_BYTE(_s, 0); \ + stream_seek_UINT16(_s); \ } #define RDPSND_PDU_FINISH(_s) \ @@ -64,7 +64,7 @@ typedef struct _rdpsnd_server int _pos; \ _pos = stream_get_pos(_s); \ stream_set_pos(_s, 2); \ - stream_write_uint16(_s, _pos - 4); \ + stream_write_UINT16(_s, _pos - 4); \ stream_set_pos(_s, _pos); \ _r = WTSVirtualChannelWrite(rdpsnd->rdpsnd_channel, stream_get_head(_s), stream_get_length(_s), NULL); \ stream_set_pos(_s, 0); \ @@ -73,32 +73,32 @@ typedef struct _rdpsnd_server static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) { - uint16 i; + UINT16 i; RDPSND_PDU_INIT(s, SNDC_FORMATS); stream_write_uint32(s, 0); /* dwFlags */ stream_write_uint32(s, 0); /* dwVolume */ stream_write_uint32(s, 0); /* dwPitch */ - stream_write_uint16(s, 0); /* wDGramPort */ - stream_write_uint16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */ - stream_write_uint8(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */ - stream_write_uint16(s, 0x06); /* wVersion */ - stream_write_uint8(s, 0); /* bPad */ + stream_write_UINT16(s, 0); /* wDGramPort */ + stream_write_UINT16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */ + stream_write_BYTE(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */ + stream_write_UINT16(s, 0x06); /* wVersion */ + stream_write_BYTE(s, 0); /* bPad */ for (i = 0; i < rdpsnd->context.num_server_formats; i++) { - stream_write_uint16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */ - stream_write_uint16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */ + stream_write_UINT16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */ + stream_write_UINT16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */ stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */ stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec * rdpsnd->context.server_formats[i].nChannels * rdpsnd->context.server_formats[i].wBitsPerSample / 8); /* nAvgBytesPerSec */ - stream_write_uint16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */ - stream_write_uint16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */ - stream_write_uint16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */ + stream_write_UINT16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */ + stream_write_UINT16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */ + stream_write_UINT16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */ if (rdpsnd->context.server_formats[i].cbSize > 0) { @@ -119,11 +119,11 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) stream_seek_uint32(s); /* dwFlags */ stream_seek_uint32(s); /* dwVolume */ stream_seek_uint32(s); /* dwPitch */ - stream_seek_uint16(s); /* wDGramPort */ - stream_read_uint16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */ - stream_seek_uint8(s); /* cLastBlockConfirmed */ - stream_seek_uint16(s); /* wVersion */ - stream_seek_uint8(s); /* bPad */ + stream_seek_UINT16(s); /* wDGramPort */ + stream_read_UINT16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */ + stream_seek_BYTE(s); /* cLastBlockConfirmed */ + stream_seek_UINT16(s); /* wVersion */ + stream_seek_BYTE(s); /* bPad */ if (rdpsnd->context.num_client_formats > 0) { @@ -138,13 +138,13 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) return FALSE; } - stream_read_uint16(s, rdpsnd->context.client_formats[i].wFormatTag); - stream_read_uint16(s, rdpsnd->context.client_formats[i].nChannels); + stream_read_UINT16(s, rdpsnd->context.client_formats[i].wFormatTag); + stream_read_UINT16(s, rdpsnd->context.client_formats[i].nChannels); stream_read_uint32(s, rdpsnd->context.client_formats[i].nSamplesPerSec); stream_seek_uint32(s); /* nAvgBytesPerSec */ - stream_read_uint16(s, rdpsnd->context.client_formats[i].nBlockAlign); - stream_read_uint16(s, rdpsnd->context.client_formats[i].wBitsPerSample); - stream_read_uint16(s, rdpsnd->context.client_formats[i].cbSize); + stream_read_UINT16(s, rdpsnd->context.client_formats[i].nBlockAlign); + stream_read_UINT16(s, rdpsnd->context.client_formats[i].wBitsPerSample); + stream_read_UINT16(s, rdpsnd->context.client_formats[i].cbSize); if (rdpsnd->context.client_formats[i].cbSize > 0) { @@ -161,8 +161,8 @@ static void* rdpsnd_server_thread_func(void* arg) void* fd; STREAM* s; void* buffer; - uint8 msgType; - uint16 BodySize; + BYTE msgType; + UINT16 BodySize; uint32 bytes_returned = 0; rdpsnd_server* rdpsnd = (rdpsnd_server*) arg; freerdp_thread* thread = rdpsnd->rdpsnd_channel_thread; @@ -200,9 +200,9 @@ static void* rdpsnd_server_thread_func(void* arg) break; } - stream_read_uint8(s, msgType); - stream_seek_uint8(s); /* bPad */ - stream_read_uint16(s, BodySize); + stream_read_BYTE(s, msgType); + stream_seek_BYTE(s); /* bPad */ + stream_read_UINT16(s, BodySize); if (BodySize + 4 > (int) bytes_returned) continue; @@ -301,7 +301,7 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) { int size; BOOL r; - uint8* src; + BYTE* src; int frames; int fill_size; rdpsndFormat* format; @@ -353,13 +353,13 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) /* WaveInfo PDU */ stream_set_pos(s, 0); - stream_write_uint8(s, SNDC_WAVE); /* msgType */ - stream_write_uint8(s, 0); /* bPad */ - stream_write_uint16(s, size + fill_size + 8); /* BodySize */ + stream_write_BYTE(s, SNDC_WAVE); /* msgType */ + stream_write_BYTE(s, 0); /* bPad */ + stream_write_UINT16(s, size + fill_size + 8); /* BodySize */ - stream_write_uint16(s, 0); /* wTimeStamp */ - stream_write_uint16(s, rdpsnd->context.selected_client_format); /* wFormatNo */ - stream_write_uint8(s, rdpsnd->context.block_no); /* cBlockNo */ + stream_write_UINT16(s, 0); /* wTimeStamp */ + stream_write_UINT16(s, rdpsnd->context.selected_client_format); /* wFormatNo */ + stream_write_BYTE(s, rdpsnd->context.block_no); /* cBlockNo */ stream_seek(s, 3); /* bPad */ stream_write(s, src, 4); @@ -397,7 +397,7 @@ static BOOL rdpsnd_server_send_samples(rdpsnd_server_context* context, const voi cframesize = cframes * rdpsnd->src_bytes_per_frame; memcpy(rdpsnd->out_buffer + (rdpsnd->out_pending_frames * rdpsnd->src_bytes_per_frame), buf, cframesize); - buf = (uint8*) buf + cframesize; + buf = (BYTE*) buf + cframesize; nframes -= cframes; rdpsnd->out_pending_frames += cframes; @@ -418,8 +418,8 @@ static BOOL rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, i RDPSND_PDU_INIT(s, SNDC_SETVOLUME); - stream_write_uint16(s, left); - stream_write_uint16(s, right); + stream_write_UINT16(s, left); + stream_write_UINT16(s, right); RDPSND_PDU_FINISH(s); } diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index f58522033..06960d73d 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -108,7 +108,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) } stream_write_uint32(irp->output, FileId); - stream_write_uint8(irp->output, 0); + stream_write_BYTE(irp->output, 0); free(path); @@ -144,7 +144,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) SERIAL_TTY* tty; uint32 Length; uint64 Offset; - uint8* buffer = NULL; + BYTE* buffer = NULL; stream_read_uint32(irp->input, Length); stream_read_uint64(irp->input, Offset); @@ -162,7 +162,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) } else { - buffer = (uint8*) malloc(Length); + buffer = (BYTE*) malloc(Length); if (!serial_tty_read(tty, buffer, &Length)) { @@ -226,7 +226,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp) } stream_write_uint32(irp->output, Length); - stream_write_uint8(irp->output, 0); /* Padding */ + stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); } @@ -420,7 +420,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) serial->device.data = stream_new(len + 1); for (i = 0; i <= len; i++) - stream_write_uint8(serial->device.data, name[i] < 0 ? '_' : name[i]); + stream_write_BYTE(serial->device.data, name[i] < 0 ? '_' : name[i]); serial->path = path; serial->irp_list = list_new(); diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index 41599d91d..d567b8312 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -73,7 +73,7 @@ #define TIOCOUTQ FIONWRITE #endif -static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len); +static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len); static void tty_set_termios(SERIAL_TTY* tty); static BOOL tty_get_termios(SERIAL_TTY* tty); static int tty_get_error_status(); @@ -83,7 +83,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, int purge_mask; uint32 result; uint32 modemstate; - uint8 immediate; + BYTE immediate; uint32 ret = STATUS_SUCCESS; uint32 length = 0; uint32 pos; @@ -113,9 +113,9 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, break; case IOCTL_SERIAL_SET_LINE_CONTROL: - stream_read_uint8(input, tty->stop_bits); - stream_read_uint8(input, tty->parity); - stream_read_uint8(input, tty->word_length); + stream_read_BYTE(input, tty->stop_bits); + stream_read_BYTE(input, tty->parity); + stream_read_BYTE(input, tty->word_length); tty_set_termios(tty); DEBUG_SVC("SERIAL_SET_LINE_CONTROL stop %d parity %d word %d", tty->stop_bits, tty->parity, tty->word_length); @@ -124,14 +124,14 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, case IOCTL_SERIAL_GET_LINE_CONTROL: DEBUG_SVC("SERIAL_GET_LINE_CONTROL"); length = 3; - stream_write_uint8(output, tty->stop_bits); - stream_write_uint8(output, tty->parity); - stream_write_uint8(output, tty->word_length); + stream_write_BYTE(output, tty->stop_bits); + stream_write_BYTE(output, tty->parity); + stream_write_BYTE(output, tty->word_length); break; case IOCTL_SERIAL_IMMEDIATE_CHAR: DEBUG_SVC("SERIAL_IMMEDIATE_CHAR"); - stream_read_uint8(input, immediate); + stream_read_BYTE(input, immediate); tty_write_data(tty, &immediate, 1); break; @@ -293,8 +293,8 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, stream_write_uint32(output, result); /* Amount in out queue */ DEBUG_SVC("SERIAL_GET_COMMSTATUS out queue %d", result); - stream_write_uint8(output, 0); /* EofReceived */ - stream_write_uint8(output, 0); /* WaitForImmediate */ + stream_write_BYTE(output, 0); /* EofReceived */ + stream_write_BYTE(output, 0); /* WaitForImmediate */ break; case IOCTL_SERIAL_PURGE: @@ -369,7 +369,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, return ret; } -BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length) +BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length) { long timeout = 90; struct termios *ptermios; @@ -418,7 +418,7 @@ BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length) return TRUE; } -BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length) +BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length) { ssize_t r; uint32 event_txempty = Length; @@ -969,7 +969,7 @@ static void tty_set_termios(SERIAL_TTY* tty) tcsetattr(tty->fd, TCSANOW, ptermios); } -static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len) +static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len) { ssize_t r; diff --git a/channels/serial/client/serial_tty.h b/channels/serial/client/serial_tty.h index d2d788cf8..c5b959626 100644 --- a/channels/serial/client/serial_tty.h +++ b/channels/serial/client/serial_tty.h @@ -53,10 +53,10 @@ struct _SERIAL_TTY uint32 read_total_timeout_constant; uint32 write_total_timeout_multiplier; uint32 write_total_timeout_constant; - uint8 stop_bits; - uint8 parity; - uint8 word_length; - uint8 chars[6]; + BYTE stop_bits; + BYTE parity; + BYTE word_length; + BYTE chars[6]; struct termios* ptermios; struct termios* pold_termios; int event_txempty; @@ -69,8 +69,8 @@ struct _SERIAL_TTY SERIAL_TTY* serial_tty_new(const char* path, uint32 id); void serial_tty_free(SERIAL_TTY* tty); -BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length); -BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length); +BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length); +BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length); uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io); BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result); diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index 8023c8d7c..17ffa0b1f 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -307,7 +307,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) scard->device.data = stream_new(length + 1); for (i = 0; i <= length; i++) - stream_write_uint8(scard->device.data, name[i] < 0 ? '_' : name[i]); + stream_write_BYTE(scard->device.data, name[i] < 0 ? '_' : name[i]); scard->path = path; diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index 138676bd6..9c235715b 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -86,7 +86,7 @@ static uint32 sc_output_string(IRP* irp, char *src, BOOL wide) { - uint8* p; + BYTE* p; uint32 len; p = stream_get_tail(irp->output); @@ -1060,7 +1060,7 @@ static uint32 handle_GetAttrib(IRP* irp) SCARDHANDLE hCard; DWORD dwAttrId = 0, dwAttrLen = 0; DWORD attrLen = 0; - uint8* pbAttr = NULL; + BYTE* pbAttr = NULL; stream_seek(irp->input, 0x20); stream_read_uint32(irp->input, dwAttrId); @@ -1083,7 +1083,7 @@ static uint32 handle_GetAttrib(IRP* irp) } #endif - rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen); + rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen); if( rv != SCARD_S_SUCCESS ) { #ifdef SCARD_AUTOALLOCATE if(dwAttrLen == 0) @@ -1100,7 +1100,7 @@ static uint32 handle_GetAttrib(IRP* irp) if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_A && rv == SCARD_E_UNSUPPORTED_FEATURE) { rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_W, - attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen); + attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen); if( rv != SCARD_S_SUCCESS ) { #ifdef SCARD_AUTOALLOCATE if(dwAttrLen == 0) @@ -1117,7 +1117,7 @@ static uint32 handle_GetAttrib(IRP* irp) if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_W && rv == SCARD_E_UNSUPPORTED_FEATURE) { rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_A, - attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen); + attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen); if( rv != SCARD_S_SUCCESS ) { #ifdef SCARD_AUTOALLOCATE if(dwAttrLen == 0) @@ -1190,8 +1190,8 @@ void scard_error(SCARD_DEVICE* scard, IRP* irp, uint32 ntstatus) typedef struct _SERVER_SCARD_ATRMASK { uint32 cbAtr; - uint8 rgbAtr[36]; - uint8 rgbMask[36]; + BYTE rgbAtr[36]; + BYTE rgbMask[36]; } SERVER_SCARD_ATRMASK; diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index 4dcaa2450..af72e4a2b 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -147,14 +147,14 @@ static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio, return TRUE; } -static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) +static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size) { int len; int error; int frames; - uint8* end; - uint8* src; - uint8* pindex; + BYTE* end; + BYTE* src; + BYTE* pindex; int rbytes_per_frame; int sbytes_per_frame; TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio; diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index 6590f375d..a6d348baf 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -50,7 +50,7 @@ typedef struct _TSMFFFmpegDecoder AVFrame* frame; int prepared; - uint8* decoded_data; + BYTE* decoded_data; uint32 decoded_size; uint32 decoded_size_max; } TSMFFFmpegDecoder; @@ -110,8 +110,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; uint32 size; - const uint8* s; - uint8* p; + const BYTE* s; + BYTE* p; mdecoder->codec = avcodec_find_decoder(mdecoder->codec_id); if (!mdecoder->codec) @@ -260,7 +260,7 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi return TRUE; } -static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int decoded; @@ -274,7 +274,7 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u { AVPacket pkt; av_init_packet(&pkt); - pkt.data = (uint8*) data; + pkt.data = (BYTE*) data; pkt.size = data_size; if (extensions & TSMM_SAMPLE_EXT_CLEANPOINT) pkt.flags |= AV_PKT_FLAG_KEY; @@ -319,14 +319,14 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u return ret; } -static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int len; int frame_size; uint32 src_size; - const uint8* src; - uint8* dst; + const BYTE* src; + BYTE* dst; int dst_offset; #if 0 @@ -345,7 +345,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16; mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max); /* align the memory for SSE2 needs */ - dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); + dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); dst_offset = dst - mdecoder->decoded_data; src = data; src_size = data_size; @@ -357,7 +357,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u { mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16; mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max); - dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); + dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); if (dst - mdecoder->decoded_data != dst_offset) { /* re-align the memory if the alignment has changed after realloc */ @@ -377,7 +377,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u int got_frame = 0; AVPacket pkt; av_init_packet(&pkt); - pkt.data = (uint8*) src; + pkt.data = (BYTE*) src; pkt.size = src_size; len = avcodec_decode_audio4(mdecoder->codec_context, decoded_frame, &got_frame, &pkt); @@ -419,7 +419,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u return TRUE; } -static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -442,10 +442,10 @@ static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 } } -static uint8* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size) +static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; - uint8* buf; + BYTE* buf; *size = mdecoder->decoded_size; buf = mdecoder->decoded_data; diff --git a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c index caf476657..058933579 100644 --- a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c +++ b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c @@ -1094,7 +1094,7 @@ static BOOL tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) return TRUE; } -static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions, +static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions, uint64 start_time, uint64 end_time, uint64 duration) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index f4c91028f..0a867af84 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -298,10 +298,10 @@ static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio, return tsmf_pulse_open_stream(pulse); } -static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size) +static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; - uint8* src; + BYTE* src; int len; int ret; diff --git a/channels/tsmf/client/tsmf_audio.h b/channels/tsmf/client/tsmf_audio.h index 302053666..cdad9dd40 100644 --- a/channels/tsmf/client/tsmf_audio.h +++ b/channels/tsmf/client/tsmf_audio.h @@ -31,7 +31,7 @@ struct _ITSMFAudioDevice /* Set the audio data format. */ BOOL (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample); /* Play audio data. */ - BOOL (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size); + BOOL (*Play) (ITSMFAudioDevice* audio, BYTE* data, uint32 data_size); /* Get the latency of the last written sample, in 100ns */ uint64 (*GetLatency) (ITSMFAudioDevice* audio); /* Change the playback volume level */ diff --git a/channels/tsmf/client/tsmf_codec.c b/channels/tsmf/client/tsmf_codec.c index 2a416ab28..136030340 100644 --- a/channels/tsmf/client/tsmf_codec.c +++ b/channels/tsmf/client/tsmf_codec.c @@ -36,7 +36,7 @@ typedef struct _TSMFMediaTypeMap { - uint8 guid[16]; + BYTE guid[16]; const char* name; int type; } TSMFMediaTypeMap; @@ -259,7 +259,7 @@ static const TSMFMediaTypeMap tsmf_format_type_map[] = } }; -static void tsmf_print_guid(const uint8* guid) +static void tsmf_print_guid(const BYTE* guid) { #ifdef WITH_DEBUG_DVC int i; @@ -454,15 +454,15 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) case TSMF_FORMAT_TYPE_WAVEFORMATEX: /* http://msdn.microsoft.com/en-us/library/dd757720.aspx */ - stream_seek_uint16(s); - stream_read_uint16(s, mediatype->Channels); + stream_seek_UINT16(s); + stream_read_UINT16(s, mediatype->Channels); stream_read_uint32(s, mediatype->SamplesPerSecond.Numerator); mediatype->SamplesPerSecond.Denominator = 1; stream_read_uint32(s, mediatype->BitRate); mediatype->BitRate *= 8; - stream_read_uint16(s, mediatype->BlockAlign); - stream_read_uint16(s, mediatype->BitsPerSample); - stream_read_uint16(s, mediatype->ExtraDataSize); + stream_read_UINT16(s, mediatype->BlockAlign); + stream_read_UINT16(s, mediatype->BitsPerSample); + stream_read_UINT16(s, mediatype->ExtraDataSize); if (mediatype->ExtraDataSize > 0) mediatype->ExtraData = stream_get_tail(s); @@ -516,7 +516,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) BOOL tsmf_codec_check_media_type(STREAM* s) { - uint8* m; + BYTE* m; BOOL ret; TS_AM_MEDIA_TYPE mediatype; diff --git a/channels/tsmf/client/tsmf_decoder.h b/channels/tsmf/client/tsmf_decoder.h index d9d0cbe59..9f222d1c7 100644 --- a/channels/tsmf/client/tsmf_decoder.h +++ b/channels/tsmf/client/tsmf_decoder.h @@ -38,9 +38,9 @@ struct _ITSMFDecoder /* Set the decoder format. Return true if supported. */ BOOL (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type); /* Decode a sample. */ - BOOL (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions); + BOOL (*Decode) (ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions); /* Get the decoded data */ - uint8* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size); + BYTE* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size); /* Get the pixel format of decoded video frame */ uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder); /* Get the width and height of decoded video frame */ @@ -50,7 +50,7 @@ struct _ITSMFDecoder /* Optional Contol function */ void (*Control) (ITSMFDecoder * decoder, ITSMFControlMsg control_msg, uint32 *arg); /* Decode a sample with extended interface. */ - int (*DecodeEx) (ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions, + int (*DecodeEx) (ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions, uint64 start_time, uint64 end_time, uint64 duration); /* Get current play time */ uint64 (*GetRunningTime) (ITSMFDecoder * decoder); diff --git a/channels/tsmf/client/tsmf_ifman.c b/channels/tsmf/client/tsmf_ifman.c index 85762735e..a55fed3f5 100644 --- a/channels/tsmf/client/tsmf_ifman.c +++ b/channels/tsmf/client/tsmf_ifman.c @@ -338,14 +338,14 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman) rects = (RDP_RECT*) xzalloc(sizeof(RDP_RECT) * num_rects); for (i = 0; i < num_rects; i++) { - stream_read_uint16(ifman->input, rects[i].y); /* Top */ - stream_seek_uint16(ifman->input); - stream_read_uint16(ifman->input, rects[i].x); /* Left */ - stream_seek_uint16(ifman->input); - stream_read_uint16(ifman->input, rects[i].height); /* Bottom */ - stream_seek_uint16(ifman->input); - stream_read_uint16(ifman->input, rects[i].width); /* Right */ - stream_seek_uint16(ifman->input); + stream_read_UINT16(ifman->input, rects[i].y); /* Top */ + stream_seek_UINT16(ifman->input); + stream_read_UINT16(ifman->input, rects[i].x); /* Left */ + stream_seek_UINT16(ifman->input); + stream_read_UINT16(ifman->input, rects[i].height); /* Bottom */ + stream_seek_UINT16(ifman->input); + stream_read_UINT16(ifman->input, rects[i].width); /* Right */ + stream_seek_UINT16(ifman->input); rects[i].width -= rects[i].x; rects[i].height -= rects[i].y; diff --git a/channels/tsmf/client/tsmf_ifman.h b/channels/tsmf/client/tsmf_ifman.h index 55108ed84..0827ddec6 100644 --- a/channels/tsmf/client/tsmf_ifman.h +++ b/channels/tsmf/client/tsmf_ifman.h @@ -27,7 +27,7 @@ struct _TSMF_IFMAN const char* decoder_name; const char* audio_name; const char* audio_device; - uint8 presentation_id[16]; + BYTE presentation_id[16]; uint32 stream_id; uint32 message_id; diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index a94dbe71a..922e064ad 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -57,7 +57,7 @@ struct _TSMF_CHANNEL_CALLBACK IWTSVirtualChannelManager* channel_mgr; IWTSVirtualChannel* channel; - uint8 presentation_id[16]; + BYTE presentation_id[16]; uint32 stream_id; }; @@ -113,7 +113,7 @@ BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, - uint8* pBuffer) + BYTE* pBuffer) { int length; STREAM* input; @@ -132,7 +132,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, return 1; } input = stream_new(0); - stream_attach(input, (uint8*) pBuffer, cbSize); + stream_attach(input, (BYTE*) pBuffer, cbSize); output = stream_new(256); stream_seek(output, 8); @@ -355,7 +355,7 @@ static int tsmf_on_close(IWTSVirtualChannelCallback* pChannelCallback) static int tsmf_on_new_channel_connection(IWTSListenerCallback* pListenerCallback, IWTSVirtualChannel* pChannel, - uint8* Data, + BYTE* Data, int* pbAccept, IWTSVirtualChannelCallback** ppCallback) { @@ -421,7 +421,7 @@ static void tsmf_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data) } } - data = (RDP_PLUGIN_DATA*)(((uint8*)data) + data->size); + data = (RDP_PLUGIN_DATA*)(((BYTE*)data) + data->size); } } diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 3e77c42ae..31db61f40 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -57,7 +57,7 @@ struct _TSMF_PRESENTATION { - uint8 presentation_id[GUID_SIZE]; + BYTE presentation_id[GUID_SIZE]; const char* audio_name; const char* audio_device; @@ -67,14 +67,14 @@ struct _TSMF_PRESENTATION uint32 last_y; uint32 last_width; uint32 last_height; - uint16 last_num_rects; + UINT16 last_num_rects; RDP_RECT* last_rects; uint32 output_x; uint32 output_y; uint32 output_width; uint32 output_height; - uint16 output_num_rects; + UINT16 output_num_rects; RDP_RECT* output_rects; IWTSVirtualChannelCallback* channel_callback; @@ -127,7 +127,7 @@ struct _TSMF_SAMPLE uint64 duration; uint32 extensions; uint32 data_size; - uint8* data; + BYTE* data; uint32 decoded_size; uint32 pixfmt; @@ -250,7 +250,7 @@ static void tsmf_stream_process_ack(TSMF_STREAM* stream) } } -TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback) +TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback) { TSMF_PRESENTATION* presentation; pthread_t thid = pthread_self(); @@ -284,7 +284,7 @@ TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCa return presentation; } -TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid) +TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid) { LIST_ITEM* item; TSMF_PRESENTATION* presentation; @@ -1021,7 +1021,7 @@ void tsmf_stream_free(TSMF_STREAM* stream) void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback, uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions, - uint32 data_size, uint8* data) + uint32 data_size, BYTE* data) { TSMF_SAMPLE* sample; diff --git a/channels/tsmf/client/tsmf_media.h b/channels/tsmf/client/tsmf_media.h index 50c00830a..e1d21c87c 100644 --- a/channels/tsmf/client/tsmf_media.h +++ b/channels/tsmf/client/tsmf_media.h @@ -32,8 +32,8 @@ typedef struct _TSMF_STREAM TSMF_STREAM; typedef struct _TSMF_SAMPLE TSMF_SAMPLE; -TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback); -TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid); +TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback); +TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid); void tsmf_presentation_start(TSMF_PRESENTATION* presentation); void tsmf_presentation_stop(TSMF_PRESENTATION* presentation); void tsmf_presentation_paused(TSMF_PRESENTATION* presentation); @@ -55,7 +55,7 @@ void tsmf_stream_free(TSMF_STREAM* stream); void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback, uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions, - uint32 data_size, uint8* data); + uint32 data_size, BYTE* data); void tsmf_media_init(void); diff --git a/channels/tsmf/client/tsmf_types.h b/channels/tsmf/client/tsmf_types.h index 5a275523a..b42e32961 100644 --- a/channels/tsmf/client/tsmf_types.h +++ b/channels/tsmf/client/tsmf_types.h @@ -51,7 +51,7 @@ typedef struct _TS_AM_MEDIA_TYPE uint32 Channels; uint32 BitsPerSample; uint32 BlockAlign; - const uint8* ExtraData; + const BYTE* ExtraData; uint32 ExtraDataSize; } TS_AM_MEDIA_TYPE; diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c index f0a3ba703..746720ea3 100644 --- a/channels/urbdrc/client/data_transfer.c +++ b/channels/urbdrc/client/data_transfer.c @@ -30,7 +30,7 @@ #include "urbdrc_types.h" #include "data_transfer.h" -static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer) +static void usb_process_get_port_status(IUDEVICE* pdev, BYTE* OutputBuffer) { int bcdUSB = pdev->query_device_descriptor(pdev, BCD_USB); @@ -59,7 +59,7 @@ static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer) static int func_check_isochronous_fds(IUDEVICE* pdev) { int ret = 0; - uint8* data_temp; + BYTE* data_temp; uint32 size_temp, process_times = 2; ISOCH_CALLBACK_QUEUE* isoch_queue = NULL; ISOCH_CALLBACK_DATA* isoch = NULL; @@ -118,7 +118,7 @@ static int func_check_isochronous_fds(IUDEVICE* pdev) #endif static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* callback, - uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) + BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) { IUDEVICE* pdev; uint32 NumRequestCompletion = 0; @@ -157,7 +157,7 @@ static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* cal return 0; } -static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) +static int urbdrc_process_cancel_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) { IUDEVICE* pdev; uint32 CancelId; @@ -177,7 +177,7 @@ static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMA return error; } -static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) +static int urbdrc_process_retract_device_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) { uint32 Reason; LLOGLN(urbdrc_debug, ("urbdrc_process_retract_device_request")); @@ -200,7 +200,7 @@ static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem, return 0; } -static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, +static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice) { IUDEVICE* pdev; @@ -211,8 +211,8 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d uint32 OutputBufferSize; uint32 RequestId; uint32 usbd_status = USBD_STATUS_SUCCESS; - uint8* OutputBuffer; - uint8* out_data; + BYTE* OutputBuffer; + BYTE* out_data; int i, offset, success = 0; LLOGLN(urbdrc_debug, ("urbdrc_process__io_control")); @@ -230,7 +230,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); /** process */ - OutputBuffer = (uint8 *)malloc(OutputBufferSize); + OutputBuffer = (BYTE *)malloc(OutputBufferSize); memset(OutputBuffer, 0, OutputBufferSize); switch (IoControlCode) @@ -285,7 +285,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d offset = 28; out_size = offset + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); data_write_uint32(out_data + 0, InterfaceId); /** interface */ data_write_uint32(out_data + 4, MessageId); /** message id */ @@ -297,7 +297,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d for (i=0;iMsInterfaces; - uint8 InterfaceNumber, AlternateSetting; + BYTE InterfaceNumber, AlternateSetting; uint32 NumInterfaces = MsConfig->NumInterfaces; for (inum = 0; inum < NumInterfaces; inum++) @@ -435,14 +435,14 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_ } } -static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, +static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) { MSUSB_CONFIG_DESCRIPTOR * MsConfig = NULL; IUDEVICE* pdev = NULL; uint32 out_size, InterfaceId, RequestId, NumInterfaces, usbd_status = 0; - uint8 ConfigurationDescriptorIsValid; - uint8* out_data; + BYTE ConfigurationDescriptorIsValid; + BYTE* out_data; int MsOutSize = 0, offset = 0; if (transferDir == 0) @@ -458,7 +458,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint8(data + 4, ConfigurationDescriptorIsValid); + data_read_BYTE(data + 4, ConfigurationDescriptorIsValid); data_read_uint32(data + 8, NumInterfaces); offset = 12; @@ -482,7 +482,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da out_size = 36 + MsOutSize; else out_size = 44; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); data_write_uint32(out_data + 0, InterfaceId); /** interface */ data_write_uint32(out_data + 4, MessageId); /** message id */ @@ -493,16 +493,16 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da /** CbTsUrbResult */ data_write_uint32(out_data + 16, 8 + MsOutSize); /** TS_URB_RESULT_HEADER Size*/ - data_write_uint16(out_data + 20, 8 + MsOutSize); + data_write_UINT16(out_data + 20, 8 + MsOutSize); } else { data_write_uint32(out_data + 16, 16); - data_write_uint16(out_data + 20, 16); + data_write_UINT16(out_data + 20, 16); } /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION); + data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ offset = 28; /** TS_URB_SELECT_CONFIGURATION_RESULT */ @@ -525,7 +525,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da return 0; } -static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, uint32 data_sizem, +static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) { MSUSB_CONFIG_DESCRIPTOR* MsConfig; @@ -533,8 +533,8 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, IUDEVICE* pdev; uint32 out_size, InterfaceId, RequestId, ConfigurationHandle; uint32 OutputBufferSize; - uint8 InterfaceNumber; - uint8* out_data; + BYTE InterfaceNumber; + BYTE* out_data; int out_offset, interface_size; if (transferDir == 0) @@ -571,7 +571,7 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, interface_size = 16 + (MsInterface->NumberOfPipes * 20); out_size = 36 + interface_size ; - out_data = (uint8*) malloc(out_size); + out_data = (BYTE*) malloc(out_size); memset(out_data, 0, out_size); data_write_uint32(out_data + 0, InterfaceId); /** interface */ @@ -580,9 +580,9 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 8 + interface_size); /** CbTsUrbResult */ /** TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 8 + interface_size); /** Size */ + data_write_UINT16(out_data + 20, 8 + interface_size); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE); + data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE); data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ out_offset = 28; @@ -600,16 +600,16 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, return 0; } -static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, +static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir, int External) { IUDEVICE* pdev; uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; uint32 TransferFlags, OutputBufferSize, usbd_status, Timeout; - uint8 bmRequestType, Request; - uint16 Value, Index, length; - uint8* buffer; - uint8* out_data; + BYTE bmRequestType, Request; + UINT16 Value, Index, length; + BYTE* buffer; + BYTE* out_data; int offset, ret; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -637,11 +637,11 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, } /** SetupPacket 8 bytes */ - data_read_uint8(data + offset, bmRequestType); - data_read_uint8(data + offset + 1, Request); - data_read_uint16(data + offset + 2, Value); - data_read_uint16(data + offset + 4, Index); - data_read_uint16(data + offset + 6, length); + data_read_BYTE(data + offset, bmRequestType); + data_read_BYTE(data + offset + 1, Request); + data_read_UINT16(data + offset + 2, Value); + data_read_UINT16(data + offset + 4, Index); + data_read_UINT16(data + offset + 6, length); data_read_uint32(data + offset + 8, OutputBufferSize); offset += 12; @@ -652,7 +652,7 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, } out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -695,10 +695,10 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER); + data_write_UINT16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -712,14 +712,14 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, return 0; } -static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, +static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; uint32 TransferFlags, OutputBufferSize, usbd_status = 0; - uint8 * Buffer; - uint8 * out_data; + BYTE * Buffer; + BYTE * out_data; int offset; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -740,7 +740,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin else out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); switch (transferDir) @@ -776,10 +776,10 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER); + data_write_UINT16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -795,7 +795,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin static int -urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, +urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -808,9 +808,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, uint32 ErrorCount, OutputBufferSize, usbd_status = 0; uint32 RequestField, noAck = 0; uint32 out_size = 0; - uint8 * iso_buffer = NULL; - uint8 * iso_packets = NULL; - uint8 * out_data = NULL; + BYTE * iso_buffer = NULL; + BYTE * iso_packets = NULL; + BYTE * out_data = NULL; int offset, nullBuffer = 0, iso_status; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -837,13 +837,13 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, if (transferDir == USBD_TRANSFER_DIRECTION_OUT) { if (!noAck) { out_size = 48 + (NumberOfPackets * 12); - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); iso_packets = out_data + 40; } } else { out_size = 48 + OutputBufferSize + (NumberOfPackets * 12); - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); iso_packets = out_data + 40; } @@ -917,9 +917,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 20 + (NumberOfPackets * 12)); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 20 + (NumberOfPackets * 12)); /** Size */ + data_write_UINT16(out_data + 20, 20 + (NumberOfPackets * 12)); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER); + data_write_UINT16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, StartFrame); /** StartFrame */ @@ -961,20 +961,20 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, static int urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice, - uint8 func_recipient, + BYTE func_recipient, int transferDir) { IUDEVICE * pdev; uint32 out_size, InterfaceId, RequestId, OutputBufferSize, usbd_status; - uint8 bmRequestType, desc_index, desc_type; - uint16 langId; - uint8 * buffer; - uint8 * out_data; + BYTE bmRequestType, desc_index, desc_type; + UINT16 langId; + BYTE * buffer; + BYTE * out_data; int ret, offset; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -982,13 +982,13 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint8(data + 4, desc_index); - data_read_uint8(data + 5, desc_type); - data_read_uint16(data + 6, langId); + data_read_BYTE(data + 4, desc_index); + data_read_BYTE(data + 5, desc_type); + data_read_UINT16(data + 6, langId); data_read_uint32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1037,9 +1037,9 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ @@ -1055,20 +1055,20 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, static int -urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, +urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice, - uint8 func_recipient, + BYTE func_recipient, int transferDir) { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; - uint16 Index; - uint8 bmRequestType; - uint8 * buffer; - uint8 * out_data; + UINT16 Index; + BYTE bmRequestType; + BYTE * buffer; + BYTE * out_data; int offset, ret; if (transferDir == 0){ @@ -1082,11 +1082,11 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint16(data + 4, Index); /** Index */ + data_read_UINT16(data + 4, Index); /** Index */ data_read_uint32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1130,9 +1130,9 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); + data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1148,22 +1148,22 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, static int urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice, - uint8 func_type, - uint8 func_recipient, + BYTE func_type, + BYTE func_recipient, int transferDir) { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, TransferFlags, usbd_status; uint32 OutputBufferSize; - uint8 ReqTypeReservedBits, Request, bmRequestType; - uint16 Value, Index, Padding; - uint8 * buffer; - uint8 * out_data; + BYTE ReqTypeReservedBits, Request, bmRequestType; + UINT16 Value, Index, Padding; + BYTE * buffer; + BYTE * out_data; int offset, ret; /** control by vendor command */ @@ -1174,16 +1174,16 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, data_read_uint32(data + 0, RequestId); data_read_uint32(data + 4, TransferFlags); /** TransferFlags */ - data_read_uint8(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */ - data_read_uint8(data + 9, Request); /** Request */ - data_read_uint16(data + 10, Value); /** value */ - data_read_uint16(data + 12, Index); /** index */ - data_read_uint16(data + 14, Padding); /** Padding */ + data_read_BYTE(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */ + data_read_BYTE(data + 9, Request); /** Request */ + data_read_UINT16(data + 10, Value); /** value */ + data_read_UINT16(data + 12, Index); /** index */ + data_read_UINT16(data + 14, Padding); /** Padding */ data_read_uint32(data + 16, OutputBufferSize); offset = 20; out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1240,8 +1240,8 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ - data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); /** Padding, MUST be ignored upon receipt */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); /** Padding, MUST be ignored upon receipt */ data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1258,7 +1258,7 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1267,10 +1267,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; - uint8 Recipient, InterfaceNumber, Ms_PageIndex; - uint16 Ms_featureDescIndex; - uint8 * out_data; - uint8 * buffer; + BYTE Recipient, InterfaceNumber, Ms_PageIndex; + UINT16 Ms_featureDescIndex; + BYTE * out_data; + BYTE * buffer; int offset, ret; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -1279,16 +1279,16 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint8(data + 4, Recipient); /** Recipient */ + data_read_BYTE(data + 4, Recipient); /** Recipient */ Recipient = Recipient && 0x1f; - data_read_uint8(data + 5, InterfaceNumber); /** InterfaceNumber */ - data_read_uint8(data + 6, Ms_PageIndex); /** Ms_PageIndex */ - data_read_uint16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */ + data_read_BYTE(data + 5, InterfaceNumber); /** InterfaceNumber */ + data_read_BYTE(data + 6, Ms_PageIndex); /** Ms_PageIndex */ + data_read_UINT16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */ data_read_uint32(data + 12, OutputBufferSize); offset = 16; out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1334,10 +1334,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1354,7 +1354,7 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, static int -urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, +urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1365,7 +1365,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, PipeHandle, EndpointAddress; uint32 OutputBufferSize, usbd_status = 0; - uint8 * out_data; + BYTE * out_data; int out_offset, ret; if (transferDir == 0){ @@ -1420,7 +1420,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, /** send data */ out_offset = 36; out_size = out_offset + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); data_write_uint32(out_data + 0, InterfaceId); /** interface */ data_write_uint32(out_data + 4, MessageId); /** message id */ @@ -1429,10 +1429,10 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 0x0008); /** Size */ + data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL); + data_write_UINT16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1449,7 +1449,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, static int urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1459,7 +1459,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize; uint32 dummy_frames; - uint8 * out_data; + BYTE * out_data; if (transferDir == 0){ LLOGLN(urbdrc_debug, ("urb_get_current_frame_number: not support transfer out\n")); @@ -1479,7 +1479,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, urbdrc_get_mstime(dummy_frames); out_size = 40; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); data_write_uint32(out_data + 0, InterfaceId); /** interface */ data_write_uint32(out_data + 4, MessageId); /** message id */ @@ -1488,10 +1488,10 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 12); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 12); /** Size */ + data_write_UINT16(out_data + 20, 12); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER); data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ data_write_uint32(out_data + 28, dummy_frames); /** FrameNumber */ @@ -1508,7 +1508,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, /* Unused function for current server */ static int urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1517,8 +1517,8 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; - uint8 * buffer; - uint8 * out_data; + BYTE * buffer; + BYTE * out_data; int ret, offset; if (transferDir == 0){ @@ -1536,7 +1536,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, data_read_uint32(data + 4, OutputBufferSize); out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1569,10 +1569,10 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 8); /** Size */ + data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1587,7 +1587,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, /* Unused function for current server */ static int urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, - uint8 * data, + BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1596,9 +1596,9 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; - uint16 interface; - uint8 * buffer; - uint8 * out_data; + UINT16 interface; + BYTE * buffer; + BYTE * out_data; int ret, offset; if (transferDir == 0){ @@ -1612,11 +1612,11 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint16(data + 4, interface); + data_read_UINT16(data + 4, interface); data_read_uint32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1647,10 +1647,10 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 8); /** Size */ + data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1663,21 +1663,21 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, } static int -urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, +urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice, - uint8 func_recipient, - uint8 command, + BYTE func_recipient, + BYTE command, int transferDir) { IUDEVICE * pdev; uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; - uint16 FeatureSelector, Index; - uint8 bmRequestType, bmRequest; - uint8 * buffer; - uint8 * out_data; + UINT16 FeatureSelector, Index; + BYTE bmRequestType, bmRequest; + BYTE * buffer; + BYTE * out_data; int ret, offset; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -1686,13 +1686,13 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); data_read_uint32(data + 0, RequestId); - data_read_uint16(data + 4, FeatureSelector); - data_read_uint16(data + 6, Index); + data_read_UINT16(data + 4, FeatureSelector); + data_read_UINT16(data + 6, Index); data_read_uint32(data + 8, OutputBufferSize); offset = 12; out_size = 36 + OutputBufferSize; - out_data = (uint8 *) malloc(out_size); + out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); buffer = out_data + 36; @@ -1749,10 +1749,10 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, data_write_uint32(out_data + 12, RequestId); /** RequestId */ data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ - data_write_uint16(out_data + 20, 8); /** Size */ + data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ - data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE); + data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE); data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ data_write_uint32(out_data + 28, 0); /** HResult */ @@ -1766,7 +1766,7 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, } static int -urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data, +urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, @@ -1775,8 +1775,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data { IUDEVICE * pdev; uint32 CbTsUrb; - uint16 Size; - uint16 URB_Function; + UINT16 Size; + UINT16 URB_Function; uint32 OutputBufferSize; int error = 0; @@ -1784,8 +1784,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data if (pdev == NULL) return 0; data_read_uint32(data + 0, CbTsUrb); /** CbTsUrb */ - data_read_uint16(data + 4, Size); /** size */ - data_read_uint16(data + 6, URB_Function); + data_read_UINT16(data + 4, Size); /** size */ + data_read_UINT16(data + 6, URB_Function); data_read_uint32(data + 4 + CbTsUrb, OutputBufferSize); switch (URB_Function) @@ -2302,7 +2302,7 @@ urbdrc_process_udev_data_transfer(void* arg) { TRANSFER_DATA* transfer_data = (TRANSFER_DATA*) arg; URBDRC_CHANNEL_CALLBACK * callback = transfer_data->callback; - uint8 * pBuffer = transfer_data->pBuffer; + BYTE * pBuffer = transfer_data->pBuffer; uint32 cbSize = transfer_data->cbSize; uint32 UsbDevice = transfer_data->UsbDevice; IUDEVMAN * udevman = transfer_data->udevman; diff --git a/channels/urbdrc/client/isoch_queue.h b/channels/urbdrc/client/isoch_queue.h index 66db441f5..0aacb1c2a 100644 --- a/channels/urbdrc/client/isoch_queue.h +++ b/channels/urbdrc/client/isoch_queue.h @@ -34,7 +34,7 @@ struct _ISOCH_CALLBACK_DATA void * prev; void * next; void * device; - uint8 * out_data; + BYTE * out_data; uint32 out_size; void * callback; }; diff --git a/channels/urbdrc/client/searchman.c b/channels/urbdrc/client/searchman.c index 86fe1de80..12ee8b1cb 100644 --- a/channels/urbdrc/client/searchman.c +++ b/channels/urbdrc/client/searchman.c @@ -48,7 +48,7 @@ static USB_SEARCHDEV* searchman_get_next(USB_SEARCHMAN* searchman) return search; } -static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct) +static int searchman_list_add(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct) { USB_SEARCHDEV* search; @@ -77,7 +77,7 @@ static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 return 1; } -static int searchman_list_remove(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct) +static int searchman_list_remove(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct) { USB_SEARCHDEV* search; USB_SEARCHDEV* point; diff --git a/channels/urbdrc/client/searchman.h b/channels/urbdrc/client/searchman.h index 1d293243e..d83d17aa5 100644 --- a/channels/urbdrc/client/searchman.h +++ b/channels/urbdrc/client/searchman.h @@ -30,8 +30,8 @@ struct _USB_SEARCHDEV void * inode; void * prev; void * next; - uint16 idVendor; - uint16 idProduct; + UINT16 idVendor; + UINT16 idProduct; }; typedef struct _USB_SEARCHMAN USB_SEARCHMAN; @@ -60,9 +60,9 @@ struct _USB_SEARCHMAN /* close searchman */ void (*close) (USB_SEARCHMAN* self); /* add a new usb device for search */ - int (*add) (USB_SEARCHMAN* seachman, uint16 idVendor, uint16 idProduct); + int (*add) (USB_SEARCHMAN* seachman, UINT16 idVendor, UINT16 idProduct); /* remove a usb device from list */ - int (*remove) (USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct); + int (*remove) (USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct); /* check list has next device*/ int (*has_next) (USB_SEARCHMAN* seachman); /* get the device from list*/ diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index 2dd75c787..f5ce42e12 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -94,7 +94,7 @@ static void func_close_udevice(USB_SEARCHMAN* searchman, IUDEVICE* pdev) pdev->SigToEnd(pdev); idVendor = pdev->query_device_descriptor(pdev, ID_VENDOR); idProduct = pdev->query_device_descriptor(pdev, ID_PRODUCT); - searchman->add(searchman, (uint16) idVendor, (uint16) idProduct); + searchman->add(searchman, (UINT16) idVendor, (UINT16) idProduct); pdev->cancel_all_transfer_request(pdev); pdev->wait_action_completion(pdev); @@ -121,12 +121,12 @@ static int fun_device_string_send_set(char* out_data, int out_offset, char* str) while (str[i]) { - data_write_uint16(out_data + out_offset + offset, str[i]); /* str */ + data_write_UINT16(out_data + out_offset + offset, str[i]); /* str */ i++; offset += 2; } - data_write_uint16(out_data + out_offset + offset, 0x0000); /* add "\0" */ + data_write_UINT16(out_data + out_offset + offset, 0x0000); /* add "\0" */ offset += 2; return offset + out_offset; @@ -187,7 +187,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data) IUDEVICE* pdev; uint32 FunctionId; uint32 RequestField; - uint16 URB_Function; + UINT16 URB_Function; IUDEVMAN* udevman = transfer_data->udevman; if (transfer_data->cbSize >= 8) @@ -198,7 +198,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data) FunctionId == TRANSFER_OUT_REQUEST) && transfer_data->cbSize >= 16) { - data_read_uint16(transfer_data->pBuffer + 14, URB_Function); + data_read_UINT16(transfer_data->pBuffer + 14, URB_Function); if (URB_Function == URB_FUNCTION_ISOCH_TRANSFER && transfer_data->cbSize >= 20) @@ -237,7 +237,7 @@ static int urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback, data_write_uint32(out_data + 4, MessageId); /* message id */ data_write_uint32(out_data + 8, Version); /* usb protocol version */ data_write_uint32(out_data + 12, 0x00000000); /* HRESULT */ - callback->channel->Write(callback->channel, out_size, (uint8*) out_data, NULL); + callback->channel->Write(callback->channel, out_size, (BYTE*) out_data, NULL); zfree(out_data); return 0; @@ -268,7 +268,7 @@ static int urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char data_write_uint32(out_data + 12, MajorVersion); data_write_uint32(out_data + 16, MinorVersion); data_write_uint32(out_data + 20, Capabilities); /* capabilities version */ - callback->channel->Write(callback->channel, out_size, (uint8 *)out_data, NULL); + callback->channel->Write(callback->channel, out_size, (BYTE *)out_data, NULL); zfree(out_data); return 0; @@ -291,7 +291,7 @@ static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 M data_write_uint32(out_data + 4, MessageId); /* message id */ data_write_uint32(out_data + 8, ADD_VIRTUAL_CHANNEL); /* function id */ - channel->Write(channel, out_size, (uint8*) out_data, NULL); + channel->Write(channel, out_size, (BYTE*) out_data, NULL); zfree(out_data); return 0; @@ -358,7 +358,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[0]); /* HardwareIds 2 */ out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[1]); - data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */ + data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */ out_offset += 2; data_write_uint32(out_data + out_offset, cchCompatIds); /* cchCompatIds */ @@ -373,7 +373,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC if (pdev->isCompositeDevice(pdev)) out_offset = fun_device_string_send_set(out_data, out_offset, composite_str); - data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */ + data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */ out_offset += 2; data_write_uint32(out_data + out_offset, 0x00000027); /* cchContainerId */ @@ -399,7 +399,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC data_write_uint32(out_data + out_offset + 24, 0x50); /* NoAckIsochWriteJitterBufferSizeInMs, >=10 or <=512 */ out_offset += 28; - callback->channel->Write(callback->channel, out_offset, (uint8 *)out_data, NULL); + callback->channel->Write(callback->channel, out_offset, (BYTE *)out_data, NULL); zfree(out_data); return 0; @@ -658,7 +658,7 @@ void* urbdrc_new_device_create(void * arg) IWTSVirtualChannelManager* channel_mgr; URBDRC_PLUGIN* urbdrc = transfer_data->urbdrc; USB_SEARCHMAN* searchman = urbdrc->searchman; - uint8* pBuffer = transfer_data->pBuffer; + BYTE* pBuffer = transfer_data->pBuffer; IUDEVMAN* udevman = transfer_data->udevman; IUDEVICE* pdev = NULL; uint32 ChannelId = 0; @@ -756,7 +756,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback transfer_data->udevman = urbdrc->udevman; transfer_data->urbdrc = urbdrc; transfer_data->cbSize = cbSize; - transfer_data->pBuffer = (uint8 *)malloc((cbSize)); + transfer_data->pBuffer = (BYTE *)malloc((cbSize)); for (i = 0; i < (cbSize); i++) { @@ -775,7 +775,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback return error; } -static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* Buffer) +static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* Buffer) { URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback; URBDRC_PLUGIN* urbdrc; @@ -829,7 +829,7 @@ static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, transfer_data->udevman = udevman; transfer_data->cbSize = cbSize - 4; transfer_data->UsbDevice = InterfaceId; - transfer_data->pBuffer = (uint8 *)malloc((cbSize - 4)); + transfer_data->pBuffer = (BYTE *)malloc((cbSize - 4)); memcpy(transfer_data->pBuffer, pBuffer + 4, (cbSize - 4)); @@ -898,7 +898,7 @@ static int urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback) } static int urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallback, - IWTSVirtualChannel * pChannel, uint8* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback) + IWTSVirtualChannel * pChannel, BYTE* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback) { URBDRC_LISTENER_CALLBACK* listener_callback = (URBDRC_LISTENER_CALLBACK*) pListenerCallback; URBDRC_CHANNEL_CALLBACK* callback; diff --git a/channels/urbdrc/client/urbdrc_main.h b/channels/urbdrc/client/urbdrc_main.h index 1de9dbd86..2a339714f 100644 --- a/channels/urbdrc/client/urbdrc_main.h +++ b/channels/urbdrc/client/urbdrc_main.h @@ -98,7 +98,7 @@ struct _TRANSFER_DATA URBDRC_CHANNEL_CALLBACK* callback; URBDRC_PLUGIN* urbdrc; IUDEVMAN* udevman; - uint8* pBuffer; + BYTE* pBuffer; uint32 cbSize; uint32 UsbDevice; }; @@ -114,21 +114,21 @@ struct _IUDEVICE uint32 *UrbdStatus, uint32 *StartFrame, uint32 NumberOfPackets, - uint8 *IsoPacket, + BYTE *IsoPacket, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, int Timeout); int (*control_transfer) (IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, uint32 TransferFlags, - uint8 bmRequestType, - uint8 Request, - uint16 Value, - uint16 Index, + BYTE bmRequestType, + BYTE Request, + UINT16 Value, + UINT16 Index, uint32 *UrbdStatus, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, uint32 Timeout); int (*bulk_or_interrupt_transfer) (IUDEVICE * idev, uint32 RequestId, @@ -136,14 +136,14 @@ struct _IUDEVICE uint32 TransferFlags, uint32 *UsbdStatus, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, uint32 Timeout); int (*select_configuration) (IUDEVICE * idev, uint32 bConfigurationValue); - int (*select_interface) (IUDEVICE * idev, uint8 InterfaceNumber, - uint8 AlternateSetting); + int (*select_interface) (IUDEVICE * idev, BYTE InterfaceNumber, + BYTE AlternateSetting); int (*control_pipe_request) (IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, @@ -153,16 +153,16 @@ struct _IUDEVICE int (*control_query_device_text) (IUDEVICE * idev, uint32 TextType, uint32 LocaleId, uint32 *BufferSize, - uint8 * Buffer); + BYTE * Buffer); int (*os_feature_descriptor_request) (IUDEVICE * idev, uint32 RequestId, - uint8 Recipient, - uint8 InterfaceNumber, - uint8 Ms_PageIndex, - uint16 Ms_featureDescIndex, + BYTE Recipient, + BYTE InterfaceNumber, + BYTE Ms_PageIndex, + UINT16 Ms_featureDescIndex, uint32 * UsbdStatus, uint32 * BufferSize, - uint8* Buffer, + BYTE* Buffer, int Timeout); void (*cancel_all_transfer_request) (IUDEVICE * idev); @@ -191,7 +191,7 @@ struct _IUDEVICE int (*query_device_port_status) (IUDEVICE * idev, uint32 *UsbdStatus, uint32 * BufferSize, - uint8 * Buffer); + BYTE * Buffer); int (*request_queue_is_none) (IUDEVICE * idev); @@ -211,8 +211,8 @@ struct _IUDEVICE BASIC_DEV_STATE_DEFINED(channel_id, uint32); BASIC_DEV_STATE_DEFINED(UsbDevice, uint32); BASIC_DEV_STATE_DEFINED(ReqCompletion, uint32); - BASIC_DEV_STATE_DEFINED(bus_number, uint16); - BASIC_DEV_STATE_DEFINED(dev_number, uint16); + BASIC_DEV_STATE_DEFINED(bus_number, UINT16); + BASIC_DEV_STATE_DEFINED(dev_number, UINT16); BASIC_DEV_STATE_DEFINED(port_number, int); BASIC_DEV_STATE_DEFINED(isoch_queue, void *); BASIC_DEV_STATE_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *); @@ -237,8 +237,8 @@ struct _IUDEVMAN int (*register_udevice) (IUDEVMAN* idevman, int bus_number, int dev_number, int UsbDevice, - uint16 idVendor, - uint16 idProduct, + UINT16 idVendor, + UINT16 idProduct, int flag); IUDEVICE *(*get_next) (IUDEVMAN *idevman); IUDEVICE *(*get_udevice_by_UsbDevice) (IUDEVMAN * idevman, @@ -246,8 +246,8 @@ struct _IUDEVMAN IUDEVICE *(*get_udevice_by_UsbDevice_try_again) (IUDEVMAN * idevman, uint32 UsbDevice); /* Extension */ - int (*check_device_exist_by_id) (IUDEVMAN * idevman, uint16 idVendor, - uint16 idProduct); + int (*check_device_exist_by_id) (IUDEVMAN * idevman, UINT16 idVendor, + UINT16 idProduct); int (*isAutoAdd) (IUDEVMAN * idevman); /* Basic state */ BASIC_DEVMAN_STATE_DEFINED(defUsbDevice, uint32); diff --git a/channels/urbdrc/libusb/libusb_udevice.c b/channels/urbdrc/libusb/libusb_udevice.c index bba9a4e84..e0a2da03c 100644 --- a/channels/urbdrc/libusb/libusb_udevice.c +++ b/channels/urbdrc/libusb/libusb_udevice.c @@ -58,8 +58,8 @@ static void udev_set_p_##_arg (IUDEVICE * idev, _type _t) \ typedef struct _ISO_USER_DATA ISO_USER_DATA; struct _ISO_USER_DATA { - uint8 * IsoPacket; - uint8 * output_data; + BYTE * IsoPacket; + BYTE * output_data; int iso_status; int completed; uint32 error_count; @@ -153,12 +153,12 @@ static void func_iso_callback(struct libusb_transfer *transfer) { ISO_USER_DATA * iso_user_data = (ISO_USER_DATA *) transfer->user_data; - uint8 * data = iso_user_data->IsoPacket; + BYTE * data = iso_user_data->IsoPacket; int * completed = &iso_user_data->completed; uint32 offset = 0; uint32 index = 0; uint32 i, act_len; - uint8 *b; + BYTE *b; *completed = 1; /* Fixme: currently fill the dummy frame number, tt needs to be @@ -220,7 +220,7 @@ func_get_ep_desc(LIBUSB_CONFIG_DESCRIPTOR * LibusbConfig, MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; const LIBUSB_INTERFACE * interface; const LIBUSB_ENDPOINT_DESCEIPTOR * endpoint; - uint8 alt; + BYTE alt; int inum, pnum; MsInterfaces = MsConfig->MsInterfaces; @@ -320,7 +320,7 @@ func_set_usbd_status(UDEVICE* pdev, uint32* status, int err_result) static void func_iso_data_init(ISO_USER_DATA * iso_user_data, uint32 numPacket, uint32 buffsize, - uint32 noAck, uint8 * isoPacket, uint8 * buffer) + uint32 noAck, BYTE * isoPacket, BYTE * buffer) { /* init struct iso_user_data */ iso_user_data->IsoPacket = isoPacket; @@ -478,7 +478,7 @@ udev_new_descript(LIBUSB_DEVICE* libusb_dev) /* Get HUB handle */ static int -udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number) +udev_get_hub_handle(UDEVICE * pdev, UINT16 bus_number, UINT16 dev_number) { struct udev *udev; struct udev_enumerate *enumerate; @@ -590,7 +590,7 @@ udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number) static int -libusb_udev_select_interface(IUDEVICE * idev, uint8 InterfaceNumber, uint8 AlternateSetting) +libusb_udev_select_interface(IUDEVICE * idev, BYTE InterfaceNumber, BYTE AlternateSetting) { MSUSB_CONFIG_DESCRIPTOR * MsConfig; MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; @@ -638,7 +638,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M const LIBUSB_INTERFACE * LibusbInterface; const LIBUSB_INTERFACE_DESCRIPTOR * LibusbAltsetting; const LIBUSB_ENDPOINT_DESCEIPTOR * LibusbEndpoint; - uint8 LibusbNumEndpoint; + BYTE LibusbNumEndpoint; int inum = 0, pnum = 0, MsOutSize = 0; LibusbConfig = pdev->LibusbConfig; @@ -746,7 +746,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M | (pdev->bus_number << 24); /* count endpoint max packet size */ int max = LibusbEndpoint->wMaxPacketSize & 0x07ff; - uint8 attr = LibusbEndpoint->bmAttributes; + BYTE attr = LibusbEndpoint->bmAttributes; if ((attr & 0x3) == 1 || (attr & 0x3) == 3) { max *= (1 + ((LibusbEndpoint->wMaxPacketSize >> 11) & 3)); @@ -866,14 +866,14 @@ static int libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType, uint32 LocaleId, uint32 * BufferSize, - uint8 * Buffer) + BYTE * Buffer) { UDEVICE * pdev = (UDEVICE *) idev; LIBUSB_DEVICE_DESCRIPTOR * devDescriptor = pdev->devDescriptor; char * strDesc = "Generic Usb String"; char deviceLocation[25]; - uint8 bus_number; - uint8 device_address; + BYTE bus_number; + BYTE device_address; int ret = 0, i = 0; switch (TextType){ @@ -914,7 +914,7 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType, sprintf(deviceLocation, "Port_#%04d.Hub_#%04d", device_address, bus_number); for(i=0;irequest_queue->register_request(pdev->request_queue, RequestId, NULL, 0); @@ -957,8 +957,8 @@ libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId, //printf("Get ms string: result number %d", error); if (error > 0) { - uint8 bMS_Vendorcode; - data_read_uint8(ms_string_desc + 16, bMS_Vendorcode); + BYTE bMS_Vendorcode; + data_read_BYTE(ms_string_desc + 16, bMS_Vendorcode); //printf("bMS_Vendorcode:0x%x", bMS_Vendorcode); /** get os descriptor */ error = libusb_control_transfer(pdev->libusb_handle, @@ -1205,7 +1205,7 @@ libusb_udev_unlock_fifo_isoch(IUDEVICE * idev) static int libusb_udev_query_device_port_status(IUDEVICE * idev, uint32 *UsbdStatus, uint32 * BufferSize, - uint8 * Buffer) + BYTE * Buffer) { UDEVICE * pdev = (UDEVICE *) idev; int success = 0, ret; @@ -1256,9 +1256,9 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd uint32 *UrbdStatus, uint32 *StartFrame, uint32 NumberOfPackets, - uint8 *IsoPacket, + BYTE *IsoPacket, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, int Timeout) { UDEVICE * pdev = (UDEVICE *) idev; @@ -1346,13 +1346,13 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd static int libusb_udev_control_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, uint32 TransferFlags, - uint8 bmRequestType, - uint8 Request, - uint16 Value, - uint16 Index, + BYTE bmRequestType, + BYTE Request, + UINT16 Value, + UINT16 Index, uint32 *UrbdStatus, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, uint32 Timeout) { UDEVICE * pdev = (UDEVICE *) idev; @@ -1386,7 +1386,7 @@ libusb_udev_bulk_or_interrupt_transfer(IUDEVICE * idev, uint32 RequestId, uint32 TransferFlags, uint32 *UsbdStatus, uint32 *BufferSize, - uint8 *Buffer, + BYTE *Buffer, uint32 Timeout) { UDEVICE * pdev = (UDEVICE *) idev; @@ -1647,8 +1647,8 @@ cancel_retry: BASIC_STATE_FUNC_DEFINED(channel_id, uint32) BASIC_STATE_FUNC_DEFINED(UsbDevice, uint32) BASIC_STATE_FUNC_DEFINED(ReqCompletion, uint32) -BASIC_STATE_FUNC_DEFINED(bus_number, uint16) -BASIC_STATE_FUNC_DEFINED(dev_number, uint16) +BASIC_STATE_FUNC_DEFINED(bus_number, UINT16) +BASIC_STATE_FUNC_DEFINED(dev_number, UINT16) BASIC_STATE_FUNC_DEFINED(port_number, int) BASIC_STATE_FUNC_DEFINED(isoch_queue, void *) BASIC_STATE_FUNC_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *) @@ -1718,7 +1718,7 @@ udev_load_interface(UDEVICE * pdev) static IUDEVICE* -udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number) +udev_init(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_number) { LIBUSB_DEVICE_DESCRIPTOR* devDescriptor; LIBUSB_CONFIG_DESCRIPTOR* config_temp; @@ -1829,13 +1829,13 @@ udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number) int -udev_new_by_id(uint16 idVendor, uint16 idProduct, IUDEVICE *** devArray) +udev_new_by_id(UINT16 idVendor, UINT16 idProduct, IUDEVICE *** devArray) { LIBUSB_DEVICE_DESCRIPTOR * descriptor; LIBUSB_DEVICE ** libusb_list; UDEVICE ** array; - uint16 bus_number; - uint16 dev_number; + UINT16 bus_number; + UINT16 dev_number; ssize_t total_device; int i, ret, num = 0; diff --git a/channels/urbdrc/libusb/libusb_udevice.h b/channels/urbdrc/libusb/libusb_udevice.h index 0b55f893d..df667b1f8 100644 --- a/channels/urbdrc/libusb/libusb_udevice.h +++ b/channels/urbdrc/libusb/libusb_udevice.h @@ -52,9 +52,9 @@ struct _UDEVICE uint32 UsbDevice; /* An unique interface ID */ uint32 ReqCompletion; /* An unique interface ID */ uint32 channel_id; - uint16 status; - uint16 bus_number; - uint16 dev_number; + UINT16 status; + UINT16 bus_number; + UINT16 dev_number; char path[17]; int port_number; int isCompositeDevice; @@ -77,7 +77,7 @@ typedef UDEVICE * PUDEVICE; int -udev_new_by_id(uint16_t idVendor, uint16_t idProduct, IUDEVICE ***devArray); +udev_new_by_id(UINT16_t idVendor, UINT16_t idProduct, IUDEVICE ***devArray); IUDEVICE* udev_new_by_addr(int bus_number, int dev_number); diff --git a/channels/urbdrc/libusb/libusb_udevman.c b/channels/urbdrc/libusb/libusb_udevman.c index 4b260586f..c3e8b631f 100644 --- a/channels/urbdrc/libusb/libusb_udevman.c +++ b/channels/urbdrc/libusb/libusb_udevman.c @@ -56,7 +56,7 @@ struct _UDEVMAN IUDEVICE* tail; /* tail device in linked list */ uint32 defUsbDevice; - uint16 flags; + UINT16 flags; int device_num; int sem_timeout; @@ -125,8 +125,8 @@ udevman_get_udevice_by_addr(IUDEVMAN * idevman, int bus_number, int dev_number) static int udevman_register_udevice(IUDEVMAN* idevman, int bus_number, int dev_number, int UsbDevice, - uint16 idVendor, - uint16 idProduct, + UINT16 idVendor, + UINT16 idProduct, int flag) { UDEVMAN * udevman = (UDEVMAN *) idevman; @@ -324,7 +324,7 @@ udevman_parse_device_pid_vid (char *str, int *id1, int *id2, char sign) static int -udevman_check_device_exist_by_id(IUDEVMAN * idevman, uint16 idVendor, uint16 idProduct) +udevman_check_device_exist_by_id(IUDEVMAN * idevman, UINT16 idVendor, UINT16 idProduct) { if (libusb_open_device_with_vid_pid (NULL, idVendor, idProduct)) return 1; @@ -537,8 +537,8 @@ int FreeRDPUDEVMANEntry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints) 0, 0, UsbDevice, - (uint16) idVendor, - (uint16) idProduct, + (UINT16) idVendor, + (UINT16) idProduct, UDEVMAN_FLAG_ADD_BY_VID_PID); } else if (udevman->flags & UDEVMAN_FLAG_ADD_BY_ADDR) diff --git a/channels/urbdrc/libusb/request_queue.c b/channels/urbdrc/libusb/request_queue.c index 787f3d8ce..de959133e 100644 --- a/channels/urbdrc/libusb/request_queue.c +++ b/channels/urbdrc/libusb/request_queue.c @@ -50,7 +50,7 @@ request_queue_has_next(REQUEST_QUEUE* queue) TRANSFER_REQUEST* request_queue_register_request(REQUEST_QUEUE* queue, uint32 RequestId, struct libusb_transfer * transfer, - uint8 endpoint) + BYTE endpoint) { TRANSFER_REQUEST* request; @@ -90,7 +90,7 @@ request_queue_rewind(REQUEST_QUEUE *queue) /* Get first*/ TRANSFER_REQUEST* -request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, uint8 ep) +request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, BYTE ep) { TRANSFER_REQUEST * request; pthread_mutex_lock(&queue->request_loading); diff --git a/channels/urbdrc/libusb/request_queue.h b/channels/urbdrc/libusb/request_queue.h index f13764b4f..fc7ae4636 100644 --- a/channels/urbdrc/libusb/request_queue.h +++ b/channels/urbdrc/libusb/request_queue.h @@ -33,7 +33,7 @@ struct _TRANSFER_REQUEST void* next; uint32 RequestId; - uint8 endpoint; + BYTE endpoint; struct libusb_transfer *transfer; int submit; }; @@ -53,9 +53,9 @@ struct _REQUEST_QUEUE int (*has_next) (REQUEST_QUEUE* queue); int (*unregister_request) (REQUEST_QUEUE *queue, uint32 RequestId); TRANSFER_REQUEST *(*get_next) (REQUEST_QUEUE* queue); - TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, uint8 ep); + TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, BYTE ep); TRANSFER_REQUEST *(*register_request) (REQUEST_QUEUE* queue, - uint32 RequestId, struct libusb_transfer * transfer, uint8 endpoint); + uint32 RequestId, struct libusb_transfer * transfer, BYTE endpoint); }; diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index d0d54c4ff..5f43fdd56 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -21,8 +21,8 @@ #include "df_event.h" -static uint8 keymap[256]; -static uint8 functionmap[128]; +static BYTE keymap[256]; +static BYTE functionmap[128]; void df_keyboard_init() { @@ -154,9 +154,9 @@ void df_keyboard_init() } -void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint16 x, uint16 y) +void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, UINT16 x, UINT16 y) { - uint16 flags; + UINT16 flags; flags = (down) ? PTR_FLAGS_DOWN : 0; @@ -171,14 +171,14 @@ void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint1 input->MouseEvent(input, flags, x, y); } -void df_send_mouse_motion_event(rdpInput* input, uint16 x, uint16 y) +void df_send_mouse_motion_event(rdpInput* input, UINT16 x, UINT16 y) { input->MouseEvent(input, PTR_FLAGS_MOVE, x, y); } -void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16 y) +void df_send_mouse_wheel_event(rdpInput* input, INT16 axisrel, UINT16 x, UINT16 y) { - uint16 flags = PTR_FLAGS_WHEEL; + UINT16 flags = PTR_FLAGS_WHEEL; if (axisrel < 0) flags |= 0x0078; @@ -188,9 +188,9 @@ void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16 input->MouseEvent(input, flags, x, y); } -void df_send_keyboard_event(rdpInput* input, BOOL down, uint8 keycode, uint8 function) +void df_send_keyboard_event(rdpInput* input, BOOL down, BYTE keycode, BYTE function) { - uint8 vkcode; + BYTE vkcode; RDP_SCANCODE rdp_scancode; if (keycode) diff --git a/client/DirectFB/df_graphics.c b/client/DirectFB/df_graphics.c index d593f4e45..8d138fea5 100644 --- a/client/DirectFB/df_graphics.c +++ b/client/DirectFB/df_graphics.c @@ -44,7 +44,7 @@ void df_Pointer_New(rdpContext* context, rdpPointer* pointer) if (result == DFB_OK) { int pitch; - uint8* point = NULL; + BYTE* point = NULL; df_pointer->xhot = pointer->xPos; df_pointer->yhot = pointer->yPos; diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index 2328c9748..d957c1478 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -261,7 +261,7 @@ BOOL df_verify_certificate(freerdp* instance, char* subject, char* issuer, char* } static int -df_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) +df_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) { return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } diff --git a/client/Mac/MRDPCursor.h b/client/Mac/MRDPCursor.h index 3430e67c8..6fd2cd580 100644 --- a/client/Mac/MRDPCursor.h +++ b/client/Mac/MRDPCursor.h @@ -14,7 +14,7 @@ { @public rdpPointer *pointer; - uint8 *cursor_data; // bitmapped pixel data + BYTE *cursor_data; // bitmapped pixel data NSBitmapImageRep *bmiRep; NSCursor *nsCursor; NSImage *nsImage; diff --git a/client/Mac/MRDPRailView.h b/client/Mac/MRDPRailView.h index 48a849db3..ee2df3866 100644 --- a/client/Mac/MRDPRailView.h +++ b/client/Mac/MRDPRailView.h @@ -50,7 +50,7 @@ void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window); void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove); -void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param); +void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param); void windows_to_apple_cords(NSRect * r); void rail_MoveWindow(rdpRail * rail, rdpWindow * window); void mac_rail_send_activate(int window_id); diff --git a/client/Mac/MRDPView.h b/client/Mac/MRDPView.h index 88e094cb1..0ef740467 100644 --- a/client/Mac/MRDPView.h +++ b/client/Mac/MRDPView.h @@ -113,13 +113,13 @@ void channel_activity_cb(CFSocketRef s, CFSocketCallBackType callbackType, CFDat int register_fds(int *fds, int count, void *inst); int invoke_draw_rect(rdpContext *context); int process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data); -int receive_channel_data(freerdp *inst, int chan_id, uint8 *data, int size, int flags, int total_size); +int receive_channel_data(freerdp *inst, int chan_id, BYTE *data, int size, int flags, int total_size); void process_cliprdr_event(freerdp *inst, RDP_EVENT *event); void cliprdr_process_cb_format_list_event(freerdp *inst, RDP_CB_FORMAT_LIST_EVENT* event); void cliprdr_send_data_request(freerdp *inst, uint32 format); void cliprdr_process_cb_monitor_ready_event(freerdp* inst); void cliprdr_process_cb_data_response_event(freerdp *inst, RDP_CB_DATA_RESPONSE_EVENT *event); -void cliprdr_process_text(freerdp *inst, uint8 *data, int len); +void cliprdr_process_text(freerdp *inst, BYTE *data, int len); void cliprdr_send_supported_format_list(freerdp *inst); int register_channel_fds(int *fds, int count, void *inst); @@ -127,14 +127,14 @@ void mac_process_rail_event(freerdp *inst, RDP_EVENT *event); void mac_rail_register_callbacks(freerdp *inst, rdpRail *rail); void mac_rail_CreateWindow(rdpRail *rail, rdpWindow *window); void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window); -void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, uint8 state); +void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, BYTE state); void mac_rail_SetWindowText(rdpRail *rail, rdpWindow *window); void mac_rail_SetWindowIcon(rdpRail *rail, rdpWindow *window, rdpIcon *icon); void mac_rail_SetWindowRects(rdpRail *rail, rdpWindow *window); void mac_rail_SetWindowVisibilityRects(rdpRail *rail, rdpWindow *window); void mac_rail_DestroyWindow(rdpRail *rail, rdpWindow *window); void mac_process_rail_get_sysparams_event(rdpChannels *channels, RDP_EVENT *event); -void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param); +void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param); void mac_on_free_rail_client_event(RDP_EVENT* event); void mac_process_rail_server_sysparam_event(rdpChannels* channels, RDP_EVENT* event); void mac_process_rail_exec_result_event(rdpChannels* channels, RDP_EVENT* event); @@ -153,7 +153,7 @@ struct mac_context struct cursor { rdpPointer *pointer; - uint8 *cursor_data; // bitmapped pixel data + BYTE *cursor_data; // bitmapped pixel data void *bmiRep; // NSBitmapImageRep void *nsCursor; // NSCursor void *nsImage; // NSImage diff --git a/client/Sample/freerdp.c b/client/Sample/freerdp.c index 3eefeb07b..070d0308d 100644 --- a/client/Sample/freerdp.c +++ b/client/Sample/freerdp.c @@ -94,7 +94,7 @@ void tf_end_paint(rdpContext* context) return; } -int tf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) +int tf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) { return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } diff --git a/client/Windows/wf_event.c b/client/Windows/wf_event.c index 2f9c5142b..94e7ac310 100644 --- a/client/Windows/wf_event.c +++ b/client/Windows/wf_event.c @@ -59,10 +59,10 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam) if (!wfi || !p) return 1; input = wfi->instance->input; - rdp_scancode = MAKE_RDP_SCANCODE((uint8) p->scanCode, p->flags & LLKHF_EXTENDED); + rdp_scancode = MAKE_RDP_SCANCODE((BYTE) p->scanCode, p->flags & LLKHF_EXTENDED); DEBUG_KBD("keydown %d scanCode %04X flags %02X vkCode %02X", - (wParam == WM_KEYDOWN), (uint8) p->scanCode, p->flags, p->vkCode); + (wParam == WM_KEYDOWN), (BYTE) p->scanCode, p->flags, p->vkCode); if (wfi->fs_toggle && ((p->vkCode == VK_RETURN) || (p->vkCode == VK_CANCEL)) && diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index 76bd92c93..4e85ace89 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -39,7 +39,7 @@ #include "wfreerdp.h" #include "wf_graphics.h" -const uint8 wf_rop2_table[] = +const BYTE wf_rop2_table[] = { R2_BLACK, /* 0 */ R2_NOTMERGEPEN, /* DPon */ @@ -84,19 +84,19 @@ void wf_glyph_free(wfBitmap* glyph) wf_image_free(glyph); } -uint8* wf_glyph_convert(wfInfo* wfi, int width, int height, uint8* data) +BYTE* wf_glyph_convert(wfInfo* wfi, int width, int height, BYTE* data) { int indexx; int indexy; - uint8* src; - uint8* dst; - uint8* cdata; + BYTE* src; + BYTE* dst; + BYTE* cdata; int src_bytes_per_row; int dst_bytes_per_row; src_bytes_per_row = (width + 7) / 8; dst_bytes_per_row = src_bytes_per_row + (src_bytes_per_row % 2); - cdata = (uint8 *) malloc(dst_bytes_per_row * height); + cdata = (BYTE *) malloc(dst_bytes_per_row * height); src = data; for (indexy = 0; indexy < height; indexy++) @@ -120,8 +120,8 @@ HBRUSH wf_create_brush(wfInfo * wfi, rdpBrush* brush, uint32 color, int bpp) int i; HBRUSH br; LOGBRUSH lbr; - uint8* cdata; - uint8 ipattern[8]; + BYTE* cdata; + BYTE ipattern[8]; HBITMAP pattern = NULL; lbr.lbStyle = brush->style; @@ -466,7 +466,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits wfi->image->_bitmap.width = surface_bits_command->width; wfi->image->_bitmap.height = surface_bits_command->height; wfi->image->_bitmap.bpp = surface_bits_command->bpp; - wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); + wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); freerdp_image_flip(nsc_context->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32); BitBlt(wfi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, wfi->image->hdc, 0, 0, GDI_SRCCOPY); } @@ -476,12 +476,12 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits wfi->image->_bitmap.height = surface_bits_command->height; wfi->image->_bitmap.bpp = surface_bits_command->bpp; - wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, + wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == TRUE)) { - uint8* temp_image; + BYTE* temp_image; freerdp_image_convert(surface_bits_command->bitmapData, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, @@ -490,7 +490,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits surface_bits_command->bpp = 32; surface_bits_command->bitmapData = wfi->image->_bitmap.data; - temp_image = (uint8*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); + temp_image = (BYTE*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4); freerdp_image_flip(wfi->image->_bitmap.data, temp_image, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32); free(wfi->image->_bitmap.data); wfi->image->_bitmap.data = temp_image; diff --git a/client/Windows/wf_gdi.h b/client/Windows/wf_gdi.h index 09e301d8e..470f66193 100644 --- a/client/Windows/wf_gdi.h +++ b/client/Windows/wf_gdi.h @@ -25,7 +25,7 @@ #include "wfreerdp.h" void wf_invalidate_region(wfInfo* wfi, int x, int y, int width, int height); -wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data); +wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data); void wf_image_free(wfBitmap* image); void wf_toggle_fullscreen(wfInfo* wfi); diff --git a/client/Windows/wf_graphics.c b/client/Windows/wf_graphics.c index 650002885..13aee1026 100644 --- a/client/Windows/wf_graphics.c +++ b/client/Windows/wf_graphics.c @@ -27,13 +27,13 @@ #include "wf_gdi.h" #include "wf_graphics.h" -HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata) +HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata) { HDC hdc; int negHeight; HBITMAP bitmap; BITMAPINFO bmi; - uint8* cdata = NULL; + BYTE* cdata = NULL; /** * See: http://msdn.microsoft.com/en-us/library/dd183376 @@ -65,7 +65,7 @@ HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, return bitmap; } -wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data) +wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data) { HDC hdc; wfBitmap* image; @@ -143,16 +143,16 @@ void wf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) } void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id) + BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id) { - uint16 size; + UINT16 size; size = width * height * (bpp / 8); if (bitmap->data == NULL) - bitmap->data = (uint8*) malloc(size); + bitmap->data = (BYTE*) malloc(size); else - bitmap->data = (uint8*) realloc(bitmap->data, size); + bitmap->data = (BYTE*) realloc(bitmap->data, size); if (compressed) { diff --git a/client/Windows/wf_graphics.h b/client/Windows/wf_graphics.h index b9868bde6..7c3827ebb 100644 --- a/client/Windows/wf_graphics.h +++ b/client/Windows/wf_graphics.h @@ -22,8 +22,8 @@ #include "wfreerdp.h" -HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata); -wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data); +HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata); +wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data); void wf_image_free(wfBitmap* image); void wf_register_graphics(rdpGraphics* graphics); diff --git a/client/Windows/wf_rail.c b/client/Windows/wf_rail.c index 0c383b3ed..f9425a2fb 100644 --- a/client/Windows/wf_rail.c +++ b/client/Windows/wf_rail.c @@ -37,7 +37,7 @@ void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail) { } -void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command) +void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command) { } diff --git a/client/Windows/wf_rail.h b/client/Windows/wf_rail.h index 053b27c61..671525136 100644 --- a/client/Windows/wf_rail.h +++ b/client/Windows/wf_rail.h @@ -23,7 +23,7 @@ void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail); -void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command); +void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command); void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled); void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event); void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window); diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index 5686b5d30..e48c7b729 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -426,7 +426,7 @@ BOOL wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* return TRUE; } -int wf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) +int wf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) { return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } diff --git a/client/Windows/wfreerdp.h b/client/Windows/wfreerdp.h index 73875478e..b1c4b1fcc 100644 --- a/client/Windows/wfreerdp.h +++ b/client/Windows/wfreerdp.h @@ -43,7 +43,7 @@ struct wf_bitmap HDC hdc; HBITMAP bitmap; HBITMAP org_bitmap; - uint8* pdata; + BYTE* pdata; }; typedef struct wf_bitmap wfBitmap; @@ -72,8 +72,8 @@ struct wf_info HWND hwnd; HGDI_DC hdc; - uint16 srcBpp; - uint16 dstBpp; + UINT16 srcBpp; + UINT16 dstBpp; freerdp* instance; wfBitmap* primary; wfBitmap* drawing; diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 7e140daaf..4c7bd88f5 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -56,7 +56,7 @@ struct clipboard_context int num_formats; Atom targets[20]; int num_targets; - uint8* data; + BYTE* data; uint32 data_format; uint32 data_alt_format; int data_length; @@ -70,7 +70,7 @@ struct clipboard_context /* INCR mechanism */ Atom incr_atom; BOOL incr_starts; - uint8* incr_data; + BYTE* incr_data; int incr_data_length; }; @@ -99,7 +99,7 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman) cb->identity_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR_ID", FALSE); XChangeProperty(xfi->display, xfi->drawable, cb->identity_atom, - XA_INTEGER, 32, PropModeReplace, (uint8*) &id, 1); + XA_INTEGER, 32, PropModeReplace, (BYTE*) &id, 1); XSelectInput(xfi->display, cb->root_window, PropertyChangeMask); @@ -158,17 +158,17 @@ void xf_cliprdr_uninit(xfInfo* xfi) } } -static uint8* lf2crlf(uint8* data, int* size) +static BYTE* lf2crlf(BYTE* data, int* size) { - uint8 c; - uint8* outbuf; - uint8* out; - uint8* in_end; - uint8* in; + BYTE c; + BYTE* outbuf; + BYTE* out; + BYTE* in_end; + BYTE* in; int out_size; out_size = (*size) * 2 + 1; - outbuf = (uint8*) xzalloc(out_size); + outbuf = (BYTE*) xzalloc(out_size); out = outbuf; in = data; in_end = data + (*size); @@ -193,12 +193,12 @@ static uint8* lf2crlf(uint8* data, int* size) return outbuf; } -static void crlf2lf(uint8* data, int* size) +static void crlf2lf(BYTE* data, int* size) { - uint8 c; - uint8* out; - uint8* in; - uint8* in_end; + BYTE c; + BYTE* out; + BYTE* in; + BYTE* in_end; out = data; in = data; @@ -215,9 +215,9 @@ static void crlf2lf(uint8* data, int* size) *size = out - data; } -static void be2le(uint8* data, int size) +static void be2le(BYTE* data, int size) { - uint8 c; + BYTE c; while (size >= 2) { @@ -245,7 +245,7 @@ static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi) { result = XGetWindowProperty(xfi->display, cb->owner, cb->identity_atom, 0, 4, 0, XA_INTEGER, - &type, &format, &length, &bytes_left, (uint8**) &pid); + &type, &format, &length, &bytes_left, (BYTE**) &pid); } if (pid) @@ -305,7 +305,7 @@ static int xf_cliprdr_select_format_by_atom(clipboardContext* cb, Atom target) static void xf_cliprdr_send_raw_format_list(xfInfo* xfi) { Atom type; - uint8* format_data; + BYTE* format_data; int format, result; unsigned long length, bytes_left; RDP_CB_FORMAT_LIST_EVENT* event; @@ -313,7 +313,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi) result = XGetWindowProperty(xfi->display, cb->root_window, cb->property_atom, 0, 3600, 0, XA_STRING, - &type, &format, &length, &bytes_left, (uint8**) &format_data); + &type, &format, &length, &bytes_left, (BYTE**) &format_data); if (result != Success) { @@ -325,7 +325,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->raw_format_data = (uint8*) malloc(length); + event->raw_format_data = (BYTE*) malloc(length); memcpy(event->raw_format_data, format_data, length); event->raw_format_data_size = length; XFree(format_data); @@ -397,7 +397,7 @@ static void xf_cliprdr_send_data_request(xfInfo* xfi, uint32 format) freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event); } -static void xf_cliprdr_send_data_response(xfInfo* xfi, uint8* data, int size) +static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size) { RDP_CB_DATA_RESPONSE_EVENT* event; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -436,7 +436,7 @@ static void xf_cliprdr_process_cb_data_request_event(xfInfo* xfi, RDP_CB_DATA_RE /* CB_FORMAT_RAW */ i = 0; XChangeProperty(xfi->display, xfi->drawable, cb->property_atom, - XA_INTEGER, 32, PropModeReplace, (uint8*) &event->format, 1); + XA_INTEGER, 32, PropModeReplace, (BYTE*) &event->format, 1); } else { @@ -468,7 +468,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi) int i, j; Atom atom; int format; - uint8* data = NULL; + BYTE* data = NULL; unsigned long length, bytes_left; RDP_CB_FORMAT_LIST_EVENT* event; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -516,16 +516,16 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi) } } -static uint8* xf_cliprdr_process_requested_raw(uint8* data, int* size) +static BYTE* xf_cliprdr_process_requested_raw(BYTE* data, int* size) { - uint8* outbuf; + BYTE* outbuf; - outbuf = (uint8*) malloc(*size); + outbuf = (BYTE*) malloc(*size); memcpy(outbuf, data, *size); return outbuf; } -static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size) +static BYTE* xf_cliprdr_process_requested_unicodetext(BYTE* data, int* size) { char* inbuf; WCHAR* outbuf; @@ -537,21 +537,21 @@ static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size) *size = (int) ((out_size + 1) * 2); - return (uint8*) outbuf; + return (BYTE*) outbuf; } -static uint8* xf_cliprdr_process_requested_text(uint8* data, int* size) +static BYTE* xf_cliprdr_process_requested_text(BYTE* data, int* size) { - uint8* outbuf; + BYTE* outbuf; outbuf = lf2crlf(data, size); return outbuf; } -static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size) +static BYTE* xf_cliprdr_process_requested_dib(BYTE* data, int* size) { - uint8* outbuf; + BYTE* outbuf; /* length should be at least BMP header (14) + sizeof(BITMAPINFOHEADER) */ if (*size < 54) @@ -561,29 +561,29 @@ static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size) } *size -= 14; - outbuf = (uint8*) xzalloc(*size); + outbuf = (BYTE*) xzalloc(*size); memcpy(outbuf, data + 14, *size); return outbuf; } -static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size) +static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size) { char* inbuf; - uint8* in; - uint8* outbuf; + BYTE* in; + BYTE* outbuf; char num[11]; inbuf = NULL; if (*size > 2) { - if ((uint8) data[0] == 0xFE && (uint8) data[1] == 0xFF) + if ((BYTE) data[0] == 0xFE && (BYTE) data[1] == 0xFF) { be2le(data, *size); } - if ((uint8) data[0] == 0xFF && (uint8) data[1] == 0xFE) + if ((BYTE) data[0] == 0xFF && (BYTE) data[1] == 0xFE) { freerdp_UnicodeToAsciiAlloc((WCHAR*) (data + 2), &inbuf, (*size - 2) / 2); } @@ -595,7 +595,7 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size) memcpy(inbuf, data, *size); } - outbuf = (uint8*) xzalloc(*size + 200); + outbuf = (BYTE*) xzalloc(*size + 200); strcpy((char*) outbuf, "Version:0.9\r\n" "StartHTML:0000000000\r\n" @@ -603,10 +603,10 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size) "StartFragment:0000000000\r\n" "EndFragment:0000000000\r\n"); - in = (uint8*) strstr((char*) inbuf, "clipboard_context; if (cb->incr_starts && has_data) @@ -695,7 +695,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) { Atom type; int format; - uint8* data = NULL; + BYTE* data = NULL; BOOL has_data = FALSE; unsigned long length, bytes_left, dummy; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -758,7 +758,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target) { bytes_left = length * format / 8; DEBUG_X11("%d bytes", (int)bytes_left); - cb->incr_data = (uint8*) realloc(cb->incr_data, cb->incr_data_length + bytes_left); + cb->incr_data = (BYTE*) realloc(cb->incr_data, cb->incr_data_length + bytes_left); memcpy(cb->incr_data + cb->incr_data_length, data, bytes_left); cb->incr_data_length += bytes_left; XFree(data); @@ -807,7 +807,7 @@ static void xf_cliprdr_provide_targets(xfInfo* xfi, XEvent* respond) respond->xselection.requestor, respond->xselection.property, XA_ATOM, 32, PropModeReplace, - (uint8*) cb->targets, cb->num_targets); + (BYTE*) cb->targets, cb->num_targets); } } @@ -821,7 +821,7 @@ static void xf_cliprdr_provide_data(xfInfo* xfi, XEvent* respond) respond->xselection.requestor, respond->xselection.property, respond->xselection.target, 8, PropModeReplace, - (uint8*) cb->data, cb->data_length); + (BYTE*) cb->data, cb->data_length); } } @@ -868,24 +868,24 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L XFlush(xfi->display); } -static void xf_cliprdr_process_text(clipboardContext* cb, uint8* data, int size) +static void xf_cliprdr_process_text(clipboardContext* cb, BYTE* data, int size) { - cb->data = (uint8*) malloc(size); + cb->data = (BYTE*) malloc(size); memcpy(cb->data, data, size); cb->data_length = size; crlf2lf(cb->data, &cb->data_length); } -static void xf_cliprdr_process_unicodetext(clipboardContext* cb, uint8* data, int size) +static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int size) { cb->data_length = freerdp_UnicodeToAsciiAlloc((WCHAR*) data, (CHAR**) &(cb->data), size / 2); crlf2lf(cb->data, &cb->data_length); } -static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size) +static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) { STREAM* s; - uint16 bpp; + UINT16 bpp; uint32 offset; uint32 ncolors; @@ -899,7 +899,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size) s = stream_new(0); stream_attach(s, data, size); stream_seek(s, 14); - stream_read_uint16(s, bpp); + stream_read_UINT16(s, bpp); stream_read_uint32(s, ncolors); offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0); stream_detach(s); @@ -908,8 +908,8 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size) DEBUG_X11_CLIPRDR("offset=%d bpp=%d ncolors=%d", offset, bpp, ncolors); s = stream_new(14 + size); - stream_write_uint8(s, 'B'); - stream_write_uint8(s, 'M'); + stream_write_BYTE(s, 'B'); + stream_write_BYTE(s, 'M'); stream_write_uint32(s, 14 + size); stream_write_uint32(s, 0); stream_write_uint32(s, offset); @@ -921,7 +921,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size) stream_free(s); } -static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size) +static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size) { char* start_str; char* end_str; @@ -943,7 +943,7 @@ static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size) return; } - cb->data = (uint8*) malloc(size - start + 1); + cb->data = (BYTE*) malloc(size - start + 1); memcpy(cb->data, data + start, end - start); cb->data_length = end - start; crlf2lf(cb->data, &cb->data_length); @@ -1071,7 +1071,7 @@ BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) uint32 format; XEvent* respond; uint32 alt_format; - uint8* data = NULL; + BYTE* data = NULL; BOOL delay_respond; unsigned long length, bytes_left; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 247ee783c..8183ef283 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -701,12 +701,12 @@ static BOOL xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, BOOL app) for (i=0;idisplay, "_NET_WM_STATE_MAXIMIZED_VERT", False)) + if ((Atom) ((UINT16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False)) { maxVert = TRUE; } - if ((Atom) ((uint16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False)) + if ((Atom) ((UINT16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False)) { maxHorz = TRUE; } diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 0a457fc35..68a8ab16a 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -34,7 +34,7 @@ #include "xf_gdi.h" -static const uint8 xf_rop2_table[] = +static const BYTE xf_rop2_table[] = { 0, GXclear, /* 0 */ @@ -205,10 +205,10 @@ BOOL xf_set_rop3(xfInfo* xfi, int rop3) return TRUE; } -Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data) +Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, BYTE* data) { Pixmap bitmap; - uint8* cdata; + BYTE* cdata; XImage* image; bitmap = XCreatePixmap(xfi->display, xfi->drawable, width, height, xfi->depth); @@ -235,7 +235,7 @@ Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data) return bitmap; } -Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data) +Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, BYTE* data) { int scanline; XImage* image; @@ -254,7 +254,7 @@ Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data) return bitmap; } -Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, uint8* data) +Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, BYTE* data) { int scanline; Pixmap bitmap; @@ -911,7 +911,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf } } -static void xf_gdi_surface_update_frame(xfInfo* xfi, uint16 tx, uint16 ty, uint16 width, uint16 height) +static void xf_gdi_surface_update_frame(xfInfo* xfi, UINT16 tx, UINT16 ty, UINT16 width, UINT16 height) { if (xfi->remote_app != TRUE) { @@ -998,7 +998,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits XSetFunction(xfi->display, xfi->gc, GXcopy); XSetFillStyle(xfi->display, xfi->gc, FillSolid); - xfi->bmp_codec_nsc = (uint8*) realloc(xfi->bmp_codec_nsc, + xfi->bmp_codec_nsc = (BYTE*) realloc(xfi->bmp_codec_nsc, surface_bits_command->width * surface_bits_command->height * 4); freerdp_image_flip(nsc_context->bmpdata, xfi->bmp_codec_nsc, @@ -1026,7 +1026,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits /* Validate that the data received is large enough */ if( surface_bits_command->width * surface_bits_command->height * surface_bits_command->bpp / 8 <= surface_bits_command->bitmapDataLength ) { - xfi->bmp_codec_none = (uint8*) realloc(xfi->bmp_codec_none, + xfi->bmp_codec_none = (BYTE*) realloc(xfi->bmp_codec_none, surface_bits_command->width * surface_bits_command->height * 4); freerdp_image_flip(surface_bits_command->bitmapData, xfi->bmp_codec_none, diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 5c3fa2128..1ca83456c 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -38,7 +38,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap) { - uint8* data; + BYTE* data; Pixmap pixmap; XImage* image; xfContext* context_ = (xfContext*) context; @@ -112,13 +112,13 @@ void xf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) } void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, + BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id) { - uint16 size; + UINT16 size; RFX_MESSAGE* msg; - uint8* src; - uint8* dst; + BYTE* src; + BYTE* dst; int yindex; int xindex; xfInfo* xfi; @@ -127,9 +127,9 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, size = width * height * (bpp + 7) / 8; if (bitmap->data == NULL) - bitmap->data = (uint8*) malloc(size); + bitmap->data = (BYTE*) malloc(size); else - bitmap->data = (uint8*) realloc(bitmap->data, size); + bitmap->data = (BYTE*) realloc(bitmap->data, size); switch (codec_id) { @@ -217,7 +217,7 @@ void xf_Pointer_New(rdpContext* context, rdpPointer* pointer) if ((pointer->andMaskData != 0) && (pointer->xorMaskData != 0)) { - freerdp_alpha_cursor_convert((uint8*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData, + freerdp_alpha_cursor_convert((BYTE*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData, pointer->width, pointer->height, pointer->xorBpp, xfi->clrconv); } diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 52d6e638f..0463c57a4 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -43,7 +43,7 @@ void xf_kbd_clear(xfInfo* xfi) memset(xfi->pressed_keys, 0, 256 * sizeof(BOOL)); } -void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym) +void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym) { if (keycode >= 8) xfi->pressed_keys[keycode] = keysym; @@ -51,7 +51,7 @@ void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym) return; } -void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode) +void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode) { if (keycode >= 8) xfi->pressed_keys[keycode] = NoSymbol; @@ -81,7 +81,7 @@ BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym) return (xfi->pressed_keys[keycode] == keysym); } -void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode) +void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode) { RDP_SCANCODE rdp_scancode; rdpInput* input; diff --git a/client/X11/xf_keyboard.h b/client/X11/xf_keyboard.h index cb01fc89f..ec90e31c6 100644 --- a/client/X11/xf_keyboard.h +++ b/client/X11/xf_keyboard.h @@ -26,11 +26,11 @@ void xf_kbd_init(xfInfo* xfi); void xf_kbd_clear(xfInfo* xfi); -void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym); -void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode); +void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym); +void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode); void xf_kbd_release_all_keypress(xfInfo* xfi); BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym); -void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode); +void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode); int xf_kbd_read_keyboard_state(xfInfo* xfi); BOOL xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym); int xf_kbd_get_toggle_keys_state(xfInfo* xfi); diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index fab540025..2f64532f7 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -162,7 +162,7 @@ static void xf_rail_MoveWindow(rdpRail* rail, rdpWindow* window) window->windowWidth, window->windowHeight); } -static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, uint8 state) +static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, BYTE state) { xfInfo* xfi; xfWindow* xfw; @@ -249,7 +249,7 @@ static void xf_on_free_rail_client_event(RDP_EVENT* event) } } -static void xf_send_rail_client_event(rdpChannels* channels, uint16 event_type, void* param) +static void xf_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param) { RDP_EVENT* out_event = NULL; void * payload = NULL; @@ -284,7 +284,7 @@ void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled) xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate); } -void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command) +void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command) { rdpChannels* channels; RAIL_SYSCOMMAND_ORDER syscommand; @@ -518,7 +518,7 @@ void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels, DEBUG_X11_LMS("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d " "minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d", minmax->windowId, minmax->maxWidth, minmax->maxHeight, - (sint16)minmax->maxPosX, (sint16)minmax->maxPosY, + (INT16)minmax->maxPosX, (INT16)minmax->maxPosY, minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight); @@ -562,7 +562,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channe DEBUG_X11_LMS("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d", movesize->windowId, movesize->isMoveSizeStart, - movetype_names[movesize->moveSizeType], (sint16) movesize->posX, (sint16) movesize->posY); + movetype_names[movesize->moveSizeType], (INT16) movesize->posX, (INT16) movesize->posY); switch (movesize->moveSizeType) { diff --git a/client/X11/xf_rail.h b/client/X11/xf_rail.h index 542a0fc19..d4cddc0b4 100644 --- a/client/X11/xf_rail.h +++ b/client/X11/xf_rail.h @@ -24,7 +24,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail); -void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command); +void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command); void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled); void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event); void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window); diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index 85bad593f..d22da8552 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -200,8 +200,8 @@ xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt) static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT* vevent) { int i; - uint8* data1; - uint8* data2; + BYTE* data1; + BYTE* data2; uint32 pixfmt; uint32 xvpixfmt; BOOL converti420yv12 = FALSE; diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 3e92f2340..a2e489bbf 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -133,7 +133,7 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, BOOL fullscreen) /* http://tronche.com/gui/x/xlib/window-information/XGetWindowProperty.html */ BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, - unsigned long* nitems, unsigned long* bytes, uint8** prop) + unsigned long* nitems, unsigned long* bytes, BYTE** prop) { int status; Atom actual_type; @@ -224,7 +224,7 @@ void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, BOOL show) hints.status = 0; XChangeProperty(xfi->display, window->handle, xfi->_MOTIF_WM_HINTS, xfi->_MOTIF_WM_HINTS, 32, - PropModeReplace, (uint8*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS); + PropModeReplace, (BYTE*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS); } void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window) @@ -235,7 +235,7 @@ void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window) window_state[1] = xfi->_NET_WM_STATE_SKIP_TASKBAR; XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_STATE, - XA_ATOM, 32, PropModeReplace, (uint8*) &window_state, 2); + XA_ATOM, 32, PropModeReplace, (BYTE*) &window_state, 2); } void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style) @@ -282,7 +282,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st } XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_WINDOW_TYPE, - XA_ATOM, 32, PropModeReplace, (uint8*) &window_type, 1); + XA_ATOM, 32, PropModeReplace, (BYTE*) &window_type, 1); } @@ -373,7 +373,7 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, input_mask |= EnterWindowMask | LeaveWindowMask; XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32, - PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop)); + PropModeReplace, (BYTE*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop)); if (xfi->parent_window) XReparentWindow(xfi->display, window->handle, xfi->parent_window, 0, 0); @@ -688,7 +688,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h xf_UpdateWindowArea(xfi, window, 0, 0, width, height); } -void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state) +void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state) { switch (state) { @@ -777,7 +777,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon) } XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32, - PropModeReplace, (uint8*) propdata, propsize); + PropModeReplace, (BYTE*) propdata, propsize); XFlush(xfi->display); } diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h index 0888a885a..4748b71c5 100644 --- a/client/X11/xf_window.h +++ b/client/X11/xf_window.h @@ -77,7 +77,7 @@ struct xf_window BOOL is_mapped; BOOL is_transient; xfLocalMove local_move; - uint8 rail_state; + BYTE rail_state; BOOL rail_ignore_configure; }; @@ -96,7 +96,7 @@ void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id); void xf_SetWindowText(xfInfo *xfi, xfWindow* window, char *name); void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height); -void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state); +void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state); void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon); void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects); void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects); @@ -107,7 +107,7 @@ void xf_DestroyWindow(xfInfo* xfi, xfWindow* window); rdpWindow* xf_rdpWindowFromWindow(xfInfo* xfi, Window wnd); BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length, - unsigned long* nitems, unsigned long* bytes, uint8** prop); + unsigned long* nitems, unsigned long* bytes, BYTE** prop); void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int maxHeight, int maxPosX, int maxPosY, int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight); diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 58ab5cafa..f3251e872 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -75,7 +75,7 @@ static HANDLE g_sem; static int g_thread_count = 0; -static uint8 g_disconnect_reason = 0; +static BYTE g_disconnect_reason = 0; static long xv_port = 0; static const size_t password_size = 512; @@ -759,7 +759,7 @@ BOOL xf_post_connect(freerdp* instance) xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0, (char*) xfi->primary_buffer, xfi->width, xfi->height, xfi->scanline_pad, 0); - xfi->bmp_codec_none = (uint8*) malloc(64 * 64 * 4); + xfi->bmp_codec_none = (BYTE*) malloc(64 * 64 * 4); if (xfi->sw_gdi) { @@ -966,7 +966,7 @@ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_D return 1; } -int xf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) +int xf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) { return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } @@ -1272,7 +1272,7 @@ void* thread_func(void* param) pthread_exit(NULL); } -static uint8 exit_code_from_disconnect_reason(uint32 reason) +static BYTE exit_code_from_disconnect_reason(uint32 reason) { if (reason == 0 || (reason >= XF_EXIT_PARSE_ARGUMENTS && reason <= XF_EXIT_CONN_FAILED)) diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index ed51e9283..30d75e16c 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -117,13 +117,13 @@ struct xf_info HGDI_DC hdc; BOOL sw_gdi; - uint8* primary_buffer; + BYTE* primary_buffer; BOOL frame_begin; - uint16 frame_x1; - uint16 frame_y1; - uint16 frame_x2; - uint16 frame_y2; + UINT16 frame_x1; + UINT16 frame_y1; + UINT16 frame_x2; + UINT16 frame_y2; BOOL focused; BOOL mouse_active; @@ -136,8 +136,8 @@ struct xf_info XSetWindowAttributes attribs; BOOL complex_regions; VIRTUAL_SCREEN vscreen; - uint8* bmp_codec_none; - uint8* bmp_codec_nsc; + BYTE* bmp_codec_none; + BYTE* bmp_codec_nsc; void* rfx_context; void* nsc_context; void* xv_context; diff --git a/cunit/test_bitmap.c b/cunit/test_bitmap.c index 1e5f0c6dc..6759b2e95 100644 --- a/cunit/test_bitmap.c +++ b/cunit/test_bitmap.c @@ -24,17 +24,17 @@ #include "test_bitmap.h" -uint8 compressed_16x1x8[] = +BYTE compressed_16x1x8[] = { 0x10 }; -uint8 decompressed_16x1x8[] = +BYTE decompressed_16x1x8[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_32x32x8[] = +BYTE compressed_32x32x8[] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06, 0xec, 0x6c, 0x0e, 0x0e, 0x44, 0x0e, 0x0e, 0x0e, 0x13, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06, @@ -90,7 +90,7 @@ uint8 compressed_32x32x8[] = 0x04, 0x8b, 0x04, 0x6c, 0xe6, 0x04, 0x06, 0x82, 0x00, 0x00 }; -uint8 decompressed_32x32x8[] = +BYTE decompressed_32x32x8[] = { 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x6c, 0x04, 0x8b, 0x04, 0x6c, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x00, 0x00, @@ -158,18 +158,18 @@ uint8 decompressed_32x32x8[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_16x1x16[] = +BYTE compressed_16x1x16[] = { 0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 decompressed_16x1x16[] = +BYTE decompressed_16x1x16[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_32x32x16[] = +BYTE compressed_32x32x16[] = { 0x1c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xef, 0x1a, 0x8a, 0xcf, 0x12, 0x4e, 0x12, 0xce, 0x09, 0xaf, 0x09, 0x8f, 0x01, 0x8f, 0x01, 0xaf, 0x09, 0xce, 0x09, @@ -268,7 +268,7 @@ uint8 compressed_32x32x16[] = 0xcf, 0x12, 0x69, 0xef, 0x1a, 0x84, 0xef, 0x1a, 0xef, 0x1a, 0x00, 0x00, 0x00, 0x00 }; -uint8 decompressed_32x32x16[] = +BYTE decompressed_32x32x16[] = { 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xcf, 0x12, 0xb0, 0x12, 0x91, 0x0a, 0xb3, 0x0a, 0xb3, 0x0a, @@ -400,19 +400,19 @@ uint8 decompressed_32x32x16[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_16x1x24[] = +BYTE compressed_16x1x24[] = { 0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 decompressed_16x1x24[] = +BYTE decompressed_16x1x24[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_32x32x24[] = +BYTE compressed_32x32x24[] = { 0x84, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x38, 0x8a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80, @@ -479,7 +479,7 @@ uint8 compressed_32x32x24[] = 0xff, 0xff, 0xff, 0xff }; -uint8 decompressed_32x32x24[] = +BYTE decompressed_32x32x24[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -675,12 +675,12 @@ uint8 decompressed_32x32x24[] = 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -uint8 compressed_16x1x32[] = +BYTE compressed_16x1x32[] = { 0x10, 0x01, 0x01, 0x01, 0x01 }; -uint8 decompressed_16x1x32[] = +BYTE decompressed_16x1x32[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -688,7 +688,7 @@ uint8 decompressed_16x1x32[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -uint8 compressed_32x32x32[] = +BYTE compressed_32x32x32[] = { 0x10, 0x02, 0x02, 0x0a, 0xbb, 0x22, 0x8e, 0xf6, 0xb9, 0x91, 0x91, 0xa9, 0xf5, 0xaa, 0x3c, 0x00, 0x08, 0xf9, 0x5e, 0xd1, 0x59, 0x8f, 0xf7, 0xb8, 0x90, 0x90, 0xa8, 0xf4, 0xab, 0x59, 0xa3, 0x8c, @@ -866,7 +866,7 @@ uint8 compressed_32x32x32[] = 0xcf, 0xb5, 0xb3, 0xc7, 0xd3, 0xc1, 0x85, 0x31, 0x03, 0x00 }; -uint8 decompressed_32x32x32[] = +BYTE decompressed_32x32x32[] = { 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, @@ -1149,14 +1149,14 @@ void test_bitmap(void) { struct btest { - uint8 decompressed_16x1x8[16 * 1 * 1]; - uint8 decompressed_32x32x8[32 * 32 * 1]; - uint8 decompressed_16x1x16[16 * 1 * 2]; - uint8 decompressed_32x32x16[32 * 32 * 2]; - uint8 decompressed_16x1x24[16 * 1 * 3]; - uint8 decompressed_32x32x24[32 * 32 * 3]; - uint8 decompressed_16x1x32[16 * 1 * 4]; - uint8 decompressed_32x32x32[32 * 32 * 4]; + BYTE decompressed_16x1x8[16 * 1 * 1]; + BYTE decompressed_32x32x8[32 * 32 * 1]; + BYTE decompressed_16x1x16[16 * 1 * 2]; + BYTE decompressed_32x32x16[32 * 32 * 2]; + BYTE decompressed_16x1x24[16 * 1 * 3]; + BYTE decompressed_32x32x24[32 * 32 * 3]; + BYTE decompressed_16x1x32[16 * 1 * 4]; + BYTE decompressed_32x32x32[32 * 32 * 4]; }; struct btest* t; int width; diff --git a/cunit/test_cliprdr.c b/cunit/test_cliprdr.c index bcf68a378..42b548aee 100644 --- a/cunit/test_cliprdr.c +++ b/cunit/test_cliprdr.c @@ -51,18 +51,18 @@ int add_cliprdr_suite(void) return 0; } -static const uint8 test_clip_caps_data[] = +static const BYTE test_clip_caps_data[] = { "\x07\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0C\x00" "\x02\x00\x00\x00\x0E\x00\x00\x00" }; -static const uint8 test_monitor_ready_data[] = +static const BYTE test_monitor_ready_data[] = { "\x01\x00\x00\x00\x00\x00\x00\x00" }; -static const uint8 test_format_list_data[] = +static const BYTE test_format_list_data[] = { "\x02\x00\x00\x00\x48\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" @@ -71,23 +71,23 @@ static const uint8 test_format_list_data[] = "\x6D\x00\x61\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }; -static const uint8 test_format_list_response_data[] = +static const BYTE test_format_list_response_data[] = { "\x03\x00\x01\x00\x00\x00\x00\x00" }; -static const uint8 test_data_request_data[] = +static const BYTE test_data_request_data[] = { "\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00" }; -static const uint8 test_data_response_data[] = +static const BYTE test_data_response_data[] = { "\x05\x00\x01\x00\x18\x00\x00\x00\x68\x00\x65\x00\x6C\x00\x6C\x00" "\x6F\x00\x20\x00\x77\x00\x6F\x00\x72\x00\x6c\x00\x64\x00\x00\x00" }; -static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size) +static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size) { printf("chan_id %d data_size %d\n", chan_id, data_size); freerdp_hexdump(data, data_size); @@ -199,7 +199,7 @@ void test_cliprdr(void) /* UI sends data response event to cliprdr */ event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_DATA_RESPONSE, event_process_callback, NULL); data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*)event; - data_response_event->data = (uint8*)malloc(6); + data_response_event->data = (BYTE*)malloc(6); strcpy((char*)data_response_event->data, "hello"); data_response_event->size = 6; event_processed = 0; diff --git a/cunit/test_color.c b/cunit/test_color.c index eb471e46c..8d7a11f53 100644 --- a/cunit/test_color.c +++ b/cunit/test_color.c @@ -83,7 +83,7 @@ void test_color_GetRGB_565(void) */ int r, g, b; - uint16 rgb16 = 0xAE7D; + UINT16 rgb16 = 0xAE7D; GetRGB_565(r, g, b, rgb16); CU_ASSERT(r == 0x15); @@ -103,7 +103,7 @@ void test_color_GetRGB16(void) */ int r, g, b; - uint16 rgb16 = 0xAE7D; + UINT16 rgb16 = 0xAE7D; GetRGB16(r, g, b, rgb16); CU_ASSERT(r == 0xAD); @@ -122,7 +122,7 @@ void test_color_GetBGR_565(void) */ int r, g, b; - uint16 bgr16 = 0xEE75; + UINT16 bgr16 = 0xEE75; GetBGR_565(r, g, b, bgr16); CU_ASSERT(r == 0x15); @@ -142,7 +142,7 @@ void test_color_GetBGR16(void) */ int r, g, b; - uint16 bgr16 = 0xEE75; + UINT16 bgr16 = 0xEE75; GetBGR16(r, g, b, bgr16); CU_ASSERT(r == 0xAD); diff --git a/cunit/test_drdynvc.c b/cunit/test_drdynvc.c index fd6d60052..3de60d864 100644 --- a/cunit/test_drdynvc.c +++ b/cunit/test_drdynvc.c @@ -50,14 +50,14 @@ int add_drdynvc_suite(void) return 0; } -static const uint8 test_capability_request_data[] = +static const BYTE test_capability_request_data[] = { "\x58\x00\x02\x00\x33\x33\x11\x11\x3D\x0A\xA7\x04" }; static int data_received = 0; -static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size) +static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size) { printf("chan_id %d data_size %d\n", chan_id, data_size); freerdp_hexdump(data, data_size); diff --git a/cunit/test_freerdp.c b/cunit/test_freerdp.c index 045f3ab37..46b8bedbe 100644 --- a/cunit/test_freerdp.c +++ b/cunit/test_freerdp.c @@ -63,11 +63,11 @@ void dump_data(unsigned char * p, int len, int width, char* name) printf("\n"); } -void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line) +void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line) { int i; int actual_length; - uint8* actual_data; + BYTE* actual_data; actual_data = s->data; actual_length = stream_get_length(s); diff --git a/cunit/test_freerdp.h b/cunit/test_freerdp.h index 113823ffc..7a537f443 100644 --- a/cunit/test_freerdp.h +++ b/cunit/test_freerdp.h @@ -38,6 +38,6 @@ } void dump_data(unsigned char * p, int len, int width, char* name); -void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line); +void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line); #define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__) diff --git a/cunit/test_gcc.c b/cunit/test_gcc.c index f25d45312..dcf307f3d 100644 --- a/cunit/test_gcc.c +++ b/cunit/test_gcc.c @@ -48,7 +48,7 @@ int add_gcc_suite(void) return 0; } -uint8 gcc_user_data[284] = +BYTE gcc_user_data[284] = "\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA" "\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00" "\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00" @@ -68,7 +68,7 @@ uint8 gcc_user_data[284] = "\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0" "\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0"; -uint8 gcc_conference_create_request_expected[307] = +BYTE gcc_conference_create_request_expected[307] = "\x00\x05\x00\x14\x7C\x00\x01\x81\x2A\x00\x08\x00\x10\x00\x01\xC0" "\x00\x44\x75\x63\x61\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x00" "\x05\x00\x04\x01\xCA\x03\xAA\x09\x04\x00\x00\xCE\x0E\x00\x00\x45" @@ -102,10 +102,10 @@ void test_gcc_write_conference_create_request(void) s = stream_new(sizeof(gcc_conference_create_request_expected)); gcc_write_conference_create_request(s, &user_data); - ASSERT_STREAM(s, (uint8*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected)); + ASSERT_STREAM(s, (BYTE*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected)); } -uint8 gcc_client_core_data_expected[216] = +BYTE gcc_client_core_data_expected[216] = "\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA" "\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00" "\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00" @@ -142,10 +142,10 @@ void test_gcc_write_client_core_data(void) gcc_write_client_core_data(s, settings); - ASSERT_STREAM(s, (uint8*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected)); + ASSERT_STREAM(s, (BYTE*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected)); } -uint8 gcc_client_security_data_expected[12] = +BYTE gcc_client_security_data_expected[12] = "\x02\xC0\x0C\x00\x1B\x00\x00\x00\x00\x00\x00\x00"; void test_gcc_write_client_security_data(void) @@ -165,10 +165,10 @@ void test_gcc_write_client_security_data(void) gcc_write_client_security_data(s, settings); - ASSERT_STREAM(s, (uint8*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected)); + ASSERT_STREAM(s, (BYTE*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected)); } -uint8 gcc_client_cluster_data_expected[12] = +BYTE gcc_client_cluster_data_expected[12] = "\x04\xC0\x0C\x00\x0D\x00\x00\x00\x00\x00\x00\x00"; void test_gcc_write_client_cluster_data(void) @@ -181,10 +181,10 @@ void test_gcc_write_client_cluster_data(void) gcc_write_client_cluster_data(s, settings); - ASSERT_STREAM(s, (uint8*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected)); + ASSERT_STREAM(s, (BYTE*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected)); } -uint8 gcc_client_network_data_expected[44] = +BYTE gcc_client_network_data_expected[44] = "\x03\xC0\x2C\x00\x03\x00\x00\x00\x72\x64\x70\x64\x72\x00\x00\x00" "\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0" "\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0"; @@ -211,5 +211,5 @@ void test_gcc_write_client_network_data(void) gcc_write_client_network_data(s, settings); - ASSERT_STREAM(s, (uint8*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected)); + ASSERT_STREAM(s, (BYTE*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected)); } diff --git a/cunit/test_gdi.c b/cunit/test_gdi.c index 2c0bdcad9..49937cb9d 100644 --- a/cunit/test_gdi.c +++ b/cunit/test_gdi.c @@ -1162,7 +1162,7 @@ unsigned char polygon_case_2[256] = int CompareBitmaps(HGDI_BITMAP hBmp1, HGDI_BITMAP hBmp2) { int x, y; - uint8 *p1, *p2; + BYTE *p1, *p2; int minw = (hBmp1->width < hBmp2->width) ? hBmp1->width : hBmp2->width; int minh = (hBmp1->height < hBmp2->height) ? hBmp1->height : hBmp2->height; @@ -1285,13 +1285,13 @@ void test_gdi_CreateBitmap(void) int bpp; int width; int height; - uint8* data; + BYTE* data; HGDI_BITMAP hBitmap; bpp = 32; width = 32; height = 16; - data = (uint8*) malloc(width * height * 4); + data = (BYTE*) malloc(width * height * 4); hBitmap = gdi_CreateBitmap(width, height, bpp, data); CU_ASSERT(hBitmap->objectType == GDIOBJECT_BITMAP); @@ -1481,7 +1481,7 @@ void test_gdi_LineTo(void) { HGDI_DC hdc; HGDI_PEN pen; - uint8* data; + BYTE* data; HGDI_BITMAP hBmp; HGDI_BITMAP hBmp_LineTo_1; HGDI_BITMAP hBmp_LineTo_2; @@ -1533,88 +1533,88 @@ void test_gdi_LineTo(void) clrconv->invert = 0; clrconv->palette = hPalette; - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); /* Test Case 1: (0,0) -> (15, 15) */ @@ -1823,7 +1823,7 @@ void test_gdi_Ellipse(void) { HGDI_DC hdc; HGDI_PEN pen; - uint8* data; + BYTE* data; HGDI_BITMAP hBmp; HGDI_BITMAP hBmp_Ellipse_1; HGDI_BITMAP hBmp_Ellipse_2; @@ -1851,13 +1851,13 @@ void test_gdi_Ellipse(void) clrconv->invert = 0; clrconv->palette = hPalette; - data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data); /* Test Case 1: (0,0) -> (16, 16) */ @@ -1964,7 +1964,7 @@ void test_gdi_FillRect(void) void test_gdi_BitBlt_32bpp(void) { - uint8* data; + BYTE* data; HGDI_DC hdcSrc; HGDI_DC hdcDst; HGDI_BRUSH hBrush; @@ -2009,64 +2009,64 @@ void test_gdi_BitBlt_32bpp(void) clrconv->invert = 0; clrconv->palette = hPalette; - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc); @@ -2218,7 +2218,7 @@ void test_gdi_BitBlt_32bpp(void) void test_gdi_BitBlt_16bpp(void) { - uint8* data; + BYTE* data; HGDI_DC hdcSrc; HGDI_DC hdcDst; HGDI_BRUSH hBrush; @@ -2263,64 +2263,64 @@ void test_gdi_BitBlt_16bpp(void) clrconv->invert = 0; clrconv->palette = hPalette; - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc); @@ -2472,7 +2472,7 @@ void test_gdi_BitBlt_16bpp(void) void test_gdi_BitBlt_8bpp(void) { - uint8* data; + BYTE* data; HGDI_DC hdcSrc; HGDI_DC hdcDst; HGDI_BRUSH hBrush; @@ -2517,64 +2517,64 @@ void test_gdi_BitBlt_8bpp(void) clrconv->invert = 0; clrconv->palette = hPalette; - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv); hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); - data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); + data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv); hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data); gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc); diff --git a/cunit/test_license.c b/cunit/test_license.c index bd18d5c97..f19b3259a 100644 --- a/cunit/test_license.c +++ b/cunit/test_license.c @@ -55,7 +55,7 @@ int add_license_suite(void) /* Server License Request (2200 bytes) */ -uint8 server_license_request[2200] = +BYTE server_license_request[2200] = "\x01\x03\x98\x08\x84\xef\xae\x20\xb1\xd5\x9e\x36\x49\x1a\xe8\x2e" "\x0a\x99\x89\xac\x49\xa6\x47\x4f\x33\x9b\x5a\xb9\x95\x03\xa6\xc6" "\xc2\x3c\x3f\x61\x00\x00\x06\x00\x2c\x00\x00\x00\x4d\x00\x69\x00" @@ -197,7 +197,7 @@ uint8 server_license_request[2200] = /* Client New License Request (341 bytes) */ -uint8 client_new_license_request[341] = +BYTE client_new_license_request[341] = "\x13\x83\x55\x01\x01\x00\x00\x00\x00\x00\x01\x04\xdc\x73\xa0\xc8" "\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf\x8b\xbc\x0d\xcc" "\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8\x02\x00\x08\x01" @@ -223,21 +223,21 @@ uint8 client_new_license_request[341] = /* Server Platform Challenge (38 bytes) */ -uint8 server_platform_challenge[38] = +BYTE server_platform_challenge[38] = "\x02\x03\x26\x00\xff\xff\xff\xff\x50\xf7\x0a\x00\x46\x37\x85\x54" "\x8e\xc5\x91\x34\x97\x5d\x78\x94\xad\x3b\x81\xda\x88\x18\x56\x0f" "\x3a\xd1\xf1\x03\xef\x35"; /* Client Platform Challenge Response (66 bytes) */ -uint8 client_platform_challenge_response[66] = +BYTE client_platform_challenge_response[66] = "\x15\x83\x42\x00\x01\x00\x12\x00\xfa\xb4\xe8\x24\xcf\x56\xb2\x4e" "\x80\x02\xbd\xb6\x61\xfc\xdf\xe9\x6c\x44\x01\x00\x14\x00\xf8\xb5" "\xe8\x25\x3d\x0f\x3f\x70\x1d\xda\x60\x19\x16\xfe\x73\x1a\x45\x7e" "\x02\x71\x38\x23\x62\x5d\x10\x8b\x93\xc3\xf1\xe4\x67\x1f\x4a\xb6" "\x00\x0a"; -uint8 license_server_modulus[256] = +BYTE license_server_modulus[256] = "\x88\xad\x7c\x8f\x8b\x82\x76\x5a\xbd\x8f\x6f\x62\x18\xe1\xd9\xaa" "\x41\xfd\xed\x68\x01\xc6\x34\x35\xb0\x29\x04\xca\x4a\x4a\x1c\x7e" "\x80\x14\xf7\x8e\x77\xb8\x25\xff\x16\x47\x6f\xbd\xe2\x34\x3d\x2e" @@ -255,9 +255,9 @@ uint8 license_server_modulus[256] = "\x6a\x9d\x7d\xde\xae\xf9\xe6\xaf\x57\xae\xb9\x01\x96\x5d\xe0\x4d" "\xcd\xed\xc8\xd7\xf3\x01\x03\x38\x10\xbe\x7c\x42\x67\x01\xa7\x23"; -uint8 license_server_exponent[4] = "\x00\x01\x00\x01"; +BYTE license_server_exponent[4] = "\x00\x01\x00\x01"; -uint8 terminal_server_modulus[256] = +BYTE terminal_server_modulus[256] = "\xc8\x90\x6b\xf0\xc6\x58\x81\xa6\x89\x1c\x0e\xf2\xf6\xd9\x82\x12" "\x71\xa5\x6e\x51\xdb\xe0\x32\x66\xaa\x91\x77\x0e\x88\xab\x44\xb7" "\xd3\x97\xda\x78\x8f\x0e\x44\x26\x46\x7f\x16\xd4\xc6\x63\xeb\xca" @@ -275,22 +275,22 @@ uint8 terminal_server_modulus[256] = "\x88\x1f\xb4\x35\x0f\x7c\xc0\x75\x17\xc6\x67\xdd\x48\x80\xcb\x0a" "\xbe\x9d\xf6\x93\x60\x65\x34\xeb\x97\xaf\x65\x6d\xdf\xbf\x6f\x5b"; -uint8 terminal_server_exponent[4] = "\x00\x01\x00\x01"; +BYTE terminal_server_exponent[4] = "\x00\x01\x00\x01"; -uint8 client_random[32] = +BYTE client_random[32] = "\xdc\x73\xa0\xc8\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf" "\x8b\xbc\x0d\xcc\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8"; -uint8 server_random[32] = +BYTE server_random[32] = "\x84\xef\xae\x20\xb1\xd5\x9e\x36\x49\x1a\xe8\x2e\x0a\x99\x89\xac" "\x49\xa6\x47\x4f\x33\x9b\x5a\xb9\x95\x03\xa6\xc6\xc2\x3c\x3f\x61"; -uint8 premaster_secret[48] = +BYTE premaster_secret[48] = "\xcf\x7a\xdb\xcb\xfb\x0e\x15\x23\x87\x1c\x84\x81\xba\x9d\x4e\x15" "\xbb\xd2\x56\xbd\xd8\xf7\xf3\x16\xcc\x35\x3b\xe1\x93\x42\x78\xdd" "\x92\x9a\xe4\x7a\xe2\x99\xd4\x73\xb1\xaa\x6f\x55\x94\x3b\xc9\xbc"; -uint8 encrypted_premaster_secret[264] = +BYTE encrypted_premaster_secret[264] = "\xda\x9c\x5d\xa6\x68\x9d\xa3\x90\x67\x24\xf3\x3a\xea\xa1\xe2\x68" "\xad\x12\xf5\xf6\x0b\x7a\xac\x92\xb1\x69\x6f\x42\x55\x8a\xa0\xe2" "\x9b\x2c\xd0\xc7\xee\x33\x6c\x47\x79\xc3\x1e\xbf\x03\x8b\x95\x70" @@ -309,7 +309,7 @@ uint8 encrypted_premaster_secret[264] = "\x09\x83\x0b\xbc\x3d\x3e\x05\x47\x65\x96\x31\x8c\x6b\xc5\xe6\xa0" "\x00\x00\x00\x00\x00\x00\x00\x00"; -uint8 platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00"; +BYTE platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00"; void test_license(void) { @@ -374,44 +374,44 @@ void test_license(void) license_read_platform_challenge_packet(license, s); } -uint8 test_client_random[32] = +BYTE test_client_random[32] = "\xdc\x73\xa0\xc8\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf" "\x8b\xbc\x0d\xcc\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8"; -uint8 test_server_random[32] = +BYTE test_server_random[32] = "\x16\x7e\xf8\x71\x48\x16\x1a\x4f\xa5\x2c\xcd\x73\x63\x60\xa6\xc3" "\xb9\x19\x1b\x4b\x6b\xb2\x0a\xb8\xec\xf1\x8d\x95\x4e\xa8\x21\xc5"; -uint8 test_premaster_secret[48] = +BYTE test_premaster_secret[48] = "\xcf\x7a\xdb\xcb\xfb\x0e\x15\x23\x87\x1c\x84\x81\xba\x9d\x4e\x15" "\xbb\xd2\x56\xbd\xd8\xf7\xf3\x16\xcc\x35\x3b\xe1\x93\x42\x78\xdd" "\x92\x9a\xe4\x7a\xe2\x99\xd4\x73\xb1\xaa\x6f\x55\x94\x3b\xc9\xbc"; -uint8 test_modulus[64] = +BYTE test_modulus[64] = "\x23\xc9\xec\x0e\x9f\x1e\x0e\x1a\x78\xaf\xa5\x14\xd4\xf5\x45\xe4" "\x04\x6e\xf4\x01\xe9\xdf\x45\xd1\xc2\xae\xf4\x7f\xd3\xb9\xcb\xf3" "\x1a\x23\xa1\x0d\x4b\xd4\xd1\x4a\xd2\xd1\xc9\x7c\xab\x24\x8b\xb1" "\x5a\x93\xca\x34\x44\x17\xb5\xe4\xfe\xf7\x9a\xaa\x72\x0d\x41\x95"; -uint8 test_exponent[4] = "\x01\x00\x01\x00"; +BYTE test_exponent[4] = "\x01\x00\x01\x00"; -uint8 test_master_secret[48] = +BYTE test_master_secret[48] = "\xbe\x51\xee\x63\x23\x90\xd0\xf4\x3a\xce\x3a\x37\x65\xc3\xdd\xcf" "\xed\xf0\xc8\x19\xed\x77\x33\x4e\xfd\x2b\x7d\x5a\xe2\xca\xf3\x0a" "\xf1\x16\xe5\x0c\x78\x59\x7e\xd4\x4b\x57\xce\x17\x60\x3a\x5a\xb3"; -uint8 test_session_key_blob[48] = +BYTE test_session_key_blob[48] = "\x07\x4f\xa0\x2e\xee\xc4\x5a\x46\x21\x8c\xae\x01\x45\x02\x26\xe4" "\x54\x6b\x59\x10\xcc\x5b\xd1\x96\xd0\x5c\xeb\xc2\x96\x9b\x44\x7b" "\x1c\xd9\x66\xb1\x9e\x24\xaa\x60\x4f\x89\xd1\x4e\xf8\xb9\x55\x3b"; -uint8 test_mac_salt_key[16] = +BYTE test_mac_salt_key[16] = "\x07\x4f\xa0\x2e\xee\xc4\x5a\x46\x21\x8c\xae\x01\x45\x02\x26\xe4"; -uint8 test_licensing_encryption_key[16] = +BYTE test_licensing_encryption_key[16] = "\xf3\xb1\xe0\x3b\xfe\xb4\xf2\xc5\x28\xa9\x48\xcd\x90\xf1\x93\xe5"; -uint8 test_encrypted_premaster_secret[64] = +BYTE test_encrypted_premaster_secret[64] = "\x6b\xbc\x77\x9f\x20\x0c\x98\x39\xc1\x85\x77\xc8\x19\x87\xd8\x82" "\x93\xbd\x21\x69\x5f\x87\xe0\xd6\x4e\xad\x5e\x23\x13\x80\x8c\x63" "\x3e\xd6\x6e\x60\xc9\x40\xe9\x86\x08\x8c\xd5\xaa\xa9\x54\xfe\x27" @@ -468,10 +468,10 @@ void test_license_encrypt_premaster_secret(void) ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret)); } -uint8 test_encrypted_platform_challenge[10] = +BYTE test_encrypted_platform_challenge[10] = "\x84\x0a\x42\x50\xad\x5e\xc1\x29\x30\xbd"; -uint8 test_platform_challenge[10] = +BYTE test_platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00"; void test_license_decrypt_platform_challenge(void) @@ -483,7 +483,7 @@ void test_license_decrypt_platform_challenge(void) sizeof(test_licensing_encryption_key)); license->encrypted_platform_challenge->data = - (uint8*) malloc(sizeof(test_encrypted_platform_challenge)); + (BYTE*) malloc(sizeof(test_encrypted_platform_challenge)); license->encrypted_platform_challenge->length = sizeof(test_encrypted_platform_challenge); diff --git a/cunit/test_mcs.c b/cunit/test_mcs.c index e549f7ab9..6f1fd6e0d 100644 --- a/cunit/test_mcs.c +++ b/cunit/test_mcs.c @@ -44,7 +44,7 @@ int add_mcs_suite(void) return 0; } -uint8 gcc_CCrq[307] = +BYTE gcc_CCrq[307] = "\x00\x05\x00\x14\x7C\x00\x01\x81\x2A\x00\x08\x00\x10\x00\x01\xC0" "\x00\x44\x75\x63\x61\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x00" "\x05\x00\x04\x01\xCA\x03\xAA\x09\x04\x00\x00\xCE\x0E\x00\x00\x45" @@ -66,7 +66,7 @@ uint8 gcc_CCrq[307] = "\x64\x72\x00\x00\x00\xA0\xC0\x72\x64\x70\x73\x6e\x64\x00\x00\x00" "\x00\x00\xc0"; -uint8 mcs_connect_initial_expected[409] = +BYTE mcs_connect_initial_expected[409] = "\x7F\x65\x82\x01\x94\x04\x01\x01\x04\x01\x01\x01\x01\xFF\x30\x19" "\x02\x01\x22\x02\x01\x02\x02\x01\x00\x02\x01\x01\x02\x01\x00\x02" "\x01\x01\x02\x02\xFF\xFF\x02\x01\x02\x30\x19\x02\x01\x01\x02\x01" @@ -109,7 +109,7 @@ void test_mcs_write_connect_initial(void) s = stream_new(512); mcs_write_connect_initial(s, mcs, user_data); - ASSERT_STREAM(s, (uint8*) mcs_connect_initial_expected, sizeof(mcs_connect_initial_expected)); + ASSERT_STREAM(s, (BYTE*) mcs_connect_initial_expected, sizeof(mcs_connect_initial_expected)); stream_free(s); } diff --git a/cunit/test_mppc.c b/cunit/test_mppc.c index e53b87e4c..5912f951a 100644 --- a/cunit/test_mppc.c +++ b/cunit/test_mppc.c @@ -24,7 +24,7 @@ #include "rdp.h" #include "test_mppc.h" -uint8_t compressed_rd5[] = +BYTE_t compressed_rd5[] = { 0x24, 0x02, 0x03, 0x09, 0x00, 0x20, 0x0c, 0x05, 0x10, 0x01, 0x40, 0x0a, 0xbf, 0xdf, 0xc3, 0x20, 0x80, 0x00, 0x1f, 0x0a, 0x00, 0x00, 0x07, 0x43, 0x4e, 0x00, 0x68, 0x02, 0x00, 0x22, 0x00, 0x34, @@ -206,7 +206,7 @@ uint8_t compressed_rd5[] = 0x7f, 0x52, 0x00 }; -uint8_t decompressed_rd5[] = +BYTE_t decompressed_rd5[] = { 0x24, 0x02, 0x03, 0x09, 0x00, 0x20, 0x0c, 0x05, 0x10, 0x01, 0x40, 0x0a, 0xff, 0xff, 0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x0d, 0x38, 0x01, 0xc0, 0x10, 0x01, 0x10, diff --git a/cunit/test_mppc_enc.c b/cunit/test_mppc_enc.c index d1f21c474..bdafee7a1 100644 --- a/cunit/test_mppc_enc.c +++ b/cunit/test_mppc_enc.c @@ -525,12 +525,12 @@ void test_mppc_enc(void) block_num++; total += bytes_read; DLOG(("block_num=%d\n", block_num)); - CU_ASSERT(compress_rdp(enc, (uint8*) buf, bytes_read) != FALSE); + CU_ASSERT(compress_rdp(enc, (BYTE*) buf, bytes_read) != FALSE); if (enc->flags & PACKET_COMPRESSED) { DLOG(("%d bytes compressed to %d\n", bytes_read, enc->bytes_in_opb)); clen += enc->bytes_in_opb; - CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer, + CU_ASSERT(decompress_rdp_5(rmppc, (BYTE *) enc->outputBuffer, enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE); CU_ASSERT(bytes_read == rlen); CU_ASSERT(memcmp(buf, &rmppc->history_buf[roff], rlen) == 0); @@ -561,10 +561,10 @@ void test_mppc_enc(void) /* save starting time */ gettimeofday(&start_time, NULL); - CU_ASSERT(compress_rdp(enc, (uint8*) decompressed_rd5_data, data_len) != FALSE); + CU_ASSERT(compress_rdp(enc, (BYTE*) decompressed_rd5_data, data_len) != FALSE); if (enc->flags & PACKET_COMPRESSED) { - CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer, + CU_ASSERT(decompress_rdp_5(rmppc, (BYTE *) enc->outputBuffer, enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE); CU_ASSERT(data_len == rlen); CU_ASSERT(memcmp(decompressed_rd5_data, &rmppc->history_buf[roff], rlen) == 0); diff --git a/cunit/test_nsc.c b/cunit/test_nsc.c index ae7f4a5ae..915d7b692 100644 --- a/cunit/test_nsc.c +++ b/cunit/test_nsc.c @@ -34,7 +34,7 @@ #include "test_nsc.h" -static const uint8 nsc_data[] = +static const BYTE nsc_data[] = { 0x71, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x63, 0x63, 0x01, 0x64, 0x64, 0x00, 0x63, 0x63, 0x02, 0x64, 0x64, 0x00, @@ -48,7 +48,7 @@ static const uint8 nsc_data[] = 0x37, 0x37, 0x06, 0x37, 0x37, 0x37, 0x37, 0xff, 0xff, 0x90, 0xff, 0xff, 0xff, 0xff }; -static const uint8 nsc_stress_data[] = +static const BYTE nsc_stress_data[] = { 0xec, 0x04, 0x00, 0x00, 0xfb, 0x04, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00 , 0x03, 0x00, 0x00, 0x00, 0x94, 0x94, 0x0f, 0xa2, 0xb2, 0x8e, 0x61, 0x62, 0x82, 0x9b, 0xa8, 0xb0 @@ -273,7 +273,7 @@ static const uint8 nsc_stress_data[] = , 0x00, 0x00, 0xff, 0xf7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static const uint8 rgb_scanline_data[] = +static const BYTE rgb_scanline_data[] = { 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, @@ -337,11 +337,11 @@ void test_nsc_decode(void) context = nsc_context_new(); nsc_context_set_cpu_opt(context, CPU_SSE2); - nsc_process_message(context, 32, 15, 10, (uint8*) nsc_data, sizeof(nsc_data)); + nsc_process_message(context, 32, 15, 10, (BYTE*) nsc_data, sizeof(nsc_data)); /*freerdp_hexdump(context->bmpdata, 15 * 10 * 4);*/ for (i = 0; i < 30000; i++) { - nsc_process_message(context, 32, 54, 44, (uint8*) nsc_stress_data, sizeof(nsc_stress_data)); + nsc_process_message(context, 32, 54, 44, (BYTE*) nsc_stress_data, sizeof(nsc_stress_data)); } nsc_context_free(context); } @@ -349,11 +349,11 @@ void test_nsc_decode(void) void test_nsc_encode(void) { int i; - uint8* rgb_data; + BYTE* rgb_data; STREAM* enc_stream; NSC_CONTEXT* context; - rgb_data = (uint8 *) malloc(64 * 64 * 3); + rgb_data = (BYTE *) malloc(64 * 64 * 3); for (i = 0; i < 64; i++) memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3); diff --git a/cunit/test_ntlm.c b/cunit/test_ntlm.c index 505b1805e..7f70bfc3b 100644 --- a/cunit/test_ntlm.c +++ b/cunit/test_ntlm.c @@ -75,7 +75,7 @@ void test_ntlm_compute_ntlm_hash(void) context = ntlm_ContextNew(); ntlm_set_password(context, password); - ntlm_compute_ntlm_hash((uint16*) &password, ntlm_hash); + ntlm_compute_ntlm_hash((UINT16*) &password, ntlm_hash); ntlm_hash_good = 1; @@ -272,8 +272,8 @@ void test_ntlm_generate_client_signing_key(void) int i; NTLM_CONTEXT* ntlm; int client_signing_key_good; - uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; - uint8 expected_client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89"; + BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; + BYTE expected_client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89"; ntlm = ntlm_client_new(); memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key)); @@ -296,8 +296,8 @@ void test_ntlm_generate_server_signing_key(void) int i; NTLM_CONTEXT* ntlm; int server_signing_key_good; - uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; - uint8 expected_server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11"; + BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; + BYTE expected_server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11"; ntlm = ntlm_client_new(); memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key)); @@ -320,8 +320,8 @@ void test_ntlm_generate_client_sealing_key(void) int i; NTLM_CONTEXT* ntlm; int client_sealing_key_good; - uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; - uint8 expected_client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73"; + BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; + BYTE expected_client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73"; ntlm = ntlm_client_new(); memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key)); @@ -344,8 +344,8 @@ void test_ntlm_generate_server_sealing_key(void) int i; NTLM_CONTEXT* ntlm; int server_sealing_key_good; - uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; - uint8 expected_server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90"; + BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; + BYTE expected_server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90"; ntlm = ntlm_client_new(); memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key)); @@ -368,9 +368,9 @@ void test_ntlm_encrypt_random_session_key(void) int i; NTLM_CONTEXT* ntlm; int encrypted_random_session_key_good; - uint8 key_exchange_key[16] = "\x6e\xf1\x6b\x79\x88\xf2\x3d\x7e\x54\x2a\x1a\x38\x4e\xa0\x6b\x52"; - uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; - uint8 expected_encrypted_random_session_key[16] = "\xb1\xd2\x45\x42\x0f\x37\x9a\x0e\xe0\xce\x77\x40\x10\x8a\xda\xba"; + BYTE key_exchange_key[16] = "\x6e\xf1\x6b\x79\x88\xf2\x3d\x7e\x54\x2a\x1a\x38\x4e\xa0\x6b\x52"; + BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1"; + BYTE expected_encrypted_random_session_key[16] = "\xb1\xd2\x45\x42\x0f\x37\x9a\x0e\xe0\xce\x77\x40\x10\x8a\xda\xba"; ntlm = ntlm_client_new(); memcpy(ntlm->key_exchange_key, key_exchange_key, 16); @@ -395,15 +395,15 @@ void test_ntlm_compute_message_integrity_check(void) int i; NTLM_CONTEXT* ntlm; int message_integrity_check_good; - uint8 exported_session_key[16] = "\xfd\x35\x59\x39\x23\x81\x29\xcd\xb8\x1c\x11\x04\xd7\x54\x4f\xd4"; - uint8 expected_message_integrity_check[16] = "\x81\x37\x56\xcf\x19\x76\x71\xf2\xc0\x3f\x95\x87\xe3\x30\xe6\x9b"; + BYTE exported_session_key[16] = "\xfd\x35\x59\x39\x23\x81\x29\xcd\xb8\x1c\x11\x04\xd7\x54\x4f\xd4"; + BYTE expected_message_integrity_check[16] = "\x81\x37\x56\xcf\x19\x76\x71\xf2\xc0\x3f\x95\x87\xe3\x30\xe6\x9b"; - uint8 negotiate_message_data[40] = + BYTE negotiate_message_data[40] = "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x01\x00\x00\x00\xb7\x82\x08\xe2" "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "\x06\x01\xb0\x1d\x00\x00\x00\x0f"; - uint8 challenge_message_data[278] = + BYTE challenge_message_data[278] = "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x02\x00\x00\x00\x16\x00\x16\x00" "\x38\x00\x00\x00\x35\x82\x89\xe2\xed\x75\x9b\x8d\x1c\x2e\x3e\xc8" "\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x00\xc8\x00\x4e\x00\x00\x00" @@ -423,7 +423,7 @@ void test_ntlm_compute_message_integrity_check(void) "\x2e\x00\x63\x00\x78\x00\x07\x00\x08\x00\xd1\x12\x78\x10\xde\xd2" "\xcb\x01\x00\x00\x00\x00"; - uint8 authenticate_message_data[504] = + BYTE authenticate_message_data[504] = "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x03\x00\x00\x00\x18\x00\x18\x00" "\x98\x00\x00\x00\x38\x01\x38\x01\xb0\x00\x00\x00\x16\x00\x16\x00" "\x58\x00\x00\x00\x1a\x00\x1a\x00\x6e\x00\x00\x00\x10\x00\x10\x00" @@ -485,22 +485,22 @@ void test_ntlm_compute_message_integrity_check(void) void test_ntlm_encrypt_message(void) { int i; - uint8* p; + BYTE* p; NTLM_CONTEXT* ntlm; rdpBlob public_key; rdpBlob ts_credentials; rdpBlob encrypted_public_key; rdpBlob encrypted_ts_credentials; - uint8 public_key_signature[16]; - uint8 ts_credentials_signature[16]; + BYTE public_key_signature[16]; + BYTE ts_credentials_signature[16]; int encrypted_public_key_good; int public_key_signature_good; int encrypted_ts_credentials_good; int ts_credentials_signature_good; - uint8 client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89"; - uint8 client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73"; + BYTE client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89"; + BYTE client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73"; - uint8 public_key_data[270] = + BYTE public_key_data[270] = "\x30\x82\x01\x0a\x02\x82\x01\x01\x00\xc2\x1c\x54\xaf\x07\xf1\x16" "\x97\xc3\x0f\x6b\xa6\x33\x2e\xdd\x1e\xe4\xb2\x9c\xe4\x12\x7f\xda" "\x58\x21\xc0\x68\xe6\xd3\xf5\x20\x1c\xba\x06\x64\x7d\x7f\x44\xb5" @@ -519,7 +519,7 @@ void test_ntlm_encrypt_message(void) "\x1b\xbc\x0b\x47\x66\x16\x3a\x7b\x6d\x8e\xcf\x55\xe8\x8c\x8a\xfe" "\x24\xce\x19\x99\xc3\x5a\xe5\xc2\xf3\x02\x03\x01\x00\x01"; - uint8 expected_encrypted_public_key[270] = + BYTE expected_encrypted_public_key[270] = "\x27\x29\x73\xa9\xfa\x46\x17\x3c\x74\x14\x45\x2a\xd1\xe2\x92\xa1" "\xc6\x0a\x30\xd4\xcc\xe0\x92\xf6\xb3\x20\xb3\xa0\xf1\x38\xb1\xf4" "\xe5\x96\xdf\xa1\x65\x5b\xd6\x0c\x2a\x86\x99\xcc\x72\x80\xbd\xe9" @@ -538,24 +538,24 @@ void test_ntlm_encrypt_message(void) "\xfb\xc9\xfc\x89\xaa\x5d\x25\x49\xc8\x6e\x86\xee\xc2\xce\xc4\x8e" "\x85\x9f\xe8\x30\xb3\x86\x11\xd5\xb8\x34\x4a\xe0\x03\xe5"; - uint8 expected_public_key_signature[16] = + BYTE expected_public_key_signature[16] = "\x01\x00\x00\x00\x91\x5e\xb0\x6e\x72\x82\x53\xae\x00\x00\x00\x00"; - uint8 ts_credentials_data[65] = + BYTE ts_credentials_data[65] = "\x30\x3f\xa0\x03\x02\x01\x01\xa1\x38\x04\x36\x30\x34\xa0\x0a\x04" "\x08\x77\x00\x69\x00\x6e\x00\x37\x00\xa1\x12\x04\x10\x75\x00\x73" "\x00\x65\x00\x72\x00\x6e\x00\x61\x00\x6d\x00\x65\x00\xa2\x12\x04" "\x10\x70\x00\x61\x00\x73\x00\x73\x00\x77\x00\x6f\x00\x72\x00\x64" "\x00"; - uint8 expected_encrypted_ts_credentials[65] = + BYTE expected_encrypted_ts_credentials[65] = "\xa8\x85\x7d\x11\xef\x92\xa0\xd6\xff\xee\xa1\xae\x6d\xc5\x2e\x4e" "\x65\x50\x28\x93\x75\x30\xe1\xc3\x37\xeb\xac\x1f\xdd\xf3\xe0\x92" "\xf6\x21\xbc\x8f\xa8\xd4\xe0\x5a\xa6\xff\xda\x09\x50\x24\x0d\x8f" "\x8f\xf4\x92\xfe\x49\x2a\x13\x52\xa6\x52\x75\x50\x8d\x3e\xe9\x6b" "\x57"; - uint8 expected_ts_credentials_signature[16] = + BYTE expected_ts_credentials_signature[16] = "\x01\x00\x00\x00\xb3\x2c\x3b\xa1\x36\xf6\x55\x71\x01\x00\x00\x00"; public_key.data = public_key_data; @@ -568,7 +568,7 @@ void test_ntlm_encrypt_message(void) ntlm_encrypt_message(ntlm, &public_key, &encrypted_public_key, public_key_signature); - p = (uint8*) encrypted_public_key.data; + p = (BYTE*) encrypted_public_key.data; encrypted_public_key_good = 1; for (i = 0; i < encrypted_public_key.length; i++) @@ -594,7 +594,7 @@ void test_ntlm_encrypt_message(void) ntlm_encrypt_message(ntlm, &ts_credentials, &encrypted_ts_credentials, ts_credentials_signature); - p = (uint8*) encrypted_ts_credentials.data; + p = (BYTE*) encrypted_ts_credentials.data; encrypted_ts_credentials_good = 1; for (i = 0; i < encrypted_ts_credentials.length; i++) @@ -619,15 +619,15 @@ void test_ntlm_encrypt_message(void) void test_ntlm_decrypt_message(void) { int i; - uint8* p; + BYTE* p; NTLM_CONTEXT* ntlm; rdpBlob public_key; rdpBlob encrypted_public_key; int public_key_good; - uint8 server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11"; - uint8 server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90"; + BYTE server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11"; + BYTE server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90"; - uint8 encrypted_public_key_data[270] = + BYTE encrypted_public_key_data[270] = "\xc7\x51\xf4\x71\xd3\x9f\xb6\x50\xbe\xa8\xf6\x20\x77\xa1\xfc\xdd" "\x8e\x02\xf0\xa4\x6b\xba\x3f\x9d\x65\x9d\xab\x4a\x95\xc9\xb4\x38" "\x03\x87\x04\xb1\xfe\x42\xec\xfa\xfc\xaa\x85\xf1\x31\x2d\x26\xcf" @@ -646,7 +646,7 @@ void test_ntlm_decrypt_message(void) "\xcd\x43\x3a\xce\x40\x74\xe1\x34\x81\xe3\x94\x47\x6f\x49\x01\xf8" "\xb5\xfc\xd0\x75\x80\xc6\x35\xac\xc0\xfd\x1b\xb5\xa2\xd3"; - uint8 expected_public_key[270] = + BYTE expected_public_key[270] = "\x31\x82\x01\x0a\x02\x82\x01\x01\x00\xc2\x1c\x54\xaf\x07\xf1\x16" "\x97\xc3\x0f\x6b\xa6\x33\x2e\xdd\x1e\xe4\xb2\x9c\xe4\x12\x7f\xda" "\x58\x21\xc0\x68\xe6\xd3\xf5\x20\x1c\xba\x06\x64\x7d\x7f\x44\xb5" @@ -665,7 +665,7 @@ void test_ntlm_decrypt_message(void) "\x1b\xbc\x0b\x47\x66\x16\x3a\x7b\x6d\x8e\xcf\x55\xe8\x8c\x8a\xfe" "\x24\xce\x19\x99\xc3\x5a\xe5\xc2\xf3\x02\x03\x01\x00\x01"; - uint8 public_key_signature[16] = + BYTE public_key_signature[16] = "\x01\x00\x00\x00\xc9\x88\xfc\xf1\x11\x68\x2c\x72\x00\x00\x00\x00"; encrypted_public_key.data = encrypted_public_key_data; @@ -678,7 +678,7 @@ void test_ntlm_decrypt_message(void) ntlm_decrypt_message(ntlm, &encrypted_public_key, &public_key, public_key_signature); - p = (uint8*) public_key.data; + p = (BYTE*) public_key.data; public_key_good = 1; for (i = 0; i < public_key.length; i++) diff --git a/cunit/test_orders.c b/cunit/test_orders.c index 0739a2eb8..63ee2cec5 100644 --- a/cunit/test_orders.c +++ b/cunit/test_orders.c @@ -69,7 +69,7 @@ int add_orders_suite(void) return 0; } -uint8 dstblt_order[] = "\x48\x00\x37\x01"; +BYTE dstblt_order[] = "\x48\x00\x37\x01"; void test_read_dstblt_order(void) { @@ -94,7 +94,7 @@ void test_read_dstblt_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(dstblt_order) - 1)); } -uint8 patblt_order[] = "\x1a\x00\xc3\x01\x0d\x00\x0d\x00\xf0\xff\xff\x00\x5b\xef\x00\x81"; +BYTE patblt_order[] = "\x1a\x00\xc3\x01\x0d\x00\x0d\x00\xf0\xff\xff\x00\x5b\xef\x00\x81"; void test_read_patblt_order(void) { @@ -124,7 +124,7 @@ void test_read_patblt_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(patblt_order) - 1)); } -uint8 scrblt_order[] = "\x07\x00\xa1\x01\xf1\x00\xcc\x2f\x01\x8e\x00"; +BYTE scrblt_order[] = "\x07\x00\xa1\x01\xf1\x00\xcc\x2f\x01\x8e\x00"; void test_read_scrblt_order(void) { @@ -151,7 +151,7 @@ void test_read_scrblt_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(scrblt_order) - 1)); } -uint8 opaque_rect_order[] = "\x00\x04\x00\x03\x73\x02\x06"; +BYTE opaque_rect_order[] = "\x00\x04\x00\x03\x73\x02\x06"; void test_read_opaque_rect_order(void) { @@ -176,7 +176,7 @@ void test_read_opaque_rect_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(opaque_rect_order) - 1)); } -uint8 draw_nine_grid_order[] = "\xfb\xf9\x0d\x00"; +BYTE draw_nine_grid_order[] = "\xfb\xf9\x0d\x00"; void test_read_draw_nine_grid_order(void) { @@ -206,7 +206,7 @@ void test_read_draw_nine_grid_order(void) } -uint8 multi_opaque_rect_order[] = +BYTE multi_opaque_rect_order[] = "\x87\x01\x1c\x01\xf1\x00\x12\x00\x5c\xef\x04\x16\x00\x08\x40\x81" "\x87\x81\x1c\x80\xf1\x01\x01\x01\x10\x80\xf0\x01\x10\xff\x10\x10" "\x80\xf1\x01"; @@ -256,7 +256,7 @@ void test_read_multi_opaque_rect_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(multi_opaque_rect_order) - 1)); } -uint8 line_to_order[] = "\x03\xb1\x0e\xa6\x5b\xef\x00"; +BYTE line_to_order[] = "\x03\xb1\x0e\xa6\x5b\xef\x00"; void test_read_line_to_order(void) { @@ -291,7 +291,7 @@ void test_read_line_to_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(line_to_order) - 1)); } -uint8 polyline_order[] = +BYTE polyline_order[] = "\xf8\x01\xb8\x02\x00\xc0\x00\x20\x6c\x00\x00\x00\x00\x00\x04\x00" "\x00\xff\x7e\x76\xff\x41\x6c\xff\x24\x62\xff\x2b\x59\xff\x55\x51" "\xff\x9c\x49\x73\x43\x80\x4d\xff\xbe\x80\x99\xff\xba\x80\xcd\xff" @@ -360,12 +360,12 @@ void test_read_polyline_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(polyline_order) - 1)); } -uint8 glyph_index_order_1[] = +BYTE glyph_index_order_1[] = "\x6a\x02\x27\x38\x00\x39\x07\x3a\x06\x3b\x07\x3c\x06\x3d\x06\x18" "\x04\x1f\x06\x17\x02\x14\x04\x1b\x06\x19\x06\x45\x05\x18\x06\x1f" "\x06\x1f\x02\x14\x02\x46\x06\xff\x15\x24"; -uint8 glyph_index_order_2[] = +BYTE glyph_index_order_2[] = "\x00\xff\xff\xff\x0c\x02\x6e\x01\x4d\x02\x7b\x01\x09\x02\x6e\x01" "\xf6\x02\x7b\x01\x0c\x02\x79\x01\x03\xfe\x04\x00"; @@ -415,7 +415,7 @@ void test_read_glyph_index_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(glyph_index_order_2) - 1)); } -uint8 fast_index_order[] = +BYTE fast_index_order[] = "\x07\x00\x03\xff\xff\x00\x74\x3b\x00\x0e\x00\x71\x00\x42\x00\x7e" "\x00\x00\x80\x7c\x00\x15\x00\x00\x01\x06\x02\x04\x03\x08\x05\x09" "\x06\x06\x06\x06\x07\x06\x08\x02\xff\x00\x12"; @@ -453,7 +453,7 @@ void test_read_fast_index_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(fast_index_order) - 1)); } -uint8 fast_glyph_order[] = +BYTE fast_glyph_order[] = "\x06\x00\x03\xff\xff\x00\x8b\x00\xb1\x00\x93\x00\xbe\x00\x0d\x00" "\xfe\x7f\x00\x80\x00\x80\xbb\x00\x13\x00\x01\x4a\x06\x0a\x80\x80" "\x80\xb8\xc4\x84\x84\x84\x84\x84\x00\x00\x68\x00"; @@ -489,7 +489,7 @@ void test_read_fast_glyph_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(fast_glyph_order) - 1)); } -uint8 polygon_cb_order[] = +BYTE polygon_cb_order[] = "\xea\x00\x46\x01\x0d\x01\x08\x00\x00\x04\x03\x81\x08\x03\x05\x88" "\x09\x26\x09\x77"; @@ -523,12 +523,12 @@ void test_read_polygon_cb_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(polygon_cb_order) - 1)); } -uint8 cache_bitmap_order[] = "\x00\x00\x10\x01\x08\x01\x00\x00\x00\x10"; +BYTE cache_bitmap_order[] = "\x00\x00\x10\x01\x08\x01\x00\x00\x00\x10"; void test_read_cache_bitmap_order(void) { STREAM _s, *s; - uint16 extraFlags; + UINT16 extraFlags; CACHE_BITMAP_ORDER cache_bitmap; s = &_s; @@ -549,7 +549,7 @@ void test_read_cache_bitmap_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_order) - 1)); } -uint8 cache_bitmap_v2_order[] = +BYTE cache_bitmap_v2_order[] = "\x20\x40\xdc\xff\xff\x85\xff\xff\x99\xd6\x99\xd6\x99\xd6\x99\xd6" "\x06\x8b\x99\xd6\x99\xd6\x99\xd6\x10\x84\x08\x42\x08\x42\x10\x84" "\x99\xd6\x99\xd6\x99\xd6\x99\xd6\x06\x84\x99\xd6\x99\xd6\x99\xd6" @@ -569,7 +569,7 @@ uint8 cache_bitmap_v2_order[] = void test_read_cache_bitmap_v2_order(void) { STREAM _s, *s; - uint16 extraFlags; + UINT16 extraFlags; CACHE_BITMAP_V2_ORDER cache_bitmap_v2; s = &_s; @@ -591,7 +591,7 @@ void test_read_cache_bitmap_v2_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_v2_order) - 1)); } -uint8 cache_bitmap_v3_order[] = +BYTE cache_bitmap_v3_order[] = "\xff\x7f\x35\x50\xec\xbc\x74\x52\x65\xb7\x20\x00\x00\x00\x05\x00" "\x02\x00\x28\x00\x00\x00\x5b\x4f\x45\xff\x5b\x4f\x45\xff\x5b\x4f" "\x45\xff\x5b\x4f\x45\xff\x5b\x4f\x45\xff\x5b\x50\x45\xff\x5b\x50" @@ -600,7 +600,7 @@ uint8 cache_bitmap_v3_order[] = void test_read_cache_bitmap_v3_order(void) { STREAM _s, *s; - uint16 extraFlags; + UINT16 extraFlags; CACHE_BITMAP_V3_ORDER cache_bitmap_v3; s = &_s; @@ -625,7 +625,7 @@ void test_read_cache_bitmap_v3_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_v3_order) - 1)); } -uint8 cache_brush_order[] = "\x00\x01\x08\x08\x81\x08\xaa\x55\xaa\x55\xaa\x55\xaa\x55"; +BYTE cache_brush_order[] = "\x00\x01\x08\x08\x81\x08\xaa\x55\xaa\x55\xaa\x55\xaa\x55"; void test_read_cache_brush_order(void) { @@ -649,7 +649,7 @@ void test_read_cache_brush_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(cache_brush_order) - 1)); } -uint8 create_offscreen_bitmap_order[] = "\x00\x80\x60\x01\x10\x00\x01\x00\x02\x00"; +BYTE create_offscreen_bitmap_order[] = "\x00\x80\x60\x01\x10\x00\x01\x00\x02\x00"; void test_read_create_offscreen_bitmap_order(void) { @@ -665,7 +665,7 @@ void test_read_create_offscreen_bitmap_order(void) deleteList = &(create_offscreen_bitmap.deleteList); deleteList->cIndices = 0; deleteList->sIndices = 16; - deleteList->indices = malloc(sizeof(uint16) * deleteList->sIndices); + deleteList->indices = malloc(sizeof(UINT16) * deleteList->sIndices); update_read_create_offscreen_bitmap_order(s, &create_offscreen_bitmap); @@ -677,7 +677,7 @@ void test_read_create_offscreen_bitmap_order(void) CU_ASSERT(stream_get_length(s) == (sizeof(create_offscreen_bitmap_order) - 1)); } -uint8 switch_surface_order[] = "\xff\xff"; +BYTE switch_surface_order[] = "\xff\xff"; void test_read_switch_surface_order(void) { @@ -700,7 +700,7 @@ int opaque_rect_count; int polyline_count; int patblt_count; -uint8 orders_update_1[] = +BYTE orders_update_1[] = "\x00\x00\x33\xd0\x07\x00\x80\xba\x0d\x0a\x7f\x1e\x2c\x4d\x00\x36" "\x02\xd3\x00\x47\x00\x4d\x00\xf0\x01\x87\x00\xc2\xdc\xff\x05\x7f" "\x0f\x67\x01\x90\x01\x8e\x01\xa5\x01\x67\x01\x90\x01\x28\x00\x16" @@ -710,7 +710,7 @@ uint8 orders_update_1[] = "\x03\x15\x0f\xf0\x65\x01\x15\xfe\x65\x01\xb0\xfd\x1d\x16\x01\xf0" "\xff\xff\x01\x01\x7a"; -uint8 orders_update_2[] = +BYTE orders_update_2[] = "\x00\x00\x45\x62\x03\x00\x93\x14\x55\x01\x50\xff\xff\xff\x55\x01" "\x50\x01\x01\x01\x55\x01\x50\xff\xff\xff\x16\x00\x17\x00\xea\x03" "\xea\x03\x02\x00\x85\x02\x16\x00\x02\x00\x00\x00\x03\x00\x14\xb2"; diff --git a/cunit/test_pcap.c b/cunit/test_pcap.c index 23e435389..51067a23d 100644 --- a/cunit/test_pcap.c +++ b/cunit/test_pcap.c @@ -42,14 +42,14 @@ int add_pcap_suite(void) return 0; } -uint8 test_packet_1[16] = +BYTE test_packet_1[16] = "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"; -uint8 test_packet_2[32] = +BYTE test_packet_2[32] = "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB" "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB"; -uint8 test_packet_3[64] = +BYTE test_packet_3[64] = "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC" "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC" "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC" diff --git a/cunit/test_rail.c b/cunit/test_rail.c index 182e71ce5..8a4dab85d 100644 --- a/cunit/test_rail.c +++ b/cunit/test_rail.c @@ -67,12 +67,12 @@ int add_rail_suite(void) } -static uint8 client_handshake[] = +static BYTE client_handshake[] = { 0x05, 0x00, 0x08, 0x00, 0xb0, 0x1d, 0x00, 0x00 }; -static uint8 client_info_pdu[] = +static BYTE client_info_pdu[] = { 0x0b, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00 }; @@ -82,7 +82,7 @@ static uint8 client_info_pdu[] = // WorkingDir: f:\windows\system32 // Arguments: www.bing.com -static uint8 client_execute_pdu[] = +static BYTE client_execute_pdu[] = { 0x01,0x00,0x5e,0x00,0x08,0x00,0x14,0x00,0x26,0x00,0x18,0x00,0x7c,0x00, 0x7c,0x00,0x69,0x00,0x65,0x00,0x78,0x00,0x70,0x00,0x6c,0x00,0x6f,0x00, @@ -93,7 +93,7 @@ static uint8 client_execute_pdu[] = 0x67,0x00,0x2e,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00 }; -static uint8 client_activate_pdu[] = +static BYTE client_activate_pdu[] = { 0x02,0x00, 0x09,0x00, @@ -103,7 +103,7 @@ static uint8 client_activate_pdu[] = -static uint8 client_sysparam_highcontrast_pdu[] = +static BYTE client_sysparam_highcontrast_pdu[] = { 0x03,0x00, 0x12,0x00, @@ -115,7 +115,7 @@ static uint8 client_sysparam_highcontrast_pdu[] = }; -static uint8 client_sysparam_taskbarpos_pdu[] = +static BYTE client_sysparam_taskbarpos_pdu[] = { 0x03,0x00, 0x10,0x00, @@ -126,7 +126,7 @@ static uint8 client_sysparam_taskbarpos_pdu[] = 0xc2,0x03 // 0x03c2 }; -static uint8 client_sysparam_mousebuttonswap_pdu[] = +static BYTE client_sysparam_mousebuttonswap_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -135,7 +135,7 @@ static uint8 client_sysparam_mousebuttonswap_pdu[] = }; -static uint8 client_sysparam_keyboardpref_pdu[] = +static BYTE client_sysparam_keyboardpref_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -144,7 +144,7 @@ static uint8 client_sysparam_keyboardpref_pdu[] = }; -static uint8 client_sysparam_dragfullwindow_pdu[] = +static BYTE client_sysparam_dragfullwindow_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -153,7 +153,7 @@ static uint8 client_sysparam_dragfullwindow_pdu[] = }; -static uint8 client_sysparam_keyboardcues_pdu[] = +static BYTE client_sysparam_keyboardcues_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -161,7 +161,7 @@ static uint8 client_sysparam_keyboardcues_pdu[] = 0x00 // FALSE }; -static uint8 client_sysparam_setworkarea_pdu[] = +static BYTE client_sysparam_setworkarea_pdu[] = { 0x03,0x00, 0x10,0x00, @@ -172,7 +172,7 @@ static uint8 client_sysparam_setworkarea_pdu[] = 0x9a,0x03 // 0x039a }; -static uint8 client_syscommand_pdu[] = +static BYTE client_syscommand_pdu[] = { 0x04,0x00, 0x0a,0x00, @@ -180,7 +180,7 @@ static uint8 client_syscommand_pdu[] = 0x20,0xf0 }; -static uint8 client_notify_pdu[] = +static BYTE client_notify_pdu[] = { 0x06,0x00, 0x10,0x00, @@ -189,7 +189,7 @@ static uint8 client_notify_pdu[] = 0x04,0x02,0x00,0x00 }; -static uint8 client_windowmove_pdu[] = +static BYTE client_windowmove_pdu[] = { 0x08,0x00, 0x10,0x00, @@ -200,7 +200,7 @@ static uint8 client_windowmove_pdu[] = 0x88,0x01 }; -static uint8 client_system_menu_pdu[] = +static BYTE client_system_menu_pdu[] = { 0x0c,0x00, 0x0c,0x00, @@ -209,35 +209,35 @@ static uint8 client_system_menu_pdu[] = 0x4a,0x02 }; -static uint8 client_langbar_pdu[] = +static BYTE client_langbar_pdu[] = { 0x0D,0x00,0x08,0x00,0x01,0x00,0x00,0x00 }; -static uint8 client_get_app_id_req_pdu[] = +static BYTE client_get_app_id_req_pdu[] = { 0x0E,0x00,0x08,0x00,0x52,0x00,0x02,0x00 }; -static uint8 server_handshake[] = +static BYTE server_handshake[] = { 0x05, 0x00, 0x08, 0x00, 0xb0, 0x1d, 0x00, 0x00 }; -static uint8 server_exec_result_pdu[] = +static BYTE server_exec_result_pdu[] = { 0x80,0x00,0x24,0x00,0x08,0x00,0x03,0x00,0x15,0x00,0x00,0x00,0x00,0x00, 0x14,0x00,0x7c,0x00,0x7c,0x00,0x57,0x00,0x72,0x00,0x6f,0x00,0x6e,0x00, 0x67,0x00,0x41,0x00,0x70,0x00,0x70,0x00 }; -static uint8 server_exec_result_exe_or_file[] = +static BYTE server_exec_result_exe_or_file[] = { 0x7c,0x00,0x7c,0x00,0x57,0x00,0x72,0x00,0x6f,0x00,0x6e,0x00, 0x67,0x00,0x41,0x00,0x70,0x00,0x70,0x00 }; -static uint8 server_sysparam1_pdu[] = +static BYTE server_sysparam1_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -245,7 +245,7 @@ static uint8 server_sysparam1_pdu[] = 0x00 }; -static uint8 server_sysparam2_pdu[] = +static BYTE server_sysparam2_pdu[] = { 0x03,0x00, 0x09,0x00, @@ -253,31 +253,31 @@ static uint8 server_sysparam2_pdu[] = 0x00 }; -static uint8 server_localmovesize_start_pdu[] = +static BYTE server_localmovesize_start_pdu[] = { 0x09,0x00,0x10,0x00,0x8e,0x00,0x07,0x00,0x01,0x00,0x09,0x00,0x7e,0x01, 0x0a,0x00 }; -static uint8 server_localmovesize_stop_pdu[] = +static BYTE server_localmovesize_stop_pdu[] = { 0x09,0x00,0x10,0x00,0x8e,0x00,0x07,0x00,0x00,0x00,0x09,0x00,0xa6,0x00, 0x44,0x00 }; -static uint8 server_minmaxinfo_pdu[] = +static BYTE server_minmaxinfo_pdu[] = { 0x0a,0x00,0x18,0x00,0x8e,0x00,0x07,0x00,0x08,0x04,0xd6,0x02,0x00,0x00, 0x00,0x00,0x70,0x00,0x1b,0x00,0x0c,0x04,0x0c,0x03 }; -static uint8 server_langbar_pdu[] = +static BYTE server_langbar_pdu[] = { 0x0D,0x00,0x08,0x00,0x01,0x00,0x00,0x00 }; -static uint8 server_app_get_resp_pdu[] = +static BYTE server_app_get_resp_pdu[] = { 0x0F,0x00,0x08,0x02,0x52,0x00,0x02,0x00,0x6d,0x00,0x69,0x00,0x63,0x00, 0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00, @@ -328,7 +328,7 @@ static uint8 server_app_get_resp_pdu[] = 0x00,0x00,0x00,0x00,0x00,0x00 }; -static uint8 server_app_get_resp_app_id[] = +static BYTE server_app_get_resp_app_id[] = { 0x6d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00, 0x66,0x00,0x74,0x00,0x2e,0x00,0x77,0x00,0x69,0x00,0x6e,0x6f,0x00,0x77, @@ -459,7 +459,7 @@ int stream_equal_dump(void * dataS, size_t sizeS, void * data, size_t size) for (i=0; i < size; i++) { - if (((uint8*)dataS)[i] != ((uint8*)data)[i]) + if (((BYTE*)dataS)[i] != ((BYTE*)data)[i]) { printf("----------------- stream_equal_dump -----------------\n"); printf("Stream and dump have different content from %d offset.\n", (int) i); @@ -486,7 +486,7 @@ static void test_on_free_rail_client_event(RDP_EVENT* event) //----------------------------------------------------------------------------- static void send_ui_event2plugin( rdpChannels* chan_man, - uint16 event_type, + UINT16 event_type, void * data ) { @@ -533,7 +533,7 @@ static void save_dump(void* data, size_t size) } //----------------------------------------------------------------------------- static int emulate_client_send_channel_data( - freerdp* freerdp, int channelId, uint8* data, int size + freerdp* freerdp, int channelId, BYTE* data, int size ) { static int counter = 0; diff --git a/cunit/test_rfx.c b/cunit/test_rfx.c index 6720ae922..f42ead986 100644 --- a/cunit/test_rfx.c +++ b/cunit/test_rfx.c @@ -41,7 +41,7 @@ #include "test_rfx.h" -static const uint8 y_data[] = +static const BYTE y_data[] = { 0x19, 0x82, 0x1d, 0x10, 0x62, 0x9d, 0x28, 0x85, 0x2c, 0xa2, 0x14, 0xb2, 0x88, 0x52, 0xca, 0x21, 0x4b, 0x28, 0x85, 0x2c, 0xa2, 0x14, 0xb2, 0x88, 0x52, 0xca, 0x21, 0x4b, 0x28, @@ -64,7 +64,7 @@ static const uint8 y_data[] = 0x4d, 0x43, 0x46, 0xd7, 0xe9, 0xe2, 0x20, 0x30, 0x00 }; -static const uint8 cb_data[] = +static const BYTE cb_data[] = { 0x1b, 0x04, 0x7f, 0x04, 0x31, 0x5f, 0xc2, 0x94, 0xaf, 0x05, 0x29, 0x5e, 0x0a, 0x52, 0xbc, 0x14, 0xa5, 0x78, 0x29, 0x25, 0x78, 0x29, 0x25, @@ -89,7 +89,7 @@ static const uint8 cb_data[] = 0x77, 0x82, 0xbc, 0x00, 0x18, 0x00 }; -static const uint8 cr_data[] = +static const BYTE cr_data[] = { 0x1b, 0xfc, 0x11, 0xc1, 0x0f, 0x4a, 0xc1, 0x4f, 0x4a, 0xc1, 0x4f, 0x4a, 0xa1, 0x4d, 0x95, 0x42, 0x9e, 0x95, 0x42, 0x9e, 0x95, 0x42, 0x9b, 0x2a, 0x85, 0x3d, @@ -120,7 +120,7 @@ static const unsigned int test_quantization_values[] = 6, 6, 6, 6, 7, 7, 8, 8, 8, 9 }; -static const uint8 rgb_scanline_data[] = +static const BYTE rgb_scanline_data[] = { 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, @@ -157,7 +157,7 @@ static const uint8 rgb_scanline_data[] = 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF }; -static uint8* rgb_data; +static BYTE* rgb_data; int init_rfx_suite(void) { @@ -188,11 +188,11 @@ int add_rfx_suite(void) void test_bitstream(void) { - uint16 b; + UINT16 b; RFX_BITSTREAM* bs; bs = xnew(RFX_BITSTREAM); - rfx_bitstream_attach(bs, (uint8*) y_data, sizeof(y_data)); + rfx_bitstream_attach(bs, (BYTE*) y_data, sizeof(y_data)); while (!rfx_bitstream_eos(bs)) { rfx_bitstream_get_bits(bs, 3, b); @@ -206,7 +206,7 @@ void test_bitstream(void) void test_bitstream_enc(void) { - uint8 buffer[10]; + BYTE buffer[10]; RFX_BITSTREAM* bs; int i; @@ -226,9 +226,9 @@ void test_bitstream_enc(void) //printf("\n"); } -static sint16 buffer[4096]; +static INT16 buffer[4096]; -void dump_buffer(sint16* buf, int n) +void dump_buffer(INT16* buf, int n) { int i; @@ -274,7 +274,7 @@ void test_dwt(void) } /* Dump a .ppm image. */ -static void dump_ppm_image(uint8* image_buf) +static void dump_ppm_image(BYTE* image_buf) { static int frame_id = 0; char buf[100]; @@ -295,7 +295,7 @@ static void dump_ppm_image(uint8* image_buf) void test_decode(void) { RFX_CONTEXT* context; - uint8 decode_buffer[4096 * 3]; + BYTE decode_buffer[4096 * 3]; STREAM* s; s = stream_new(sizeof(y_data) + sizeof(cb_data) + sizeof(cr_data)); @@ -324,9 +324,9 @@ void test_encode(void) STREAM* enc_stream; int y_size, cb_size, cr_size; int i; - uint8 decode_buffer[4096 * 3]; + BYTE decode_buffer[4096 * 3]; - rgb_data = (uint8 *) malloc(64 * 64 * 3); + rgb_data = (BYTE *) malloc(64 * 64 * 3); for (i = 0; i < 64; i++) memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3); //freerdp_hexdump(rgb_data, 64 * 64 * 3); @@ -371,7 +371,7 @@ void test_message(void) RFX_RECT rect = {0, 0, 100, 80}; RFX_MESSAGE * message; - rgb_data = (uint8 *) malloc(100 * 80 * 3); + rgb_data = (BYTE *) malloc(100 * 80 * 3); for (i = 0; i < 80; i++) memcpy(rgb_data + i * 100 * 3, rgb_scanline_data, 100 * 3); diff --git a/include/freerdp/altsec.h b/include/freerdp/altsec.h index 949b520a2..f45821873 100644 --- a/include/freerdp/altsec.h +++ b/include/freerdp/altsec.h @@ -40,7 +40,7 @@ struct _OFFSCREEN_DELETE_LIST { uint32 sIndices; uint32 cIndices; - uint16* indices; + UINT16* indices; }; typedef struct _OFFSCREEN_DELETE_LIST OFFSCREEN_DELETE_LIST; @@ -95,7 +95,7 @@ struct _STREAM_BITMAP_FIRST_ORDER uint32 bitmapHeight; uint32 bitmapSize; uint32 bitmapBlockSize; - uint8* bitmapBlock; + BYTE* bitmapBlock; }; typedef struct _STREAM_BITMAP_FIRST_ORDER STREAM_BITMAP_FIRST_ORDER; @@ -104,7 +104,7 @@ struct _STREAM_BITMAP_NEXT_ORDER uint32 bitmapFlags; uint32 bitmapType; uint32 bitmapBlockSize; - uint8* bitmapBlock; + BYTE* bitmapBlock; }; typedef struct _STREAM_BITMAP_NEXT_ORDER STREAM_BITMAP_NEXT_ORDER; @@ -113,14 +113,14 @@ struct _DRAW_GDIPLUS_FIRST_ORDER uint32 cbSize; uint32 cbTotalSize; uint32 cbTotalEmfSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_FIRST_ORDER DRAW_GDIPLUS_FIRST_ORDER; struct _DRAW_GDIPLUS_NEXT_ORDER { uint32 cbSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_NEXT_ORDER DRAW_GDIPLUS_NEXT_ORDER; @@ -129,7 +129,7 @@ struct _DRAW_GDIPLUS_END_ORDER uint32 cbSize; uint32 cbTotalSize; uint32 cbTotalEmfSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_END_ORDER DRAW_GDIPLUS_END_ORDER; @@ -140,7 +140,7 @@ struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER uint32 cacheIndex; uint32 cbSize; uint32 cbTotalSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER DRAW_GDIPLUS_CACHE_FIRST_ORDER; @@ -150,7 +150,7 @@ struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER uint32 cacheType; uint32 cacheIndex; uint32 cbSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER DRAW_GDIPLUS_CACHE_NEXT_ORDER; @@ -161,7 +161,7 @@ struct _DRAW_GDIPLUS_CACHE_END_ORDER uint32 cacheIndex; uint32 cbSize; uint32 cbTotalSize; - uint8* emfRecords; + BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_END_ORDER DRAW_GDIPLUS_CACHE_END_ORDER; diff --git a/include/freerdp/channels/rdpsnd.h b/include/freerdp/channels/rdpsnd.h index a366c07ae..4545077a8 100644 --- a/include/freerdp/channels/rdpsnd.h +++ b/include/freerdp/channels/rdpsnd.h @@ -27,13 +27,13 @@ typedef struct rdpsnd_format rdpsndFormat; struct rdpsnd_format { - uint16 wFormatTag; - uint16 nChannels; + UINT16 wFormatTag; + UINT16 nChannels; uint32 nSamplesPerSec; - uint16 nBlockAlign; - uint16 wBitsPerSample; - uint16 cbSize; - uint8* data; + UINT16 nBlockAlign; + UINT16 wBitsPerSample; + UINT16 cbSize; + BYTE* data; }; #define SNDC_CLOSE 1 diff --git a/include/freerdp/channels/wtsvc.h b/include/freerdp/channels/wtsvc.h index 274eeb5cf..8cb90135b 100644 --- a/include/freerdp/channels/wtsvc.h +++ b/include/freerdp/channels/wtsvc.h @@ -108,7 +108,7 @@ FREERDP_API void WTSFreeMemory( FREERDP_API BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, /* __in */ uint32 TimeOut, - /* __out */ uint8* Buffer, + /* __out */ BYTE* Buffer, /* __in */ uint32 BufferSize, /* __out */ uint32* pBytesRead); @@ -117,7 +117,7 @@ FREERDP_API BOOL WTSVirtualChannelRead( */ FREERDP_API BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, - /* __in */ uint8* Buffer, + /* __in */ BYTE* Buffer, /* __in */ uint32 Length, /* __out */ uint32* pBytesWritten); diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h index 7714aebec..9940b00dd 100644 --- a/include/freerdp/client/cliprdr.h +++ b/include/freerdp/client/cliprdr.h @@ -50,8 +50,8 @@ struct _RDP_CB_FORMAT_LIST_EVENT { RDP_EVENT event; uint32* formats; - uint16 num_formats; - uint8* raw_format_data; + UINT16 num_formats; + BYTE* raw_format_data; uint32 raw_format_data_size; }; typedef struct _RDP_CB_FORMAT_LIST_EVENT RDP_CB_FORMAT_LIST_EVENT; @@ -66,7 +66,7 @@ typedef struct _RDP_CB_DATA_REQUEST_EVENT RDP_CB_DATA_REQUEST_EVENT; struct _RDP_CB_DATA_RESPONSE_EVENT { RDP_EVENT event; - uint8* data; + BYTE* data; uint32 size; }; typedef struct _RDP_CB_DATA_RESPONSE_EVENT RDP_CB_DATA_RESPONSE_EVENT; diff --git a/include/freerdp/client/tsmf.h b/include/freerdp/client/tsmf.h index 1e3049682..7f1163846 100644 --- a/include/freerdp/client/tsmf.h +++ b/include/freerdp/client/tsmf.h @@ -32,16 +32,16 @@ enum RDP_EVENT_TYPE_TSMF struct _RDP_VIDEO_FRAME_EVENT { RDP_EVENT event; - uint8* frame_data; + BYTE* frame_data; uint32 frame_size; uint32 frame_pixfmt; - sint16 frame_width; - sint16 frame_height; - sint16 x; - sint16 y; - sint16 width; - sint16 height; - uint16 num_visible_rects; + INT16 frame_width; + INT16 frame_height; + INT16 x; + INT16 y; + INT16 width; + INT16 height; + UINT16 num_visible_rects; RDP_RECT* visible_rects; }; typedef struct _RDP_VIDEO_FRAME_EVENT RDP_VIDEO_FRAME_EVENT; @@ -49,10 +49,10 @@ typedef struct _RDP_VIDEO_FRAME_EVENT RDP_VIDEO_FRAME_EVENT; struct _RDP_REDRAW_EVENT { RDP_EVENT event; - sint16 x; - sint16 y; - sint16 width; - sint16 height; + INT16 x; + INT16 y; + INT16 width; + INT16 height; }; typedef struct _RDP_REDRAW_EVENT RDP_REDRAW_EVENT; diff --git a/include/freerdp/codec/bitmap.h b/include/freerdp/codec/bitmap.h index 7a63fff13..a58195db4 100644 --- a/include/freerdp/codec/bitmap.h +++ b/include/freerdp/codec/bitmap.h @@ -23,6 +23,6 @@ #include #include -FREERDP_API BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp); +FREERDP_API BOOL bitmap_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size, int srcBpp, int dstBpp); #endif /* __BITMAP_H */ diff --git a/include/freerdp/codec/color.h b/include/freerdp/codec/color.h index 920a2f6e9..1ce222441 100644 --- a/include/freerdp/codec/color.h +++ b/include/freerdp/codec/color.h @@ -235,16 +235,16 @@ typedef CLRCONV* HCLRCONV; #define IBPP(_bpp) (((_bpp + 1)/ 8) % 5) -typedef uint8* (*p_freerdp_image_convert)(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv); +typedef BYTE* (*p_freerdp_image_convert)(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint8* freerdp_image_convert(uint8* srcData, uint8 *dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint8* freerdp_glyph_convert(int width, int height, uint8* data); -FREERDP_API void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height); -FREERDP_API uint8* freerdp_image_flip(uint8* srcData, uint8* dstData, int width, int height, int bpp); -FREERDP_API uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int width, int height, int bpp, HCLRCONV clrconv); -FREERDP_API uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv); -FREERDP_API void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMask, int width, int height, int bpp, HCLRCONV clrconv); -FREERDP_API void freerdp_image_swap_color_order(uint8* data, int width, int height); +FREERDP_API BYTE* freerdp_image_convert(BYTE* srcData, BYTE *dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API BYTE* freerdp_glyph_convert(int width, int height, BYTE* data); +FREERDP_API void freerdp_bitmap_flip(BYTE * src, BYTE * dst, int scanLineSz, int height); +FREERDP_API BYTE* freerdp_image_flip(BYTE* srcData, BYTE* dstData, int width, int height, int bpp); +FREERDP_API BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, int height, int bpp, HCLRCONV clrconv); +FREERDP_API BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv); +FREERDP_API void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, int width, int height, int bpp, HCLRCONV clrconv); +FREERDP_API void freerdp_image_swap_color_order(BYTE* data, int width, int height); FREERDP_API uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); FREERDP_API uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); diff --git a/include/freerdp/codec/jpeg.h b/include/freerdp/codec/jpeg.h index 881967965..fdbe549ad 100644 --- a/include/freerdp/codec/jpeg.h +++ b/include/freerdp/codec/jpeg.h @@ -23,6 +23,6 @@ #include BOOL -jpeg_decompress(uint8* input, uint8* output, int width, int height, int size, int bpp); +jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp); #endif /* __BITMAP_H */ diff --git a/include/freerdp/codec/mppc_dec.h b/include/freerdp/codec/mppc_dec.h index 5d205b72f..32e00fa32 100644 --- a/include/freerdp/codec/mppc_dec.h +++ b/include/freerdp/codec/mppc_dec.h @@ -39,17 +39,17 @@ struct rdp_mppc_dec { - uint8* history_buf; - uint16* offset_cache; - uint8* history_buf_end; - uint8* history_ptr; + BYTE* history_buf; + UINT16* offset_cache; + BYTE* history_buf_end; + BYTE* history_ptr; }; -FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); FREERDP_API struct rdp_mppc_dec* mppc_dec_new(void); FREERDP_API void mppc_dec_free(struct rdp_mppc_dec* dec); diff --git a/include/freerdp/codec/mppc_enc.h b/include/freerdp/codec/mppc_enc.h index 32f348b0f..f039c7b55 100644 --- a/include/freerdp/codec/mppc_enc.h +++ b/include/freerdp/codec/mppc_enc.h @@ -39,12 +39,12 @@ struct rdp_mppc_enc int flags; /* PACKET_COMPRESSED, PACKET_AT_FRONT, PACKET_FLUSHED etc */ int flagsHold; int first_pkt; /* this is the first pkt passing through enc */ - uint16* hash_table; + UINT16* hash_table; }; -FREERDP_API BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len); -FREERDP_API BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len); -FREERDP_API BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len); +FREERDP_API BOOL compress_rdp(struct rdp_mppc_enc* enc, BYTE* srcData, int len); +FREERDP_API BOOL compress_rdp_4(struct rdp_mppc_enc* enc, BYTE* srcData, int len); +FREERDP_API BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len); FREERDP_API struct rdp_mppc_enc* mppc_enc_new(int protocol_type); FREERDP_API void mppc_enc_free(struct rdp_mppc_enc* enc); diff --git a/include/freerdp/codec/nsc.h b/include/freerdp/codec/nsc.h index a1c8b409f..5e55fb3e8 100644 --- a/include/freerdp/codec/nsc.h +++ b/include/freerdp/codec/nsc.h @@ -34,10 +34,10 @@ extern "C" { struct _NSC_STREAM { uint32 PlaneByteCount[4]; - uint8 ColorLossLevel; - uint8 ChromaSubSamplingLevel; - uint16 Reserved; - uint8* Planes; + BYTE ColorLossLevel; + BYTE ChromaSubSamplingLevel; + UINT16 Reserved; + BYTE* Planes; }; typedef struct _NSC_STREAM NSC_STREAM; @@ -48,18 +48,18 @@ struct _NSC_CONTEXT { uint32 OrgByteCount[4]; /* original byte length of luma, chroma orange, chroma green, alpha variable in order */ NSC_STREAM nsc_stream; - uint16 bpp; - uint16 width; - uint16 height; - uint8* bmpdata; /* final argb values in little endian order */ + UINT16 bpp; + UINT16 width; + UINT16 height; + BYTE* bmpdata; /* final argb values in little endian order */ uint32 bmpdata_length; /* the maximum length of the buffer that bmpdata points to */ RDP_PIXEL_FORMAT pixel_format; /* color palette allocated by the application */ - const uint8* palette; + const BYTE* palette; void (*decode)(NSC_CONTEXT* context); - void (*encode)(NSC_CONTEXT* context, uint8* bmpdata, int rowstride); + void (*encode)(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride); NSC_CONTEXT_PRIV* priv; }; @@ -67,10 +67,10 @@ struct _NSC_CONTEXT FREERDP_API NSC_CONTEXT* nsc_context_new(void); FREERDP_API void nsc_context_set_cpu_opt(NSC_CONTEXT* context, uint32 cpu_opt); FREERDP_API void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format); -FREERDP_API void nsc_process_message(NSC_CONTEXT* context, uint16 bpp, - uint16 width, uint16 height, uint8* data, uint32 length); +FREERDP_API void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, + UINT16 width, UINT16 height, BYTE* data, uint32 length); FREERDP_API void nsc_compose_message(NSC_CONTEXT* context, STREAM* s, - uint8* bmpdata, int width, int height, int rowstride); + BYTE* bmpdata, int width, int height, int rowstride); FREERDP_API void nsc_context_free(NSC_CONTEXT* context); #ifdef __cplusplus diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index ef9f42ccf..8b2c7915b 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -38,18 +38,18 @@ typedef enum _RLGR_MODE RLGR_MODE; struct _RFX_RECT { - uint16 x; - uint16 y; - uint16 width; - uint16 height; + UINT16 x; + UINT16 y; + UINT16 width; + UINT16 height; }; typedef struct _RFX_RECT RFX_RECT; struct _RFX_TILE { - uint16 x; - uint16 y; - uint8* data; + UINT16 x; + UINT16 y; + BYTE* data; }; typedef struct _RFX_TILE RFX_TILE; @@ -59,7 +59,7 @@ struct _RFX_MESSAGE * The rects array represents the updated region of the frame. The UI * requires to clip drawing destination base on the union of the rects. */ - uint16 num_rects; + UINT16 num_rects; RFX_RECT* rects; /** @@ -68,7 +68,7 @@ struct _RFX_MESSAGE * rects described above) are valid. Pixels outside of the region may * contain arbitrary data. */ - uint16 num_tiles; + UINT16 num_tiles; RFX_TILE** tiles; }; typedef struct _RFX_MESSAGE RFX_MESSAGE; @@ -77,36 +77,36 @@ typedef struct _RFX_CONTEXT_PRIV RFX_CONTEXT_PRIV; struct _RFX_CONTEXT { - uint16 flags; - uint16 properties; - uint16 width; - uint16 height; + UINT16 flags; + UINT16 properties; + UINT16 width; + UINT16 height; RLGR_MODE mode; uint32 version; uint32 codec_id; uint32 codec_version; RDP_PIXEL_FORMAT pixel_format; - uint8 bits_per_pixel; + BYTE bits_per_pixel; /* color palette allocated by the application */ - const uint8* palette; + const BYTE* palette; /* temporary data within a frame */ uint32 frame_idx; BOOL header_processed; - uint8 num_quants; + BYTE num_quants; uint32* quants; - uint8 quant_idx_y; - uint8 quant_idx_cb; - uint8 quant_idx_cr; + BYTE quant_idx_y; + BYTE quant_idx_cb; + BYTE quant_idx_cr; /* routines */ - void (*decode_ycbcr_to_rgb)(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); - void (*encode_rgb_to_ycbcr)(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); - void (*quantization_decode)(sint16* buffer, const uint32* quantization_values); - void (*quantization_encode)(sint16* buffer, const uint32* quantization_values); - void (*dwt_2d_decode)(sint16* buffer, sint16* dwt_buffer); - void (*dwt_2d_encode)(sint16* buffer, sint16* dwt_buffer); + void (*decode_ycbcr_to_rgb)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); + void (*encode_rgb_to_ycbcr)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); + void (*quantization_decode)(INT16* buffer, const uint32* quantization_values); + void (*quantization_encode)(INT16* buffer, const uint32* quantization_values); + void (*dwt_2d_decode)(INT16* buffer, INT16* dwt_buffer); + void (*dwt_2d_encode)(INT16* buffer, INT16* dwt_buffer); /* private definitions */ RFX_CONTEXT_PRIV* priv; @@ -119,16 +119,16 @@ FREERDP_API void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt); FREERDP_API void rfx_context_set_pixel_format(RFX_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format); FREERDP_API void rfx_context_reset(RFX_CONTEXT* context); -FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 length); -FREERDP_API uint16 rfx_message_get_tile_count(RFX_MESSAGE* message); +FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length); +FREERDP_API UINT16 rfx_message_get_tile_count(RFX_MESSAGE* message); FREERDP_API RFX_TILE* rfx_message_get_tile(RFX_MESSAGE* message, int index); -FREERDP_API uint16 rfx_message_get_rect_count(RFX_MESSAGE* message); +FREERDP_API UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message); FREERDP_API RFX_RECT* rfx_message_get_rect(RFX_MESSAGE* message, int index); FREERDP_API void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message); FREERDP_API void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s); FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s, - const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride); + const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride); #ifdef __cplusplus } diff --git a/include/freerdp/crypto/ber.h b/include/freerdp/crypto/ber.h index 26558ae63..1835c0c25 100644 --- a/include/freerdp/crypto/ber.h +++ b/include/freerdp/crypto/ber.h @@ -55,22 +55,22 @@ FREERDP_API void ber_read_length(STREAM* s, int* length); FREERDP_API int ber_write_length(STREAM* s, int length); FREERDP_API int _ber_skip_length(int length); FREERDP_API int ber_get_content_length(int length); -FREERDP_API BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc); -FREERDP_API void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc); -FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API void ber_write_application_tag(STREAM* s, uint8 tag, int length); -FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); -FREERDP_API void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count); -FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc); -FREERDP_API int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc); +FREERDP_API BOOL ber_read_universal_tag(STREAM* s, BYTE tag, BOOL pc); +FREERDP_API void ber_write_universal_tag(STREAM* s, BYTE tag, BOOL pc); +FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length); +FREERDP_API void ber_write_application_tag(STREAM* s, BYTE tag, int length); +FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length); +FREERDP_API BOOL ber_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count); +FREERDP_API void ber_write_enumerated(STREAM* s, BYTE enumerated, BYTE count); +FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc); +FREERDP_API int ber_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc); FREERDP_API int ber_skip_contextual_tag(int length); FREERDP_API BOOL ber_read_sequence_tag(STREAM* s, int* length); FREERDP_API int ber_write_sequence_tag(STREAM* s, int length); FREERDP_API int ber_skip_sequence(int length); FREERDP_API int ber_skip_sequence_tag(int length); -FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding); -FREERDP_API void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length); +FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, BYTE* padding); +FREERDP_API void ber_write_octet_string(STREAM* s, const BYTE* oct_str, int length); FREERDP_API BOOL ber_read_octet_string_tag(STREAM* s, int* length); FREERDP_API int ber_write_octet_string_tag(STREAM* s, int length); FREERDP_API int ber_skip_octet_string(int length); diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index 73ee40774..c06fe7ed8 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -80,43 +80,43 @@ struct crypto_cert_struct typedef struct crypto_sha1_struct* CryptoSha1; FREERDP_API CryptoSha1 crypto_sha1_init(void); -FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length); -FREERDP_API void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data); +FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length); +FREERDP_API void crypto_sha1_final(CryptoSha1 sha1, BYTE* out_data); #define CRYPTO_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH typedef struct crypto_md5_struct* CryptoMd5; FREERDP_API CryptoMd5 crypto_md5_init(void); -FREERDP_API void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length); -FREERDP_API void crypto_md5_final(CryptoMd5 md5, uint8* out_data); +FREERDP_API void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length); +FREERDP_API void crypto_md5_final(CryptoMd5 md5, BYTE* out_data); typedef struct crypto_rc4_struct* CryptoRc4; -FREERDP_API CryptoRc4 crypto_rc4_init(const uint8* key, uint32 length); -FREERDP_API void crypto_rc4(CryptoRc4 rc4, uint32 length, const uint8* in_data, uint8* out_data); +FREERDP_API CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length); +FREERDP_API void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data); FREERDP_API void crypto_rc4_free(CryptoRc4 rc4); typedef struct crypto_des3_struct* CryptoDes3; -FREERDP_API CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec); -FREERDP_API CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec); -FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const uint8 *in_data, uint8 *out_data); -FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const uint8 *in_data, uint8* out_data); +FREERDP_API CryptoDes3 crypto_des3_encrypt_init(const BYTE* key, const BYTE* ivec); +FREERDP_API CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec); +FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE *out_data); +FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE* out_data); FREERDP_API void crypto_des3_free(CryptoDes3 des3); typedef struct crypto_hmac_struct* CryptoHmac; FREERDP_API CryptoHmac crypto_hmac_new(void); -FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const uint8 *data, uint32 length); -FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const uint8 *data, uint32 length); -FREERDP_API void crypto_hmac_final(CryptoHmac hmac, uint8 *out_data, uint32 length); +FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE *data, uint32 length); +FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const BYTE *data, uint32 length); +FREERDP_API void crypto_hmac_final(CryptoHmac hmac, BYTE *out_data, uint32 length); FREERDP_API void crypto_hmac_free(CryptoHmac hmac); typedef struct crypto_cert_struct* CryptoCert; #include -FREERDP_API CryptoCert crypto_cert_read(uint8* data, uint32 length); +FREERDP_API CryptoCert crypto_cert_read(BYTE* data, uint32 length); FREERDP_API char* crypto_cert_fingerprint(X509* xcert); FREERDP_API char* crypto_cert_subject(X509* xcert); FREERDP_API char* crypto_cert_subject_common_name(X509* xcert, int* length); @@ -130,18 +130,18 @@ FREERDP_API rdpCertificateData* crypto_get_certificate_data(X509* xcert, char* h FREERDP_API BOOL crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength); #define TSSK_KEY_LENGTH 64 -extern const uint8 tssk_modulus[]; -extern const uint8 tssk_privateExponent[]; -extern const uint8 tssk_exponent[]; +extern const BYTE tssk_modulus[]; +extern const BYTE tssk_privateExponent[]; +extern const BYTE tssk_exponent[]; -FREERDP_API void crypto_rsa_public_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output); -FREERDP_API void crypto_rsa_public_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output); -FREERDP_API void crypto_rsa_private_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output); -FREERDP_API void crypto_rsa_private_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output); -FREERDP_API void crypto_reverse(uint8* data, int length); -FREERDP_API void crypto_nonce(uint8* nonce, int size); +FREERDP_API void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); +FREERDP_API void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); +FREERDP_API void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); +FREERDP_API void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); +FREERDP_API void crypto_reverse(BYTE* data, int length); +FREERDP_API void crypto_nonce(BYTE* nonce, int size); -FREERDP_API char* crypto_base64_encode(uint8* data, int length); -FREERDP_API void crypto_base64_decode(uint8* enc_data, int length, uint8** dec_data, int* res_length); +FREERDP_API char* crypto_base64_encode(BYTE* data, int length); +FREERDP_API void crypto_base64_decode(BYTE* enc_data, int length, BYTE** dec_data, int* res_length); #endif /* FREERDP_CRYPTO_H */ diff --git a/include/freerdp/crypto/der.h b/include/freerdp/crypto/der.h index 13537c7bf..f7758e5aa 100644 --- a/include/freerdp/crypto/der.h +++ b/include/freerdp/crypto/der.h @@ -30,7 +30,7 @@ FREERDP_API int der_skip_octet_string(int length); FREERDP_API int der_skip_sequence_tag(int length); FREERDP_API int der_write_sequence_tag(STREAM* s, int length); FREERDP_API int der_skip_contextual_tag(int length); -FREERDP_API int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc); -FREERDP_API void der_write_octet_string(STREAM* s, uint8* oct_str, int length); +FREERDP_API int der_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc); +FREERDP_API void der_write_octet_string(STREAM* s, BYTE* oct_str, int length); #endif /* FREERDP_CRYPTO_DER_H */ diff --git a/include/freerdp/crypto/er.h b/include/freerdp/crypto/er.h index 9ad53a642..4174ea985 100644 --- a/include/freerdp/crypto/er.h +++ b/include/freerdp/crypto/er.h @@ -58,24 +58,24 @@ FREERDP_API void er_read_length(STREAM* s, int* length); FREERDP_API int er_write_length(STREAM* s, int length, BOOL flag); FREERDP_API int _er_skip_length(int length); FREERDP_API int er_get_content_length(int length); -FREERDP_API BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc); -FREERDP_API void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc); -FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag); -FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length); -FREERDP_API BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); -FREERDP_API void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag); -FREERDP_API BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc); -FREERDP_API int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag); +FREERDP_API BOOL er_read_universal_tag(STREAM* s, BYTE tag, BOOL pc); +FREERDP_API void er_write_universal_tag(STREAM* s, BYTE tag, BOOL pc); +FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length); +FREERDP_API void er_write_application_tag(STREAM* s, BYTE tag, int length, BOOL flag); +FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length); +FREERDP_API BOOL er_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count); +FREERDP_API void er_write_enumerated(STREAM* s, BYTE enumerated, BYTE count, BOOL flag); +FREERDP_API BOOL er_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc); +FREERDP_API int er_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc, BOOL flag); FREERDP_API int er_skip_contextual_tag(int length); FREERDP_API BOOL er_read_sequence_tag(STREAM* s, int* length); FREERDP_API int er_write_sequence_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_sequence(int length); FREERDP_API int er_skip_sequence_tag(int length); -FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding); -FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag); +FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding); +FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag); FREERDP_API BOOL er_read_octet_string(STREAM* s, int* length); -FREERDP_API void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag); +FREERDP_API void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag); FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_octet_string(int length); FREERDP_API BOOL er_read_BOOL(STREAM* s, BOOL* value); diff --git a/include/freerdp/crypto/per.h b/include/freerdp/crypto/per.h index d03e32240..54db219a4 100644 --- a/include/freerdp/crypto/per.h +++ b/include/freerdp/crypto/per.h @@ -23,27 +23,27 @@ #include #include -FREERDP_API BOOL per_read_length(STREAM* s, uint16* length); +FREERDP_API BOOL per_read_length(STREAM* s, UINT16* length); FREERDP_API void per_write_length(STREAM* s, int length); -FREERDP_API BOOL per_read_choice(STREAM* s, uint8* choice); -FREERDP_API void per_write_choice(STREAM* s, uint8 choice); -FREERDP_API BOOL per_read_selection(STREAM* s, uint8* selection); -FREERDP_API void per_write_selection(STREAM* s, uint8 selection); -FREERDP_API BOOL per_read_number_of_sets(STREAM* s, uint8* number); -FREERDP_API void per_write_number_of_sets(STREAM* s, uint8 number); +FREERDP_API BOOL per_read_choice(STREAM* s, BYTE* choice); +FREERDP_API void per_write_choice(STREAM* s, BYTE choice); +FREERDP_API BOOL per_read_selection(STREAM* s, BYTE* selection); +FREERDP_API void per_write_selection(STREAM* s, BYTE selection); +FREERDP_API BOOL per_read_number_of_sets(STREAM* s, BYTE* number); +FREERDP_API void per_write_number_of_sets(STREAM* s, BYTE number); FREERDP_API BOOL per_read_padding(STREAM* s, int length); FREERDP_API void per_write_padding(STREAM* s, int length); FREERDP_API BOOL per_read_integer(STREAM* s, uint32* integer); -FREERDP_API BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min); +FREERDP_API BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min); FREERDP_API void per_write_integer(STREAM* s, uint32 integer); -FREERDP_API void per_write_integer16(STREAM* s, uint16 integer, uint16 min); -FREERDP_API BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count); -FREERDP_API void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count); -FREERDP_API void per_write_object_identifier(STREAM* s, uint8 oid[6]); -FREERDP_API BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]); -FREERDP_API BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min); -FREERDP_API void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min); +FREERDP_API void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min); +FREERDP_API BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count); +FREERDP_API void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count); +FREERDP_API void per_write_object_identifier(STREAM* s, BYTE oid[6]); +FREERDP_API BOOL per_read_object_identifier(STREAM* s, BYTE oid[6]); +FREERDP_API BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min); +FREERDP_API void per_write_octet_string(STREAM* s, BYTE* oct_str, int length, int min); FREERDP_API BOOL per_read_numeric_string(STREAM* s, int min); -FREERDP_API void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min); +FREERDP_API void per_write_numeric_string(STREAM* s, BYTE* num_str, int length, int min); #endif /* FREERDP_CRYPTO_PER_H */ diff --git a/include/freerdp/crypto/tls.h b/include/freerdp/crypto/tls.h index 105d05186..949f60ae1 100644 --- a/include/freerdp/crypto/tls.h +++ b/include/freerdp/crypto/tls.h @@ -47,11 +47,11 @@ FREERDP_API BOOL tls_connect(rdpTls* tls); FREERDP_API BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file); FREERDP_API BOOL tls_disconnect(rdpTls* tls); -FREERDP_API int tls_read(rdpTls* tls, uint8* data, int length); -FREERDP_API int tls_write(rdpTls* tls, uint8* data, int length); +FREERDP_API int tls_read(rdpTls* tls, BYTE* data, int length); +FREERDP_API int tls_write(rdpTls* tls, BYTE* data, int length); -FREERDP_API int tls_read_all(rdpTls* tls, uint8* data, int length); -FREERDP_API int tls_write_all(rdpTls* tls, uint8* data, int length); +FREERDP_API int tls_read_all(rdpTls* tls, BYTE* data, int length); +FREERDP_API int tls_write_all(rdpTls* tls, BYTE* data, int length); FREERDP_API BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname); FREERDP_API void tls_print_certificate_error(char* hostname, char* fingerprint); diff --git a/include/freerdp/dvc.h b/include/freerdp/dvc.h index 2ab21f9fc..5c83776bc 100644 --- a/include/freerdp/dvc.h +++ b/include/freerdp/dvc.h @@ -73,7 +73,7 @@ struct _IWTSVirtualChannel /* Starts a write request on the channel. */ int (*Write) (IWTSVirtualChannel* pChannel, uint32 cbSize, - uint8* pBuffer, + BYTE* pBuffer, void* pReserved); /* Closes the channel. */ int (*Close) (IWTSVirtualChannel* pChannel); @@ -122,7 +122,7 @@ struct _IWTSListenerCallback the associated listener. */ int (*OnNewChannelConnection) (IWTSListenerCallback* pListenerCallback, IWTSVirtualChannel* pChannel, - uint8* Data, + BYTE* Data, int* pbAccept, IWTSVirtualChannelCallback** ppCallback); }; @@ -132,7 +132,7 @@ struct _IWTSVirtualChannelCallback /* Notifies the user about data that is being received. */ int (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, - uint8* pBuffer); + BYTE* pBuffer); /* Notifies the user that the channel has been closed. */ int (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback); }; diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 3200e3c4e..62b525451 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -54,8 +54,8 @@ typedef BOOL (*pAuthenticate)(freerdp* instance, char** username, char** passwor typedef BOOL (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint); typedef BOOL (*pVerifyChangedCertificate)(freerdp* instance, char* subject, char* issuer, char* new_fingerprint, char* old_fingerprint); -typedef int (*pSendChannelData)(freerdp* instance, int channelId, uint8* data, int size); -typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size); +typedef int (*pSendChannelData)(freerdp* instance, int channelId, BYTE* data, int size); +typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size); /** * Defines the context for a given instance of RDP connection. diff --git a/include/freerdp/gdi/16bpp.h b/include/freerdp/gdi/16bpp.h index 447dcea29..0594a4989 100644 --- a/include/freerdp/gdi/16bpp.h +++ b/include/freerdp/gdi/16bpp.h @@ -23,7 +23,7 @@ typedef int (*pLineTo_16bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); -FREERDP_API uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color); +FREERDP_API UINT16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color); FREERDP_API int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); FREERDP_API int BitBlt_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); diff --git a/include/freerdp/gdi/8bpp.h b/include/freerdp/gdi/8bpp.h index 329e3691b..6ee9e8e7b 100644 --- a/include/freerdp/gdi/8bpp.h +++ b/include/freerdp/gdi/8bpp.h @@ -23,7 +23,7 @@ typedef int (*pLineTo_8bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); -FREERDP_API uint8 gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color); +FREERDP_API BYTE gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color); FREERDP_API int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); FREERDP_API int BitBlt_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); diff --git a/include/freerdp/gdi/bitmap.h b/include/freerdp/gdi/bitmap.h index 558e6ec95..df79e6ea1 100644 --- a/include/freerdp/gdi/bitmap.h +++ b/include/freerdp/gdi/bitmap.h @@ -25,16 +25,16 @@ FREERDP_API GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos); FREERDP_API GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor); -FREERDP_API uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API BYTE gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel); -FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel); +FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, BYTE pixel); +FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel); FREERDP_API void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel); -FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data); +FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, BYTE* data); FREERDP_API HGDI_BITMAP gdi_CreateCompatibleBitmap(HGDI_DC hdc, int nWidth, int nHeight); FREERDP_API int gdi_BitBlt(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index 39b9cd292..c419eddb3 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -116,7 +116,7 @@ struct _GDIOBJECT { - uint8 objectType; + BYTE objectType; }; typedef struct _GDIOBJECT GDIOBJECT; typedef GDIOBJECT* HGDIOBJECT; @@ -127,7 +127,7 @@ typedef GDI_COLOR* LPGDI_COLOR; struct _GDI_RECT { - uint8 objectType; + BYTE objectType; int left; int top; int right; @@ -138,7 +138,7 @@ typedef GDI_RECT* HGDI_RECT; struct _GDI_RGN { - uint8 objectType; + BYTE objectType; int x; /* left */ int y; /* top */ int w; /* width */ @@ -150,20 +150,20 @@ typedef GDI_RGN* HGDI_RGN; struct _GDI_BITMAP { - uint8 objectType; + BYTE objectType; int bytesPerPixel; int bitsPerPixel; int width; int height; int scanline; - uint8* data; + BYTE* data; }; typedef struct _GDI_BITMAP GDI_BITMAP; typedef GDI_BITMAP* HGDI_BITMAP; struct _GDI_PEN { - uint8 objectType; + BYTE objectType; int style; int width; int posX; @@ -175,15 +175,15 @@ typedef GDI_PEN* HGDI_PEN; struct _GDI_PALETTEENTRY { - uint8 red; - uint8 green; - uint8 blue; + BYTE red; + BYTE green; + BYTE blue; }; typedef struct _GDI_PALETTEENTRY GDI_PALETTEENTRY; struct _GDI_PALETTE { - uint16 count; + UINT16 count; GDI_PALETTEENTRY *entries; }; typedef struct _GDI_PALETTE GDI_PALETTE; @@ -199,7 +199,7 @@ typedef GDI_POINT* HGDI_POINT; struct _GDI_BRUSH { - uint8 objectType; + BYTE objectType; int style; HGDI_BITMAP pattern; GDI_COLOR color; @@ -273,7 +273,7 @@ struct rdp_gdi HCLRCONV clrconv; gdiBitmap* primary; gdiBitmap* drawing; - uint8* primary_buffer; + BYTE* primary_buffer; GDI_COLOR textColor; void* rfx_context; void* nsc_context; @@ -281,13 +281,13 @@ struct rdp_gdi gdiBitmap* image; }; -FREERDP_API uint32 gdi_rop3_code(uint8 code); -FREERDP_API uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y); -FREERDP_API uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y); -FREERDP_API int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width); +FREERDP_API uint32 gdi_rop3_code(BYTE code); +FREERDP_API BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y); +FREERDP_API BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y); +FREERDP_API int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width); FREERDP_API void gdi_resize(rdpGdi* gdi, int width, int height); -FREERDP_API int gdi_init(freerdp* instance, uint32 flags, uint8* buffer); +FREERDP_API int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer); FREERDP_API void gdi_free(freerdp* instance); #ifdef WITH_DEBUG_GDI diff --git a/include/freerdp/gdi/pen.h b/include/freerdp/gdi/pen.h index 827d6e20c..1872c71a4 100644 --- a/include/freerdp/gdi/pen.h +++ b/include/freerdp/gdi/pen.h @@ -24,8 +24,8 @@ #include FREERDP_API HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor); -FREERDP_API uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen); -FREERDP_API uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen); +FREERDP_API BYTE gdi_GetPenColor_8bpp(HGDI_PEN pen); +FREERDP_API UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen); FREERDP_API uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen); #endif /* __GDI_PEN_H */ diff --git a/include/freerdp/graphics.h b/include/freerdp/graphics.h index 907fac1b6..ef689aaf0 100644 --- a/include/freerdp/graphics.h +++ b/include/freerdp/graphics.h @@ -35,7 +35,7 @@ typedef void (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Paint)(rdpContext* context, rdpBitmap* bitmap); typedef void (*pBitmap_Decompress)(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, + BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id); typedef void (*pBitmap_SetSurface)(rdpContext* context, rdpBitmap* bitmap, BOOL primary); @@ -58,7 +58,7 @@ struct rdp_bitmap uint32 bpp; /* 22 */ uint32 flags; /* 23 */ uint32 length; /* 24 */ - uint8* data; /* 25 */ + BYTE* data; /* 25 */ uint32 paddingB[32 - 26]; /* 26 */ BOOL compressed; /* 32 */ @@ -71,10 +71,10 @@ FREERDP_API void Bitmap_New(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Register(rdpContext* context, rdpBitmap* bitmap); FREERDP_API void Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, BOOL compressed); + BYTE* data, int width, int height, int bpp, int length, BOOL compressed); FREERDP_API void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, - uint16 left, uint16 top, uint16 right, uint16 bottom); -FREERDP_API void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, uint16 height); + UINT16 left, UINT16 top, UINT16 right, UINT16 bottom); +FREERDP_API void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, UINT16 width, UINT16 height); FREERDP_API void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary); /* Pointer Class */ @@ -102,8 +102,8 @@ struct rdp_pointer uint32 xorBpp; /* 20 */ uint32 lengthAndMask; /* 21 */ uint32 lengthXorMask; /* 22 */ - uint8* xorMaskData; /* 23 */ - uint8* andMaskData; /* 24 */ + BYTE* xorMaskData; /* 23 */ + BYTE* andMaskData; /* 24 */ uint32 paddingB[32 - 25]; /* 25 */ }; @@ -137,7 +137,7 @@ struct rdp_glyph uint32 cx; /* 18 */ uint32 cy; /* 19 */ uint32 cb; /* 20 */ - uint8* aj; /* 21 */ + BYTE* aj; /* 21 */ uint32 paddingB[32 - 22]; /* 22 */ }; diff --git a/include/freerdp/input.h b/include/freerdp/input.h index 0275f0957..ec3f0126d 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -55,10 +55,10 @@ typedef struct rdp_input rdpInput; #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4 typedef void (*pSynchronizeEvent)(rdpInput* input, uint32 flags); -typedef void (*pKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code); -typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code); -typedef void (*pMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y); -typedef void (*pExtendedMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y); +typedef void (*pKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code); +typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code); +typedef void (*pMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +typedef void (*pExtendedMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); struct rdp_input { @@ -75,10 +75,10 @@ struct rdp_input }; FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags); -FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code); +FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode); -FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); +FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); #endif /* __INPUT_API_H */ diff --git a/include/freerdp/listener.h b/include/freerdp/listener.h index 120c09ac5..4c16b3a0f 100644 --- a/include/freerdp/listener.h +++ b/include/freerdp/listener.h @@ -31,7 +31,7 @@ typedef struct rdp_freerdp_listener freerdp_listener; extern "C" { #endif -typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, uint16 port); +typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, UINT16 port); typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance, const char* path); typedef BOOL (*psListenerGetFileDescriptor)(freerdp_listener* instance, void** rfds, int* rcount); typedef BOOL (*psListenerCheckFileDescriptor)(freerdp_listener* instance); diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index cfa211282..3139ab2fb 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -41,8 +41,8 @@ typedef BOOL (*psPeerPostConnect)(freerdp_peer* client); typedef BOOL (*psPeerActivate)(freerdp_peer* client); typedef BOOL (*psPeerLogon)(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic); -typedef int (*psPeerSendChannelData)(freerdp_peer* client, int channelId, uint8* data, int size); -typedef int (*psPeerReceiveChannelData)(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size); +typedef int (*psPeerSendChannelData)(freerdp_peer* client, int channelId, BYTE* data, int size); +typedef int (*psPeerReceiveChannelData)(freerdp_peer* client, int channelId, BYTE* data, int size, int flags, int total_size); struct rdp_freerdp_peer { diff --git a/include/freerdp/pointer.h b/include/freerdp/pointer.h index 5a558a495..50c23fc46 100644 --- a/include/freerdp/pointer.h +++ b/include/freerdp/pointer.h @@ -53,8 +53,8 @@ struct _POINTER_COLOR_UPDATE uint32 height; uint32 lengthAndMask; uint32 lengthXorMask; - uint8* xorMaskData; - uint8* andMaskData; + BYTE* xorMaskData; + BYTE* andMaskData; }; typedef struct _POINTER_COLOR_UPDATE POINTER_COLOR_UPDATE; diff --git a/include/freerdp/primary.h b/include/freerdp/primary.h index fcec1bf80..346138cfe 100644 --- a/include/freerdp/primary.h +++ b/include/freerdp/primary.h @@ -42,8 +42,8 @@ struct rdp_brush uint32 style; uint32 hatch; uint32 index; - uint8* data; - uint8 p8x8[8]; + BYTE* data; + BYTE p8x8[8]; }; typedef struct rdp_brush rdpBrush; @@ -190,7 +190,7 @@ struct _MULTI_DRAW_NINE_GRID_ORDER uint32 bitmapId; uint32 nDeltaEntries; uint32 cbData; - uint8* codeDeltaList; + BYTE* codeDeltaList; }; typedef struct _MULTI_DRAW_NINE_GRID_ORDER MULTI_DRAW_NINE_GRID_ORDER; @@ -311,7 +311,7 @@ struct _GLYPH_INDEX_ORDER sint32 x; sint32 y; uint32 cbData; - uint8 data[256]; + BYTE data[256]; }; typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER; @@ -334,7 +334,7 @@ struct _FAST_INDEX_ORDER sint32 x; sint32 y; uint32 cbData; - uint8 data[256]; + BYTE data[256]; }; typedef struct _FAST_INDEX_ORDER FAST_INDEX_ORDER; @@ -356,7 +356,7 @@ struct _FAST_GLYPH_ORDER sint32 x; sint32 y; uint32 cbData; - uint8 data[256]; + BYTE data[256]; void* glyph_data; }; typedef struct _FAST_GLYPH_ORDER FAST_GLYPH_ORDER; diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 6e971369b..40b4ea783 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -152,8 +152,8 @@ enum SPI_MASK struct _RAIL_UNICODE_STRING { - uint16 length; - uint8* string; + UINT16 length; + BYTE* string; }; typedef struct _RAIL_UNICODE_STRING RAIL_UNICODE_STRING; @@ -181,7 +181,7 @@ typedef struct _RAIL_CLIENT_STATUS_ORDER RAIL_CLIENT_STATUS_ORDER; struct _RAIL_EXEC_ORDER { - uint16 flags; + UINT16 flags; RAIL_UNICODE_STRING exeOrFile; RAIL_UNICODE_STRING workingDir; RAIL_UNICODE_STRING arguments; @@ -190,8 +190,8 @@ typedef struct _RAIL_EXEC_ORDER RAIL_EXEC_ORDER; struct _RAIL_EXEC_RESULT_ORDER { - uint16 flags; - uint16 execResult; + UINT16 flags; + UINT16 execResult; uint32 rawResult; RAIL_UNICODE_STRING exeOrFile; }; @@ -224,15 +224,15 @@ typedef struct _RAIL_ACTIVATE_ORDER RAIL_ACTIVATE_ORDER; struct _RAIL_SYSMENU_ORDER { uint32 windowId; - uint16 left; - uint16 top; + UINT16 left; + UINT16 top; }; typedef struct _RAIL_SYSMENU_ORDER RAIL_SYSMENU_ORDER; struct _RAIL_SYSCOMMAND_ORDER { uint32 windowId; - uint16 command; + UINT16 command; }; typedef struct _RAIL_SYSCOMMAND_ORDER RAIL_SYSCOMMAND_ORDER; @@ -247,14 +247,14 @@ typedef struct _RAIL_NOTIFY_EVENT_ORDER RAIL_NOTIFY_EVENT_ORDER; struct _RAIL_MINMAXINFO_ORDER { uint32 windowId; - uint16 maxWidth; - uint16 maxHeight; - uint16 maxPosX; - uint16 maxPosY; - uint16 minTrackWidth; - uint16 minTrackHeight; - uint16 maxTrackWidth; - uint16 maxTrackHeight; + UINT16 maxWidth; + UINT16 maxHeight; + UINT16 maxPosX; + UINT16 maxPosY; + UINT16 minTrackWidth; + UINT16 minTrackHeight; + UINT16 maxTrackWidth; + UINT16 maxTrackHeight; }; typedef struct _RAIL_MINMAXINFO_ORDER RAIL_MINMAXINFO_ORDER; @@ -262,19 +262,19 @@ struct _RAIL_LOCALMOVESIZE_ORDER { uint32 windowId; BOOL isMoveSizeStart; - uint16 moveSizeType; - uint16 posX; - uint16 posY; + UINT16 moveSizeType; + UINT16 posX; + UINT16 posY; }; typedef struct _RAIL_LOCALMOVESIZE_ORDER RAIL_LOCALMOVESIZE_ORDER; struct _RAIL_WINDOWMOVE_ORDER { uint32 windowId; - uint16 left; - uint16 top; - uint16 right; - uint16 bottom; + UINT16 left; + UINT16 top; + UINT16 right; + UINT16 bottom; }; typedef struct _RAIL_WINDOWMOVE_ORDER RAIL_WINDOW_MOVE_ORDER; @@ -288,7 +288,7 @@ struct _RAIL_GET_APPID_RESP_ORDER { uint32 windowId; RAIL_UNICODE_STRING applicationId; - uint8 applicationIdBuffer[512]; + BYTE applicationIdBuffer[512]; }; typedef struct _RAIL_GET_APPID_RESP_ORDER RAIL_GET_APPID_RESP_ORDER; diff --git a/include/freerdp/rail/icon.h b/include/freerdp/rail/icon.h index 05a0c7cf8..e5e91427f 100644 --- a/include/freerdp/rail/icon.h +++ b/include/freerdp/rail/icon.h @@ -47,13 +47,13 @@ typedef struct _WINDOW_ICON_CACHE WINDOW_ICON_CACHE; struct rdp_icon_cache { rdpRail* rail; - uint8 numCaches; - uint16 numCacheEntries; + BYTE numCaches; + UINT16 numCacheEntries; WINDOW_ICON_CACHE* caches; }; -ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** extra); -void icon_cache_put(rdpIconCache* cache, uint8 id, uint16 index, ICON_INFO* entry, void* extra); +ICON_INFO* icon_cache_get(rdpIconCache* cache, BYTE id, UINT16 index, void** extra); +void icon_cache_put(rdpIconCache* cache, BYTE id, UINT16 index, ICON_INFO* entry, void* extra); rdpIconCache* icon_cache_new(rdpRail* rail); void icon_cache_free(rdpIconCache* cache); diff --git a/include/freerdp/rail/rail.h b/include/freerdp/rail/rail.h index 5f43d4d10..cf5944ec9 100644 --- a/include/freerdp/rail/rail.h +++ b/include/freerdp/rail/rail.h @@ -35,7 +35,7 @@ typedef void (*railCreateWindow)(rdpRail* rail, rdpWindow* window); typedef void (*railDestroyWindow)(rdpRail* rail, rdpWindow* window); typedef void (*railMoveWindow)(rdpRail* rail, rdpWindow* window); -typedef void (*railShowWindow)(rdpRail* rail, rdpWindow* window, uint8 state); +typedef void (*railShowWindow)(rdpRail* rail, rdpWindow* window, BYTE state); typedef void (*railSetWindowText)(rdpRail* rail, rdpWindow* window); typedef void (*railSetWindowIcon)(rdpRail* rail, rdpWindow* window, rdpIcon* icon); typedef void (*railSetWindowRects)(rdpRail* rail, rdpWindow* window); diff --git a/include/freerdp/rail/window.h b/include/freerdp/rail/window.h index dd4c67211..78d681699 100644 --- a/include/freerdp/rail/window.h +++ b/include/freerdp/rail/window.h @@ -45,13 +45,13 @@ struct rdp_window uint32 ownerWindowId; uint32 style; uint32 extendedStyle; - uint8 showState; + BYTE showState; RAIL_UNICODE_STRING titleInfo; uint32 clientOffsetX; uint32 clientOffsetY; uint32 clientAreaWidth; uint32 clientAreaHeight; - uint8 RPContent; + BYTE RPContent; uint32 rootParentHandle; sint32 windowOffsetX; sint32 windowOffsetY; @@ -59,11 +59,11 @@ struct rdp_window uint32 windowClientDeltaY; uint32 windowWidth; uint32 windowHeight; - uint16 numWindowRects; + UINT16 numWindowRects; RECTANGLE_16* windowRects; uint32 visibleOffsetX; uint32 visibleOffsetY; - uint16 numVisibilityRects; + UINT16 numVisibilityRects; RECTANGLE_16* visibilityRects; }; diff --git a/include/freerdp/scancode.h b/include/freerdp/scancode.h index 36603cd4e..98e2623fe 100644 --- a/include/freerdp/scancode.h +++ b/include/freerdp/scancode.h @@ -28,7 +28,7 @@ */ typedef uint32 RDP_SCANCODE; /* Our own representation of a RDP protocol scancode */ -#define RDP_SCANCODE_CODE(_rdp_scancode) ((uint8)(_rdp_scancode & 0xFF)) +#define RDP_SCANCODE_CODE(_rdp_scancode) ((BYTE)(_rdp_scancode & 0xFF)) #define RDP_SCANCODE_EXTENDED(_rdp_scancode) (((_rdp_scancode) & 0x100) ? TRUE : FALSE) #define MAKE_RDP_SCANCODE(_code, _extended) (((_code) & 0xFF) | ((_extended) ? 0x100 : 0)) diff --git a/include/freerdp/secondary.h b/include/freerdp/secondary.h index 0a22bd416..0213743eb 100644 --- a/include/freerdp/secondary.h +++ b/include/freerdp/secondary.h @@ -75,8 +75,8 @@ struct _CACHE_BITMAP_ORDER uint32 bitmapLength; uint32 cacheIndex; BOOL compressed; - uint8 bitmapComprHdr[8]; - uint8* bitmapDataStream; + BYTE bitmapComprHdr[8]; + BYTE* bitmapDataStream; }; typedef struct _CACHE_BITMAP_ORDER CACHE_BITMAP_ORDER; @@ -96,7 +96,7 @@ struct _CACHE_BITMAP_V2_ORDER uint32 cbCompMainBodySize; uint32 cbScanWidth; uint32 cbUncompressedSize; - uint8* bitmapDataStream; + BYTE* bitmapDataStream; }; typedef struct _CACHE_BITMAP_V2_ORDER CACHE_BITMAP_V2_ORDER; @@ -107,7 +107,7 @@ struct _BITMAP_DATA_EX uint32 width; uint32 height; uint32 length; - uint8* data; + BYTE* data; }; typedef struct _BITMAP_DATA_EX BITMAP_DATA_EX; @@ -139,7 +139,7 @@ struct _GLYPH_DATA uint32 cx; uint32 cy; uint32 cb; - uint8* aj; + BYTE* aj; }; typedef struct _GLYPH_DATA GLYPH_DATA; @@ -148,7 +148,7 @@ struct _CACHE_GLYPH_ORDER uint32 cacheId; uint32 cGlyphs; GLYPH_DATA* glyphData[255]; - uint8* unicodeCharacters; + BYTE* unicodeCharacters; }; typedef struct _CACHE_GLYPH_ORDER CACHE_GLYPH_ORDER; @@ -160,7 +160,7 @@ struct _GLYPH_DATA_V2 uint32 cx; uint32 cy; uint32 cb; - uint8* aj; + BYTE* aj; }; typedef struct _GLYPH_DATA_V2 GLYPH_DATA_V2; @@ -170,7 +170,7 @@ struct _CACHE_GLYPH_V2_ORDER uint32 flags; uint32 cGlyphs; GLYPH_DATA_V2* glyphData[255]; - uint8* unicodeCharacters; + BYTE* unicodeCharacters; }; typedef struct _CACHE_GLYPH_V2_ORDER CACHE_GLYPH_V2_ORDER; @@ -182,7 +182,7 @@ struct _CACHE_BRUSH_ORDER uint32 cy; uint32 style; uint32 length; - uint8* data; + BYTE* data; }; typedef struct _CACHE_BRUSH_ORDER CACHE_BRUSH_ORDER; diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index f497cf97e..f44aadec8 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -99,14 +99,14 @@ /* SYSTEM_TIME */ typedef struct { - uint16 wYear; - uint16 wMonth; - uint16 wDayOfWeek; - uint16 wDay; - uint16 wHour; - uint16 wMinute; - uint16 wSecond; - uint16 wMilliseconds; + UINT16 wYear; + UINT16 wMonth; + UINT16 wDayOfWeek; + UINT16 wDay; + UINT16 wHour; + UINT16 wMinute; + UINT16 wSecond; + UINT16 wMilliseconds; } SYSTEM_TIME; /* TIME_ZONE_INFORMATION */ @@ -128,7 +128,7 @@ typedef struct uint32 cbLen; uint32 version; uint32 logonId; - uint8 securityVerifier[16]; + BYTE securityVerifier[16]; } ARC_CS_PRIVATE_PACKET; /* ARC_SC_PRIVATE_PACKET */ @@ -137,7 +137,7 @@ typedef struct uint32 cbLen; uint32 version; uint32 logonId; - uint8 arcRandomBits[16]; + BYTE arcRandomBits[16]; } ARC_SC_PRIVATE_PACKET; /* Certificates */ @@ -145,7 +145,7 @@ typedef struct struct rdp_CertBlob { uint32 length; - uint8* data; + BYTE* data; }; typedef struct rdp_CertBlob rdpCertBlob; @@ -160,7 +160,7 @@ struct rdp_CertInfo { BYTE* Modulus; DWORD ModulusLength; - uint8 exponent[4]; + BYTE exponent[4]; }; typedef struct rdp_CertInfo rdpCertInfo; @@ -177,7 +177,7 @@ struct rdp_key DWORD ModulusLength; BYTE* PrivateExponent; DWORD PrivateExponentLength; - uint8 exponent[4]; + BYTE exponent[4]; }; typedef struct rdp_key rdpKey; @@ -205,8 +205,8 @@ struct rdp_ext_set struct _BITMAP_CACHE_CELL_INFO { - uint16 numEntries; - uint16 maxSize; + UINT16 numEntries; + UINT16 maxSize; }; typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO; @@ -221,8 +221,8 @@ typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO; struct _GLYPH_CACHE_DEFINITION { - uint16 cacheEntries; - uint16 cacheMaximumCellSize; + UINT16 cacheEntries; + UINT16 cacheMaximumCellSize; }; typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION; @@ -369,8 +369,8 @@ struct rdp_settings ALIGN64 BOOL frame_marker; /* 221 */ ALIGN64 BOOL fastpath_input; /* 222 */ ALIGN64 BOOL fastpath_output; /* 223 */ - ALIGN64 uint8* received_caps; /* 224 */ - ALIGN64 uint8* order_support; /* 225 */ + ALIGN64 BYTE* received_caps; /* 224 */ + ALIGN64 BYTE* order_support; /* 225 */ ALIGN64 BOOL surface_commands; /* 226 */ ALIGN64 BOOL disable_wallpaper; /* 227 */ ALIGN64 BOOL disable_full_window_drag; /* 228 */ diff --git a/include/freerdp/types.h b/include/freerdp/types.h index b6905c522..b17278135 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -40,10 +40,6 @@ #ifdef FREERDP_HAVE_INTTYPES_H #include -typedef uint8_t uint8; -typedef int8_t sint8; -typedef uint16_t uint16; -typedef int16_t sint16; typedef uint32_t uint32; typedef int32_t sint32; typedef uint64_t uint64; @@ -51,10 +47,6 @@ typedef int64_t sint64; #else -typedef unsigned char uint8; -typedef signed char sint8; -typedef unsigned short uint16; -typedef signed short sint16; typedef unsigned int uint32; typedef signed int sint32; #ifdef _WIN32 @@ -67,45 +59,6 @@ typedef signed long long sint64; #endif /* HAVE_INTTYPES_H */ -#ifdef FREERDP_HAVE_STDBOOL_H - -#include - -#ifdef _WIN32 -#define BOOL BOOLEAN -#else -typedef int BOOL; -#endif - -#else - -#ifndef __cplusplus - -#define TRUE 1 -#define FALSE 0 - -#ifdef _WIN32 -#define BOOL BOOLEAN -#else -typedef int BOOL; -#endif - -#else /* ifdef __cplusplus */ - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -typedef int BOOL; - -#endif /* __cplusplus */ - -#endif /* FREERDP_HAVE_STDBOOL_H */ - #ifndef MIN #define MIN(x,y) (((x) < (y)) ? (x) : (y)) #endif @@ -119,35 +72,35 @@ typedef int BOOL; typedef struct { uint32 time_low; - uint16 time_mid; - uint16 time_hi_and_version; - uint8 clock_seq_hi_and_reserved; - uint8 clock_seq_low; - uint8 node[6]; + UINT16 time_mid; + UINT16 time_hi_and_version; + BYTE clock_seq_hi_and_reserved; + BYTE clock_seq_low; + BYTE node[6]; } uuid; struct _RDP_PLUGIN_DATA { - uint16 size; + UINT16 size; void* data[4]; }; typedef struct _RDP_PLUGIN_DATA RDP_PLUGIN_DATA; struct _RDP_RECT { - sint16 x; - sint16 y; - sint16 width; - sint16 height; + INT16 x; + INT16 y; + INT16 width; + INT16 height; }; typedef struct _RDP_RECT RDP_RECT; struct _RECTANGLE_16 { - uint16 left; - uint16 top; - uint16 right; - uint16 bottom; + UINT16 left; + UINT16 top; + UINT16 right; + UINT16 bottom; }; typedef struct _RECTANGLE_16 RECTANGLE_16; @@ -158,8 +111,8 @@ typedef void (*RDP_EVENT_CALLBACK) (RDP_EVENT* event); struct _RDP_EVENT { - uint16 event_class; - uint16 event_type; + UINT16 event_class; + UINT16 event_type; RDP_EVENT_CALLBACK on_event_free_callback; void* user_data; }; diff --git a/include/freerdp/update.h b/include/freerdp/update.h index e96832673..24c17a964 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -52,7 +52,7 @@ struct _BITMAP_DATA uint32 cbCompMainBodySize; uint32 cbScanWidth; uint32 cbUncompressedSize; - uint8* bitmapDataStream; + BYTE* bitmapDataStream; BOOL compressed; }; typedef struct _BITMAP_DATA BITMAP_DATA; @@ -69,9 +69,9 @@ typedef struct _BITMAP_UPDATE BITMAP_UPDATE; struct _PALETTE_ENTRY { - uint8 red; - uint8 green; - uint8 blue; + BYTE red; + BYTE green; + BYTE blue; }; typedef struct _PALETTE_ENTRY PALETTE_ENTRY; @@ -112,7 +112,7 @@ struct _SURFACE_BITS_COMMAND uint32 width; uint32 height; uint32 bitmapDataLength; - uint8* bitmapData; + BYTE* bitmapData; }; typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND; @@ -141,8 +141,8 @@ typedef void (*pBitmapUpdate)(rdpContext* context, BITMAP_UPDATE* bitmap); typedef void (*pPalette)(rdpContext* context, PALETTE_UPDATE* palette); typedef void (*pPlaySound)(rdpContext* context, PLAY_SOUND_UPDATE* play_sound); -typedef void (*pRefreshRect)(rdpContext* context, uint8 count, RECTANGLE_16* areas); -typedef void (*pSuppressOutput)(rdpContext* context, uint8 allow, RECTANGLE_16* area); +typedef void (*pRefreshRect)(rdpContext* context, BYTE count, RECTANGLE_16* areas); +typedef void (*pSuppressOutput)(rdpContext* context, BYTE allow, RECTANGLE_16* area); typedef void (*pSurfaceCommand)(rdpContext* context, STREAM* s); typedef void (*pSurfaceBits)(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command); diff --git a/include/freerdp/utils/dsp.h b/include/freerdp/utils/dsp.h index 8abd65bb6..a87babe1a 100644 --- a/include/freerdp/utils/dsp.h +++ b/include/freerdp/utils/dsp.h @@ -26,12 +26,12 @@ union _ADPCM { struct { - sint16 last_sample[2]; - sint16 last_step[2]; + INT16 last_sample[2]; + INT16 last_step[2]; } ima; struct { - uint8 predictor[2]; + BYTE predictor[2]; sint32 delta[2]; sint32 sample1[2]; sint32 sample2[2]; @@ -42,31 +42,31 @@ typedef union _ADPCM ADPCM; typedef struct _FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT; struct _FREERDP_DSP_CONTEXT { - uint8* resampled_buffer; + BYTE* resampled_buffer; uint32 resampled_size; uint32 resampled_frames; uint32 resampled_maxlength; - uint8* adpcm_buffer; + BYTE* adpcm_buffer; uint32 adpcm_size; uint32 adpcm_maxlength; ADPCM adpcm; void (*resample)(FREERDP_DSP_CONTEXT* context, - const uint8* src, int bytes_per_sample, + const BYTE* src, int bytes_per_sample, uint32 schan, uint32 srate, int sframes, uint32 rchan, uint32 rrate); void (*decode_ima_adpcm)(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size); + const BYTE* src, int size, int channels, int block_size); void (*encode_ima_adpcm)(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size); + const BYTE* src, int size, int channels, int block_size); void (*decode_ms_adpcm)(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size); + const BYTE* src, int size, int channels, int block_size); void (*encode_ms_adpcm)(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size); + const BYTE* src, int size, int channels, int block_size); }; FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(void); diff --git a/include/freerdp/utils/event.h b/include/freerdp/utils/event.h index d9506b6d1..bf69d5d5c 100644 --- a/include/freerdp/utils/event.h +++ b/include/freerdp/utils/event.h @@ -23,7 +23,7 @@ #include #include -FREERDP_API RDP_EVENT* freerdp_event_new(uint16 event_class, uint16 event_type, +FREERDP_API RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type, RDP_EVENT_CALLBACK on_event_free_callback, void* user_data); FREERDP_API void freerdp_event_free(RDP_EVENT* event); diff --git a/include/freerdp/utils/hexdump.h b/include/freerdp/utils/hexdump.h index 00dfcca9e..7485f117e 100644 --- a/include/freerdp/utils/hexdump.h +++ b/include/freerdp/utils/hexdump.h @@ -24,6 +24,6 @@ #define FREERDP_HEXDUMP_LINE_LENGTH 16 -FREERDP_API void freerdp_hexdump(uint8* data, int length); +FREERDP_API void freerdp_hexdump(BYTE* data, int length); #endif /* __UTILS_HEXDUMP_H */ diff --git a/include/freerdp/utils/msusb.h b/include/freerdp/utils/msusb.h index 89dc32679..36ac8becf 100644 --- a/include/freerdp/utils/msusb.h +++ b/include/freerdp/utils/msusb.h @@ -29,52 +29,52 @@ #define zfree(p) do { if (p != NULL) {free(p); p = NULL;} } while (0) /* Data maintenance helper only used in URBDRC */ -#define data_read_uint8(_p, _v) do { _v = \ - *((uint8 *) (_p)); \ +#define data_read_BYTE(_p, _v) do { _v = \ + *((BYTE *) (_p)); \ } while (0) -#define data_read_uint16(_p, _v) do { _v = \ - ((uint16) (*((uint8 *) (_p)))) + \ - ((uint16) (*(((uint8 *) (_p)) + 1)) << 8); \ +#define data_read_UINT16(_p, _v) do { _v = \ + ((UINT16) (*((BYTE *) (_p)))) + \ + ((UINT16) (*(((BYTE *) (_p)) + 1)) << 8); \ } while (0) #define data_read_uint32(_p, _v) do { _v = \ - (uint32) (*((uint8 *) (_p))) + \ - ((uint32) (*(((uint8 *) (_p)) + 1)) << 8) + \ - ((uint32) (*(((uint8 *) (_p)) + 2)) << 16) + \ - ((uint32) (*(((uint8 *) (_p)) + 3)) << 24); \ + (uint32) (*((BYTE *) (_p))) + \ + ((uint32) (*(((BYTE *) (_p)) + 1)) << 8) + \ + ((uint32) (*(((BYTE *) (_p)) + 2)) << 16) + \ + ((uint32) (*(((BYTE *) (_p)) + 3)) << 24); \ } while (0) #define data_read_uint64(_p, _v) do { _v = \ - (uint64) (*((uint8 *) (_p))) + \ - ((uint64) (*(((uint8 *) (_p)) + 1)) << 8) + \ - ((uint64) (*(((uint8 *) (_p)) + 2)) << 16) + \ - ((uint64) (*(((uint8 *) (_p)) + 3)) << 24) + \ - ((uint64) (*(((uint8 *) (_p)) + 4)) << 32) + \ - ((uint64) (*(((uint8 *) (_p)) + 5)) << 40) + \ - ((uint64) (*(((uint8 *) (_p)) + 6)) << 48) + \ - ((uint64) (*(((uint8 *) (_p)) + 7)) << 56); \ + (uint64) (*((BYTE *) (_p))) + \ + ((uint64) (*(((BYTE *) (_p)) + 1)) << 8) + \ + ((uint64) (*(((BYTE *) (_p)) + 2)) << 16) + \ + ((uint64) (*(((BYTE *) (_p)) + 3)) << 24) + \ + ((uint64) (*(((BYTE *) (_p)) + 4)) << 32) + \ + ((uint64) (*(((BYTE *) (_p)) + 5)) << 40) + \ + ((uint64) (*(((BYTE *) (_p)) + 6)) << 48) + \ + ((uint64) (*(((BYTE *) (_p)) + 7)) << 56); \ } while (0) -#define data_write_uint8(_p, _v) do { \ - *((uint8 *) _p) = (uint8) (_v); \ +#define data_write_BYTE(_p, _v) do { \ + *((BYTE *) _p) = (BYTE) (_v); \ } while (0) -#define data_write_uint16(_p, _v) do { \ - *((uint8 *) _p) = (uint8) (((uint16) (_v)) & 0xff); \ - *(((uint8 *) _p) + 1) = (uint8) ((((uint16) (_v)) >> 8) & 0xff); \ +#define data_write_UINT16(_p, _v) do { \ + *((BYTE *) _p) = (BYTE) (((UINT16) (_v)) & 0xff); \ + *(((BYTE *) _p) + 1) = (BYTE) ((((UINT16) (_v)) >> 8) & 0xff); \ } while (0) #define data_write_uint32(_p, _v) do { \ - *((uint8 *) _p) = (uint8) (((uint32) (_v)) & 0xff); \ - *(((uint8 *) _p) + 1) = (uint8) ((((uint32) (_v)) >> 8) & 0xff); \ - *(((uint8 *) _p) + 2) = (uint8) ((((uint32) (_v)) >> 16) & 0xff); \ - *(((uint8 *) _p) + 3) = (uint8) ((((uint32) (_v)) >> 24) & 0xff); \ + *((BYTE *) _p) = (BYTE) (((uint32) (_v)) & 0xff); \ + *(((BYTE *) _p) + 1) = (BYTE) ((((uint32) (_v)) >> 8) & 0xff); \ + *(((BYTE *) _p) + 2) = (BYTE) ((((uint32) (_v)) >> 16) & 0xff); \ + *(((BYTE *) _p) + 3) = (BYTE) ((((uint32) (_v)) >> 24) & 0xff); \ } while (0) #define data_write_uint64(_p, _v) do { \ - *((uint8 *) _p) = (uint8) (((uint64) (_v)) & 0xff); \ - *(((uint8 *) _p) + 1) = (uint8) ((((uint64) (_v)) >> 8) & 0xff); \ - *(((uint8 *) _p) + 2) = (uint8) ((((uint64) (_v)) >> 16) & 0xff); \ - *(((uint8 *) _p) + 3) = (uint8) ((((uint64) (_v)) >> 24) & 0xff); \ - *(((uint8 *) _p) + 4) = (uint8) ((((uint64) (_v)) >> 32) & 0xff); \ - *(((uint8 *) _p) + 5) = (uint8) ((((uint64) (_v)) >> 40) & 0xff); \ - *(((uint8 *) _p) + 6) = (uint8) ((((uint64) (_v)) >> 48) & 0xff); \ - *(((uint8 *) _p) + 7) = (uint8) ((((uint64) (_v)) >> 56) & 0xff); \ + *((BYTE *) _p) = (BYTE) (((uint64) (_v)) & 0xff); \ + *(((BYTE *) _p) + 1) = (BYTE) ((((uint64) (_v)) >> 8) & 0xff); \ + *(((BYTE *) _p) + 2) = (BYTE) ((((uint64) (_v)) >> 16) & 0xff); \ + *(((BYTE *) _p) + 3) = (BYTE) ((((uint64) (_v)) >> 24) & 0xff); \ + *(((BYTE *) _p) + 4) = (BYTE) ((((uint64) (_v)) >> 32) & 0xff); \ + *(((BYTE *) _p) + 5) = (BYTE) ((((uint64) (_v)) >> 40) & 0xff); \ + *(((BYTE *) _p) + 6) = (BYTE) ((((uint64) (_v)) >> 48) & 0xff); \ + *(((BYTE *) _p) + 7) = (BYTE) ((((uint64) (_v)) >> 56) & 0xff); \ } while (0) typedef struct _MSUSB_INTERFACE_DESCRIPTOR MSUSB_INTERFACE_DESCRIPTOR; @@ -83,35 +83,35 @@ typedef struct _MSUSB_CONFIG_DESCRIPTOR MSUSB_CONFIG_DESCRIPTOR; struct _MSUSB_PIPE_DESCRIPTOR { - uint16 MaximumPacketSize; + UINT16 MaximumPacketSize; uint32 MaximumTransferSize; uint32 PipeFlags; uint32 PipeHandle; - uint8 bEndpointAddress; - uint8 bInterval; - uint8 PipeType; + BYTE bEndpointAddress; + BYTE bInterval; + BYTE PipeType; int InitCompleted; } __attribute__((packed)); struct _MSUSB_INTERFACE_DESCRIPTOR { - uint16 Length; - uint16 NumberOfPipesExpected; - uint8 InterfaceNumber; - uint8 AlternateSetting; + UINT16 Length; + UINT16 NumberOfPipesExpected; + BYTE InterfaceNumber; + BYTE AlternateSetting; uint32 NumberOfPipes; uint32 InterfaceHandle; - uint8 bInterfaceClass; - uint8 bInterfaceSubClass; - uint8 bInterfaceProtocol; + BYTE bInterfaceClass; + BYTE bInterfaceSubClass; + BYTE bInterfaceProtocol; MSUSB_PIPE_DESCRIPTOR ** MsPipes; int InitCompleted; } __attribute__((packed)); struct _MSUSB_CONFIG_DESCRIPTOR { - uint16 wTotalLength; - uint8 bConfigurationValue; + UINT16 wTotalLength; + BYTE bConfigurationValue; uint32 ConfigurationHandle; uint32 NumInterfaces; MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; @@ -123,15 +123,15 @@ struct _MSUSB_CONFIG_DESCRIPTOR void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, uint32 NewNumberOfPipes); /* MSUSB_INTERFACE exported functions */ -void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, uint8 InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface); -MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(uint8* data, uint32 data_size, int* offset); -int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, uint8* data, int* offset); +void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface); +MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, uint32 data_size, int* offset); +int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, BYTE* data, int* offset); /* MSUSB_CONFIG exported functions */ MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_new(); void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig); -MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(uint8* data, uint32 data_size, uint32 NumInterfaces); -int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, uint8* data, int * offset); +MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, uint32 data_size, uint32 NumInterfaces); +int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset); void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg); #endif diff --git a/include/freerdp/utils/pcap.h b/include/freerdp/utils/pcap.h index 667a0c5e5..75115c70c 100644 --- a/include/freerdp/utils/pcap.h +++ b/include/freerdp/utils/pcap.h @@ -26,8 +26,8 @@ struct _pcap_header { uint32 magic_number; /* magic number */ - uint16 version_major; /* major version number */ - uint16 version_minor; /* minor version number */ + UINT16 version_major; /* major version number */ + UINT16 version_minor; /* minor version number */ sint32 thiszone; /* GMT to local correction */ uint32 sigfigs; /* accuracy of timestamps */ uint32 snaplen; /* max length of captured packets, in octets */ diff --git a/include/freerdp/utils/rail.h b/include/freerdp/utils/rail.h index 8e82901e6..f50221b24 100644 --- a/include/freerdp/utils/rail.h +++ b/include/freerdp/utils/rail.h @@ -24,7 +24,7 @@ #include #include -FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, uint16 cbString); +FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString); FREERDP_API void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string); FREERDP_API void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string); FREERDP_API void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string); diff --git a/include/freerdp/utils/stream.h b/include/freerdp/utils/stream.h index e84ffb216..c9048377a 100644 --- a/include/freerdp/utils/stream.h +++ b/include/freerdp/utils/stream.h @@ -28,8 +28,8 @@ struct _STREAM { int size; - uint8* p; - uint8* data; + BYTE* p; + BYTE* data; }; typedef struct _STREAM STREAM; @@ -62,10 +62,10 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); #define stream_get_size(_s) (_s->size) #define stream_get_left(_s) (_s->size - (_s->p - _s->data)) -#define stream_read_uint8(_s, _v) do { _v = *_s->p++; } while (0) -#define stream_read_uint16(_s, _v) do { _v = \ - (uint16)(*_s->p) + \ - (uint16)(((uint16)(*(_s->p + 1))) << 8); \ +#define stream_read_BYTE(_s, _v) do { _v = *_s->p++; } while (0) +#define stream_read_UINT16(_s, _v) do { _v = \ + (UINT16)(*_s->p) + \ + (UINT16)(((UINT16)(*(_s->p + 1))) << 8); \ _s->p += 2; } while (0) #define stream_read_uint32(_s, _v) do { _v = \ (uint32)(*_s->p) + \ @@ -88,9 +88,9 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); _s->p += (_n); \ } while (0) -#define stream_write_uint8(_s, _v) do { \ - *_s->p++ = (uint8)(_v); } while (0) -#define stream_write_uint16(_s, _v) do { \ +#define stream_write_BYTE(_s, _v) do { \ + *_s->p++ = (BYTE)(_v); } while (0) +#define stream_write_UINT16(_s, _v) do { \ *_s->p++ = (_v) & 0xFF; \ *_s->p++ = ((_v) >> 8) & 0xFF; } while (0) #define stream_write_uint32(_s, _v) do { \ @@ -120,10 +120,10 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); _s->p += (_n); \ } while (0) -#define stream_peek_uint8(_s, _v) do { _v = *_s->p; } while (0) -#define stream_peek_uint16(_s, _v) do { _v = \ - (uint16)(*_s->p) + \ - (((uint16)(*(_s->p + 1))) << 8); \ +#define stream_peek_BYTE(_s, _v) do { _v = *_s->p; } while (0) +#define stream_peek_UINT16(_s, _v) do { _v = \ + (UINT16)(*_s->p) + \ + (((UINT16)(*(_s->p + 1))) << 8); \ } while (0) #define stream_peek_uint32(_s, _v) do { _v = \ (uint32)(*_s->p) + \ @@ -142,14 +142,14 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); (((uint64)(*(_s->p + 7))) << 56); \ } while (0) -#define stream_seek_uint8(_s) stream_seek(_s, 1) -#define stream_seek_uint16(_s) stream_seek(_s, 2) +#define stream_seek_BYTE(_s) stream_seek(_s, 1) +#define stream_seek_UINT16(_s) stream_seek(_s, 2) #define stream_seek_uint32(_s) stream_seek(_s, 4) #define stream_seek_uint64(_s) stream_seek(_s, 8) -#define stream_read_uint16_be(_s, _v) do { _v = \ - (((uint16)(*_s->p)) << 8) + \ - (uint16)(*(_s->p + 1)); \ +#define stream_read_UINT16_be(_s, _v) do { _v = \ + (((UINT16)(*_s->p)) << 8) + \ + (UINT16)(*(_s->p + 1)); \ _s->p += 2; } while (0) #define stream_read_uint32_be(_s, _v) do { _v = \ (((uint32)(*(_s->p))) << 24) + \ @@ -158,12 +158,12 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); (((uint32)(*(_s->p + 3)))); \ _s->p += 4; } while (0) -#define stream_write_uint16_be(_s, _v) do { \ +#define stream_write_UINT16_be(_s, _v) do { \ *_s->p++ = ((_v) >> 8) & 0xFF; \ *_s->p++ = (_v) & 0xFF; } while (0) #define stream_write_uint32_be(_s, _v) do { \ - stream_write_uint16_be(_s, ((_v) >> 16 & 0xFFFF)); \ - stream_write_uint16_be(_s, ((_v) & 0xFFFF)); \ + stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \ + stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \ } while (0) #define stream_copy(_dst, _src, _n) do { \ diff --git a/include/freerdp/utils/tcp.h b/include/freerdp/utils/tcp.h index 4c486b541..6517ad425 100644 --- a/include/freerdp/utils/tcp.h +++ b/include/freerdp/utils/tcp.h @@ -24,8 +24,8 @@ #include FREERDP_API int freerdp_tcp_connect(const char* hostname, int port); -FREERDP_API int freerdp_tcp_read(int sockfd, uint8* data, int length); -FREERDP_API int freerdp_tcp_write(int sockfd, uint8* data, int length); +FREERDP_API int freerdp_tcp_read(int sockfd, BYTE* data, int length); +FREERDP_API int freerdp_tcp_write(int sockfd, BYTE* data, int length); FREERDP_API int freerdp_tcp_disconnect(int sockfd); FREERDP_API int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay); diff --git a/include/freerdp/window.h b/include/freerdp/window.h index 0e01cc3cf..baa49efc4 100644 --- a/include/freerdp/window.h +++ b/include/freerdp/window.h @@ -138,9 +138,9 @@ struct _ICON_INFO uint32 cbColorTable; uint32 cbBitsMask; uint32 cbBitsColor; - uint8* bitsMask; - uint8* colorTable; - uint8* bitsColor; + BYTE* bitsMask; + BYTE* colorTable; + BYTE* bitsColor; }; typedef struct _ICON_INFO ICON_INFO; diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 2aec2e332..23d1655cc 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -38,7 +38,7 @@ void update_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) if (memblt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, memblt->cacheIndex); else - bitmap = bitmap_cache_get(cache->bitmap, (uint8) memblt->cacheId, memblt->cacheIndex); + bitmap = bitmap_cache_get(cache->bitmap, (BYTE) memblt->cacheId, memblt->cacheIndex); memblt->bitmap = bitmap; IFCALL(cache->bitmap->MemBlt, context, memblt); @@ -46,7 +46,7 @@ void update_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) { - uint8 style; + BYTE style; rdpBitmap* bitmap; rdpCache* cache = context->cache; rdpBrush* brush = &mem3blt->brush; @@ -54,7 +54,7 @@ void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) if (mem3blt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex); else - bitmap = bitmap_cache_get(cache->bitmap, (uint8) mem3blt->cacheId, mem3blt->cacheIndex); + bitmap = bitmap_cache_get(cache->bitmap, (BYTE) mem3blt->cacheId, mem3blt->cacheIndex); style = brush->style; diff --git a/libfreerdp/cache/brush.c b/libfreerdp/cache/brush.c index fef92e56c..e3da15353 100644 --- a/libfreerdp/cache/brush.c +++ b/libfreerdp/cache/brush.c @@ -32,7 +32,7 @@ void update_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { - uint8 style; + BYTE style; rdpBrush* brush = &patblt->brush; rdpCache* cache = context->cache; @@ -56,7 +56,7 @@ void update_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) void update_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) { - uint8 style; + BYTE style; rdpBrush* brush = &polygon_cb->brush; rdpCache* cache = context->cache; diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index b074fc4d2..ea809c3bd 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -29,7 +29,7 @@ #include -void update_process_glyph(rdpContext* context, uint8* data, int* index, +void update_process_glyph(rdpContext* context, BYTE* data, int* index, int* x, int* y, uint32 cacheId, uint32 ulCharInc, uint32 flAccel) { int offset; @@ -72,7 +72,7 @@ void update_process_glyph(rdpContext* context, uint8* data, int* index, } } -void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 length, +void update_process_glyph_fragments(rdpContext* context, BYTE* data, uint32 length, uint32 cacheId, uint32 ulCharInc, uint32 flAccel, uint32 bgcolor, uint32 fgcolor, int x, int y, int bkX, int bkY, int bkWidth, int bkHeight, int opX, int opY, int opWidth, int opHeight) { @@ -80,7 +80,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len uint32 id; uint32 size; int index = 0; - uint8* fragments; + BYTE* fragments; rdpGraphics* graphics; rdpGlyphCache* glyph_cache; @@ -106,7 +106,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len } id = data[index + 1]; - fragments = (uint8*) glyph_cache_fragment_get(glyph_cache, id, &size); + fragments = (BYTE*) glyph_cache_fragment_get(glyph_cache, id, &size); if (fragments != NULL) { @@ -143,7 +143,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len id = data[index + 1]; size = data[index + 2]; - fragments = (uint8*) malloc(size); + fragments = (BYTE*) malloc(size); memcpy(fragments, data, size); glyph_cache_fragment_put(glyph_cache, id, size, fragments); @@ -198,7 +198,7 @@ void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index) if (opBottom == -32768) { - uint8 flags = (uint8) (opTop & 0x0F); + BYTE flags = (BYTE) (opTop & 0x0F); if (flags & 0x01) opBottom = fast_index->bkBottom; @@ -238,7 +238,7 @@ void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph) GLYPH_DATA_V2* glyph_data; rdpGlyph* glyph; rdpCache* cache = context->cache; - uint8 text_data[2]; + BYTE text_data[2]; opLeft = fast_glyph->opLeft; opTop = fast_glyph->opTop; @@ -249,7 +249,7 @@ void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph) if (opBottom == -32768) { - uint8 flags = (uint8) (opTop & 0x0F); + BYTE flags = (BYTE) (opTop & 0x0F); if (flags & 0x01) opBottom = fast_glyph->bkBottom; @@ -417,7 +417,7 @@ void* glyph_cache_fragment_get(rdpGlyphCache* glyph_cache, uint32 index, uint32* void* fragment; fragment = glyph_cache->fragCache.entries[index].fragment; - *size = (uint8) glyph_cache->fragCache.entries[index].size; + *size = (BYTE) glyph_cache->fragCache.entries[index].size; if (fragment == NULL) { diff --git a/libfreerdp/cache/offscreen.c b/libfreerdp/cache/offscreen.c index 28f1a1cab..281082d0c 100644 --- a/libfreerdp/cache/offscreen.c +++ b/libfreerdp/cache/offscreen.c @@ -31,7 +31,7 @@ void update_gdi_create_offscreen_bitmap(rdpContext* context, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap) { int i; - uint16 index; + UINT16 index; rdpBitmap* bitmap; rdpCache* cache = context->cache; diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index c6ab04346..b5e587726 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -40,8 +40,8 @@ typedef struct wts_data_item { - uint16 channel_id; - uint8* buffer; + UINT16 channel_id; + BYTE* buffer; uint32 length; } wts_data_item; @@ -67,7 +67,7 @@ static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, return channel; } -static void wts_queue_receive_data(rdpPeerChannel* channel, const uint8* buffer, uint32 length) +static void wts_queue_receive_data(rdpPeerChannel* channel, const BYTE* buffer, uint32 length) { wts_data_item* item; @@ -105,12 +105,12 @@ static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val) case 0: if (stream_get_left(s) < 1) return 0; - stream_read_uint8(s, *val); + stream_read_BYTE(s, *val); return 1; case 1: if (stream_get_left(s) < 2) return 0; - stream_read_uint16(s, *val); + stream_read_UINT16(s, *val); return 2; default: if (stream_get_left(s) < 4) @@ -122,13 +122,13 @@ static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val) static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, uint32 length) { - uint16 Version; + UINT16 Version; if (length < 3) return; - stream_seek_uint8(channel->receive_data); /* Pad (1 byte) */ - stream_read_uint16(channel->receive_data, Version); + stream_seek_BYTE(channel->receive_data); /* Pad (1 byte) */ + stream_read_UINT16(channel->receive_data, Version); DEBUG_DVC("Version: %d", Version); @@ -223,7 +223,7 @@ static void wts_read_drdynvc_pdu(rdpPeerChannel* channel) return; stream_set_pos(channel->receive_data, 0); - stream_read_uint8(channel->receive_data, value); + stream_read_BYTE(channel->receive_data, value); length--; Cmd = (value & 0xf0) >> 4; @@ -289,12 +289,12 @@ static int wts_write_variable_uint(STREAM* stream, uint32 val) if (val <= 0xFF) { cb = 0; - stream_write_uint8(stream, val); + stream_write_BYTE(stream, val); } else if (val <= 0xFFFF) { cb = 1; - stream_write_uint16(stream, val); + stream_write_UINT16(stream, val); } else { @@ -305,13 +305,13 @@ static int wts_write_variable_uint(STREAM* stream, uint32 val) return cb; } -static void wts_write_drdynvc_header(STREAM *s, uint8 Cmd, uint32 ChannelId) +static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, uint32 ChannelId) { - uint8* bm; + BYTE* bm; int cbChId; stream_get_mark(s, bm); - stream_seek_uint8(s); + stream_seek_BYTE(s); cbChId = wts_write_variable_uint(s, ChannelId); *bm = ((Cmd & 0x0F) << 4) | cbChId; } @@ -326,7 +326,7 @@ static void wts_write_drdynvc_create_request(STREAM *s, uint32 ChannelId, const stream_write(s, ChannelName, len); } -static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8* data, int size, int flags, int total_size) +static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, BYTE* data, int size, int flags, int total_size) { if (flags & CHANNEL_FLAG_FIRST) { @@ -354,7 +354,7 @@ static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8* } } -static int WTSReceiveChannelData(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size) +static int WTSReceiveChannelData(freerdp_peer* client, int channelId, BYTE* data, int size, int flags, int total_size) { int i; BOOL result = FALSE; @@ -462,7 +462,7 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) { vcm->drdynvc_channel = channel; dynvc_caps = 0x00010050; /* DYNVC_CAPS_VERSION1 (4 bytes) */ - WTSVirtualChannelWrite(channel, (uint8*) &dynvc_caps, sizeof(dynvc_caps), NULL); + WTSVirtualChannelWrite(channel, (BYTE*) &dynvc_caps, sizeof(dynvc_caps), NULL); } } @@ -635,7 +635,7 @@ void WTSFreeMemory( BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, /* __in */ uint32 TimeOut, - /* __out */ uint8* Buffer, + /* __out */ BYTE* Buffer, /* __in */ uint32 BufferSize, /* __out */ uint32* pBytesRead) { @@ -673,7 +673,7 @@ BOOL WTSVirtualChannelRead( BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, - /* __in */ uint8* Buffer, + /* __in */ BYTE* Buffer, /* __in */ uint32 Length, /* __out */ uint32* pBytesWritten) { @@ -713,7 +713,7 @@ BOOL WTSVirtualChannelWrite( item->buffer = malloc(channel->client->settings->vc_chunk_size); stream_attach(s, item->buffer, channel->client->settings->vc_chunk_size); - stream_seek_uint8(s); + stream_seek_BYTE(s); cbChId = wts_write_variable_uint(s, channel->channel_id); if (first && (Length > (uint32) stream_get_left(s))) diff --git a/libfreerdp/channels/wtsvc.h b/libfreerdp/channels/wtsvc.h index 93d4c2e4c..e58b7e49c 100644 --- a/libfreerdp/channels/wtsvc.h +++ b/libfreerdp/channels/wtsvc.h @@ -62,15 +62,15 @@ struct rdp_peer_channel WTSVirtualChannelManager* vcm; freerdp_peer* client; uint32 channel_id; - uint16 channel_type; - uint16 index; + UINT16 channel_type; + UINT16 index; STREAM* receive_data; struct wait_obj* receive_event; LIST* receive_queue; HANDLE mutex; - uint8 dvc_open_state; + BYTE dvc_open_state; uint32 dvc_total_length; }; @@ -82,7 +82,7 @@ struct WTSVirtualChannelManager HANDLE mutex; rdpPeerChannel* drdynvc_channel; - uint8 drdynvc_state; + BYTE drdynvc_state; uint32 dvc_channel_id_seq; LIST* dvc_channel_list; }; diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index ff39207a4..c859bf527 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -60,26 +60,26 @@ typedef uint32 PIXEL; -static const uint8 g_MaskBit0 = 0x01; /* Least significant bit */ -static const uint8 g_MaskBit1 = 0x02; -static const uint8 g_MaskBit2 = 0x04; -static const uint8 g_MaskBit3 = 0x08; -static const uint8 g_MaskBit4 = 0x10; -static const uint8 g_MaskBit5 = 0x20; -static const uint8 g_MaskBit6 = 0x40; -static const uint8 g_MaskBit7 = 0x80; /* Most significant bit */ +static const BYTE g_MaskBit0 = 0x01; /* Least significant bit */ +static const BYTE g_MaskBit1 = 0x02; +static const BYTE g_MaskBit2 = 0x04; +static const BYTE g_MaskBit3 = 0x08; +static const BYTE g_MaskBit4 = 0x10; +static const BYTE g_MaskBit5 = 0x20; +static const BYTE g_MaskBit6 = 0x40; +static const BYTE g_MaskBit7 = 0x80; /* Most significant bit */ -static const uint8 g_MaskSpecialFgBg1 = 0x03; -static const uint8 g_MaskSpecialFgBg2 = 0x05; +static const BYTE g_MaskSpecialFgBg1 = 0x03; +static const BYTE g_MaskSpecialFgBg2 = 0x05; -static const uint8 g_MaskRegularRunLength = 0x1F; -static const uint8 g_MaskLiteRunLength = 0x0F; +static const BYTE g_MaskRegularRunLength = 0x1F; +static const BYTE g_MaskLiteRunLength = 0x0F; /** * Reads the supplied order header and extracts the compression * order code ID. */ -static uint32 ExtractCodeId(uint8 bOrderHdr) +static uint32 ExtractCodeId(BYTE bOrderHdr) { int code; @@ -115,7 +115,7 @@ static uint32 ExtractCodeId(uint8 bOrderHdr) /** * Extract the run length of a compression order. */ -static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) +static uint32 ExtractRunLength(uint32 code, BYTE* pbOrderHdr, uint32* advance) { uint32 runLength; uint32 ladvance; @@ -178,7 +178,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) case MEGA_MEGA_FGBG_IMAGE: case MEGA_MEGA_SET_FGBG_IMAGE: case MEGA_MEGA_COLOR_IMAGE: - runLength = ((uint16) pbOrderHdr[1]) | ((uint16) (pbOrderHdr[2] << 8)); + runLength = ((UINT16) pbOrderHdr[1]) | ((UINT16) (pbOrderHdr[2] << 8)); ladvance += 2; break; } @@ -198,7 +198,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) #undef WRITEFIRSTLINEFGBGIMAGE #undef RLEDECOMPRESS #undef RLEEXTRA -#define DESTWRITEPIXEL(_buf, _pix) (_buf)[0] = (uint8)(_pix) +#define DESTWRITEPIXEL(_buf, _pix) (_buf)[0] = (BYTE)(_pix) #define DESTREADPIXEL(_pix, _buf) _pix = (_buf)[0] #define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] #define DESTNEXTPIXEL(_buf) _buf += 1 @@ -218,9 +218,9 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) #undef WRITEFIRSTLINEFGBGIMAGE #undef RLEDECOMPRESS #undef RLEEXTRA -#define DESTWRITEPIXEL(_buf, _pix) ((uint16*)(_buf))[0] = (uint16)(_pix) -#define DESTREADPIXEL(_pix, _buf) _pix = ((uint16*)(_buf))[0] -#define SRCREADPIXEL(_pix, _buf) _pix = ((uint16*)(_buf))[0] +#define DESTWRITEPIXEL(_buf, _pix) ((UINT16*)(_buf))[0] = (UINT16)(_pix) +#define DESTREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0] +#define SRCREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0] #define DESTNEXTPIXEL(_buf) _buf += 2 #define SRCNEXTPIXEL(_buf) _buf += 2 #define WRITEFGBGIMAGE WriteFgBgImage16to16 @@ -238,8 +238,8 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) #undef WRITEFIRSTLINEFGBGIMAGE #undef RLEDECOMPRESS #undef RLEEXTRA -#define DESTWRITEPIXEL(_buf, _pix) do { (_buf)[0] = (uint8)(_pix); \ - (_buf)[1] = (uint8)((_pix) >> 8); (_buf)[2] = (uint8)((_pix) >> 16); } while (0) +#define DESTWRITEPIXEL(_buf, _pix) do { (_buf)[0] = (BYTE)(_pix); \ + (_buf)[1] = (BYTE)((_pix) >> 8); (_buf)[2] = (BYTE)((_pix) >> 16); } while (0) #define DESTREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \ ((_buf)[2] << 16) #define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \ @@ -258,7 +258,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance) * decompress an RLE color plane * RDP6_BITMAP_STREAM */ -static int process_rle_plane(uint8* in, int width, int height, uint8* out, int size) +static int process_rle_plane(BYTE* in, int width, int height, BYTE* out, int size) { int indexw; int indexh; @@ -268,10 +268,10 @@ static int process_rle_plane(uint8* in, int width, int height, uint8* out, int s int color; int x; int revcode; - uint8* last_line; - uint8* this_line; - uint8* org_in; - uint8* org_out; + BYTE* last_line; + BYTE* this_line; + BYTE* org_in; + BYTE* org_out; org_in = in; org_out = out; @@ -365,7 +365,7 @@ static int process_rle_plane(uint8* in, int width, int height, uint8* out, int s /** * process a raw color plane */ -static int process_raw_plane(uint8* srcData, int width, int height, uint8* dstData, int size) +static int process_raw_plane(BYTE* srcData, int width, int height, BYTE* dstData, int size) { int x, y; @@ -384,7 +384,7 @@ static int process_raw_plane(uint8* srcData, int width, int height, uint8* dstDa * 4 byte bitmap decompress * RDP6_BITMAP_STREAM */ -static BOOL bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int height, int size) +static BOOL bitmap_decompress4(BYTE* srcData, BYTE* dstData, int width, int height, int size) { int RLE; int code; @@ -439,13 +439,13 @@ static BOOL bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int he /** * bitmap decompression routine */ -BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp) +BOOL bitmap_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size, int srcBpp, int dstBpp) { - uint8 * TmpBfr; + BYTE * TmpBfr; if (srcBpp == 16 && dstBpp == 16) { - TmpBfr = (uint8*) malloc(width * height * 2); + TmpBfr = (BYTE*) malloc(width * height * 2); RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height); free(TmpBfr); @@ -457,21 +457,21 @@ BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, in } else if (srcBpp == 15 && dstBpp == 15) { - TmpBfr = (uint8*) malloc(width * height * 2); + TmpBfr = (BYTE*) malloc(width * height * 2); RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height); free(TmpBfr); } else if (srcBpp == 8 && dstBpp == 8) { - TmpBfr = (uint8*) malloc(width * height); + TmpBfr = (BYTE*) malloc(width * height); RleDecompress8to8(srcData, size, TmpBfr, width, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width, height); free(TmpBfr); } else if (srcBpp == 24 && dstBpp == 24) { - TmpBfr = (uint8*) malloc(width * height * 3); + TmpBfr = (BYTE*) malloc(width * height * 3); RleDecompress24to24(srcData, size, TmpBfr, width * 3, width, height); freerdp_bitmap_flip(TmpBfr, dstData, width * 3, height); free(TmpBfr); diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index d64dd5677..63637b895 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -30,11 +30,11 @@ #include #include -int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp) +int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp) { int start; int shift; - uint16 *src16; + UINT16 *src16; uint32 *src32; int red, green, blue; @@ -49,7 +49,7 @@ int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp return data[y * width + x]; case 15: case 16: - src16 = (uint16*) data; + src16 = (UINT16*) data; return src16[y * width + x]; case 24: data += y * width * 3; @@ -68,7 +68,7 @@ int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp return 0; } -void freerdp_set_pixel(uint8* data, int x, int y, int width, int height, int bpp, int pixel) +void freerdp_set_pixel(BYTE* data, int x, int y, int width, int height, int bpp, int pixel) { int start; int shift; @@ -91,7 +91,7 @@ void freerdp_set_pixel(uint8* data, int x, int y, int width, int height, int bpp } } -static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -142,7 +142,7 @@ static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, u } } -static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -193,7 +193,7 @@ static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, u } } -static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { switch (bpp) { @@ -234,7 +234,7 @@ static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, ui } } -static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { switch (bpp) { @@ -277,10 +277,10 @@ static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, ui uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { - uint8 red = 0; - uint8 green = 0; - uint8 blue = 0; - uint8 alpha = 0xFF; + BYTE red = 0; + BYTE green = 0; + BYTE blue = 0; + BYTE alpha = 0xFF; uint32 dstColor = 0; freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); @@ -291,10 +291,10 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { - uint8 red = 0; - uint8 green = 0; - uint8 blue = 0; - uint8 alpha = 0xFF; + BYTE red = 0; + BYTE green = 0; + BYTE blue = 0; + BYTE alpha = 0xFF; uint32 dstColor = 0; freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); @@ -305,10 +305,10 @@ uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { - uint8 red = 0; - uint8 green = 0; - uint8 blue = 0; - uint8 alpha = 0xFF; + BYTE red = 0; + BYTE green = 0; + BYTE blue = 0; + BYTE alpha = 0xFF; uint32 dstColor = 0; freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); @@ -319,10 +319,10 @@ uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { - uint8 red = 0; - uint8 green = 0; - uint8 blue = 0; - uint8 alpha = 0xFF; + BYTE red = 0; + BYTE green = 0; + BYTE blue = 0; + BYTE alpha = 0xFF; uint32 dstColor = 0; freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); @@ -355,21 +355,21 @@ uint32 freerdp_color_convert_var_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC return freerdp_color_convert_rgb_bgr(srcColor, srcBpp, dstBpp, clrconv); } -uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { int i; - uint8 red; - uint8 green; - uint8 blue; + BYTE red; + BYTE green; + BYTE blue; uint32 pixel; - uint8 *src8; - uint16 *dst16; + BYTE *src8; + UINT16 *dst16; uint32 *dst32; if (dstBpp == 8) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height); + dstData = (BYTE*) malloc(width * height); memcpy(dstData, srcData, width * height); return dstData; @@ -377,9 +377,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555)) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); - dst16 = (uint16 *) dstData; + dst16 = (UINT16 *) dstData; for (i = width * height; i > 0; i--) { pixel = *srcData; @@ -396,9 +396,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); - dst16 = (uint16 *) dstData; + dst16 = (UINT16 *) dstData; for (i = width * height; i > 0; i--) { pixel = *srcData; @@ -415,9 +415,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int else if (dstBpp == 32) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); - src8 = (uint8*) srcData; + src8 = (BYTE*) srcData; dst32 = (uint32*) dstData; for (i = width * height; i > 0; i--) { @@ -436,21 +436,21 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int return srcData; } -uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { int i; - uint8 red; - uint8 green; - uint8 blue; + BYTE red; + BYTE green; + BYTE blue; uint32 pixel; - uint16 *src16; - uint16 *dst16; + UINT16 *src16; + UINT16 *dst16; uint32 *dst32; if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555)) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); memcpy(dstData, srcData, width * height * 2); @@ -459,9 +459,9 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in else if (dstBpp == 32) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); - src16 = (uint16 *) srcData; + src16 = (UINT16 *) srcData; dst32 = (uint32 *) dstData; for (i = width * height; i > 0; i--) { @@ -477,10 +477,10 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in else if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); - src16 = (uint16 *) srcData; - dst16 = (uint16 *) dstData; + src16 = (UINT16 *) srcData; + dst16 = (UINT16 *) dstData; for (i = width * height; i > 0; i--) { pixel = *src16; @@ -497,7 +497,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in return srcData; } -uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert_16bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { if (srcBpp == 15) return freerdp_image_convert_15bpp(srcData, dstData, width, height, srcBpp, dstBpp, clrconv); @@ -505,14 +505,14 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in if (dstBpp == 16) { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); if (clrconv->rgb555) { int i; - uint8 red, green, blue; - uint16* src16 = (uint16 *) srcData; - uint16* dst16 = (uint16 *) dstData; + BYTE red, green, blue; + UINT16* src16 = (UINT16 *) srcData; + UINT16* dst16 = (UINT16 *) dstData; for (i = width * height; i > 0; i--) { @@ -533,15 +533,15 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in else if (dstBpp == 24) { int i; - uint8 *dst8; - uint16 *src16; - uint8 red, green, blue; + BYTE *dst8; + UINT16 *src16; + BYTE red, green, blue; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 3); + dstData = (BYTE*) malloc(width * height * 3); - dst8 = (uint8*) dstData; - src16 = (uint16*) srcData; + dst8 = (BYTE*) dstData; + src16 = (UINT16*) srcData; for (i = width * height; i > 0; i--) { @@ -567,14 +567,14 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in { int i; uint32 pixel; - uint16* src16; + UINT16* src16; uint32* dst32; - uint8 red, green, blue; + BYTE red, green, blue; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); - src16 = (uint16*) srcData; + src16 = (UINT16*) srcData; dst32 = (uint32*) dstData; for (i = width * height; i > 0; i--) @@ -592,15 +592,15 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in return srcData; } -uint8* freerdp_image_convert_24bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert_24bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { int i; if (dstBpp == 32) { - uint8 *dstp; + BYTE *dstp; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); dstp = dstData; for (i = width * height; i > 0; i--) @@ -616,19 +616,19 @@ uint8* freerdp_image_convert_24bpp(uint8* srcData, uint8* dstData, int width, in return srcData; } -uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert_32bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { if (dstBpp == 16) { int index; - uint16 *dst16; + UINT16 *dst16; uint32 *src32; - uint8 red, green, blue; + BYTE red, green, blue; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 2); + dstData = (BYTE*) malloc(width * height * 2); - dst16 = (uint16*) dstData; + dst16 = (UINT16*) dstData; src32 = (uint32*) srcData; for (index = 0; index < width * height; index++) @@ -642,12 +642,12 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in } else if (dstBpp == 24) { - uint8 *dstp; + BYTE *dstp; int index; - uint8 red, green, blue; + BYTE red, green, blue; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 3); + dstData = (BYTE*) malloc(width * height * 3); dstp = dstData; for (index = 0; index < width * height; index++) @@ -678,10 +678,10 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in if (clrconv->alpha) { int x, y; - uint8 *dstp; + BYTE *dstp; if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); memcpy(dstData, srcData, width * height * 4); @@ -699,7 +699,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in else { if (dstData == NULL) - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); memcpy(dstData, srcData, width * height * 4); } @@ -719,7 +719,7 @@ p_freerdp_image_convert freerdp_image_convert_[5] = freerdp_image_convert_32bpp }; -uint8* freerdp_image_convert(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) +BYTE* freerdp_image_convert(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv) { p_freerdp_image_convert _p_freerdp_image_convert = freerdp_image_convert_[IBPP(srcBpp)]; @@ -729,12 +729,12 @@ uint8* freerdp_image_convert(uint8* srcData, uint8* dstData, int width, int heig return 0; } -void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height) +void freerdp_bitmap_flip(BYTE * src, BYTE * dst, int scanLineSz, int height) { int i; - uint8 * bottomLine = dst + (scanLineSz * (height - 1)); - uint8 * topLine = src; + BYTE * bottomLine = dst + (scanLineSz * (height - 1)); + BYTE * topLine = src; /* Special processing if called for flip-in-place. */ if (src == dst) @@ -745,7 +745,7 @@ void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height) * fixed size buffers (of max scanline size (or adaptative?) ) * -- would be much faster). */ - uint8 * tmpBfr = malloc(scanLineSz); + BYTE * tmpBfr = malloc(scanLineSz); int half = height / 2; /* Flip buffer in place by line permutations through the temp * scan line buffer. @@ -781,23 +781,23 @@ void freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height) } -uint8* freerdp_image_flip(uint8* srcData, uint8* dstData, int width, int height, int bpp) +BYTE* freerdp_image_flip(BYTE* srcData, BYTE* dstData, int width, int height, int bpp) { int scanline; scanline = width * ((bpp + 7) / 8); if (dstData == NULL) - dstData = (uint8*) malloc(width * height * ((bpp + 7) / 8)); + dstData = (BYTE*) malloc(width * height * ((bpp + 7) / 8)); freerdp_bitmap_flip(srcData, dstData, scanline, height); return dstData; } -uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int width, int height, int bpp, HCLRCONV clrconv) +BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, int height, int bpp, HCLRCONV clrconv) { - uint8* data; - uint8 bmask; + BYTE* data; + BYTE bmask; uint32* icon; int x, y, bit; int maskIndex; @@ -847,12 +847,12 @@ uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int wid return dstData; } -uint8* freerdp_glyph_convert(int width, int height, uint8* data) +BYTE* freerdp_glyph_convert(int width, int height, BYTE* data) { int x, y; - uint8 *srcp; - uint8 *dstp; - uint8 *dstData; + BYTE *srcp; + BYTE *dstp; + BYTE *dstData; int scanline; /* @@ -862,7 +862,7 @@ uint8* freerdp_glyph_convert(int width, int height, uint8* data) */ scanline = (width + 7) / 8; - dstData = (uint8*) malloc(width * height); + dstData = (BYTE*) malloc(width * height); memset(dstData, 0, width * height); dstp = dstData; @@ -884,16 +884,16 @@ uint8* freerdp_glyph_convert(int width, int height, uint8* data) return dstData; } -uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv) +BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv) { int index; - uint16* dst16; + UINT16* dst16; uint32* dst32; - uint8* dstData; - uint8 bitMask; + BYTE* dstData; + BYTE bitMask; int bitIndex; - uint8 redBg, greenBg, blueBg; - uint8 redFg, greenFg, blueFg; + BYTE redBg, greenBg, blueBg; + BYTE redFg, greenFg, blueFg; switch (srcBpp) { @@ -946,8 +946,8 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src } } - dstData = (uint8*) malloc(width * height * 2); - dst16 = (uint16*) dstData; + dstData = (BYTE*) malloc(width * height * 2); + dst16 = (UINT16*) dstData; for (index = height; index > 0; index--) { @@ -971,7 +971,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src } else if (dstBpp == 32) { - dstData = (uint8*) malloc(width * height * 4); + dstData = (BYTE*) malloc(width * height * 4); dst32 = (uint32*) dstData; for (index = height; index > 0; index--) @@ -999,7 +999,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src return srcData; } -void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMask, int width, int height, int bpp, HCLRCONV clrconv) +void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, int width, int height, int bpp, HCLRCONV clrconv) { int xpixel; int apixel; @@ -1034,11 +1034,11 @@ void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMa } } -void freerdp_image_swap_color_order(uint8* data, int width, int height) +void freerdp_image_swap_color_order(BYTE* data, int width, int height) { int x, y; uint32* pixel; - uint8 a, r, g, b; + BYTE a, r, g, b; pixel = (uint32*) data; diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index b6d702aeb..0d56483cc 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -22,8 +22,8 @@ /** * Write a foreground/background image to a destination buffer. */ -static uint8* WRITEFGBGIMAGE(uint8* pbDest, uint32 rowDelta, - uint8 bitmask, PIXEL fgPel, uint32 cBits) +static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta, + BYTE bitmask, PIXEL fgPel, uint32 cBits) { PIXEL xorPixel; @@ -142,7 +142,7 @@ static uint8* WRITEFGBGIMAGE(uint8* pbDest, uint32 rowDelta, * Write a foreground/background image to a destination buffer * for the first line of compressed data. */ -static uint8* WRITEFIRSTLINEFGBGIMAGE(uint8* pbDest, uint8 bitmask, +static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask, PIXEL fgPel, uint32 cBits) { if (bitmask & g_MaskBit0) @@ -251,19 +251,19 @@ static uint8* WRITEFIRSTLINEFGBGIMAGE(uint8* pbDest, uint8 bitmask, /** * Decompress an RLE compressed bitmap. */ -void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer, +void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer, uint32 rowDelta, uint32 width, uint32 height) { - uint8* pbSrc = pbSrcBuffer; - uint8* pbEnd = pbSrcBuffer + cbSrcBuffer; - uint8* pbDest = pbDestBuffer; + BYTE* pbSrc = pbSrcBuffer; + BYTE* pbEnd = pbSrcBuffer + cbSrcBuffer; + BYTE* pbDest = pbDestBuffer; PIXEL temp; PIXEL fgPel = WHITE_PIXEL; BOOL fInsertFgPel = FALSE; BOOL fFirstLine = TRUE; - uint8 bitmask; + BYTE bitmask; PIXEL pixelA, pixelB; uint32 runLength; diff --git a/libfreerdp/codec/jpeg.c b/libfreerdp/codec/jpeg.c index ad00b75a5..ddd7c3e72 100644 --- a/libfreerdp/codec/jpeg.c +++ b/libfreerdp/codec/jpeg.c @@ -124,7 +124,7 @@ do_decompress(char* comp_data, int comp_data_bytes, /* jpeg decompress */ BOOL -jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp) +jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp) { int lwidth; int lheight; @@ -151,7 +151,7 @@ jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, #else BOOL -jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp) +jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp) { return 0; } diff --git a/libfreerdp/codec/mppc_dec.c b/libfreerdp/codec/mppc_dec.c index f6f6f662a..02b75c0c7 100644 --- a/libfreerdp/codec/mppc_dec.c +++ b/libfreerdp/codec/mppc_dec.c @@ -30,72 +30,72 @@ #include -static uint8 HuffLenLEC[] = { +static BYTE HuffLenLEC[] = { 0x6, 0x6, 0x6, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0x8, 0x8, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x8, 0x9, 0x9, 0xa, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0x9, 0xa, 0x9, 0xa, 0x9, 0x9, 0x9, 0xa, 0xa, 0x9, 0xa, 0x9, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x8, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0x7, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xd, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xb, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0x8, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0x8, 0x7, 0xd, 0xd, 0x7, 0x7, 0xa, 0x7, 0x7, 0x6, 0x6, 0x6, 0x6, 0x5, 0x6, 0x6, 0x6, 0x5, 0x6, 0x5, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x8, 0x5, 0x6, 0x7, 0x7 }; -static uint16 HuffIndexLEC[512] = { +static UINT16 HuffIndexLEC[512] = { 0x007b, 0xff1f, 0xff0d, 0xfe27, 0xfe00, 0xff05, 0xff17, 0xfe68, 0x00c5, 0xfe07, 0xff13, 0xfec0, 0xff08, 0xfe18, 0xff1b, 0xfeb3, 0xfe03, 0x00a2, 0xfe42, 0xff10, 0xfe0b, 0xfe02, 0xfe91, 0xff19, 0xfe80, 0x00e9, 0xfe3a, 0xff15, 0xfe12, 0x0057, 0xfed7, 0xff1d, 0xff0e, 0xfe35, 0xfe69, 0xff22, 0xff18, 0xfe7a, 0xfe01, 0xff23, 0xff14, 0xfef4, 0xfeb4, 0xfe09, 0xff1c, 0xfec4, 0xff09, 0xfe60, 0xfe70, 0xff12, 0xfe05, 0xfe92, 0xfea1, 0xff1a, 0xfe0f, 0xff07, 0xfe56, 0xff16, 0xff02, 0xfed8, 0xfee8, 0xff1e, 0xfe1d, 0x003b, 0xffff, 0xff06, 0xffff, 0xfe71, 0xfe89, 0xffff, 0xffff, 0xfe2c, 0xfe2b, 0xfe20, 0xffff, 0xfebb, 0xfecf, 0xfe08, 0xffff, 0xfee0, 0xfe0d, 0xffff, 0xfe99, 0xffff, 0xfe04, 0xfeaa, 0xfe49, 0xffff, 0xfe17, 0xfe61, 0xfedf, 0xffff, 0xfeff, 0xfef6, 0xfe4c, 0xffff, 0xffff, 0xfe87, 0xffff, 0xff24, 0xffff, 0xfe3c, 0xfe72, 0xffff, 0xffff, 0xfece, 0xffff, 0xfefe, 0xffff, 0xfe23, 0xfebc, 0xfe0a, 0xfea9, 0xffff, 0xfe11, 0xffff, 0xfe82, 0xffff, 0xfe06, 0xfe9a, 0xfef5, 0xffff, 0xfe22, 0xfe4d, 0xfe5f, 0xffff, 0xff03, 0xfee1, 0xffff, 0xfeca, 0xfecc, 0xffff, 0xfe19, 0xffff, 0xfeb7, 0xffff, 0xffff, 0xfe83, 0xfe29, 0xffff, 0xffff, 0xffff, 0xfe6c, 0xffff, 0xfeed, 0xffff, 0xffff, 0xfe46, 0xfe5c, 0xfe15, 0xffff, 0xfedb, 0xfea6, 0xffff, 0xffff, 0xfe44, 0xffff, 0xfe0c, 0xffff, 0xfe95, 0xfefc, 0xffff, 0xffff, 0xfeb8, 0x16c9, 0xffff, 0xfef0, 0xffff, 0xfe38, 0xffff, 0xffff, 0xfe6d, 0xfe7e, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe5b, 0xfedc, 0xffff, 0xffff, 0xfeec, 0xfe47, 0xfe1f, 0xffff, 0xfe7f, 0xfe96, 0xffff, 0xffff, 0xfea5, 0xffff, 0xfe10, 0xfe40, 0xfe32, 0xfebf, 0xffff, 0xffff, 0xfed4, 0xfef1, 0xffff, 0xffff, 0xffff, 0xfe75, 0xffff, 0xffff, 0xfe8d, 0xfe31, 0xffff, 0xfe65, 0xfe1b, 0xffff, 0xfee4, 0xfefb, 0xffff, 0xffff, 0xfe52, 0xffff, 0xfe0e, 0xffff, 0xfe9d, 0xfeaf, 0xffff, 0xffff, 0xfe51, 0xfed3, 0xffff, 0xff20, 0xffff, 0xfe2f, 0xffff, 0xffff, 0xfec1, 0xfe8c, 0xffff, 0xffff, 0xffff, 0xfe3f, 0xffff, 0xffff, 0xfe76, 0xffff, 0xfefa, 0xfe53, 0xfe25, 0xffff, 0xfe64, 0xfee5, 0xffff, 0xffff, 0xfeae, 0xffff, 0xfe13, 0xffff, 0xfe88, 0xfe9e, 0xffff, 0xfe43, 0xffff, 0xffff, 0xfea4, 0xfe93, 0xffff, 0xffff, 0xffff, 0xfe3d, 0xffff, 0xffff, 0xfeeb, 0xfed9, 0xffff, 0xfe14, 0xfe5a, 0xffff, 0xfe28, 0xfe7d, 0xffff, 0xffff, 0xfe6a, 0xffff, 0xffff, 0xff01, 0xfec6, 0xfec8, 0xffff, 0xffff, 0xfeb5, 0xffff, 0xffff, 0xffff, 0xfe94, 0xfe78, 0xffff, 0xffff, 0xffff, 0xfea3, 0xffff, 0xffff, 0xfeda, 0xfe58, 0xffff, 0xfe1e, 0xfe45, 0xfeea, 0xffff, 0xfe6b, 0xffff, 0xffff, 0xfe37, 0xffff, 0xffff, 0xffff, 0xfe7c, 0xfeb6, 0xffff, 0xffff, 0xfef8, 0xffff, 0xffff, 0xffff, 0xfec7, 0xfe9b, 0xffff, 0xffff, 0xffff, 0xfe50, 0xffff, 0xffff, 0xfead, 0xfee2, 0xffff, 0xfe1a, 0xfe63, 0xfe4e, 0xffff, 0xffff, 0xfef9, 0xffff, 0xfe73, 0xffff, 0xffff, 0xffff, 0xfe30, 0xfe8b, 0xffff, 0xffff, 0xfebd, 0xfe2e, 0x0100, 0xffff, 0xfeee, 0xfed2, 0xffff, 0xffff, 0xffff, 0xfeac, 0xffff, 0xffff, 0xfe9c, 0xfe84, 0xffff, 0xfe24, 0xfe4f, 0xfef7, 0xffff, 0xffff, 0xfee3, 0xfe62, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe8a, 0xfe74, 0xffff, 0xffff, 0xfe3e, 0xffff, 0xffff, 0xffff, 0xfed1, 0xfebe, 0xffff, 0xffff, 0xfe2d, 0xffff, 0xfe4a, 0xfef3, 0xffff, 0xffff, 0xfedd, 0xfe5e, 0xfe16, 0xffff, 0xfe48, 0xfea8, 0xffff, 0xfeab, 0xfe97, 0xffff, 0xffff, 0xfed0, 0xffff, 0xffff, 0xfecd, 0xfeb9, 0xffff, 0xffff, 0xffff, 0xfe2a, 0xffff, 0xffff, 0xfe86, 0xfe6e, 0xffff, 0xffff, 0xffff, 0xfede, 0xffff, 0xffff, 0xfe5d, 0xfe4b, 0xfe21, 0xffff, 0xfeef, 0xfe98, 0xffff, 0xffff, 0xfe81, 0xffff, 0xffff, 0xffff, 0xfea7, 0xffff, 0xfeba, 0xfefd, 0xffff, 0xffff, 0xffff, 0xfecb, 0xffff, 0xffff, 0xfe6f, 0xfe39, 0xffff, 0xffff, 0xffff, 0xfe85, 0xffff, 0x010c, 0xfee6, 0xfe67, 0xfe1c, 0xffff, 0xfe54, 0xfeb2, 0xffff, 0xffff, 0xfe9f, 0xffff, 0xffff, 0xffff, 0xfe59, 0xfeb1, 0xffff, 0xfec2, 0xffff, 0xffff, 0xfe36, 0xfef2, 0xffff, 0xffff, 0xfed6, 0xfe77, 0xffff, 0xffff, 0xffff, 0xfe33, 0xffff, 0xffff, 0xfe8f, 0xfe55, 0xfe26, 0x010a, 0xff04, 0xfee7, 0xffff, 0x0121, 0xfe66, 0xffff, 0xffff, 0xffff, 0xfeb0, 0xfea0, 0xffff, 0x010f, 0xfe90, 0xffff, 0xffff, 0xfed5, 0xffff, 0xffff, 0xfec3, 0xfe34, 0xffff, 0xffff, 0xffff, 0xfe8e, 0xffff, 0x0111, 0xfe79, 0xfe41, 0x010b }; -static uint16 LECHTab[] = {511, 0, 508, 448, 494, 347, 486, 482}; +static UINT16 LECHTab[] = {511, 0, 508, 448, 494, 347, 486, 482}; -static uint8 HuffLenLOM[] = { +static BYTE HuffLenLOM[] = { 0x4, 0x2, 0x3, 0x4, 0x3, 0x4, 0x4, 0x5, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7, 0x8, 0x7, 0x8, 0x8, 0x9, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 }; -static uint16 HuffIndexLOM[] = { +static UINT16 HuffIndexLOM[] = { 0xfe1, 0xfe0, 0xfe2, 0xfe8, 0xe, 0xfe5, 0xfe4, 0xfea, 0xff1, 0xfe3, 0x15, 0xfe7, 0xfef, 0x46, 0xff0, 0xfed, 0xfff, 0xff7, 0xffb, 0x19, 0xffd, 0xff4, 0x12c, 0xfeb, 0xffe, 0xff6, 0xffa, 0x89, 0xffc, 0xff3, 0xff8, 0xff2 }; -static uint8 LOMHTab[] = {0, 4, 10, 19}; +static BYTE LOMHTab[] = {0, 4, 10, 19}; -static uint8 CopyOffsetBitsLUT[] = { +static BYTE CopyOffsetBitsLUT[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15 }; static uint32 CopyOffsetBaseLUT[] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153, 65537 }; -static uint8 LOMBitsLUT[] = { +static BYTE LOMBitsLUT[] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 6, 6, 8, 8, 14, 14 }; -static uint16 LOMBaseLUT[] = { +static UINT16 LOMBaseLUT[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 22, 26, 30, 34, 42, 50, 58, 66, 82, 98, 114, 130, 194, 258, 514, 2, 2 }; -uint16 LEChash(uint16 key) +UINT16 LEChash(UINT16 key) { return ((key & 0x1ff) ^ (key >> 9) ^ (key >> 4) ^ (key >> 7)); } -uint16 LOMhash(uint16 key) +UINT16 LOMhash(UINT16 key) { return ((key & 0x1f) ^ (key >> 5) ^ (key >> 9)); } -uint16 miniLEChash(uint16 key) +UINT16 miniLEChash(UINT16 key) { - uint16 h; + UINT16 h; h = ((((key >> 8) ^ (key & 0xff)) >> 2) & 0xf); if(key >> 9) h = ~h; return (h % 12); } -uint8 miniLOMhash(uint16 key) +BYTE miniLOMhash(UINT16 key) { - uint8 h; + BYTE h; h = (key >> 4) & 0xf; return ((h ^ (h >> 2) ^ (h >> 3)) & 0x3); } -uint16 getLECindex(uint16 huff) +UINT16 getLECindex(UINT16 huff) { - uint16 h = HuffIndexLEC[LEChash(huff)]; + UINT16 h = HuffIndexLEC[LEChash(huff)]; if((h ^ huff) >> 9) return h & 0x1ff; else return HuffIndexLEC[LECHTab[miniLEChash(huff)]]; } -uint16 getLOMindex(uint16 huff) +UINT16 getLOMindex(UINT16 huff) { - uint16 h = HuffIndexLOM[LOMhash(huff)]; + UINT16 h = HuffIndexLOM[LOMhash(huff)]; if((h ^ huff) >> 5) { return h & 0x1f; @@ -124,11 +124,11 @@ uint32 transposebits(uint32 x) *((uint32*)(_s)) = (*((uint32*)(_s)) << 16) | (_x); } while(0) #define cache_swap(_s, _i) do { \ - uint16 t = *(_s); \ + UINT16 t = *(_s); \ *(_s) = *((_s) + (_i)); \ *((_s) + (_i)) = t; } while(0) -int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { int type = ctype & 0x0f; @@ -169,16 +169,16 @@ int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, ui * @return True on success, False on failure */ -int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { - uint8* history_buf; /* uncompressed data goes here */ - uint8* history_ptr; /* points to next free slot in history_buf */ + BYTE* history_buf; /* uncompressed data goes here */ + BYTE* history_ptr; /* points to next free slot in history_buf */ uint32 d32; /* we process 4 compressed bytes at a time */ - uint16 copy_offset; /* location to copy data from */ - uint16 lom; /* length of match */ - uint8* src_ptr; /* used while copying compressed data */ - uint8* cptr; /* points to next byte in cbuf */ - uint8 cur_byte; /* last byte fetched from cbuf */ + UINT16 copy_offset; /* location to copy data from */ + UINT16 lom; /* length of match */ + BYTE* src_ptr; /* used while copying compressed data */ + BYTE* cptr; /* points to next byte in cbuf */ + BYTE cur_byte; /* last byte fetched from cbuf */ int bits_left; /* bits left in d34 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp; @@ -599,16 +599,16 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, * @return True on success, False on failure */ -int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { - uint8* history_buf; /* uncompressed data goes here */ - uint8* history_ptr; /* points to next free slot in bistory_buf */ + BYTE* history_buf; /* uncompressed data goes here */ + BYTE* history_ptr; /* points to next free slot in bistory_buf */ uint32 d32; /* we process 4 compressed bytes at a time */ - uint16 copy_offset; /* location to copy data from */ - uint16 lom; /* length of match */ - uint8* src_ptr; /* used while copying compressed data */ - uint8* cptr; /* points to next byte in cbuf */ - uint8 cur_byte; /* last byte fetched from cbuf */ + UINT16 copy_offset; /* location to copy data from */ + UINT16 lom; /* length of match */ + BYTE* src_ptr; /* used while copying compressed data */ + BYTE* cptr; /* points to next byte in cbuf */ + BYTE cur_byte; /* last byte fetched from cbuf */ int bits_left; /* bits left in d32 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp; @@ -1063,18 +1063,18 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, * @return True on success, False on failure */ -int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { - uint8* history_buf; /* uncompressed data goes here */ - uint16* offset_cache; /* Copy Offset cache */ - uint8* history_ptr; /* points to next free slot in bistory_buf */ + BYTE* history_buf; /* uncompressed data goes here */ + UINT16* offset_cache; /* Copy Offset cache */ + BYTE* history_ptr; /* points to next free slot in bistory_buf */ uint32 d32; /* we process 4 compressed bytes at a time */ - uint16 copy_offset; /* location to copy data from */ - uint16 lom; /* length of match */ - uint16 LUTIndex; /* LookUp table Index */ - uint8* src_ptr; /* used while copying compressed data */ - uint8* cptr; /* points to next byte in cbuf */ - uint8 cur_byte; /* last byte fetched from cbuf */ + UINT16 copy_offset; /* location to copy data from */ + UINT16 lom; /* length of match */ + UINT16 LUTIndex; /* LookUp table Index */ + BYTE* src_ptr; /* used while copying compressed data */ + BYTE* cptr; /* points to next byte in cbuf */ + BYTE cur_byte; /* last byte fetched from cbuf */ int bits_left; /* bits left in d32 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp, i; @@ -1180,7 +1180,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, d32 <<= i; bits_left -= i; if(i32 < 256) - *history_ptr++ = (uint8)i32; + *history_ptr++ = (BYTE)i32; else if(i32 > 256 && i32 < 289) { LUTIndex = i32 - 257; @@ -1398,7 +1398,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, * @return True on success, False on failure */ -int decompress_rdp_61(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) { return FALSE; } @@ -1421,8 +1421,8 @@ struct rdp_mppc_dec* mppc_dec_new(void) return NULL; } - ptr->history_buf = (uint8 *) xzalloc(RDP6_HISTORY_BUF_SIZE); - ptr->offset_cache = (uint16 *) xzalloc(RDP6_OFFSET_CACHE_SIZE); + ptr->history_buf = (BYTE *) xzalloc(RDP6_HISTORY_BUF_SIZE); + ptr->offset_cache = (UINT16 *) xzalloc(RDP6_OFFSET_CACHE_SIZE); if (!ptr->history_buf) { printf("mppc_new(): system out of memory\n"); diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index 59cbc25b4..14f94e065 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -41,7 +41,7 @@ #define CRC(crcval, newchar) crcval = (crcval >> 8) ^ crc_table[(crcval ^ newchar) & 0x00ff] /* CRC16 defs */ -static const uint16 crc_table[256] = +static const UINT16 crc_table[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, @@ -462,7 +462,7 @@ struct rdp_mppc_enc* mppc_enc_new(int protocol_type) return NULL; } enc->outputBuffer = enc->outputBufferPlus + 64; - enc->hash_table = (uint16*) xzalloc(enc->buf_len * 2); + enc->hash_table = (UINT16*) xzalloc(enc->buf_len * 2); if (enc->hash_table == NULL) { free(enc->historyBuffer); @@ -499,7 +499,7 @@ void mppc_enc_free(struct rdp_mppc_enc* enc) * @return TRUE on success, FALSE on failure */ -BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp(struct rdp_mppc_enc* enc, BYTE* srcData, int len) { if ((enc == NULL) || (srcData == NULL) || (len <= 0) || (len > enc->buf_len)) return FALSE; @@ -525,7 +525,7 @@ BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @return TRUE on success, FALSE on failure */ -BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp_4(struct rdp_mppc_enc* enc, BYTE* srcData, int len) { /* RDP 4.0 encoding not yet implemented */ return FALSE; @@ -541,7 +541,7 @@ BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len) * @return TRUE on success, FALSE on failure */ -BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) +BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len) { char* outputBuffer; /* points to enc->outputBuffer */ char* hptr_end; /* points to end of history data */ @@ -554,20 +554,20 @@ BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len) uint32 copy_offset; /* pattern match starts here... */ uint32 lom; /* ...and matches this many bytes */ int last_crc_index; /* don't compute CRC beyond this index */ - uint16 *hash_table; /* hash table for pattern matching */ + UINT16 *hash_table; /* hash table for pattern matching */ uint32 i; uint32 j; uint32 k; uint32 x; - uint8 data; - uint16 data16; + BYTE data; + UINT16 data16; uint32 historyOffset; - uint16 crc; + UINT16 crc; uint32 ctr; uint32 saved_ctr; uint32 data_end; - uint8 byte_val; + BYTE byte_val; crc = 0; opb_index = 0; diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 05cad27b2..1c319b266 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -45,21 +45,21 @@ static void nsc_decode(NSC_CONTEXT* context) { - uint16 x; - uint16 y; - uint16 rw; - uint8 shift; - uint8* yplane; - uint8* coplane; - uint8* cgplane; - uint8* aplane; - sint16 y_val; - sint16 co_val; - sint16 cg_val; - sint16 r_val; - sint16 g_val; - sint16 b_val; - uint8* bmpdata; + UINT16 x; + UINT16 y; + UINT16 rw; + BYTE shift; + BYTE* yplane; + BYTE* coplane; + BYTE* cgplane; + BYTE* aplane; + INT16 y_val; + INT16 co_val; + INT16 cg_val; + INT16 r_val; + INT16 g_val; + INT16 b_val; + BYTE* bmpdata; bmpdata = context->bmpdata; rw = ROUND_UP_TO(context->width, 8); @@ -82,9 +82,9 @@ static void nsc_decode(NSC_CONTEXT* context) aplane = context->priv->plane_buf[3] + y * context->width; /* A */ for (x = 0; x < context->width; x++) { - y_val = (sint16) *yplane; - co_val = (sint16) (sint8) (*coplane << shift); - cg_val = (sint16) (sint8) (*cgplane << shift); + y_val = (INT16) *yplane; + co_val = (INT16) (INT8) (*coplane << shift); + cg_val = (INT16) (INT8) (*cgplane << shift); r_val = y_val + co_val - cg_val; g_val = y_val + cg_val; b_val = y_val - co_val - cg_val; @@ -100,11 +100,11 @@ static void nsc_decode(NSC_CONTEXT* context) } } -static void nsc_rle_decode(uint8* in, uint8* out, uint32 origsz) +static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz) { uint32 len; uint32 left; - uint8 value; + BYTE value; left = origsz; while (left > 4) @@ -146,8 +146,8 @@ static void nsc_rle_decode(uint8* in, uint8* out, uint32 origsz) static void nsc_rle_decompress_data(NSC_CONTEXT* context) { - uint16 i; - uint8* rle; + UINT16 i; + BYTE* rle; uint32 origsize; uint32 planesize; @@ -176,8 +176,8 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s) for (i = 0; i < 4; i++) stream_read_uint32(s, context->nsc_stream.PlaneByteCount[i]); - stream_read_uint8(s, context->nsc_stream.ColorLossLevel); - stream_read_uint8(s, context->nsc_stream.ChromaSubSamplingLevel); + stream_read_BYTE(s, context->nsc_stream.ColorLossLevel); + stream_read_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); stream_seek(s, 2); context->nsc_stream.Planes = stream_get_tail(s); @@ -210,7 +210,7 @@ static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s) if (length > context->priv->plane_buf_length) { for (i = 0; i < 4; i++) - context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length); + context->priv->plane_buf[i] = (BYTE*) realloc(context->priv->plane_buf[i], length); context->priv->plane_buf_length = length; } @@ -316,8 +316,8 @@ void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f } } -void nsc_process_message(NSC_CONTEXT* context, uint16 bpp, - uint16 width, uint16 height, uint8* data, uint32 length) +void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, + UINT16 width, UINT16 height, BYTE* data, uint32 length) { STREAM* s; diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index d8e7ce674..5e8957f2b 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -48,7 +48,7 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context) if (length > context->priv->plane_buf_length) { for (i = 0; i < 5; i++) - context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length); + context->priv->plane_buf[i] = (BYTE*) realloc(context->priv->plane_buf[i], length); context->priv->plane_buf_length = length; } @@ -68,21 +68,21 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context) } } -static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int rowstride) +static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride) { - uint16 x; - uint16 y; - uint16 rw; - uint8 ccl; - uint8* src; - uint8* yplane; - uint8* coplane; - uint8* cgplane; - uint8* aplane; - sint16 r_val; - sint16 g_val; - sint16 b_val; - uint8 a_val; + UINT16 x; + UINT16 y; + UINT16 rw; + BYTE ccl; + BYTE* src; + BYTE* yplane; + BYTE* coplane; + BYTE* cgplane; + BYTE* aplane; + INT16 r_val; + INT16 g_val; + INT16 b_val; + BYTE a_val; uint32 tempWidth; uint32 tempHeight; @@ -131,23 +131,23 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int a_val = 0xFF; break; case RDP_PIXEL_FORMAT_B5G6R5_LE: - b_val = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); - g_val = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); - r_val = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); + b_val = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); + g_val = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); + r_val = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); a_val = 0xFF; src += 2; break; case RDP_PIXEL_FORMAT_R5G6B5_LE: - r_val = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); - g_val = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); - b_val = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); + r_val = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); + g_val = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); + b_val = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); a_val = 0xFF; src += 2; break; case RDP_PIXEL_FORMAT_P4_PLANER: { int shift; - uint8 idx; + BYTE idx; shift = (7 - (x % 8)); idx = ((*src) >> shift) & 1; @@ -155,9 +155,9 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int idx |= (((*(src + 2)) >> shift) & 1) << 2; idx |= (((*(src + 3)) >> shift) & 1) << 3; idx *= 3; - r_val = (sint16) context->palette[idx]; - g_val = (sint16) context->palette[idx + 1]; - b_val = (sint16) context->palette[idx + 2]; + r_val = (INT16) context->palette[idx]; + g_val = (INT16) context->palette[idx + 1]; + b_val = (INT16) context->palette[idx + 2]; if (shift == 0) src += 4; } @@ -167,9 +167,9 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int { int idx = (*src) * 3; - r_val = (sint16) context->palette[idx]; - g_val = (sint16) context->palette[idx + 1]; - b_val = (sint16) context->palette[idx + 2]; + r_val = (INT16) context->palette[idx]; + g_val = (INT16) context->palette[idx + 1]; + b_val = (INT16) context->palette[idx + 2]; src++; } a_val = 0xFF; @@ -178,10 +178,10 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int r_val = g_val = b_val = a_val = 0; break; } - *yplane++ = (uint8) ((r_val >> 2) + (g_val >> 1) + (b_val >> 2)); + *yplane++ = (BYTE) ((r_val >> 2) + (g_val >> 1) + (b_val >> 2)); /* Perform color loss reduction here */ - *coplane++ = (uint8) ((r_val - b_val) >> ccl); - *cgplane++ = (uint8) ((-(r_val >> 1) + g_val - (b_val >> 1)) >> ccl); + *coplane++ = (BYTE) ((r_val - b_val) >> ccl); + *cgplane++ = (BYTE) ((-(r_val >> 1) + g_val - (b_val >> 1)) >> ccl); *aplane++ = a_val; } if (context->nsc_stream.ChromaSubSamplingLevel > 0 && (x % 2) == 1) @@ -201,14 +201,14 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int static void nsc_encode_subsampling(NSC_CONTEXT* context) { - uint16 x; - uint16 y; - uint8* co_dst; - uint8* cg_dst; - sint8* co_src0; - sint8* co_src1; - sint8* cg_src0; - sint8* cg_src1; + UINT16 x; + UINT16 y; + BYTE* co_dst; + BYTE* cg_dst; + INT8* co_src0; + INT8* co_src1; + INT8* cg_src0; + INT8* cg_src1; uint32 tempWidth; uint32 tempHeight; @@ -219,16 +219,16 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context) { co_dst = context->priv->plane_buf[1] + y * (tempWidth >> 1); cg_dst = context->priv->plane_buf[2] + y * (tempWidth >> 1); - co_src0 = (sint8*) context->priv->plane_buf[1] + (y << 1) * tempWidth; + co_src0 = (INT8*) context->priv->plane_buf[1] + (y << 1) * tempWidth; co_src1 = co_src0 + tempWidth; - cg_src0 = (sint8*) context->priv->plane_buf[2] + (y << 1) * tempWidth; + cg_src0 = (INT8*) context->priv->plane_buf[2] + (y << 1) * tempWidth; cg_src1 = cg_src0 + tempWidth; for (x = 0; x < tempWidth >> 1; x++) { - *co_dst++ = (uint8) (((sint16) *co_src0 + (sint16) *(co_src0 + 1) + - (sint16) *co_src1 + (sint16) *(co_src1 + 1)) >> 2); - *cg_dst++ = (uint8) (((sint16) *cg_src0 + (sint16) *(cg_src0 + 1) + - (sint16) *cg_src1 + (sint16) *(cg_src1 + 1)) >> 2); + *co_dst++ = (BYTE) (((INT16) *co_src0 + (INT16) *(co_src0 + 1) + + (INT16) *co_src1 + (INT16) *(co_src1 + 1)) >> 2); + *cg_dst++ = (BYTE) (((INT16) *cg_src0 + (INT16) *(cg_src0 + 1) + + (INT16) *cg_src1 + (INT16) *(cg_src1 + 1)) >> 2); co_src0 += 2; co_src1 += 2; cg_src0 += 2; @@ -237,7 +237,7 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context) } } -void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride) +void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride) { nsc_encode_argb_to_aycocg(context, bmpdata, rowstride); if (context->nsc_stream.ChromaSubSamplingLevel > 0) @@ -246,7 +246,7 @@ void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride) } } -static uint32 nsc_rle_encode(uint8* in, uint8* out, uint32 origsz) +static uint32 nsc_rle_encode(BYTE* in, BYTE* out, uint32 origsz) { uint32 left; uint32 runlength = 1; @@ -302,8 +302,8 @@ static uint32 nsc_rle_encode(uint8* in, uint8* out, uint32 origsz) static void nsc_rle_compress_data(NSC_CONTEXT* context) { - uint16 i; - uint8* rle; + UINT16 i; + BYTE* rle; uint32 origsize; uint32 planesize; @@ -331,7 +331,7 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context) } void nsc_compose_message(NSC_CONTEXT* context, STREAM* s, - uint8* bmpdata, int width, int height, int rowstride) + BYTE* bmpdata, int width, int height, int rowstride) { int i; @@ -355,9 +355,9 @@ void nsc_compose_message(NSC_CONTEXT* context, STREAM* s, stream_write_uint32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */ stream_write_uint32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */ stream_write_uint32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */ - stream_write_uint8(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */ - stream_write_uint8(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */ - stream_write_uint16(s, 0); /* Reserved (2 bytes) */ + stream_write_BYTE(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */ + stream_write_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */ + stream_write_UINT16(s, 0); /* Reserved (2 bytes) */ for (i = 0; i < 4; i++) { diff --git a/libfreerdp/codec/nsc_encode.h b/libfreerdp/codec/nsc_encode.h index 16d13c8dc..f4c320197 100644 --- a/libfreerdp/codec/nsc_encode.h +++ b/libfreerdp/codec/nsc_encode.h @@ -20,6 +20,6 @@ #ifndef __NSC_ENCODE_H #define __NSC_ENCODE_H -void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride); +void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride); #endif diff --git a/libfreerdp/codec/nsc_sse2.c b/libfreerdp/codec/nsc_sse2.c index 5551bfc6c..f84c1b2d7 100644 --- a/libfreerdp/codec/nsc_sse2.c +++ b/libfreerdp/codec/nsc_sse2.c @@ -31,17 +31,17 @@ #include "nsc_types.h" #include "nsc_sse2.h" -static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata, int rowstride) +static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride) { - uint16 x; - uint16 y; - uint16 rw; - uint8 ccl; - uint8* src; - uint8* yplane; - uint8* coplane; - uint8* cgplane; - uint8* aplane; + UINT16 x; + UINT16 y; + UINT16 rw; + BYTE ccl; + BYTE* src; + BYTE* yplane; + BYTE* coplane; + BYTE* cgplane; + BYTE* aplane; __m128i r_val; __m128i g_val; __m128i b_val; @@ -165,7 +165,7 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata, case RDP_PIXEL_FORMAT_P4_PLANER: { int shift; - uint8 idx[8]; + BYTE idx[8]; for (shift = 7; shift >= 0; shift--) { @@ -283,14 +283,14 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata, static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context) { - uint16 x; - uint16 y; - uint8* co_dst; - uint8* cg_dst; - sint8* co_src0; - sint8* co_src1; - sint8* cg_src0; - sint8* cg_src1; + UINT16 x; + UINT16 y; + BYTE* co_dst; + BYTE* cg_dst; + INT8* co_src0; + INT8* co_src1; + INT8* cg_src0; + INT8* cg_src1; uint32 tempWidth; uint32 tempHeight; __m128i t; @@ -304,9 +304,9 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context) { co_dst = context->priv->plane_buf[1] + y * (tempWidth >> 1); cg_dst = context->priv->plane_buf[2] + y * (tempWidth >> 1); - co_src0 = (sint8*) context->priv->plane_buf[1] + (y << 1) * tempWidth; + co_src0 = (INT8*) context->priv->plane_buf[1] + (y << 1) * tempWidth; co_src1 = co_src0 + tempWidth; - cg_src0 = (sint8*) context->priv->plane_buf[2] + (y << 1) * tempWidth; + cg_src0 = (INT8*) context->priv->plane_buf[2] + (y << 1) * tempWidth; cg_src1 = cg_src0 + tempWidth; for (x = 0; x < tempWidth >> 1; x += 8) { @@ -333,7 +333,7 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context) } } -static void nsc_encode_sse2(NSC_CONTEXT* context, uint8* bmpdata, int rowstride) +static void nsc_encode_sse2(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride) { nsc_encode_argb_to_aycocg_sse2(context, bmpdata, rowstride); if (context->nsc_stream.ChromaSubSamplingLevel > 0) diff --git a/libfreerdp/codec/nsc_types.h b/libfreerdp/codec/nsc_types.h index 9f29b720f..14bc1f873 100644 --- a/libfreerdp/codec/nsc_types.h +++ b/libfreerdp/codec/nsc_types.h @@ -33,7 +33,7 @@ struct _NSC_CONTEXT_PRIV { - uint8* plane_buf[5]; /* Decompressed Plane Buffers in the respective order */ + BYTE* plane_buf[5]; /* Decompressed Plane Buffers in the respective order */ uint32 plane_buf_length; /* Lengths of each plane buffer */ /* profilers */ diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 86305d6c4..7d63a2ed6 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -148,11 +148,11 @@ RFX_CONTEXT* rfx_context_new(void) rfx_context_set_pixel_format(context, RDP_PIXEL_FORMAT_B8G8R8A8); /* align buffers to 16 byte boundary (needed for SSE/SSE2 instructions) */ - context->priv->y_r_buffer = (sint16*)(((uintptr_t)context->priv->y_r_mem + 16) & ~ 0x0F); - context->priv->cb_g_buffer = (sint16*)(((uintptr_t)context->priv->cb_g_mem + 16) & ~ 0x0F); - context->priv->cr_b_buffer = (sint16*)(((uintptr_t)context->priv->cr_b_mem + 16) & ~ 0x0F); + context->priv->y_r_buffer = (INT16*)(((uintptr_t)context->priv->y_r_mem + 16) & ~ 0x0F); + context->priv->cb_g_buffer = (INT16*)(((uintptr_t)context->priv->cb_g_mem + 16) & ~ 0x0F); + context->priv->cr_b_buffer = (INT16*)(((uintptr_t)context->priv->cr_b_mem + 16) & ~ 0x0F); - context->priv->dwt_buffer = (sint16*)(((uintptr_t)context->priv->dwt_mem + 16) & ~ 0x0F); + context->priv->dwt_buffer = (INT16*)(((uintptr_t)context->priv->dwt_mem + 16) & ~ 0x0F); /* create profilers for default decoding routines */ rfx_profiler_create(context); @@ -236,7 +236,7 @@ static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s) return; } - stream_read_uint16(s, context->version); /* version (2 bytes), WF_VERSION_1_0 (0x0100) */ + stream_read_UINT16(s, context->version); /* version (2 bytes), WF_VERSION_1_0 (0x0100) */ if (context->version != WF_VERSION_1_0) { @@ -249,9 +249,9 @@ static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s) static void rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s) { - uint8 numCodecs; + BYTE numCodecs; - stream_read_uint8(s, numCodecs); /* numCodecs (1 byte), must be set to 0x01 */ + stream_read_BYTE(s, numCodecs); /* numCodecs (1 byte), must be set to 0x01 */ if (numCodecs != 1) { @@ -260,18 +260,18 @@ static void rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s) } /* RFX_CODEC_VERSIONT */ - stream_read_uint8(s, context->codec_id); /* codecId (1 byte) */ - stream_read_uint8(s, context->codec_version); /* version (2 bytes) */ + stream_read_BYTE(s, context->codec_id); /* codecId (1 byte) */ + stream_read_BYTE(s, context->codec_version); /* version (2 bytes) */ DEBUG_RFX("id %d version 0x%X.", context->codec_id, context->codec_version); } static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s) { - uint8 channelId; - uint8 numChannels; + BYTE channelId; + BYTE numChannels; - stream_read_uint8(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */ + stream_read_BYTE(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */ /* In RDVH sessions, numChannels will represent the number of virtual monitors * configured and does not always be set to 0x01 as [MS-RDPRFX] said. @@ -283,9 +283,9 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s) } /* RFX_CHANNELT */ - stream_read_uint8(s, channelId); /* channelId (1 byte) */ - stream_read_uint16(s, context->width); /* width (2 bytes) */ - stream_read_uint16(s, context->height); /* height (2 bytes) */ + stream_read_BYTE(s, channelId); /* channelId (1 byte) */ + stream_read_UINT16(s, context->width); /* width (2 bytes) */ + stream_read_UINT16(s, context->height); /* height (2 bytes) */ /* Now, only the first monitor can be used, therefore the other channels will be ignored. */ stream_seek(s, 5 * (numChannels - 1)); @@ -296,13 +296,13 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s) static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s) { - uint8 ctxId; - uint16 tileSize; - uint16 properties; + BYTE ctxId; + UINT16 tileSize; + UINT16 properties; - stream_read_uint8(s, ctxId); /* ctxId (1 byte), must be set to 0x00 */ - stream_read_uint16(s, tileSize); /* tileSize (2 bytes), must be set to CT_TILE_64x64 (0x0040) */ - stream_read_uint16(s, properties); /* properties (2 bytes) */ + stream_read_BYTE(s, ctxId); /* ctxId (1 byte), must be set to 0x00 */ + stream_read_UINT16(s, tileSize); /* tileSize (2 bytes), must be set to CT_TILE_64x64 (0x0040) */ + stream_read_UINT16(s, properties); /* properties (2 bytes) */ DEBUG_RFX("ctxId %d tileSize %d properties 0x%X.", ctxId, tileSize, properties); @@ -335,10 +335,10 @@ static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s) static void rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s) { uint32 frameIdx; - uint16 numRegions; + UINT16 numRegions; stream_read_uint32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */ - stream_read_uint16(s, numRegions); /* numRegions (2 bytes) */ + stream_read_UINT16(s, numRegions); /* numRegions (2 bytes) */ DEBUG_RFX("RFX_FRAME_BEGIN: frameIdx:%d numRegions:%d", frameIdx, numRegions); } @@ -352,8 +352,8 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag { int i; - stream_seek_uint8(s); /* regionFlags (1 byte) */ - stream_read_uint16(s, message->num_rects); /* numRects (2 bytes) */ + stream_seek_BYTE(s); /* regionFlags (1 byte) */ + stream_read_UINT16(s, message->num_rects); /* numRects (2 bytes) */ if (message->num_rects < 1) { @@ -370,10 +370,10 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag for (i = 0; i < message->num_rects; i++) { /* RFX_RECT */ - stream_read_uint16(s, message->rects[i].x); /* x (2 bytes) */ - stream_read_uint16(s, message->rects[i].y); /* y (2 bytes) */ - stream_read_uint16(s, message->rects[i].width); /* width (2 bytes) */ - stream_read_uint16(s, message->rects[i].height); /* height (2 bytes) */ + stream_read_UINT16(s, message->rects[i].x); /* x (2 bytes) */ + stream_read_UINT16(s, message->rects[i].y); /* y (2 bytes) */ + stream_read_UINT16(s, message->rects[i].width); /* width (2 bytes) */ + stream_read_UINT16(s, message->rects[i].height); /* height (2 bytes) */ DEBUG_RFX("rect %d (%d %d %d %d).", i, message->rects[i].x, message->rects[i].y, message->rects[i].width, message->rects[i].height); @@ -382,21 +382,21 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag static void rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREAM* s) { - uint8 quantIdxY; - uint8 quantIdxCb; - uint8 quantIdxCr; - uint16 xIdx, yIdx; - uint16 YLen, CbLen, CrLen; + BYTE quantIdxY; + BYTE quantIdxCb; + BYTE quantIdxCr; + UINT16 xIdx, yIdx; + UINT16 YLen, CbLen, CrLen; /* RFX_TILE */ - stream_read_uint8(s, quantIdxY); /* quantIdxY (1 byte) */ - stream_read_uint8(s, quantIdxCb); /* quantIdxCb (1 byte) */ - stream_read_uint8(s, quantIdxCr); /* quantIdxCr (1 byte) */ - stream_read_uint16(s, xIdx); /* xIdx (2 bytes) */ - stream_read_uint16(s, yIdx); /* yIdx (2 bytes) */ - stream_read_uint16(s, YLen); /* YLen (2 bytes) */ - stream_read_uint16(s, CbLen); /* CbLen (2 bytes) */ - stream_read_uint16(s, CrLen); /* CrLen (2 bytes) */ + stream_read_BYTE(s, quantIdxY); /* quantIdxY (1 byte) */ + stream_read_BYTE(s, quantIdxCb); /* quantIdxCb (1 byte) */ + stream_read_BYTE(s, quantIdxCr); /* quantIdxCr (1 byte) */ + stream_read_UINT16(s, xIdx); /* xIdx (2 bytes) */ + stream_read_UINT16(s, yIdx); /* yIdx (2 bytes) */ + stream_read_UINT16(s, YLen); /* YLen (2 bytes) */ + stream_read_UINT16(s, CbLen); /* CbLen (2 bytes) */ + stream_read_UINT16(s, CrLen); /* CrLen (2 bytes) */ DEBUG_RFX("quantIdxY:%d quantIdxCb:%d quantIdxCr:%d xIdx:%d yIdx:%d YLen:%d CbLen:%d CrLen:%d", quantIdxY, quantIdxCb, quantIdxCr, xIdx, yIdx, YLen, CbLen, CrLen); @@ -414,15 +414,15 @@ static void rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREA static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s) { int i; - uint16 subtype; + UINT16 subtype; uint32 blockLen; uint32 blockType; uint32 tilesDataSize; uint32* quants; - uint8 quant; + BYTE quant; int pos; - stream_read_uint16(s, subtype); /* subtype (2 bytes) must be set to CBT_TILESET (0xCAC2) */ + stream_read_UINT16(s, subtype); /* subtype (2 bytes) must be set to CBT_TILESET (0xCAC2) */ if (subtype != CBT_TILESET) { @@ -430,11 +430,11 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa return; } - stream_seek_uint16(s); /* idx (2 bytes), must be set to 0x0000 */ - stream_seek_uint16(s); /* properties (2 bytes) */ + stream_seek_UINT16(s); /* idx (2 bytes), must be set to 0x0000 */ + stream_seek_UINT16(s); /* properties (2 bytes) */ - stream_read_uint8(s, context->num_quants); /* numQuant (1 byte) */ - stream_seek_uint8(s); /* tileSize (1 byte), must be set to 0x40 */ + stream_read_BYTE(s, context->num_quants); /* numQuant (1 byte) */ + stream_seek_BYTE(s); /* tileSize (1 byte), must be set to 0x40 */ if (context->num_quants < 1) { @@ -442,7 +442,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa return; } - stream_read_uint16(s, message->num_tiles); /* numTiles (2 bytes) */ + stream_read_UINT16(s, message->num_tiles); /* numTiles (2 bytes) */ if (message->num_tiles < 1) { @@ -462,19 +462,19 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa for (i = 0; i < context->num_quants; i++) { /* RFX_CODEC_QUANT */ - stream_read_uint8(s, quant); + stream_read_BYTE(s, quant); *quants++ = (quant & 0x0F); *quants++ = (quant >> 4); - stream_read_uint8(s, quant); + stream_read_BYTE(s, quant); *quants++ = (quant & 0x0F); *quants++ = (quant >> 4); - stream_read_uint8(s, quant); + stream_read_BYTE(s, quant); *quants++ = (quant & 0x0F); *quants++ = (quant >> 4); - stream_read_uint8(s, quant); + stream_read_BYTE(s, quant); *quants++ = (quant & 0x0F); *quants++ = (quant >> 4); - stream_read_uint8(s, quant); + stream_read_BYTE(s, quant); *quants++ = (quant & 0x0F); *quants++ = (quant >> 4); @@ -492,7 +492,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa for (i = 0; i < message->num_tiles; i++) { /* RFX_TILE */ - stream_read_uint16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */ + stream_read_UINT16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */ stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */ pos = stream_get_pos(s) - 6 + blockLen; @@ -509,7 +509,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa } } -RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 length) +RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length) { int pos; STREAM* s; @@ -524,7 +524,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 lengt while (stream_get_left(s) > 6) { /* RFX_BLOCKT */ - stream_read_uint16(s, blockType); /* blockType (2 bytes) */ + stream_read_UINT16(s, blockType); /* blockType (2 bytes) */ stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */ DEBUG_RFX("blockType 0x%X blockLen %d", blockType, blockLen); @@ -593,7 +593,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 lengt return message; } -uint16 rfx_message_get_tile_count(RFX_MESSAGE* message) +UINT16 rfx_message_get_tile_count(RFX_MESSAGE* message) { return message->num_tiles; } @@ -603,7 +603,7 @@ RFX_TILE* rfx_message_get_tile(RFX_MESSAGE* message, int index) return message->tiles[index]; } -uint16 rfx_message_get_rect_count(RFX_MESSAGE* message) +UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message) { return message->num_rects; } @@ -631,41 +631,41 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message) static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s) { - stream_write_uint16(s, WBT_SYNC); /* BlockT.blockType */ + stream_write_UINT16(s, WBT_SYNC); /* BlockT.blockType */ stream_write_uint32(s, 12); /* BlockT.blockLen */ stream_write_uint32(s, WF_MAGIC); /* magic */ - stream_write_uint16(s, WF_VERSION_1_0); /* version */ + stream_write_UINT16(s, WF_VERSION_1_0); /* version */ } static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s) { - stream_write_uint16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */ + stream_write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */ stream_write_uint32(s, 10); /* BlockT.blockLen */ - stream_write_uint8(s, 1); /* numCodecs */ - stream_write_uint8(s, 1); /* codecs.codecId */ - stream_write_uint16(s, WF_VERSION_1_0); /* codecs.version */ + stream_write_BYTE(s, 1); /* numCodecs */ + stream_write_BYTE(s, 1); /* codecs.codecId */ + stream_write_UINT16(s, WF_VERSION_1_0); /* codecs.version */ } static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s) { - stream_write_uint16(s, WBT_CHANNELS); /* BlockT.blockType */ + stream_write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType */ stream_write_uint32(s, 12); /* BlockT.blockLen */ - stream_write_uint8(s, 1); /* numChannels */ - stream_write_uint8(s, 0); /* Channel.channelId */ - stream_write_uint16(s, context->width); /* Channel.width */ - stream_write_uint16(s, context->height); /* Channel.height */ + stream_write_BYTE(s, 1); /* numChannels */ + stream_write_BYTE(s, 0); /* Channel.channelId */ + stream_write_UINT16(s, context->width); /* Channel.width */ + stream_write_UINT16(s, context->height); /* Channel.height */ } static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s) { - uint16 properties; + UINT16 properties; - stream_write_uint16(s, WBT_CONTEXT); /* CodecChannelT.blockType */ + stream_write_UINT16(s, WBT_CONTEXT); /* CodecChannelT.blockType */ stream_write_uint32(s, 13); /* CodecChannelT.blockLen */ - stream_write_uint8(s, 1); /* CodecChannelT.codecId */ - stream_write_uint8(s, 0); /* CodecChannelT.channelId */ - stream_write_uint8(s, 0); /* ctxId */ - stream_write_uint16(s, CT_TILE_64x64); /* tileSize */ + stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ + stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ + stream_write_BYTE(s, 0); /* ctxId */ + stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */ /* properties */ properties = context->flags; /* flags */ @@ -673,7 +673,7 @@ static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s) properties |= (CLW_XFORM_DWT_53_A << 5); /* xft */ properties |= ((context->mode == RLGR1 ? CLW_ENTROPY_RLGR1 : CLW_ENTROPY_RLGR3) << 9); /* et */ properties |= (SCALAR_QUANTIZATION << 13); /* qt */ - stream_write_uint16(s, properties); + stream_write_UINT16(s, properties); /* properties in tilesets: note that this has different format from the one in TS_RFX_CONTEXT */ properties = 1; /* lt */ @@ -701,12 +701,12 @@ static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s) { stream_check_size(s, 14); - stream_write_uint16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */ + stream_write_UINT16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */ stream_write_uint32(s, 14); /* CodecChannelT.blockLen */ - stream_write_uint8(s, 1); /* CodecChannelT.codecId */ - stream_write_uint8(s, 0); /* CodecChannelT.channelId */ + stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ + stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ stream_write_uint32(s, context->frame_idx); /* frameIdx */ - stream_write_uint16(s, 1); /* numRegions */ + stream_write_UINT16(s, 1); /* numRegions */ context->frame_idx++; } @@ -720,27 +720,27 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s, size = 15 + num_rects * 8; stream_check_size(s, size); - stream_write_uint16(s, WBT_REGION); /* CodecChannelT.blockType */ + stream_write_UINT16(s, WBT_REGION); /* CodecChannelT.blockType */ stream_write_uint32(s, size); /* set CodecChannelT.blockLen later */ - stream_write_uint8(s, 1); /* CodecChannelT.codecId */ - stream_write_uint8(s, 0); /* CodecChannelT.channelId */ - stream_write_uint8(s, 1); /* regionFlags */ - stream_write_uint16(s, num_rects); /* numRects */ + stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ + stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ + stream_write_BYTE(s, 1); /* regionFlags */ + stream_write_UINT16(s, num_rects); /* numRects */ for (i = 0; i < num_rects; i++) { - stream_write_uint16(s, rects[i].x); - stream_write_uint16(s, rects[i].y); - stream_write_uint16(s, rects[i].width); - stream_write_uint16(s, rects[i].height); + stream_write_UINT16(s, rects[i].x); + stream_write_UINT16(s, rects[i].y); + stream_write_UINT16(s, rects[i].width); + stream_write_UINT16(s, rects[i].height); } - stream_write_uint16(s, CBT_REGION); /* regionType */ - stream_write_uint16(s, 1); /* numTilesets */ + stream_write_UINT16(s, CBT_REGION); /* regionType */ + stream_write_UINT16(s, 1); /* numTilesets */ } static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, - uint8* tile_data, int tile_width, int tile_height, int rowstride, + BYTE* tile_data, int tile_width, int tile_height, int rowstride, const uint32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr, int xIdx, int yIdx) { @@ -752,13 +752,13 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, stream_check_size(s, 19); start_pos = stream_get_pos(s); - stream_write_uint16(s, CBT_TILE); /* BlockT.blockType */ + stream_write_UINT16(s, CBT_TILE); /* BlockT.blockType */ stream_seek_uint32(s); /* set BlockT.blockLen later */ - stream_write_uint8(s, quantIdxY); - stream_write_uint8(s, quantIdxCb); - stream_write_uint8(s, quantIdxCr); - stream_write_uint16(s, xIdx); - stream_write_uint16(s, yIdx); + stream_write_BYTE(s, quantIdxY); + stream_write_BYTE(s, quantIdxCb); + stream_write_BYTE(s, quantIdxCr); + stream_write_UINT16(s, xIdx); + stream_write_UINT16(s, yIdx); stream_seek(s, 6); /* YLen, CbLen, CrLen */ @@ -774,15 +774,15 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, stream_set_pos(s, start_pos + 2); stream_write_uint32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */ stream_set_pos(s, start_pos + 13); - stream_write_uint16(s, YLen); - stream_write_uint16(s, CbLen); - stream_write_uint16(s, CrLen); + stream_write_UINT16(s, YLen); + stream_write_UINT16(s, CbLen); + stream_write_UINT16(s, CrLen); stream_set_pos(s, end_pos); } static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, - uint8* image_data, int width, int height, int rowstride) + BYTE* image_data, int width, int height, int rowstride) { int size; int start_pos, end_pos; @@ -825,22 +825,22 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, stream_check_size(s, size); start_pos = stream_get_pos(s); - stream_write_uint16(s, WBT_EXTENSION); /* CodecChannelT.blockType */ + stream_write_UINT16(s, WBT_EXTENSION); /* CodecChannelT.blockType */ stream_seek_uint32(s); /* set CodecChannelT.blockLen later */ - stream_write_uint8(s, 1); /* CodecChannelT.codecId */ - stream_write_uint8(s, 0); /* CodecChannelT.channelId */ - stream_write_uint16(s, CBT_TILESET); /* subtype */ - stream_write_uint16(s, 0); /* idx */ - stream_write_uint16(s, context->properties); /* properties */ - stream_write_uint8(s, numQuants); /* numQuants */ - stream_write_uint8(s, 0x40); /* tileSize */ - stream_write_uint16(s, numTiles); /* numTiles */ + stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ + stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ + stream_write_UINT16(s, CBT_TILESET); /* subtype */ + stream_write_UINT16(s, 0); /* idx */ + stream_write_UINT16(s, context->properties); /* properties */ + stream_write_BYTE(s, numQuants); /* numQuants */ + stream_write_BYTE(s, 0x40); /* tileSize */ + stream_write_UINT16(s, numTiles); /* numTiles */ stream_seek_uint32(s); /* set tilesDataSize later */ quantValsPtr = quantVals; for (i = 0; i < numQuants * 5; i++) { - stream_write_uint8(s, quantValsPtr[0] + (quantValsPtr[1] << 4)); + stream_write_BYTE(s, quantValsPtr[0] + (quantValsPtr[1] << 4)); quantValsPtr += 2; } @@ -874,14 +874,14 @@ static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s) { stream_check_size(s, 8); - stream_write_uint16(s, WBT_FRAME_END); /* CodecChannelT.blockType */ + stream_write_UINT16(s, WBT_FRAME_END); /* CodecChannelT.blockType */ stream_write_uint32(s, 8); /* CodecChannelT.blockLen */ - stream_write_uint8(s, 1); /* CodecChannelT.codecId */ - stream_write_uint8(s, 0); /* CodecChannelT.channelId */ + stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ + stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ } static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s, - const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride) + const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride) { rfx_compose_message_frame_begin(context, s); rfx_compose_message_region(context, s, rects, num_rects); @@ -890,7 +890,7 @@ static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s, } FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s, - const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride) + const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride) { /* Only the first frame should send the RemoteFX header */ if (context->frame_idx == 0 && !context->header_processed) diff --git a/libfreerdp/codec/rfx_bitstream.h b/libfreerdp/codec/rfx_bitstream.h index a0051e4f3..164060f72 100644 --- a/libfreerdp/codec/rfx_bitstream.h +++ b/libfreerdp/codec/rfx_bitstream.h @@ -24,7 +24,7 @@ struct _RFX_BITSTREAM { - uint8* buffer; + BYTE* buffer; int nbytes; int byte_pos; int bits_left; @@ -32,7 +32,7 @@ struct _RFX_BITSTREAM typedef struct _RFX_BITSTREAM RFX_BITSTREAM; #define rfx_bitstream_attach(bs, _buffer, _nbytes) do { \ - bs->buffer = (uint8*) (_buffer); \ + bs->buffer = (BYTE*) (_buffer); \ bs->nbytes = (_nbytes); \ bs->byte_pos = 0; \ bs->bits_left = 8; } while (0) @@ -40,7 +40,7 @@ typedef struct _RFX_BITSTREAM RFX_BITSTREAM; #define rfx_bitstream_get_bits(bs, _nbits, _r) do { \ int nbits = _nbits; \ int b; \ - uint16 n = 0; \ + UINT16 n = 0; \ while (bs->byte_pos < bs->nbytes && nbits > 0) \ { \ b = nbits; \ @@ -60,7 +60,7 @@ typedef struct _RFX_BITSTREAM RFX_BITSTREAM; _r = n; } while (0) #define rfx_bitstream_put_bits(bs, _bits, _nbits) do { \ - uint16 bits = (_bits); \ + UINT16 bits = (_bits); \ int nbits = (_nbits); \ int b; \ while (bs->byte_pos < bs->nbytes && nbits > 0) \ diff --git a/libfreerdp/codec/rfx_decode.c b/libfreerdp/codec/rfx_decode.c index 6f18f8d96..cc61b8bfc 100644 --- a/libfreerdp/codec/rfx_decode.c +++ b/libfreerdp/codec/rfx_decode.c @@ -36,13 +36,13 @@ #include "rfx_decode.h" -static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf, - RDP_PIXEL_FORMAT pixel_format, uint8* dst_buf) +static void rfx_decode_format_rgb(INT16* r_buf, INT16* g_buf, INT16* b_buf, + RDP_PIXEL_FORMAT pixel_format, BYTE* dst_buf) { - sint16* r = r_buf; - sint16* g = g_buf; - sint16* b = b_buf; - uint8* dst = dst_buf; + INT16* r = r_buf; + INT16* g = g_buf; + INT16* b = b_buf; + BYTE* dst = dst_buf; int i; switch (pixel_format) @@ -50,35 +50,35 @@ static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf, case RDP_PIXEL_FORMAT_B8G8R8A8: for (i = 0; i < 4096; i++) { - *dst++ = (uint8) (*b++); - *dst++ = (uint8) (*g++); - *dst++ = (uint8) (*r++); + *dst++ = (BYTE) (*b++); + *dst++ = (BYTE) (*g++); + *dst++ = (BYTE) (*r++); *dst++ = 0xFF; } break; case RDP_PIXEL_FORMAT_R8G8B8A8: for (i = 0; i < 4096; i++) { - *dst++ = (uint8) (*r++); - *dst++ = (uint8) (*g++); - *dst++ = (uint8) (*b++); + *dst++ = (BYTE) (*r++); + *dst++ = (BYTE) (*g++); + *dst++ = (BYTE) (*b++); *dst++ = 0xFF; } break; case RDP_PIXEL_FORMAT_B8G8R8: for (i = 0; i < 4096; i++) { - *dst++ = (uint8) (*b++); - *dst++ = (uint8) (*g++); - *dst++ = (uint8) (*r++); + *dst++ = (BYTE) (*b++); + *dst++ = (BYTE) (*g++); + *dst++ = (BYTE) (*r++); } break; case RDP_PIXEL_FORMAT_R8G8B8: for (i = 0; i < 4096; i++) { - *dst++ = (uint8) (*r++); - *dst++ = (uint8) (*g++); - *dst++ = (uint8) (*b++); + *dst++ = (BYTE) (*r++); + *dst++ = (BYTE) (*g++); + *dst++ = (BYTE) (*b++); } break; default: @@ -88,7 +88,7 @@ static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf, #define MINMAX(_v,_l,_h) ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v))) -void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf) +void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) { /* sint32 is used intentionally because we calculate with shifted factors! */ sint32 y, cb, cr; @@ -101,7 +101,7 @@ void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf * 1 sign bit + 10 integer bits + 5 fractional bits * * However only 7 integer bits will be actually used since the value range is [-128.0, 127.0]. - * In other words, the decoded coeffectients is scaled by << 5 when intepreted as sint16. + * In other words, the decoded coeffectients is scaled by << 5 when intepreted as INT16. * It was scaled in the quantization phase, so we must scale it back here. */ for (i = 0; i < 4096; i++) @@ -150,7 +150,7 @@ void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf } static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantization_values, - const uint8* data, int size, sint16* buffer) + const BYTE* data, int size, INT16* buffer) { PROFILER_ENTER(context->priv->prof_rfx_decode_component); @@ -176,7 +176,7 @@ static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantizatio void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in, int y_size, const uint32 * y_quants, int cb_size, const uint32 * cb_quants, - int cr_size, const uint32 * cr_quants, uint8* rgb_buffer) + int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer) { PROFILER_ENTER(context->priv->prof_rfx_decode_rgb); diff --git a/libfreerdp/codec/rfx_decode.h b/libfreerdp/codec/rfx_decode.h index 669175980..f11e358d1 100644 --- a/libfreerdp/codec/rfx_decode.h +++ b/libfreerdp/codec/rfx_decode.h @@ -22,12 +22,12 @@ #include -void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); +void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in, int y_size, const uint32 * y_quants, int cb_size, const uint32 * cb_quants, - int cr_size, const uint32 * cr_quants, uint8* rgb_buffer); + int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer); #endif /* __RFX_DECODE_H */ diff --git a/libfreerdp/codec/rfx_differential.c b/libfreerdp/codec/rfx_differential.c index 2260a17ac..e80aa98f3 100644 --- a/libfreerdp/codec/rfx_differential.c +++ b/libfreerdp/codec/rfx_differential.c @@ -27,10 +27,10 @@ #include "rfx_differential.h" -void rfx_differential_decode(sint16* buffer, int buffer_size) +void rfx_differential_decode(INT16* buffer, int buffer_size) { - sint16* src; - sint16* dst; + INT16* src; + INT16* dst; for (src = buffer, dst = buffer + 1; buffer_size > 1; src++, dst++, buffer_size--) { @@ -38,10 +38,10 @@ void rfx_differential_decode(sint16* buffer, int buffer_size) } } -void rfx_differential_encode(sint16* buffer, int buffer_size) +void rfx_differential_encode(INT16* buffer, int buffer_size) { - sint16 n1, n2; - sint16* dst; + INT16 n1, n2; + INT16* dst; for (n1 = *buffer, dst = buffer + 1; buffer_size > 1; dst++, buffer_size--) { diff --git a/libfreerdp/codec/rfx_differential.h b/libfreerdp/codec/rfx_differential.h index 724e589c5..3f6dbf623 100644 --- a/libfreerdp/codec/rfx_differential.h +++ b/libfreerdp/codec/rfx_differential.h @@ -22,7 +22,7 @@ #include -void rfx_differential_decode(sint16* buffer, int buffer_size); -void rfx_differential_encode(sint16* buffer, int buffer_size); +void rfx_differential_decode(INT16* buffer, int buffer_size); +void rfx_differential_encode(INT16* buffer, int buffer_size); #endif /* __RFX_DIFFERENTIAL_H */ diff --git a/libfreerdp/codec/rfx_dwt.c b/libfreerdp/codec/rfx_dwt.c index 2e92c9cb7..0b8448b9e 100644 --- a/libfreerdp/codec/rfx_dwt.c +++ b/libfreerdp/codec/rfx_dwt.c @@ -27,11 +27,11 @@ #include "rfx_dwt.h" -static void rfx_dwt_2d_decode_block(sint16* buffer, sint16* idwt, int subband_width) +static void rfx_dwt_2d_decode_block(INT16* buffer, INT16* idwt, int subband_width) { - sint16 *dst, *l, *h; - sint16 *l_dst, *h_dst; - sint16 *hl, *lh, *hh, *ll; + INT16 *dst, *l, *h; + INT16 *l_dst, *h_dst; + INT16 *hl, *lh, *hh, *ll; int total_width; int x, y; int n; @@ -108,18 +108,18 @@ static void rfx_dwt_2d_decode_block(sint16* buffer, sint16* idwt, int subband_wi } } -void rfx_dwt_2d_decode(sint16* buffer, sint16* dwt_buffer) +void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer) { rfx_dwt_2d_decode_block(buffer + 3840, dwt_buffer, 8); rfx_dwt_2d_decode_block(buffer + 3072, dwt_buffer, 16); rfx_dwt_2d_decode_block(buffer, dwt_buffer, 32); } -static void rfx_dwt_2d_encode_block(sint16* buffer, sint16* dwt, int subband_width) +static void rfx_dwt_2d_encode_block(INT16* buffer, INT16* dwt, int subband_width) { - sint16 *src, *l, *h; - sint16 *l_src, *h_src; - sint16 *hl, *lh, *hh, *ll; + INT16 *src, *l, *h; + INT16 *l_src, *h_src; + INT16 *hl, *lh, *hh, *ll; int total_width; int x, y; int n; @@ -190,7 +190,7 @@ static void rfx_dwt_2d_encode_block(sint16* buffer, sint16* dwt, int subband_wid } } -void rfx_dwt_2d_encode(sint16* buffer, sint16* dwt_buffer) +void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer) { rfx_dwt_2d_encode_block(buffer, dwt_buffer, 32); rfx_dwt_2d_encode_block(buffer + 3072, dwt_buffer, 16); diff --git a/libfreerdp/codec/rfx_dwt.h b/libfreerdp/codec/rfx_dwt.h index aa95f6723..bf57d0186 100644 --- a/libfreerdp/codec/rfx_dwt.h +++ b/libfreerdp/codec/rfx_dwt.h @@ -22,7 +22,7 @@ #include -void rfx_dwt_2d_decode(sint16* buffer, sint16* dwt_buffer); -void rfx_dwt_2d_encode(sint16* buffer, sint16* dwt_buffer); +void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer); +void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer); #endif /* __RFX_DWT_H */ diff --git a/libfreerdp/codec/rfx_encode.c b/libfreerdp/codec/rfx_encode.c index 4ca76569b..a95a5d93c 100644 --- a/libfreerdp/codec/rfx_encode.c +++ b/libfreerdp/codec/rfx_encode.c @@ -36,15 +36,15 @@ #define MINMAX(_v,_l,_h) ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v))) -static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, int rowstride, - RDP_PIXEL_FORMAT pixel_format, const uint8* palette, sint16* r_buf, sint16* g_buf, sint16* b_buf) +static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, int rowstride, + RDP_PIXEL_FORMAT pixel_format, const BYTE* palette, INT16* r_buf, INT16* g_buf, INT16* b_buf) { int x, y; int x_exceed; int y_exceed; - const uint8* src; - sint16 r, g, b; - sint16 *r_last, *g_last, *b_last; + const BYTE* src; + INT16 r, g, b; + INT16 *r_last, *g_last, *b_last; x_exceed = 64 - width; y_exceed = 64 - height; @@ -58,52 +58,52 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, case RDP_PIXEL_FORMAT_B8G8R8A8: for (x = 0; x < width; x++) { - *b_buf++ = (sint16) (*src++); - *g_buf++ = (sint16) (*src++); - *r_buf++ = (sint16) (*src++); + *b_buf++ = (INT16) (*src++); + *g_buf++ = (INT16) (*src++); + *r_buf++ = (INT16) (*src++); src++; } break; case RDP_PIXEL_FORMAT_R8G8B8A8: for (x = 0; x < width; x++) { - *r_buf++ = (sint16) (*src++); - *g_buf++ = (sint16) (*src++); - *b_buf++ = (sint16) (*src++); + *r_buf++ = (INT16) (*src++); + *g_buf++ = (INT16) (*src++); + *b_buf++ = (INT16) (*src++); src++; } break; case RDP_PIXEL_FORMAT_B8G8R8: for (x = 0; x < width; x++) { - *b_buf++ = (sint16) (*src++); - *g_buf++ = (sint16) (*src++); - *r_buf++ = (sint16) (*src++); + *b_buf++ = (INT16) (*src++); + *g_buf++ = (INT16) (*src++); + *r_buf++ = (INT16) (*src++); } break; case RDP_PIXEL_FORMAT_R8G8B8: for (x = 0; x < width; x++) { - *r_buf++ = (sint16) (*src++); - *g_buf++ = (sint16) (*src++); - *b_buf++ = (sint16) (*src++); + *r_buf++ = (INT16) (*src++); + *g_buf++ = (INT16) (*src++); + *b_buf++ = (INT16) (*src++); } break; case RDP_PIXEL_FORMAT_B5G6R5_LE: for (x = 0; x < width; x++) { - *b_buf++ = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); - *g_buf++ = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); - *r_buf++ = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); + *b_buf++ = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); + *g_buf++ = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); + *r_buf++ = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); src += 2; } break; case RDP_PIXEL_FORMAT_R5G6B5_LE: for (x = 0; x < width; x++) { - *r_buf++ = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); - *g_buf++ = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); - *b_buf++ = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); + *r_buf++ = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5)); + *g_buf++ = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3)); + *b_buf++ = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07)); src += 2; } break; @@ -113,7 +113,7 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, for (x = 0; x < width; x++) { int shift; - uint8 idx; + BYTE idx; shift = (7 - (x % 8)); idx = ((*src) >> shift) & 1; @@ -121,9 +121,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, idx |= (((*(src + 2)) >> shift) & 1) << 2; idx |= (((*(src + 3)) >> shift) & 1) << 3; idx *= 3; - *r_buf++ = (sint16) palette[idx]; - *g_buf++ = (sint16) palette[idx + 1]; - *b_buf++ = (sint16) palette[idx + 2]; + *r_buf++ = (INT16) palette[idx]; + *g_buf++ = (INT16) palette[idx + 1]; + *b_buf++ = (INT16) palette[idx + 2]; if (shift == 0) src += 4; } @@ -135,9 +135,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, { int idx = (*src) * 3; - *r_buf++ = (sint16) palette[idx]; - *g_buf++ = (sint16) palette[idx + 1]; - *b_buf++ = (sint16) palette[idx + 2]; + *r_buf++ = (INT16) palette[idx]; + *g_buf++ = (INT16) palette[idx + 1]; + *b_buf++ = (INT16) palette[idx + 2]; src++; } break; @@ -169,9 +169,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, while (y_exceed > 0) { - memcpy(r_buf, r_last, 64 * sizeof(sint16)); - memcpy(g_buf, g_last, 64 * sizeof(sint16)); - memcpy(b_buf, b_last, 64 * sizeof(sint16)); + memcpy(r_buf, r_last, 64 * sizeof(INT16)); + memcpy(g_buf, g_last, 64 * sizeof(INT16)); + memcpy(b_buf, b_last, 64 * sizeof(INT16)); r_buf += 64; g_buf += 64; b_buf += 64; @@ -180,7 +180,7 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, } } -void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf) +void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) { /* sint32 is used intentionally because we calculate with shifted factors! */ int i; @@ -193,7 +193,7 @@ void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf * 1 sign bit + 10 integer bits + 5 fractional bits * * However only 7 integer bits will be actually used since the value range is [-128.0, 127.0]. - * In other words, the encoded coefficients is scaled by << 5 when interpreted as sint16. + * In other words, the encoded coefficients is scaled by << 5 when interpreted as INT16. * It will be scaled down to original during the quantization phase. */ for (i = 0; i < 4096; i++) @@ -223,7 +223,7 @@ void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf } static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantization_values, - sint16* data, uint8* buffer, int buffer_size, int* size) + INT16* data, BYTE* buffer, int buffer_size, int* size) { PROFILER_ENTER(context->priv->prof_rfx_encode_component); @@ -246,13 +246,13 @@ static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantizatio PROFILER_EXIT(context->priv->prof_rfx_encode_component); } -void rfx_encode_rgb(RFX_CONTEXT* context, const uint8* rgb_data, int width, int height, int rowstride, +void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride, const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants, STREAM* data_out, int* y_size, int* cb_size, int* cr_size) { - sint16* y_r_buffer = context->priv->y_r_buffer; - sint16* cb_g_buffer = context->priv->cb_g_buffer; - sint16* cr_b_buffer = context->priv->cr_b_buffer; + INT16* y_r_buffer = context->priv->y_r_buffer; + INT16* cb_g_buffer = context->priv->cb_g_buffer; + INT16* cr_b_buffer = context->priv->cr_b_buffer; PROFILER_ENTER(context->priv->prof_rfx_encode_rgb); diff --git a/libfreerdp/codec/rfx_encode.h b/libfreerdp/codec/rfx_encode.h index f466c52e3..0203b4f55 100644 --- a/libfreerdp/codec/rfx_encode.h +++ b/libfreerdp/codec/rfx_encode.h @@ -22,9 +22,9 @@ #include -void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); +void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); -void rfx_encode_rgb(RFX_CONTEXT* context, const uint8* rgb_data, int width, int height, int rowstride, +void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride, const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants, STREAM* data_out, int* y_size, int* cb_size, int* cr_size); diff --git a/libfreerdp/codec/rfx_neon.c b/libfreerdp/codec/rfx_neon.c index 170671714..ab313cb3d 100644 --- a/libfreerdp/codec/rfx_neon.c +++ b/libfreerdp/codec/rfx_neon.c @@ -36,7 +36,7 @@ #endif -void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sint16 * cr_b_buffer) +void rfx_decode_YCbCr_to_RGB_NEON(INT16 * y_r_buffer, INT16 * cb_g_buffer, INT16 * cr_b_buffer) { int16x8_t zero = vdupq_n_s16(0); int16x8_t max = vdupq_n_s16(255); @@ -49,10 +49,10 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin int i; for (i = 0; i < 4096 / 8; i++) { - int16x8_t y = vld1q_s16((sint16*)&y_r_buf[i]); + int16x8_t y = vld1q_s16((INT16*)&y_r_buf[i]); y = vaddq_s16(y, y_add); - int16x8_t cr = vld1q_s16((sint16*)&cr_b_buf[i]); + int16x8_t cr = vld1q_s16((INT16*)&cr_b_buf[i]); // r = between((y + cr + (cr >> 2) + (cr >> 3) + (cr >> 5)), 0, 255); int16x8_t r = vaddq_s16(y, cr); @@ -60,10 +60,10 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin r = vaddq_s16(r, vshrq_n_s16(cr, 3)); r = vaddq_s16(r, vshrq_n_s16(cr, 5)); r = vminq_s16(vmaxq_s16(r, zero), max); - vst1q_s16((sint16*)&y_r_buf[i], r); + vst1q_s16((INT16*)&y_r_buf[i], r); // cb = cb_g_buf[i]; - int16x8_t cb = vld1q_s16((sint16*)&cb_g_buf[i]); + int16x8_t cb = vld1q_s16((INT16*)&cb_g_buf[i]); // g = between(y - (cb >> 2) - (cb >> 4) - (cb >> 5) - (cr >> 1) - (cr >> 3) - (cr >> 4) - (cr >> 5), 0, 255); int16x8_t g = vsubq_s16(y, vshrq_n_s16(cb, 2)); @@ -74,7 +74,7 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin g = vsubq_s16(g, vshrq_n_s16(cr, 4)); g = vsubq_s16(g, vshrq_n_s16(cr, 5)); g = vminq_s16(vmaxq_s16(g, zero), max); - vst1q_s16((sint16*)&cb_g_buf[i], g); + vst1q_s16((INT16*)&cb_g_buf[i], g); // b = between((y + cb + (cb >> 1) + (cb >> 2) + (cb >> 6)), 0, 255); int16x8_t b = vaddq_s16(y, cb); @@ -82,13 +82,13 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin b = vaddq_s16(b, vshrq_n_s16(cb, 2)); b = vaddq_s16(b, vshrq_n_s16(cb, 6)); b = vminq_s16(vmaxq_s16(b, zero), max); - vst1q_s16((sint16*)&cr_b_buf[i], b); + vst1q_s16((INT16*)&cr_b_buf[i], b); } } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_decode_block_NEON(sint16 * buffer, const int buffer_size, const uint32 factor) +rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const uint32 factor) { if (factor <= 6) return; @@ -98,16 +98,16 @@ rfx_quantization_decode_block_NEON(sint16 * buffer, const int buffer_size, const do { - int16x8_t val = vld1q_s16((sint16*)buf); + int16x8_t val = vld1q_s16((INT16*)buf); val = vshlq_s16(val, quantFactors); - vst1q_s16((sint16*)buf, val); + vst1q_s16((INT16*)buf, val); buf++; } while(buf < buf_end); } void -rfx_quantization_decode_NEON(sint16 * buffer, const uint32 * quantization_values) +rfx_quantization_decode_NEON(INT16 * buffer, const uint32 * quantization_values) { rfx_quantization_decode_block_NEON(buffer, 1024, quantization_values[8]); /* HL1 */ rfx_quantization_decode_block_NEON(buffer + 1024, 1024, quantization_values[7]); /* LH1 */ @@ -124,12 +124,12 @@ rfx_quantization_decode_NEON(sint16 * buffer, const uint32 * quantization_values static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_horiz_NEON(sint16 * l, sint16 * h, sint16 * dst, int subband_width) +rfx_dwt_2d_decode_block_horiz_NEON(INT16 * l, INT16 * h, INT16 * dst, int subband_width) { int y, n; - sint16 * l_ptr = l; - sint16 * h_ptr = h; - sint16 * dst_ptr = dst; + INT16 * l_ptr = l; + INT16 * h_ptr = h; + INT16 * dst_ptr = dst; for (y = 0; y < subband_width; y++) { @@ -195,12 +195,12 @@ rfx_dwt_2d_decode_block_horiz_NEON(sint16 * l, sint16 * h, sint16 * dst, int sub } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_vert_NEON(sint16 * l, sint16 * h, sint16 * dst, int subband_width) +rfx_dwt_2d_decode_block_vert_NEON(INT16 * l, INT16 * h, INT16 * dst, int subband_width) { int x, n; - sint16 * l_ptr = l; - sint16 * h_ptr = h; - sint16 * dst_ptr = dst; + INT16 * l_ptr = l; + INT16 * h_ptr = h; + INT16 * dst_ptr = dst; int total_width = subband_width + subband_width; @@ -269,10 +269,10 @@ rfx_dwt_2d_decode_block_vert_NEON(sint16 * l, sint16 * h, sint16 * dst, int subb } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_NEON(sint16 * buffer, sint16 * idwt, int subband_width) +rfx_dwt_2d_decode_block_NEON(INT16 * buffer, INT16 * idwt, int subband_width) { - sint16 * hl, * lh, * hh, * ll; - sint16 * l_dst, * h_dst; + INT16 * hl, * lh, * hh, * ll; + INT16 * l_dst, * h_dst; /* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt. */ /* The 4 sub-bands are stored in HL(0), LH(1), HH(2), LL(3) order. */ @@ -296,7 +296,7 @@ rfx_dwt_2d_decode_block_NEON(sint16 * buffer, sint16 * idwt, int subband_width) } void -rfx_dwt_2d_decode_NEON(sint16 * buffer, sint16 * dwt_buffer) +rfx_dwt_2d_decode_NEON(INT16 * buffer, INT16 * dwt_buffer) { rfx_dwt_2d_decode_block_NEON(buffer + 3840, dwt_buffer, 8); rfx_dwt_2d_decode_block_NEON(buffer + 3072, dwt_buffer, 16); diff --git a/libfreerdp/codec/rfx_pool.c b/libfreerdp/codec/rfx_pool.c index eb4e5a214..7032a2593 100644 --- a/libfreerdp/codec/rfx_pool.c +++ b/libfreerdp/codec/rfx_pool.c @@ -81,7 +81,7 @@ RFX_TILE* rfx_pool_get_tile(RFX_POOL* pool) if (pool->count < 1) { tile = xnew(RFX_TILE); - tile->data = (uint8*) malloc(4096 * 4); /* 64x64 * 4 */ + tile->data = (BYTE*) malloc(4096 * 4); /* 64x64 * 4 */ } else { diff --git a/libfreerdp/codec/rfx_quantization.c b/libfreerdp/codec/rfx_quantization.c index 9a71db069..f2edfd2ce 100644 --- a/libfreerdp/codec/rfx_quantization.c +++ b/libfreerdp/codec/rfx_quantization.c @@ -23,9 +23,9 @@ #include "rfx_quantization.h" -static void rfx_quantization_decode_block(sint16* buffer, int buffer_size, uint32 factor) +static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32 factor) { - sint16* dst; + INT16* dst; if (factor == 0) return; @@ -36,7 +36,7 @@ static void rfx_quantization_decode_block(sint16* buffer, int buffer_size, uint3 } } -void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values) +void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values) { /* Scale the values so that they are represented as 11.5 fixed-point number */ rfx_quantization_decode_block(buffer, 4096, 5); @@ -53,10 +53,10 @@ void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values) rfx_quantization_decode_block(buffer + 4032, 64, quantization_values[0] - 6); /* LL3 */ } -static void rfx_quantization_encode_block(sint16* buffer, int buffer_size, uint32 factor) +static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32 factor) { - sint16* dst; - sint16 half; + INT16* dst; + INT16 half; if (factor == 0) return; @@ -68,7 +68,7 @@ static void rfx_quantization_encode_block(sint16* buffer, int buffer_size, uint3 } } -void rfx_quantization_encode(sint16* buffer, const uint32* quantization_values) +void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values) { rfx_quantization_encode_block(buffer, 1024, quantization_values[8] - 6); /* HL1 */ rfx_quantization_encode_block(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */ diff --git a/libfreerdp/codec/rfx_quantization.h b/libfreerdp/codec/rfx_quantization.h index ba9fccb9b..c6731b126 100644 --- a/libfreerdp/codec/rfx_quantization.h +++ b/libfreerdp/codec/rfx_quantization.h @@ -22,7 +22,7 @@ #include -void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values); -void rfx_quantization_encode(sint16* buffer, const uint32* quantization_values); +void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values); +void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values); #endif /* __RFX_QUANTIZATION_H */ diff --git a/libfreerdp/codec/rfx_rlgr.c b/libfreerdp/codec/rfx_rlgr.c index 9a7b1ba37..84d4100c1 100644 --- a/libfreerdp/codec/rfx_rlgr.c +++ b/libfreerdp/codec/rfx_rlgr.c @@ -63,7 +63,7 @@ nZeroesWritten = buffer_size; \ if (nZeroesWritten > 0) \ { \ - memset(dst, 0, nZeroesWritten * sizeof(sint16)); \ + memset(dst, 0, nZeroesWritten * sizeof(INT16)); \ dst += nZeroesWritten; \ } \ buffer_size -= (nZeroes); \ @@ -82,7 +82,7 @@ } /* Converts from (2 * magnitude - sign) to integer */ -#define GetIntFrom2MagSign(twoMs) (((twoMs) & 1) ? -1 * (sint16)(((twoMs) + 1) >> 1) : (sint16)((twoMs) >> 1)) +#define GetIntFrom2MagSign(twoMs) (((twoMs) & 1) ? -1 * (INT16)(((twoMs) + 1) >> 1) : (INT16)((twoMs) >> 1)) /* * Update the passed parameter and clamp it to the range [0, KPMAX] @@ -121,18 +121,18 @@ UpdateParam(*krp, vk, *kr); /* at 1, no change! */ \ } -int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* buffer, int buffer_size) +int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size) { int k; int kp; int kr; int krp; - uint16 r; - sint16* dst; + UINT16 r; + INT16* dst; RFX_BITSTREAM* bs; int vk; - uint16 mag16; + UINT16 mag16; bs = xnew(RFX_BITSTREAM); rfx_bitstream_attach(bs, data, data_size); @@ -259,7 +259,7 @@ int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* bu /* Emit a bit (0 or 1), count number of times, to the output bitstream */ #define OutputBit(count, bit) \ { \ - uint16 _b = (bit ? 0xFFFF : 0); \ + UINT16 _b = (bit ? 0xFFFF : 0); \ int _c = (count); \ for (; _c > 0; _c -= 16) \ rfx_bitstream_put_bits(bs, _b, (_c > 16 ? 16 : _c)); \ @@ -298,7 +298,7 @@ static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, uint32 val) } } -int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* buffer, int buffer_size) +int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size) { int k; int kp; diff --git a/libfreerdp/codec/rfx_rlgr.h b/libfreerdp/codec/rfx_rlgr.h index 264beabbd..07fa895f6 100644 --- a/libfreerdp/codec/rfx_rlgr.h +++ b/libfreerdp/codec/rfx_rlgr.h @@ -22,7 +22,7 @@ #include -int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* buffer, int buffer_size); -int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* buffer, int buffer_size); +int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size); +int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size); #endif /* __RFX_RLGR_H */ diff --git a/libfreerdp/codec/rfx_sse2.c b/libfreerdp/codec/rfx_sse2.c index bcb32ea13..608c5318e 100644 --- a/libfreerdp/codec/rfx_sse2.c +++ b/libfreerdp/codec/rfx_sse2.c @@ -52,7 +52,7 @@ _mm_prefetch_buffer(char * buffer, int num_bytes) } } -static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer, sint16* cr_b_buffer) +static void rfx_decode_ycbcr_to_rgb_sse2(INT16* y_r_buffer, INT16* cb_g_buffer, INT16* cr_b_buffer) { __m128i zero = _mm_setzero_si128(); __m128i max = _mm_set1_epi16(255); @@ -76,13 +76,13 @@ static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer __m128i b_cb = _mm_set1_epi16(28999); // 1.770 << 14 __m128i c4096 = _mm_set1_epi16(4096); - for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i))) + for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i))) { _mm_prefetch((char*)(&y_r_buf[i]), _MM_HINT_NTA); _mm_prefetch((char*)(&cb_g_buf[i]), _MM_HINT_NTA); _mm_prefetch((char*)(&cr_b_buf[i]), _MM_HINT_NTA); } - for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i++) + for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i++) { /* In order to use SSE2 signed 16-bit integer multiplication we need to convert @@ -135,7 +135,7 @@ static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer } /* The encodec YCbCr coeffectients are represented as 11.5 fixed-point numbers. See rfx_encode.c */ -static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer, sint16* cr_b_buffer) +static void rfx_encode_rgb_to_ycbcr_sse2(INT16* y_r_buffer, INT16* cb_g_buffer, INT16* cr_b_buffer) { __m128i min = _mm_set1_epi16(-128 << 5); __m128i max = _mm_set1_epi16(127 << 5); @@ -163,13 +163,13 @@ static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer int i; - for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i))) + for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i))) { _mm_prefetch((char*)(&y_r_buf[i]), _MM_HINT_NTA); _mm_prefetch((char*)(&cb_g_buf[i]), _MM_HINT_NTA); _mm_prefetch((char*)(&cr_b_buf[i]), _MM_HINT_NTA); } - for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i++) + for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i++) { /* In order to use SSE2 signed 16-bit integer multiplication we need to convert @@ -225,7 +225,7 @@ static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_decode_block_sse2(sint16* buffer, const int buffer_size, const uint32 factor) +rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor) { __m128i a; __m128i * ptr = (__m128i*) buffer; @@ -244,9 +244,9 @@ rfx_quantization_decode_block_sse2(sint16* buffer, const int buffer_size, const } while(ptr < buf_end); } -static void rfx_quantization_decode_sse2(sint16* buffer, const uint32* quantization_values) +static void rfx_quantization_decode_sse2(INT16* buffer, const uint32* quantization_values) { - _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16)); + _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); rfx_quantization_decode_block_sse2(buffer, 4096, 5); @@ -263,7 +263,7 @@ static void rfx_quantization_decode_sse2(sint16* buffer, const uint32* quantizat } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_encode_block_sse2(sint16* buffer, const int buffer_size, const uint32 factor) +rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor) { __m128i a; __m128i* ptr = (__m128i*) buffer; @@ -285,9 +285,9 @@ rfx_quantization_encode_block_sse2(sint16* buffer, const int buffer_size, const } while(ptr < buf_end); } -static void rfx_quantization_encode_sse2(sint16* buffer, const uint32* quantization_values) +static void rfx_quantization_encode_sse2(INT16* buffer, const uint32* quantization_values) { - _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16)); + _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); rfx_quantization_encode_block_sse2(buffer, 1024, quantization_values[8] - 6); /* HL1 */ rfx_quantization_encode_block_sse2(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */ @@ -304,12 +304,12 @@ static void rfx_quantization_encode_sse2(sint16* buffer, const uint32* quantizat } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_horiz_sse2(sint16* l, sint16* h, sint16* dst, int subband_width) +rfx_dwt_2d_decode_block_horiz_sse2(INT16* l, INT16* h, INT16* dst, int subband_width) { int y, n; - sint16* l_ptr = l; - sint16* h_ptr = h; - sint16* dst_ptr = dst; + INT16* l_ptr = l; + INT16* h_ptr = h; + INT16* dst_ptr = dst; int first; int last; __m128i l_n; @@ -388,12 +388,12 @@ rfx_dwt_2d_decode_block_horiz_sse2(sint16* l, sint16* h, sint16* dst, int subban } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_vert_sse2(sint16* l, sint16* h, sint16* dst, int subband_width) +rfx_dwt_2d_decode_block_vert_sse2(INT16* l, INT16* h, INT16* dst, int subband_width) { int x, n; - sint16* l_ptr = l; - sint16* h_ptr = h; - sint16* dst_ptr = dst; + INT16* l_ptr = l; + INT16* h_ptr = h; + INT16* dst_ptr = dst; __m128i l_n; __m128i h_n; __m128i tmp_n; @@ -469,12 +469,12 @@ rfx_dwt_2d_decode_block_vert_sse2(sint16* l, sint16* h, sint16* dst, int subband } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_decode_block_sse2(sint16* buffer, sint16* idwt, int subband_width) +rfx_dwt_2d_decode_block_sse2(INT16* buffer, INT16* idwt, int subband_width) { - sint16 *hl, *lh, *hh, *ll; - sint16 *l_dst, *h_dst; + INT16 *hl, *lh, *hh, *ll; + INT16 *l_dst, *h_dst; - _mm_prefetch_buffer((char*) idwt, subband_width * 4 * sizeof(sint16)); + _mm_prefetch_buffer((char*) idwt, subband_width * 4 * sizeof(INT16)); /* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt. */ /* The 4 sub-bands are stored in HL(0), LH(1), HH(2), LL(3) order. */ @@ -497,9 +497,9 @@ rfx_dwt_2d_decode_block_sse2(sint16* buffer, sint16* idwt, int subband_width) rfx_dwt_2d_decode_block_vert_sse2(l_dst, h_dst, buffer, subband_width); } -static void rfx_dwt_2d_decode_sse2(sint16* buffer, sint16* dwt_buffer) +static void rfx_dwt_2d_decode_sse2(INT16* buffer, INT16* dwt_buffer) { - _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16)); + _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); rfx_dwt_2d_decode_block_sse2(buffer + 3840, dwt_buffer, 8); rfx_dwt_2d_decode_block_sse2(buffer + 3072, dwt_buffer, 16); @@ -507,7 +507,7 @@ static void rfx_dwt_2d_decode_sse2(sint16* buffer, sint16* dwt_buffer) } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_encode_block_vert_sse2(sint16* src, sint16* l, sint16* h, int subband_width) +rfx_dwt_2d_encode_block_vert_sse2(INT16* src, INT16* l, INT16* h, int subband_width) { int total_width; int x; @@ -563,7 +563,7 @@ rfx_dwt_2d_encode_block_vert_sse2(sint16* src, sint16* l, sint16* h, int subband } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_encode_block_horiz_sse2(sint16* src, sint16* l, sint16* h, int subband_width) +rfx_dwt_2d_encode_block_horiz_sse2(INT16* src, INT16* l, INT16* h, int subband_width) { int y; int n; @@ -617,12 +617,12 @@ rfx_dwt_2d_encode_block_horiz_sse2(sint16* src, sint16* l, sint16* h, int subban } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_dwt_2d_encode_block_sse2(sint16* buffer, sint16* dwt, int subband_width) +rfx_dwt_2d_encode_block_sse2(INT16* buffer, INT16* dwt, int subband_width) { - sint16 *hl, *lh, *hh, *ll; - sint16 *l_src, *h_src; + INT16 *hl, *lh, *hh, *ll; + INT16 *l_src, *h_src; - _mm_prefetch_buffer((char*) dwt, subband_width * 4 * sizeof(sint16)); + _mm_prefetch_buffer((char*) dwt, subband_width * 4 * sizeof(INT16)); /* DWT in vertical direction, results in 2 sub-bands in L, H order in tmp buffer dwt. */ @@ -645,9 +645,9 @@ rfx_dwt_2d_encode_block_sse2(sint16* buffer, sint16* dwt, int subband_width) rfx_dwt_2d_encode_block_horiz_sse2(h_src, lh, hh, subband_width); } -static void rfx_dwt_2d_encode_sse2(sint16* buffer, sint16* dwt_buffer) +static void rfx_dwt_2d_encode_sse2(INT16* buffer, INT16* dwt_buffer) { - _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16)); + _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); rfx_dwt_2d_encode_block_sse2(buffer, dwt_buffer, 32); rfx_dwt_2d_encode_block_sse2(buffer + 3072, dwt_buffer, 16); diff --git a/libfreerdp/codec/rfx_types.h b/libfreerdp/codec/rfx_types.h index 64b72fdfe..223cbf9cd 100644 --- a/libfreerdp/codec/rfx_types.h +++ b/libfreerdp/codec/rfx_types.h @@ -41,17 +41,17 @@ struct _RFX_CONTEXT_PRIV RFX_POOL* pool; /* memory pool */ - sint16 y_r_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ - sint16 cb_g_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ - sint16 cr_b_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ + INT16 y_r_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ + INT16 cb_g_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ + INT16 cr_b_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */ - sint16* y_r_buffer; - sint16* cb_g_buffer; - sint16* cr_b_buffer; + INT16* y_r_buffer; + INT16* cb_g_buffer; + INT16* cr_b_buffer; - sint16 dwt_mem[32 * 32 * 2 * 2 + 8]; /* maximum sub-band width is 32 */ + INT16 dwt_mem[32 * 32 * 2 * 2 + 8]; /* maximum sub-band width is 32 */ - sint16* dwt_buffer; + INT16* dwt_buffer; /* profilers */ PROFILER_DEFINE(prof_rfx_decode_rgb); diff --git a/libfreerdp/core/activation.c b/libfreerdp/core/activation.c index dd1f49e2b..db54dc147 100644 --- a/libfreerdp/core/activation.c +++ b/libfreerdp/core/activation.c @@ -36,8 +36,8 @@ static const char* const CTRLACTION_STRINGS[] = void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */ - stream_write_uint16(s, settings->pdu_source); /* targetUser (2 bytes) */ + stream_write_UINT16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */ + stream_write_UINT16(s, settings->pdu_source); /* targetUser (2 bytes) */ } BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s) @@ -68,20 +68,20 @@ BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp) BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s) { - uint16 messageType; + UINT16 messageType; rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU; if (stream_get_left(s) < 4) return FALSE; - stream_read_uint16(s, messageType); /* messageType (2 bytes) */ + stream_read_UINT16(s, messageType); /* messageType (2 bytes) */ if (messageType != SYNCMSGTYPE_SYNC) return FALSE; /* targetUser (2 bytes) */ - stream_seek_uint16(s); + stream_seek_UINT16(s); return TRUE; } @@ -97,28 +97,28 @@ BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id); } -BOOL rdp_recv_control_pdu(STREAM* s, uint16* action) +BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action) { if (stream_get_left(s) < 8) return FALSE; - stream_read_uint16(s, *action); /* action (2 bytes) */ - stream_seek_uint16(s); /* grantId (2 bytes) */ + stream_read_UINT16(s, *action); /* action (2 bytes) */ + stream_seek_UINT16(s); /* grantId (2 bytes) */ stream_seek_uint32(s); /* controlId (4 bytes) */ return TRUE; } -void rdp_write_client_control_pdu(STREAM* s, uint16 action) +void rdp_write_client_control_pdu(STREAM* s, UINT16 action) { - stream_write_uint16(s, action); /* action (2 bytes) */ - stream_write_uint16(s, 0); /* grantId (2 bytes) */ + stream_write_UINT16(s, action); /* action (2 bytes) */ + stream_write_UINT16(s, 0); /* grantId (2 bytes) */ stream_write_uint32(s, 0); /* controlId (4 bytes) */ } BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) { - uint16 action; + UINT16 action; rdp_recv_control_pdu(s, &action); @@ -142,8 +142,8 @@ BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) s = rdp_data_pdu_init(rdp); - stream_write_uint16(s, CTRLACTION_COOPERATE); /* action (2 bytes) */ - stream_write_uint16(s, 0); /* grantId (2 bytes) */ + stream_write_UINT16(s, CTRLACTION_COOPERATE); /* action (2 bytes) */ + stream_write_UINT16(s, 0); /* grantId (2 bytes) */ stream_write_uint32(s, 0); /* controlId (4 bytes) */ rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id); @@ -157,8 +157,8 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp) s = rdp_data_pdu_init(rdp); - stream_write_uint16(s, CTRLACTION_GRANTED_CONTROL); /* action (2 bytes) */ - stream_write_uint16(s, rdp->mcs->user_id); /* grantId (2 bytes) */ + stream_write_UINT16(s, CTRLACTION_GRANTED_CONTROL); /* action (2 bytes) */ + stream_write_UINT16(s, rdp->mcs->user_id); /* grantId (2 bytes) */ stream_write_uint32(s, 0x03EA); /* controlId (4 bytes) */ rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id); @@ -166,7 +166,7 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp) return TRUE; } -BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action) +BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action) { STREAM* s; @@ -184,19 +184,19 @@ void rdp_write_persistent_list_entry(STREAM* s, uint32 key1, uint32 key2) void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 0); /* numEntriesCache0 (2 bytes) */ - stream_write_uint16(s, 0); /* numEntriesCache1 (2 bytes) */ - stream_write_uint16(s, 0); /* numEntriesCache2 (2 bytes) */ - stream_write_uint16(s, 0); /* numEntriesCache3 (2 bytes) */ - stream_write_uint16(s, 0); /* numEntriesCache4 (2 bytes) */ - stream_write_uint16(s, 0); /* totalEntriesCache0 (2 bytes) */ - stream_write_uint16(s, 0); /* totalEntriesCache1 (2 bytes) */ - stream_write_uint16(s, 0); /* totalEntriesCache2 (2 bytes) */ - stream_write_uint16(s, 0); /* totalEntriesCache3 (2 bytes) */ - stream_write_uint16(s, 0); /* totalEntriesCache4 (2 bytes) */ - stream_write_uint8(s, PERSIST_FIRST_PDU | PERSIST_LAST_PDU); /* bBitMask (1 byte) */ - stream_write_uint8(s, 0); /* pad1 (1 byte) */ - stream_write_uint16(s, 0); /* pad3 (2 bytes) */ + stream_write_UINT16(s, 0); /* numEntriesCache0 (2 bytes) */ + stream_write_UINT16(s, 0); /* numEntriesCache1 (2 bytes) */ + stream_write_UINT16(s, 0); /* numEntriesCache2 (2 bytes) */ + stream_write_UINT16(s, 0); /* numEntriesCache3 (2 bytes) */ + stream_write_UINT16(s, 0); /* numEntriesCache4 (2 bytes) */ + stream_write_UINT16(s, 0); /* totalEntriesCache0 (2 bytes) */ + stream_write_UINT16(s, 0); /* totalEntriesCache1 (2 bytes) */ + stream_write_UINT16(s, 0); /* totalEntriesCache2 (2 bytes) */ + stream_write_UINT16(s, 0); /* totalEntriesCache3 (2 bytes) */ + stream_write_UINT16(s, 0); /* totalEntriesCache4 (2 bytes) */ + stream_write_BYTE(s, PERSIST_FIRST_PDU | PERSIST_LAST_PDU); /* bBitMask (1 byte) */ + stream_write_BYTE(s, 0); /* pad1 (1 byte) */ + stream_write_UINT16(s, 0); /* pad3 (2 bytes) */ /* entries */ } @@ -219,15 +219,15 @@ BOOL rdp_recv_client_font_list_pdu(STREAM* s) return TRUE; } -void rdp_write_client_font_list_pdu(STREAM* s, uint16 flags) +void rdp_write_client_font_list_pdu(STREAM* s, UINT16 flags) { - stream_write_uint16(s, 0); /* numberFonts (2 bytes) */ - stream_write_uint16(s, 0); /* totalNumFonts (2 bytes) */ - stream_write_uint16(s, flags); /* listFlags (2 bytes) */ - stream_write_uint16(s, 50); /* entrySize (2 bytes) */ + stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */ + stream_write_UINT16(s, 0); /* totalNumFonts (2 bytes) */ + stream_write_UINT16(s, flags); /* listFlags (2 bytes) */ + stream_write_UINT16(s, 50); /* entrySize (2 bytes) */ } -BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags) +BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags) { STREAM* s; @@ -255,10 +255,10 @@ BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s) { rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU; - stream_seek_uint16(s); /* numberEntries (2 bytes) */ - stream_seek_uint16(s); /* totalNumEntries (2 bytes) */ - stream_seek_uint16(s); /* mapFlags (2 bytes) */ - stream_seek_uint16(s); /* entrySize (2 bytes) */ + stream_seek_UINT16(s); /* numberEntries (2 bytes) */ + stream_seek_UINT16(s); /* totalNumEntries (2 bytes) */ + stream_seek_UINT16(s); /* mapFlags (2 bytes) */ + stream_seek_UINT16(s); /* entrySize (2 bytes) */ return TRUE; } @@ -269,17 +269,17 @@ BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp) s = rdp_data_pdu_init(rdp); - stream_write_uint16(s, 0); /* numberEntries (2 bytes) */ - stream_write_uint16(s, 0); /* totalNumEntries (2 bytes) */ - stream_write_uint16(s, FONTLIST_FIRST | FONTLIST_LAST); /* mapFlags (2 bytes) */ - stream_write_uint16(s, 4); /* entrySize (2 bytes) */ + stream_write_UINT16(s, 0); /* numberEntries (2 bytes) */ + stream_write_UINT16(s, 0); /* totalNumEntries (2 bytes) */ + stream_write_UINT16(s, FONTLIST_FIRST | FONTLIST_LAST); /* mapFlags (2 bytes) */ + stream_write_UINT16(s, 4); /* entrySize (2 bytes) */ return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_MAP, rdp->mcs->user_id); } BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) { - uint16 lengthSourceDescriptor; + UINT16 lengthSourceDescriptor; /* * Windows XP can send short DEACTIVATE_ALL PDU that doesn't contain @@ -288,7 +288,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) if (stream_get_left(s) > 0) { stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ - stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ + stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor (should be 0x00) */ } @@ -312,15 +312,15 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp) s = rdp_pdu_init(rdp); stream_write_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ - stream_write_uint16(s, 1); /* lengthSourceDescriptor (2 bytes) */ - stream_write_uint8(s, 0); /* sourceDescriptor (should be 0x00) */ + stream_write_UINT16(s, 1); /* lengthSourceDescriptor (2 bytes) */ + stream_write_BYTE(s, 0); /* sourceDescriptor (should be 0x00) */ return rdp_send_pdu(rdp, s, PDU_TYPE_DEACTIVATE_ALL, rdp->mcs->user_id); } BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s) { - uint16 action; + UINT16 action; if (!rdp_recv_control_pdu(s, &action)) return FALSE; diff --git a/libfreerdp/core/activation.h b/libfreerdp/core/activation.h index 563832e03..0a231359e 100644 --- a/libfreerdp/core/activation.h +++ b/libfreerdp/core/activation.h @@ -46,14 +46,14 @@ BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s); BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp); BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s); BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp); -BOOL rdp_recv_control_pdu(STREAM* s, uint16* action); +BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action); BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s); BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp); BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp); -BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action); +BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action); BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp); BOOL rdp_recv_client_font_list_pdu(STREAM* s); -BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags); +BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags); BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s); BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s); BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s); diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index c5018f91f..1bc4c900d 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -69,21 +69,21 @@ static const char* const CAPSET_TYPE_STRINGS[] = /* CODEC_GUID_JPEG 0x430C9EED1BAF4CE6869ACB8B37B66237*/ #define CODEC_GUID_JPEG "\xE6\x4C\xAF\x1B\xED\x9E\x0C\x43\x86\x9A\xCB\x8B\x37\xB6\x62\x37" -void rdp_read_capability_set_header(STREAM* s, uint16* length, uint16* type) +void rdp_read_capability_set_header(STREAM* s, UINT16* length, UINT16* type) { - stream_read_uint16(s, *type); /* capabilitySetType */ - stream_read_uint16(s, *length); /* lengthCapability */ + stream_read_UINT16(s, *type); /* capabilitySetType */ + stream_read_UINT16(s, *length); /* lengthCapability */ } -void rdp_write_capability_set_header(STREAM* s, uint16 length, uint16 type) +void rdp_write_capability_set_header(STREAM* s, UINT16 length, UINT16 type) { - stream_write_uint16(s, type); /* capabilitySetType */ - stream_write_uint16(s, length); /* lengthCapability */ + stream_write_UINT16(s, type); /* capabilitySetType */ + stream_write_UINT16(s, length); /* lengthCapability */ } -uint8* rdp_capability_set_start(STREAM* s) +BYTE* rdp_capability_set_start(STREAM* s) { - uint8* header; + BYTE* header; stream_get_mark(s, header); stream_write_zero(s, CAPSET_HEADER_LENGTH); @@ -91,10 +91,10 @@ uint8* rdp_capability_set_start(STREAM* s) return header; } -void rdp_capability_set_finish(STREAM* s, uint8* header, uint16 type) +void rdp_capability_set_finish(STREAM* s, BYTE* header, UINT16 type) { - uint16 length; - uint8* footer; + UINT16 length; + BYTE* footer; footer = s->p; length = footer - header; @@ -111,31 +111,31 @@ void rdp_capability_set_finish(STREAM* s, uint8* header, uint16 type) * @param settings settings */ -void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint16 extraFlags; - uint8 refreshRectSupport; - uint8 suppressOutputSupport; + UINT16 extraFlags; + BYTE refreshRectSupport; + BYTE suppressOutputSupport; if (settings->server_mode) { - stream_read_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */ - stream_read_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ + stream_read_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */ + stream_read_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ } else { - stream_seek_uint16(s); /* osMajorType (2 bytes) */ - stream_seek_uint16(s); /* osMinorType (2 bytes) */ + stream_seek_UINT16(s); /* osMajorType (2 bytes) */ + stream_seek_UINT16(s); /* osMinorType (2 bytes) */ } - stream_seek_uint16(s); /* protocolVersion (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ - stream_seek_uint16(s); /* generalCompressionTypes (2 bytes) */ - stream_read_uint16(s, extraFlags); /* extraFlags (2 bytes) */ - stream_seek_uint16(s); /* updateCapabilityFlag (2 bytes) */ - stream_seek_uint16(s); /* remoteUnshareFlag (2 bytes) */ - stream_seek_uint16(s); /* generalCompressionLevel (2 bytes) */ - stream_read_uint8(s, refreshRectSupport); /* refreshRectSupport (1 byte) */ - stream_read_uint8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */ + stream_seek_UINT16(s); /* protocolVersion (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ + stream_seek_UINT16(s); /* generalCompressionTypes (2 bytes) */ + stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */ + stream_seek_UINT16(s); /* updateCapabilityFlag (2 bytes) */ + stream_seek_UINT16(s); /* remoteUnshareFlag (2 bytes) */ + stream_seek_UINT16(s); /* generalCompressionLevel (2 bytes) */ + stream_read_BYTE(s, refreshRectSupport); /* refreshRectSupport (1 byte) */ + stream_read_BYTE(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */ if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED)) settings->fastpath_output = FALSE; @@ -156,8 +156,8 @@ void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* sett void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 extraFlags; + BYTE* header; + UINT16 extraFlags; header = rdp_capability_set_start(s); @@ -172,17 +172,17 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings) if (settings->salted_checksum) extraFlags |= ENC_SALTED_CHECKSUM; - stream_write_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */ - stream_write_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ - stream_write_uint16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */ - stream_write_uint16(s, 0); /* generalCompressionTypes (2 bytes) */ - stream_write_uint16(s, extraFlags); /* extraFlags (2 bytes) */ - stream_write_uint16(s, 0); /* updateCapabilityFlag (2 bytes) */ - stream_write_uint16(s, 0); /* remoteUnshareFlag (2 bytes) */ - stream_write_uint16(s, 0); /* generalCompressionLevel (2 bytes) */ - stream_write_uint8(s, settings->refresh_rect); /* refreshRectSupport (1 byte) */ - stream_write_uint8(s, settings->suppress_output); /* suppressOutputSupport (1 byte) */ + stream_write_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */ + stream_write_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */ + stream_write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ + stream_write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */ + stream_write_UINT16(s, extraFlags); /* extraFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */ + stream_write_BYTE(s, settings->refresh_rect); /* refreshRectSupport (1 byte) */ + stream_write_BYTE(s, settings->suppress_output); /* suppressOutputSupport (1 byte) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_GENERAL); } @@ -194,27 +194,27 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_bitmap_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint8 drawingFlags; - uint16 desktopWidth; - uint16 desktopHeight; - uint16 desktopResizeFlag; - uint16 preferredBitsPerPixel; + BYTE drawingFlags; + UINT16 desktopWidth; + UINT16 desktopHeight; + UINT16 desktopResizeFlag; + UINT16 preferredBitsPerPixel; - stream_read_uint16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */ - stream_seek_uint16(s); /* receive1BitPerPixel (2 bytes) */ - stream_seek_uint16(s); /* receive4BitsPerPixel (2 bytes) */ - stream_seek_uint16(s); /* receive8BitsPerPixel (2 bytes) */ - stream_read_uint16(s, desktopWidth); /* desktopWidth (2 bytes) */ - stream_read_uint16(s, desktopHeight); /* desktopHeight (2 bytes) */ - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ - stream_read_uint16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */ - stream_seek_uint16(s); /* bitmapCompressionFlag (2 bytes) */ - stream_seek_uint8(s); /* highColorFlags (1 byte) */ - stream_read_uint8(s, drawingFlags); /* drawingFlags (1 byte) */ - stream_seek_uint16(s); /* multipleRectangleSupport (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsB (2 bytes) */ + stream_read_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */ + stream_seek_UINT16(s); /* receive1BitPerPixel (2 bytes) */ + stream_seek_UINT16(s); /* receive4BitsPerPixel (2 bytes) */ + stream_seek_UINT16(s); /* receive8BitsPerPixel (2 bytes) */ + stream_read_UINT16(s, desktopWidth); /* desktopWidth (2 bytes) */ + stream_read_UINT16(s, desktopHeight); /* desktopHeight (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ + stream_read_UINT16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */ + stream_seek_UINT16(s); /* bitmapCompressionFlag (2 bytes) */ + stream_seek_BYTE(s); /* highColorFlags (1 byte) */ + stream_read_BYTE(s, drawingFlags); /* drawingFlags (1 byte) */ + stream_seek_UINT16(s); /* multipleRectangleSupport (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */ if (!settings->server_mode && preferredBitsPerPixel != settings->color_depth) { @@ -242,10 +242,10 @@ void rdp_read_bitmap_capability_set(STREAM* s, uint16 length, rdpSettings* setti void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint8 drawingFlags = 0; - uint16 desktopResizeFlag; - uint16 preferredBitsPerPixel; + BYTE* header; + BYTE drawingFlags = 0; + UINT16 desktopResizeFlag; + UINT16 preferredBitsPerPixel; header = rdp_capability_set_start(s); @@ -258,19 +258,19 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings) desktopResizeFlag = settings->desktop_resize; - stream_write_uint16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */ - stream_write_uint16(s, 1); /* receive1BitPerPixel (2 bytes) */ - stream_write_uint16(s, 1); /* receive4BitsPerPixel (2 bytes) */ - stream_write_uint16(s, 1); /* receive8BitsPerPixel (2 bytes) */ - stream_write_uint16(s, settings->width); /* desktopWidth (2 bytes) */ - stream_write_uint16(s, settings->height); /* desktopHeight (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ - stream_write_uint16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */ - stream_write_uint16(s, 1); /* bitmapCompressionFlag (2 bytes) */ - stream_write_uint8(s, 0); /* highColorFlags (1 byte) */ - stream_write_uint8(s, drawingFlags); /* drawingFlags (1 byte) */ - stream_write_uint16(s, 1); /* multipleRectangleSupport (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsB (2 bytes) */ + stream_write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */ + stream_write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */ + stream_write_UINT16(s, 1); /* receive4BitsPerPixel (2 bytes) */ + stream_write_UINT16(s, 1); /* receive8BitsPerPixel (2 bytes) */ + stream_write_UINT16(s, settings->width); /* desktopWidth (2 bytes) */ + stream_write_UINT16(s, settings->height); /* desktopHeight (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */ + stream_write_UINT16(s, 1); /* bitmapCompressionFlag (2 bytes) */ + stream_write_BYTE(s, 0); /* highColorFlags (1 byte) */ + stream_write_BYTE(s, drawingFlags); /* drawingFlags (1 byte) */ + stream_write_UINT16(s, 1); /* multipleRectangleSupport (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsB (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP); } @@ -282,30 +282,30 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_order_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { int i; - uint16 orderFlags; - uint8 orderSupport[32]; - uint16 orderSupportExFlags; + UINT16 orderFlags; + BYTE orderSupport[32]; + UINT16 orderSupportExFlags; stream_seek(s, 16); /* terminalDescriptor (16 bytes) */ stream_seek_uint32(s); /* pad4OctetsA (4 bytes) */ - stream_seek_uint16(s); /* desktopSaveXGranularity (2 bytes) */ - stream_seek_uint16(s); /* desktopSaveYGranularity (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ - stream_seek_uint16(s); /* maximumOrderLevel (2 bytes) */ - stream_seek_uint16(s); /* numberFonts (2 bytes) */ - stream_read_uint16(s, orderFlags); /* orderFlags (2 bytes) */ + stream_seek_UINT16(s); /* desktopSaveXGranularity (2 bytes) */ + stream_seek_UINT16(s); /* desktopSaveYGranularity (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ + stream_seek_UINT16(s); /* maximumOrderLevel (2 bytes) */ + stream_seek_UINT16(s); /* numberFonts (2 bytes) */ + stream_read_UINT16(s, orderFlags); /* orderFlags (2 bytes) */ stream_read(s, orderSupport, 32); /* orderSupport (32 bytes) */ - stream_seek_uint16(s); /* textFlags (2 bytes) */ - stream_read_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ + stream_seek_UINT16(s); /* textFlags (2 bytes) */ + stream_read_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ stream_seek_uint32(s); /* pad4OctetsB (4 bytes) */ stream_seek_uint32(s); /* desktopSaveSize (4 bytes) */ - stream_seek_uint16(s); /* pad2OctetsC (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsD (2 bytes) */ - stream_seek_uint16(s); /* textANSICodePage (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsE (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsC (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsD (2 bytes) */ + stream_seek_UINT16(s); /* textANSICodePage (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsE (2 bytes) */ for (i = 0; i < 32; i++) { @@ -323,10 +323,10 @@ void rdp_read_order_capability_set(STREAM* s, uint16 length, rdpSettings* settin void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 orderFlags; - uint16 orderSupportExFlags; - uint16 textANSICodePage; + BYTE* header; + UINT16 orderFlags; + UINT16 orderSupportExFlags; + UINT16 textANSICodePage; header = rdp_capability_set_start(s); @@ -350,21 +350,21 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) stream_write_zero(s, 16); /* terminalDescriptor (16 bytes) */ stream_write_uint32(s, 0); /* pad4OctetsA (4 bytes) */ - stream_write_uint16(s, 1); /* desktopSaveXGranularity (2 bytes) */ - stream_write_uint16(s, 20); /* desktopSaveYGranularity (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */ - stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */ - stream_write_uint16(s, 0); /* numberFonts (2 bytes) */ - stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */ + stream_write_UINT16(s, 1); /* desktopSaveXGranularity (2 bytes) */ + stream_write_UINT16(s, 20); /* desktopSaveYGranularity (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ + stream_write_UINT16(s, 1); /* maximumOrderLevel (2 bytes) */ + stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */ + stream_write_UINT16(s, orderFlags); /* orderFlags (2 bytes) */ stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */ - stream_write_uint16(s, 0); /* textFlags (2 bytes) */ - stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* textFlags (2 bytes) */ + stream_write_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ stream_write_uint32(s, 0); /* pad4OctetsB (4 bytes) */ stream_write_uint32(s, 230400); /* desktopSaveSize (4 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsC (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsD (2 bytes) */ - stream_write_uint16(s, 0); /* textANSICodePage (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsE (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsC (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsD (2 bytes) */ + stream_write_UINT16(s, 0); /* textANSICodePage (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsE (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_ORDER); } @@ -376,7 +376,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { stream_seek_uint32(s); /* pad1 (4 bytes) */ stream_seek_uint32(s); /* pad2 (4 bytes) */ @@ -384,12 +384,12 @@ void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* stream_seek_uint32(s); /* pad4 (4 bytes) */ stream_seek_uint32(s); /* pad5 (4 bytes) */ stream_seek_uint32(s); /* pad6 (4 bytes) */ - stream_seek_uint16(s); /* Cache0Entries (2 bytes) */ - stream_seek_uint16(s); /* Cache0MaximumCellSize (2 bytes) */ - stream_seek_uint16(s); /* Cache1Entries (2 bytes) */ - stream_seek_uint16(s); /* Cache1MaximumCellSize (2 bytes) */ - stream_seek_uint16(s); /* Cache2Entries (2 bytes) */ - stream_seek_uint16(s); /* Cache2MaximumCellSize (2 bytes) */ + stream_seek_UINT16(s); /* Cache0Entries (2 bytes) */ + stream_seek_UINT16(s); /* Cache0MaximumCellSize (2 bytes) */ + stream_seek_UINT16(s); /* Cache1Entries (2 bytes) */ + stream_seek_UINT16(s); /* Cache1MaximumCellSize (2 bytes) */ + stream_seek_UINT16(s); /* Cache2Entries (2 bytes) */ + stream_seek_UINT16(s); /* Cache2MaximumCellSize (2 bytes) */ } /** @@ -402,8 +402,8 @@ void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) { int bpp; - uint16 size; - uint8* header; + UINT16 size; + BYTE* header; header = rdp_capability_set_start(s); @@ -417,16 +417,16 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) stream_write_uint32(s, 0); /* pad6 (4 bytes) */ size = bpp * 256; - stream_write_uint16(s, 200); /* Cache0Entries (2 bytes) */ - stream_write_uint16(s, size); /* Cache0MaximumCellSize (2 bytes) */ + stream_write_UINT16(s, 200); /* Cache0Entries (2 bytes) */ + stream_write_UINT16(s, size); /* Cache0MaximumCellSize (2 bytes) */ size = bpp * 1024; - stream_write_uint16(s, 600); /* Cache1Entries (2 bytes) */ - stream_write_uint16(s, size); /* Cache1MaximumCellSize (2 bytes) */ + stream_write_UINT16(s, 600); /* Cache1Entries (2 bytes) */ + stream_write_UINT16(s, size); /* Cache1MaximumCellSize (2 bytes) */ size = bpp * 4096; - stream_write_uint16(s, 1000); /* Cache2Entries (2 bytes) */ - stream_write_uint16(s, size); /* Cache2MaximumCellSize (2 bytes) */ + stream_write_UINT16(s, 1000); /* Cache2Entries (2 bytes) */ + stream_write_UINT16(s, size); /* Cache2MaximumCellSize (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE); } @@ -438,12 +438,12 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_control_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_control_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* controlFlags (2 bytes) */ - stream_seek_uint16(s); /* remoteDetachFlag (2 bytes) */ - stream_seek_uint16(s); /* controlInterest (2 bytes) */ - stream_seek_uint16(s); /* detachInterest (2 bytes) */ + stream_seek_UINT16(s); /* controlFlags (2 bytes) */ + stream_seek_UINT16(s); /* remoteDetachFlag (2 bytes) */ + stream_seek_UINT16(s); /* controlInterest (2 bytes) */ + stream_seek_UINT16(s); /* detachInterest (2 bytes) */ } /** @@ -455,14 +455,14 @@ void rdp_read_control_capability_set(STREAM* s, uint16 length, rdpSettings* sett void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint16(s, 0); /* controlFlags (2 bytes) */ - stream_write_uint16(s, 0); /* remoteDetachFlag (2 bytes) */ - stream_write_uint16(s, 2); /* controlInterest (2 bytes) */ - stream_write_uint16(s, 2); /* detachInterest (2 bytes) */ + stream_write_UINT16(s, 0); /* controlFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* remoteDetachFlag (2 bytes) */ + stream_write_UINT16(s, 2); /* controlInterest (2 bytes) */ + stream_write_UINT16(s, 2); /* detachInterest (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_CONTROL); } @@ -474,12 +474,12 @@ void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_window_activation_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_window_activation_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* helpKeyFlag (2 bytes) */ - stream_seek_uint16(s); /* helpKeyIndexFlag (2 bytes) */ - stream_seek_uint16(s); /* helpExtendedKeyFlag (2 bytes) */ - stream_seek_uint16(s); /* windowManagerKeyFlag (2 bytes) */ + stream_seek_UINT16(s); /* helpKeyFlag (2 bytes) */ + stream_seek_UINT16(s); /* helpKeyIndexFlag (2 bytes) */ + stream_seek_UINT16(s); /* helpExtendedKeyFlag (2 bytes) */ + stream_seek_UINT16(s); /* windowManagerKeyFlag (2 bytes) */ } /** @@ -491,14 +491,14 @@ void rdp_read_window_activation_capability_set(STREAM* s, uint16 length, rdpSett void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint16(s, 0); /* helpKeyFlag (2 bytes) */ - stream_write_uint16(s, 0); /* helpKeyIndexFlag (2 bytes) */ - stream_write_uint16(s, 0); /* helpExtendedKeyFlag (2 bytes) */ - stream_write_uint16(s, 0); /* windowManagerKeyFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* helpKeyFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* helpKeyIndexFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* helpExtendedKeyFlag (2 bytes) */ + stream_write_UINT16(s, 0); /* windowManagerKeyFlag (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_ACTIVATION); } @@ -510,15 +510,15 @@ void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings * @param settings settings */ -void rdp_read_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint16 colorPointerFlag; - uint16 colorPointerCacheSize; - uint16 pointerCacheSize; + UINT16 colorPointerFlag; + UINT16 colorPointerCacheSize; + UINT16 pointerCacheSize; - stream_read_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */ - stream_read_uint16(s, colorPointerCacheSize); /* colorPointerCacheSize (2 bytes) */ - stream_read_uint16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */ + stream_read_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */ + stream_read_UINT16(s, colorPointerCacheSize); /* colorPointerCacheSize (2 bytes) */ + stream_read_UINT16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */ if (colorPointerFlag == FALSE) settings->color_pointer = FALSE; @@ -538,19 +538,19 @@ void rdp_read_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* sett void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 colorPointerFlag; + BYTE* header; + UINT16 colorPointerFlag; header = rdp_capability_set_start(s); colorPointerFlag = (settings->color_pointer) ? 1 : 0; - stream_write_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */ - stream_write_uint16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */ + stream_write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */ + stream_write_UINT16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */ if (settings->large_pointer) { - stream_write_uint16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */ + stream_write_UINT16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */ } rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER); @@ -563,10 +563,10 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_share_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_share_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* nodeId (2 bytes) */ - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* nodeId (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ } /** @@ -578,15 +578,15 @@ void rdp_read_share_capability_set(STREAM* s, uint16 length, rdpSettings* settin void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 nodeId; + BYTE* header; + UINT16 nodeId; header = rdp_capability_set_start(s); nodeId = (settings->server_mode) ? 0x03EA : 0; - stream_write_uint16(s, nodeId); /* nodeId (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, nodeId); /* nodeId (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_SHARE); } @@ -598,10 +598,10 @@ void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_color_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_color_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* colorTableCacheSize (2 bytes) */ - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* colorTableCacheSize (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ } /** @@ -613,12 +613,12 @@ void rdp_read_color_cache_capability_set(STREAM* s, uint16 length, rdpSettings* void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint16(s, 6); /* colorTableCacheSize (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, 6); /* colorTableCacheSize (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_COLOR_CACHE); } @@ -630,12 +630,12 @@ void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_sound_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_sound_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint16 soundFlags; + UINT16 soundFlags; - stream_read_uint16(s, soundFlags); /* soundFlags (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ + stream_read_UINT16(s, soundFlags); /* soundFlags (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ settings->sound_beeps = (soundFlags & SOUND_BEEPS_FLAG) ? TRUE : FALSE; } @@ -649,15 +649,15 @@ void rdp_read_sound_capability_set(STREAM* s, uint16 length, rdpSettings* settin void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 soundFlags; + BYTE* header; + UINT16 soundFlags; header = rdp_capability_set_start(s); soundFlags = (settings->sound_beeps) ? SOUND_BEEPS_FLAG : 0; - stream_write_uint16(s, soundFlags); /* soundFlags (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */ + stream_write_UINT16(s, soundFlags); /* soundFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_SOUND); } @@ -669,12 +669,12 @@ void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint16 inputFlags; + UINT16 inputFlags; - stream_read_uint16(s, inputFlags); /* inputFlags (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ + stream_read_UINT16(s, inputFlags); /* inputFlags (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ if (settings->server_mode) { @@ -720,8 +720,8 @@ void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settin void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 inputFlags; + BYTE* header; + UINT16 inputFlags; header = rdp_capability_set_start(s); @@ -733,8 +733,8 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings) inputFlags |= INPUT_FLAG_FASTPATH_INPUT2; } - stream_write_uint16(s, inputFlags); /* inputFlags (2 bytes) */ - stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */ + stream_write_UINT16(s, inputFlags); /* inputFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */ stream_write_uint32(s, settings->kbd_type); /* keyboardType (4 bytes) */ stream_write_uint32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */ @@ -751,13 +751,13 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_font_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_font_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { if (length > 4) - stream_seek_uint16(s); /* fontSupportFlags (2 bytes) */ + stream_seek_UINT16(s); /* fontSupportFlags (2 bytes) */ if (length > 6) - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ } /** @@ -769,12 +769,12 @@ void rdp_read_font_capability_set(STREAM* s, uint16 length, rdpSettings* setting void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint16(s, FONTSUPPORT_FONTLIST); /* fontSupportFlags (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, FONTSUPPORT_FONTLIST); /* fontSupportFlags (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_FONT); } @@ -786,7 +786,7 @@ void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_brush_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_brush_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { stream_seek_uint32(s); /* brushSupportLevel (4 bytes) */ } @@ -800,7 +800,7 @@ void rdp_read_brush_capability_set(STREAM* s, uint16 length, rdpSettings* settin void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); @@ -816,8 +816,8 @@ void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings) */ void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition) { - stream_read_uint16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */ - stream_read_uint16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */ + stream_read_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */ + stream_read_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */ } /** @@ -827,8 +827,8 @@ void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definiti */ void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition) { - stream_write_uint16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */ - stream_write_uint16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */ + stream_write_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */ + stream_write_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */ } /** @@ -838,14 +838,14 @@ void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definit * @param settings settings */ -void rdp_read_glyph_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint16 glyphSupportLevel; + UINT16 glyphSupportLevel; stream_seek(s, 40); /* glyphCache (40 bytes) */ stream_seek_uint32(s); /* fragCache (4 bytes) */ - stream_read_uint16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ settings->glyphSupportLevel = glyphSupportLevel; } @@ -859,7 +859,7 @@ void rdp_read_glyph_cache_capability_set(STREAM* s, uint16 length, rdpSettings* void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); @@ -877,9 +877,9 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings) rdp_write_cache_definition(s, settings->fragCache); /* fragCache (4 bytes) */ - stream_write_uint16(s, settings->glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ + stream_write_UINT16(s, settings->glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_GLYPH_CACHE); } @@ -891,13 +891,13 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { uint32 offscreenSupportLevel; stream_read_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ - stream_read_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ - stream_read_uint16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ + stream_read_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ + stream_read_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ if (offscreenSupportLevel & TRUE) settings->offscreen_bitmap_cache = TRUE; @@ -912,7 +912,7 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rd void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 offscreenSupportLevel = FALSE; header = rdp_capability_set_start(s); @@ -921,8 +921,8 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set offscreenSupportLevel = TRUE; stream_write_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ - stream_write_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ - stream_write_uint16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ + stream_write_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ + stream_write_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE); } @@ -934,13 +934,13 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set * @param settings settings */ -void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint8 cacheVersion; + BYTE cacheVersion; - stream_read_uint8(s, cacheVersion); /* cacheVersion (1 byte) */ - stream_seek_uint8(s); /* pad1 (1 byte) */ - stream_seek_uint16(s); /* pad2 (2 bytes) */ + stream_read_BYTE(s, cacheVersion); /* cacheVersion (1 byte) */ + stream_seek_BYTE(s); /* pad1 (1 byte) */ + stream_seek_UINT16(s); /* pad2 (2 bytes) */ if (cacheVersion & BITMAP_CACHE_V2) settings->persistent_bitmap_cache = TRUE; @@ -955,13 +955,13 @@ void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, uint16 length, void rdp_write_bitmap_cache_host_support_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint8(s, BITMAP_CACHE_V2); /* cacheVersion (1 byte) */ - stream_write_uint8(s, 0); /* pad1 (1 byte) */ - stream_write_uint16(s, 0); /* pad2 (2 bytes) */ + stream_write_BYTE(s, BITMAP_CACHE_V2); /* cacheVersion (1 byte) */ + stream_write_BYTE(s, 0); /* pad1 (1 byte) */ + stream_write_UINT16(s, 0); /* pad2 (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_HOST_SUPPORT); } @@ -986,11 +986,11 @@ void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cell * @param settings settings */ -void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* cacheFlags (2 bytes) */ - stream_seek_uint8(s); /* pad2 (1 byte) */ - stream_seek_uint8(s); /* numCellCaches (1 byte) */ + stream_seek_UINT16(s); /* cacheFlags (2 bytes) */ + stream_seek_BYTE(s); /* pad2 (1 byte) */ + stream_seek_BYTE(s); /* numCellCaches (1 byte) */ stream_seek(s, 4); /* bitmapCache0CellInfo (4 bytes) */ stream_seek(s, 4); /* bitmapCache1CellInfo (4 bytes) */ stream_seek(s, 4); /* bitmapCache2CellInfo (4 bytes) */ @@ -1008,8 +1008,8 @@ void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, uint16 length, rdpSettin void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 cacheFlags; + BYTE* header; + UINT16 cacheFlags; header = rdp_capability_set_start(s); @@ -1018,9 +1018,9 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings) if (settings->persistent_bitmap_cache) cacheFlags |= PERSISTENT_KEYS_EXPECTED_FLAG; - stream_write_uint16(s, cacheFlags); /* cacheFlags (2 bytes) */ - stream_write_uint8(s, 0); /* pad2 (1 byte) */ - stream_write_uint8(s, settings->bitmapCacheV2NumCells); /* numCellCaches (1 byte) */ + stream_write_UINT16(s, cacheFlags); /* cacheFlags (2 bytes) */ + stream_write_BYTE(s, 0); /* pad2 (1 byte) */ + stream_write_BYTE(s, settings->bitmapCacheV2NumCells); /* numCellCaches (1 byte) */ rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[0]); /* bitmapCache0CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[1]); /* bitmapCache1CellInfo (4 bytes) */ rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[2]); /* bitmapCache2CellInfo (4 bytes) */ @@ -1038,7 +1038,7 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_virtual_channel_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { uint32 flags; uint32 VCChunkSize; @@ -1063,7 +1063,7 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, uint16 length, rdpSettin void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 flags; header = rdp_capability_set_start(s); @@ -1083,13 +1083,13 @@ void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { uint32 drawNineGridSupportLevel; stream_read_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ - stream_read_uint16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ - stream_read_uint16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ + stream_read_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ + stream_read_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ if ((drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED) || (drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED_V2)) @@ -1105,7 +1105,7 @@ void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, uint16 length, rdpS void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 drawNineGridSupportLevel; header = rdp_capability_set_start(s); @@ -1113,34 +1113,34 @@ void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* setti drawNineGridSupportLevel = (settings->draw_nine_grid) ? DRAW_NINEGRID_SUPPORTED_V2 : DRAW_NINEGRID_NO_SUPPORT; stream_write_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ - stream_write_uint16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ - stream_write_uint16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ + stream_write_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ + stream_write_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_NINE_GRID_CACHE); } -void rdp_write_gdiplus_cache_entries(STREAM* s, uint16 gce, uint16 bce, uint16 pce, uint16 ice, uint16 ace) +void rdp_write_gdiplus_cache_entries(STREAM* s, UINT16 gce, UINT16 bce, UINT16 pce, UINT16 ice, UINT16 ace) { - stream_write_uint16(s, gce); /* gdipGraphicsCacheEntries (2 bytes) */ - stream_write_uint16(s, bce); /* gdipBrushCacheEntries (2 bytes) */ - stream_write_uint16(s, pce); /* gdipPenCacheEntries (2 bytes) */ - stream_write_uint16(s, ice); /* gdipImageCacheEntries (2 bytes) */ - stream_write_uint16(s, ace); /* gdipImageAttributesCacheEntries (2 bytes) */ + stream_write_UINT16(s, gce); /* gdipGraphicsCacheEntries (2 bytes) */ + stream_write_UINT16(s, bce); /* gdipBrushCacheEntries (2 bytes) */ + stream_write_UINT16(s, pce); /* gdipPenCacheEntries (2 bytes) */ + stream_write_UINT16(s, ice); /* gdipImageCacheEntries (2 bytes) */ + stream_write_UINT16(s, ace); /* gdipImageAttributesCacheEntries (2 bytes) */ } -void rdp_write_gdiplus_cache_chunk_size(STREAM* s, uint16 gccs, uint16 obccs, uint16 opccs, uint16 oiaccs) +void rdp_write_gdiplus_cache_chunk_size(STREAM* s, UINT16 gccs, UINT16 obccs, UINT16 opccs, UINT16 oiaccs) { - stream_write_uint16(s, gccs); /* gdipGraphicsCacheChunkSize (2 bytes) */ - stream_write_uint16(s, obccs); /* gdipObjectBrushCacheChunkSize (2 bytes) */ - stream_write_uint16(s, opccs); /* gdipObjectPenCacheChunkSize (2 bytes) */ - stream_write_uint16(s, oiaccs); /* gdipObjectImageAttributesCacheChunkSize (2 bytes) */ + stream_write_UINT16(s, gccs); /* gdipGraphicsCacheChunkSize (2 bytes) */ + stream_write_UINT16(s, obccs); /* gdipObjectBrushCacheChunkSize (2 bytes) */ + stream_write_UINT16(s, opccs); /* gdipObjectPenCacheChunkSize (2 bytes) */ + stream_write_UINT16(s, oiaccs); /* gdipObjectImageAttributesCacheChunkSize (2 bytes) */ } -void rdp_write_gdiplus_image_cache_properties(STREAM* s, uint16 oiccs, uint16 oicts, uint16 oicms) +void rdp_write_gdiplus_image_cache_properties(STREAM* s, UINT16 oiccs, UINT16 oicts, UINT16 oicms) { - stream_write_uint16(s, oiccs); /* gdipObjectImageCacheChunkSize (2 bytes) */ - stream_write_uint16(s, oicts); /* gdipObjectImageCacheTotalSize (2 bytes) */ - stream_write_uint16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */ + stream_write_UINT16(s, oiccs); /* gdipObjectImageCacheChunkSize (2 bytes) */ + stream_write_UINT16(s, oicts); /* gdipObjectImageCacheTotalSize (2 bytes) */ + stream_write_UINT16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */ } /** @@ -1150,7 +1150,7 @@ void rdp_write_gdiplus_image_cache_properties(STREAM* s, uint16 oiccs, uint16 oi * @param settings settings */ -void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { uint32 drawGDIPlusSupportLevel; uint32 drawGdiplusCacheLevel; @@ -1178,7 +1178,7 @@ void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, uint16 length, rdpSet void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 drawGDIPlusSupportLevel; uint32 drawGdiplusCacheLevel; @@ -1204,7 +1204,7 @@ void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* setting * @param settings settings */ -void rdp_read_remote_programs_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { uint32 railSupportLevel; @@ -1229,7 +1229,7 @@ void rdp_read_remote_programs_capability_set(STREAM* s, uint16 length, rdpSettin void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 railSupportLevel; header = rdp_capability_set_start(s); @@ -1251,11 +1251,11 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_window_list_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { stream_seek_uint32(s); /* wndSupportLevel (4 bytes) */ - stream_seek_uint8(s); /* numIconCaches (1 byte) */ - stream_seek_uint16(s); /* numIconCacheEntries (2 bytes) */ + stream_seek_BYTE(s); /* numIconCaches (1 byte) */ + stream_seek_UINT16(s); /* numIconCacheEntries (2 bytes) */ } /** @@ -1267,7 +1267,7 @@ void rdp_read_window_list_capability_set(STREAM* s, uint16 length, rdpSettings* void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 wndSupportLevel; header = rdp_capability_set_start(s); @@ -1275,8 +1275,8 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings) wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX; stream_write_uint32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */ - stream_write_uint8(s, settings->num_icon_caches); /* numIconCaches (1 byte) */ - stream_write_uint16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */ + stream_write_BYTE(s, settings->num_icon_caches); /* numIconCaches (1 byte) */ + stream_write_UINT16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW); } @@ -1288,9 +1288,9 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_desktop_composition_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_desktop_composition_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* compDeskSupportLevel (2 bytes) */ + stream_seek_UINT16(s); /* compDeskSupportLevel (2 bytes) */ } /** @@ -1302,14 +1302,14 @@ void rdp_read_desktop_composition_capability_set(STREAM* s, uint16 length, rdpSe void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 compDeskSupportLevel; + BYTE* header; + UINT16 compDeskSupportLevel; header = rdp_capability_set_start(s); compDeskSupportLevel = (settings->desktop_composition) ? COMPDESK_SUPPORTED : COMPDESK_NOT_SUPPORTED; - stream_write_uint16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */ + stream_write_UINT16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_COMP_DESK); } @@ -1321,7 +1321,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin * @param settings settings */ -void rdp_read_multifragment_update_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { stream_read_uint32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ } @@ -1335,7 +1335,7 @@ void rdp_read_multifragment_update_capability_set(STREAM* s, uint16 length, rdpS void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); @@ -1351,9 +1351,9 @@ void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* setti * @param settings settings */ -void rdp_read_large_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_large_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint16(s); /* largePointerSupportFlags (2 bytes) */ + stream_seek_UINT16(s); /* largePointerSupportFlags (2 bytes) */ } /** @@ -1365,14 +1365,14 @@ void rdp_read_large_pointer_capability_set(STREAM* s, uint16 length, rdpSettings void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint16 largePointerSupportFlags; + BYTE* header; + UINT16 largePointerSupportFlags; header = rdp_capability_set_start(s); largePointerSupportFlags = (settings->large_pointer) ? LARGE_POINTER_FLAG_96x96 : 0; - stream_write_uint16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */ + stream_write_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_LARGE_POINTER); } @@ -1384,7 +1384,7 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_surface_commands_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { stream_seek_uint32(s); /* cmdFlags (4 bytes) */ stream_seek_uint32(s); /* reserved (4 bytes) */ @@ -1401,7 +1401,7 @@ void rdp_read_surface_commands_capability_set(STREAM* s, uint16 length, rdpSetti void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 cmdFlags; header = rdp_capability_set_start(s); @@ -1423,12 +1423,12 @@ void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint8 bitmapCodecCount; - uint16 codecPropertiesLength; + BYTE bitmapCodecCount; + UINT16 codecPropertiesLength; - stream_read_uint8(s, bitmapCodecCount); /* bitmapCodecCount (1 byte) */ + stream_read_BYTE(s, bitmapCodecCount); /* bitmapCodecCount (1 byte) */ if (settings->server_mode) { @@ -1442,22 +1442,22 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0) { stream_seek(s, 16); /* codecGUID (16 bytes) */ - stream_read_uint8(s, settings->rfx_codec_id); + stream_read_BYTE(s, settings->rfx_codec_id); settings->rfx_codec = TRUE; } else if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0) { stream_seek(s, 16); /*codec GUID (16 bytes) */ - stream_read_uint8(s, settings->ns_codec_id); + stream_read_BYTE(s, settings->ns_codec_id); settings->ns_codec = TRUE; } else { stream_seek(s, 16); /* codecGUID (16 bytes) */ - stream_seek_uint8(s); /* codecID (1 byte) */ + stream_seek_BYTE(s); /* codecID (1 byte) */ } - stream_read_uint16(s, codecPropertiesLength); /* codecPropertiesLength (2 bytes) */ + stream_read_UINT16(s, codecPropertiesLength); /* codecPropertiesLength (2 bytes) */ stream_seek(s, codecPropertiesLength); /* codecProperties */ bitmapCodecCount--; @@ -1472,12 +1472,12 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings) { uint32 captureFlags; - uint8 codecMode; + BYTE codecMode; captureFlags = settings->rfx_codec_only ? CARDP_CAPS_CAPTURE_NON_CAC : 0; codecMode = settings->rfx_codec_mode; - stream_write_uint16(s, 49); /* codecPropertiesLength */ + stream_write_UINT16(s, 49); /* codecPropertiesLength */ /* TS_RFX_CLNT_CAPS_CONTAINER */ stream_write_uint32(s, 49); /* length */ @@ -1485,33 +1485,33 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings) stream_write_uint32(s, 37); /* capsLength */ /* TS_RFX_CAPS */ - stream_write_uint16(s, CBY_CAPS); /* blockType */ + stream_write_UINT16(s, CBY_CAPS); /* blockType */ stream_write_uint32(s, 8); /* blockLen */ - stream_write_uint16(s, 1); /* numCapsets */ + stream_write_UINT16(s, 1); /* numCapsets */ /* TS_RFX_CAPSET */ - stream_write_uint16(s, CBY_CAPSET); /* blockType */ + stream_write_UINT16(s, CBY_CAPSET); /* blockType */ stream_write_uint32(s, 29); /* blockLen */ - stream_write_uint8(s, 0x01); /* codecId (MUST be set to 0x01) */ - stream_write_uint16(s, CLY_CAPSET); /* capsetType */ - stream_write_uint16(s, 2); /* numIcaps */ - stream_write_uint16(s, 8); /* icapLen */ + stream_write_BYTE(s, 0x01); /* codecId (MUST be set to 0x01) */ + stream_write_UINT16(s, CLY_CAPSET); /* capsetType */ + stream_write_UINT16(s, 2); /* numIcaps */ + stream_write_UINT16(s, 8); /* icapLen */ /* TS_RFX_ICAP (RLGR1) */ - stream_write_uint16(s, CLW_VERSION_1_0); /* version */ - stream_write_uint16(s, CT_TILE_64x64); /* tileSize */ - stream_write_uint8(s, codecMode); /* flags */ - stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */ - stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */ - stream_write_uint8(s, CLW_ENTROPY_RLGR1); /* entropyBits */ + stream_write_UINT16(s, CLW_VERSION_1_0); /* version */ + stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */ + stream_write_BYTE(s, codecMode); /* flags */ + stream_write_BYTE(s, CLW_COL_CONV_ICT); /* colConvBits */ + stream_write_BYTE(s, CLW_XFORM_DWT_53_A); /* transformBits */ + stream_write_BYTE(s, CLW_ENTROPY_RLGR1); /* entropyBits */ /* TS_RFX_ICAP (RLGR3) */ - stream_write_uint16(s, CLW_VERSION_1_0); /* version */ - stream_write_uint16(s, CT_TILE_64x64); /* tileSize */ - stream_write_uint8(s, codecMode); /* flags */ - stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */ - stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */ - stream_write_uint8(s, CLW_ENTROPY_RLGR3); /* entropyBits */ + stream_write_UINT16(s, CLW_VERSION_1_0); /* version */ + stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */ + stream_write_BYTE(s, codecMode); /* flags */ + stream_write_BYTE(s, CLW_COL_CONV_ICT); /* colConvBits */ + stream_write_BYTE(s, CLW_XFORM_DWT_53_A); /* transformBits */ + stream_write_BYTE(s, CLW_ENTROPY_RLGR3); /* entropyBits */ } /** @@ -1521,18 +1521,18 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings) */ void rdp_write_nsc_client_capability_container(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 3); /* codecPropertiesLength */ + stream_write_UINT16(s, 3); /* codecPropertiesLength */ /* TS_NSCODEC_CAPABILITYSET */ - stream_write_uint8(s, 1); /* fAllowDynamicFidelity */ - stream_write_uint8(s, 1); /* fAllowSubsampling */ - stream_write_uint8(s, 3); /* colorLossLevel */ + stream_write_BYTE(s, 1); /* fAllowDynamicFidelity */ + stream_write_BYTE(s, 1); /* fAllowSubsampling */ + stream_write_BYTE(s, 3); /* colorLossLevel */ } void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 1); /* codecPropertiesLength */ - stream_write_uint8(s, settings->jpeg_quality); + stream_write_UINT16(s, 1); /* codecPropertiesLength */ + stream_write_BYTE(s, settings->jpeg_quality); } /** @@ -1542,14 +1542,14 @@ void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings */ void rdp_write_rfx_server_capability_container(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 4); /* codecPropertiesLength */ + stream_write_UINT16(s, 4); /* codecPropertiesLength */ stream_write_uint32(s, 0); /* reserved */ } void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 1); /* codecPropertiesLength */ - stream_write_uint8(s, 75); + stream_write_UINT16(s, 1); /* codecPropertiesLength */ + stream_write_BYTE(s, 75); } /** @@ -1559,7 +1559,7 @@ void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings */ void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings) { - stream_write_uint16(s, 4); /* codecPropertiesLength */ + stream_write_UINT16(s, 4); /* codecPropertiesLength */ stream_write_uint32(s, 0); /* reserved */ } @@ -1572,8 +1572,8 @@ void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings) void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; - uint8 bitmapCodecCount; + BYTE* header; + BYTE bitmapCodecCount; header = rdp_capability_set_start(s); @@ -1586,7 +1586,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) if (settings->jpeg_codec) bitmapCodecCount++; - stream_write_uint8(s, bitmapCodecCount); + stream_write_BYTE(s, bitmapCodecCount); if (settings->rfx_codec) { @@ -1594,12 +1594,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) if (settings->server_mode) { - stream_write_uint8(s, 0); /* codecID is defined by the client */ + stream_write_BYTE(s, 0); /* codecID is defined by the client */ rdp_write_rfx_server_capability_container(s, settings); } else { - stream_write_uint8(s, CODEC_ID_REMOTEFX); /* codecID */ + stream_write_BYTE(s, CODEC_ID_REMOTEFX); /* codecID */ rdp_write_rfx_client_capability_container(s, settings); } } @@ -1608,12 +1608,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) stream_write(s, CODEC_GUID_NSCODEC, 16); if (settings->server_mode) { - stream_write_uint8(s, 0); /* codecID is defined by the client */ + stream_write_BYTE(s, 0); /* codecID is defined by the client */ rdp_write_nsc_server_capability_container(s, settings); } else { - stream_write_uint8(s, CODEC_ID_NSCODEC); /* codecID */ + stream_write_BYTE(s, CODEC_ID_NSCODEC); /* codecID */ rdp_write_nsc_client_capability_container(s, settings); } } @@ -1622,12 +1622,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) stream_write(s, CODEC_GUID_JPEG, 16); if (settings->server_mode) { - stream_write_uint8(s, 0); /* codecID is defined by the client */ + stream_write_BYTE(s, 0); /* codecID is defined by the client */ rdp_write_jpeg_server_capability_container(s, settings); } else { - stream_write_uint8(s, CODEC_ID_JPEG); /* codecID */ + stream_write_BYTE(s, CODEC_ID_JPEG); /* codecID */ rdp_write_jpeg_client_capability_container(s, settings); } } @@ -1640,7 +1640,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings) * @param settings settings */ -void rdp_read_frame_acknowledge_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { if (settings->server_mode) { @@ -1652,17 +1652,17 @@ void rdp_read_frame_acknowledge_capability_set(STREAM* s, uint16 length, rdpSett } } -void rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, uint16 length, rdpSettings* settings) +void rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint8(s); /* (1 byte) */ + stream_seek_BYTE(s); /* (1 byte) */ } void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; header = rdp_capability_set_start(s); - stream_write_uint8(s, settings->v3_codec_id); + stream_write_BYTE(s, settings->v3_codec_id); rdp_capability_set_finish(s, header, 6); } @@ -1675,7 +1675,7 @@ void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* s void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings) { - uint8* header; + BYTE* header; uint32 frame_acknowledge; header = rdp_capability_set_start(s); @@ -1686,11 +1686,11 @@ void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE); } -BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCapabilities) +BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCapabilities) { - uint16 type; - uint16 length; - uint8 *bm, *em; + UINT16 type; + UINT16 length; + BYTE *bm, *em; while (numberCapabilities > 0) { @@ -1845,15 +1845,15 @@ BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCap BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) { - uint16 length; - uint16 channelId; - uint16 pduType; - uint16 pduLength; - uint16 pduSource; - uint16 numberCapabilities; - uint16 lengthSourceDescriptor; - uint16 lengthCombinedCapabilities; - uint16 securityFlags; + UINT16 length; + UINT16 channelId; + UINT16 pduType; + UINT16 pduLength; + UINT16 pduSource; + UINT16 numberCapabilities; + UINT16 lengthSourceDescriptor; + UINT16 lengthCombinedCapabilities; + UINT16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) return FALSE; @@ -1895,10 +1895,10 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) } stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ - stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ - stream_read_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ + stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ + stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */ - stream_read_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ + stream_read_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ /* capabilitySets */ @@ -1915,20 +1915,20 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) void rdp_write_demand_active(STREAM* s, rdpSettings* settings) { - uint8 *bm, *em, *lm; - uint16 numberCapabilities; - uint16 lengthCombinedCapabilities; + BYTE *bm, *em, *lm; + UINT16 numberCapabilities; + UINT16 lengthCombinedCapabilities; stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */ - stream_write_uint16(s, 4); /* lengthSourceDescriptor (2 bytes) */ + stream_write_UINT16(s, 4); /* lengthSourceDescriptor (2 bytes) */ stream_get_mark(s, lm); - stream_seek_uint16(s); /* lengthCombinedCapabilities (2 bytes) */ + stream_seek_UINT16(s); /* lengthCombinedCapabilities (2 bytes) */ stream_write(s, "RDP", 4); /* sourceDescriptor */ stream_get_mark(s, bm); - stream_seek_uint16(s); /* numberCapabilities (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* numberCapabilities (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ numberCapabilities = 14; rdp_write_general_capability_set(s, settings); @@ -1956,10 +1956,10 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings) stream_set_mark(s, lm); /* go back to lengthCombinedCapabilities */ lengthCombinedCapabilities = (em - bm); - stream_write_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ + stream_write_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ stream_set_mark(s, bm); /* go back to numberCapabilities */ - stream_write_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ + stream_write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ stream_set_mark(s, em); @@ -1983,15 +1983,15 @@ BOOL rdp_send_demand_active(rdpRdp* rdp) BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) { - uint16 length; - uint16 channelId; - uint16 pduType; - uint16 pduLength; - uint16 pduSource; - uint16 lengthSourceDescriptor; - uint16 lengthCombinedCapabilities; - uint16 numberCapabilities; - uint16 securityFlags; + UINT16 length; + UINT16 channelId; + UINT16 pduType; + UINT16 pduLength; + UINT16 pduSource; + UINT16 lengthSourceDescriptor; + UINT16 lengthCombinedCapabilities; + UINT16 numberCapabilities; + UINT16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) return FALSE; @@ -2021,11 +2021,11 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) return FALSE; stream_seek_uint32(s); /* shareId (4 bytes) */ - stream_seek_uint16(s); /* originatorId (2 bytes) */ - stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ - stream_read_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ + stream_seek_UINT16(s); /* originatorId (2 bytes) */ + stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ + stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */ - stream_read_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ + stream_read_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ if (!rdp_read_capability_sets(s, rdp->settings, numberCapabilities)) @@ -2036,24 +2036,24 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) void rdp_write_confirm_active(STREAM* s, rdpSettings* settings) { - uint8 *bm, *em, *lm; - uint16 numberCapabilities; - uint16 lengthSourceDescriptor; - uint16 lengthCombinedCapabilities; + BYTE *bm, *em, *lm; + UINT16 numberCapabilities; + UINT16 lengthSourceDescriptor; + UINT16 lengthCombinedCapabilities; lengthSourceDescriptor = sizeof(SOURCE_DESCRIPTOR); stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */ - stream_write_uint16(s, 0x03EA); /* originatorId (2 bytes) */ - stream_write_uint16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */ + stream_write_UINT16(s, 0x03EA); /* originatorId (2 bytes) */ + stream_write_UINT16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */ stream_get_mark(s, lm); - stream_seek_uint16(s); /* lengthCombinedCapabilities (2 bytes) */ + stream_seek_UINT16(s); /* lengthCombinedCapabilities (2 bytes) */ stream_write(s, SOURCE_DESCRIPTOR, lengthSourceDescriptor); /* sourceDescriptor */ stream_get_mark(s, bm); - stream_seek_uint16(s); /* numberCapabilities (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* numberCapabilities (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ /* Capability Sets */ numberCapabilities = 15; @@ -2146,10 +2146,10 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings) stream_set_mark(s, lm); /* go back to lengthCombinedCapabilities */ lengthCombinedCapabilities = (em - bm); - stream_write_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ + stream_write_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ stream_set_mark(s, bm); /* go back to numberCapabilities */ - stream_write_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ + stream_write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */ stream_set_mark(s, em); } diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 8870cee26..5f893a9a0 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -131,7 +131,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info) { STREAM* s; int length; - uint8 padding; + BYTE padding; uint32 version; int modulus_length; int exponent_length; @@ -185,7 +185,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info) /* skip zero padding, if any */ do { - stream_peek_uint8(s, padding); + stream_peek_BYTE(s, padding); if (padding == 0) { @@ -250,7 +250,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain) static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, uint32 length) { - uint8 magic[4]; + BYTE magic[4]; uint32 keylen; uint32 bitlen; uint32 datalen; @@ -279,13 +279,13 @@ static BOOL certificate_process_server_public_key(rdpCertificate* certificate, S return TRUE; } -static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, uint8* sigdata, int sigdatalen, STREAM* s, uint32 siglen) +static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, BYTE* sigdata, int sigdatalen, STREAM* s, uint32 siglen) { int i, sum; CryptoMd5 md5ctx; - uint8 sig[TSSK_KEY_LENGTH]; - uint8 encsig[TSSK_KEY_LENGTH + 8]; - uint8 md5hash[CRYPTO_MD5_DIGEST_LENGTH]; + BYTE sig[TSSK_KEY_LENGTH]; + BYTE encsig[TSSK_KEY_LENGTH + 8]; + BYTE md5hash[CRYPTO_MD5_DIGEST_LENGTH]; md5ctx = crypto_md5_init(); crypto_md5_update(md5ctx, sigdata, sigdatalen); @@ -348,7 +348,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate uint32 wPublicKeyBlobLen; uint32 wSignatureBlobType; uint32 wSignatureBlobLen; - uint8* sigdata; + BYTE* sigdata; int sigdatalen; /* -4, because we need to include dwVersion */ @@ -362,7 +362,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate return FALSE; } - stream_read_uint16(s, wPublicKeyBlobType); + stream_read_UINT16(s, wPublicKeyBlobType); if (wPublicKeyBlobType != BB_RSA_KEY_BLOB) { @@ -370,7 +370,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate return FALSE; } - stream_read_uint16(s, wPublicKeyBlobLen); + stream_read_UINT16(s, wPublicKeyBlobLen); if (!certificate_process_server_public_key(certificate, s, wPublicKeyBlobLen)) { @@ -379,7 +379,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate } sigdatalen = stream_get_tail(s) - sigdata; - stream_read_uint16(s, wSignatureBlobType); + stream_read_UINT16(s, wSignatureBlobType); if (wSignatureBlobType != BB_RSA_SIGNATURE_BLOB) { @@ -387,7 +387,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate return FALSE; } - stream_read_uint16(s, wSignatureBlobLen); + stream_read_UINT16(s, wSignatureBlobLen); if (wSignatureBlobLen != 72) { @@ -428,7 +428,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, DEBUG_CERTIFICATE("\nX.509 Certificate #%d, length:%d", i + 1, certLength); - certificate->x509_cert_chain->array[i].data = (uint8*) malloc(certLength); + certificate->x509_cert_chain->array[i].data = (BYTE*) malloc(certLength); stream_read(s, certificate->x509_cert_chain->array[i].data, certLength); certificate->x509_cert_chain->array[i].length = certLength; @@ -458,7 +458,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, * @param length certificate length */ -BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length) +BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length) { STREAM* s; uint32 dwVersion; diff --git a/libfreerdp/core/certificate.h b/libfreerdp/core/certificate.h index 387846b1f..e1349dcfe 100644 --- a/libfreerdp/core/certificate.h +++ b/libfreerdp/core/certificate.h @@ -49,7 +49,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain); BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s); BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s); -BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length); +BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length); rdpCertificate* certificate_new(); void certificate_free(rdpCertificate* certificate); diff --git a/libfreerdp/core/channel.c b/libfreerdp/core/channel.c index 893371d4e..a93bca6af 100644 --- a/libfreerdp/core/channel.c +++ b/libfreerdp/core/channel.c @@ -34,7 +34,7 @@ #include "rdp.h" #include "channel.h" -BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size) +BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size) { STREAM* s; uint32 flags; @@ -92,7 +92,7 @@ BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size) return TRUE; } -void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id) +void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id) { uint32 length; uint32 flags; @@ -106,7 +106,7 @@ void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id) channel_id, stream_get_tail(s), chunk_length, flags, length); } -void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id) +void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id) { uint32 length; uint32 flags; diff --git a/libfreerdp/core/channel.h b/libfreerdp/core/channel.h index bdc4c2207..0e8d8fe3a 100644 --- a/libfreerdp/core/channel.h +++ b/libfreerdp/core/channel.h @@ -20,8 +20,8 @@ #ifndef __CHANNEL_H #define __CHANNEL_H -BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size); -void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id); -void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id); +BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size); +void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id); +void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id); #endif /* __CHANNEL_H */ diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 701cdb82b..90c623119 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -204,11 +204,11 @@ BOOL rdp_client_redirect(rdpRdp* rdp) static BOOL rdp_client_establish_keys(rdpRdp* rdp) { - uint8 client_random[CLIENT_RANDOM_LENGTH]; - uint8 crypt_client_random[256 + 8]; + BYTE client_random[CLIENT_RANDOM_LENGTH]; + BYTE crypt_client_random[256 + 8]; uint32 key_len; - uint8* mod; - uint8* exp; + BYTE* mod; + BYTE* exp; uint32 length; STREAM* s; @@ -251,7 +251,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp) if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS) { - uint8 fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; + BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; rdp->fips_encrypt = crypto_des3_encrypt_init(rdp->fips_encrypt_key, fips_ivec); rdp->fips_decrypt = crypto_des3_decrypt_init(rdp->fips_decrypt_key, fips_ivec); @@ -267,12 +267,12 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp) static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) { - uint8 client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */ - uint8 crypt_client_random[256 + 8]; + BYTE client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */ + BYTE crypt_client_random[256 + 8]; uint32 rand_len, key_len; - uint16 channel_id, length, sec_flags; - uint8* mod; - uint8* priv_exp; + UINT16 channel_id, length, sec_flags; + BYTE* mod; + BYTE* priv_exp; if (rdp->settings->encryption == FALSE) { @@ -323,7 +323,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS) { - uint8 fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; + BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; rdp->fips_encrypt = crypto_des3_encrypt_init(rdp->fips_encrypt_key, fips_ivec); rdp->fips_decrypt = crypto_des3_decrypt_init(rdp->fips_decrypt_key, fips_ivec); @@ -372,7 +372,7 @@ BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s) BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s) { int i; - uint16 channel_id; + UINT16 channel_id; BOOL all_joined = TRUE; if (!mcs_recv_channel_join_confirm(rdp->mcs, s, &channel_id)) @@ -456,9 +456,9 @@ BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s) BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) { - uint8* mark; - uint16 width; - uint16 height; + BYTE* mark; + UINT16 width; + UINT16 height; width = rdp->settings->width; height = rdp->settings->height; @@ -636,7 +636,7 @@ BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s) BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s) { int i; - uint16 channel_id; + UINT16 channel_id; BOOL all_joined = TRUE; if (!mcs_recv_channel_join_request(rdp->mcs, s, &channel_id)) diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index 86f4f29f3..b799e375e 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -70,12 +70,12 @@ static const char* const FASTPATH_UPDATETYPE_STRINGS[] = * This function assumes that at least two bytes are available in the stream * and doesn't touch third byte. */ -uint16 fastpath_header_length(STREAM* s) +UINT16 fastpath_header_length(STREAM* s) { - uint8 length1; + BYTE length1; - stream_seek_uint8(s); - stream_read_uint8(s, length1); + stream_seek_BYTE(s); + stream_read_BYTE(s, length1); stream_rewind(s, 2); return ((length1 & 0x80) != 0 ? 3 : 2); @@ -87,12 +87,12 @@ uint16 fastpath_header_length(STREAM* s) * @param encryptionFlags * @return length */ -uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s) +UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s) { - uint8 header; - uint16 length; + BYTE header; + UINT16 length; - stream_read_uint8(s, header); + stream_read_BYTE(s, header); if (fastpath != NULL) { @@ -105,32 +105,32 @@ uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s) return length; } -static INLINE void fastpath_read_update_header(STREAM* s, uint8* updateCode, uint8* fragmentation, uint8* compression) +static INLINE void fastpath_read_update_header(STREAM* s, BYTE* updateCode, BYTE* fragmentation, BYTE* compression) { - uint8 updateHeader; + BYTE updateHeader; - stream_read_uint8(s, updateHeader); + stream_read_BYTE(s, updateHeader); *updateCode = updateHeader & 0x0F; *fragmentation = (updateHeader >> 4) & 0x03; *compression = (updateHeader >> 6) & 0x03; } -static INLINE void fastpath_write_update_header(STREAM* s, uint8 updateCode, uint8 fragmentation, uint8 compression) +static INLINE void fastpath_write_update_header(STREAM* s, BYTE updateCode, BYTE fragmentation, BYTE compression) { - uint8 updateHeader = 0; + BYTE updateHeader = 0; updateHeader |= updateCode & 0x0F; updateHeader |= (fragmentation & 0x03) << 4; updateHeader |= (compression & 0x03) << 6; - stream_write_uint8(s, updateHeader); + stream_write_BYTE(s, updateHeader); } -uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s) +UINT16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s) { - uint8 header; - uint16 length; + BYTE header; + UINT16 length; - stream_read_uint8(s, header); + stream_read_BYTE(s, header); if (fastpath != NULL) { @@ -146,9 +146,9 @@ uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s) static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; - uint16 numberOrders; + UINT16 numberOrders; - stream_read_uint16(s, numberOrders); /* numberOrders (2 bytes) */ + stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */ while (numberOrders > 0) { @@ -162,11 +162,11 @@ static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s) static void fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s) { - uint16 updateType; + UINT16 updateType; rdpUpdate* update = fastpath->rdp->update; rdpContext* context = update->context; - stream_read_uint16(s, updateType); /* updateType (2 bytes) */ + stream_read_UINT16(s, updateType); /* updateType (2 bytes) */ switch (updateType) { @@ -184,10 +184,10 @@ static void fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s) static void fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s) { - stream_seek_uint16(s); /* size (2 bytes), must be set to zero */ + stream_seek_UINT16(s); /* size (2 bytes), must be set to zero */ } -static BOOL fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32 size, STREAM* s) +static BOOL fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, uint32 size, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; rdpContext* context = fastpath->rdp->update->context; @@ -259,13 +259,13 @@ static BOOL fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32 static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) { - uint16 size; + UINT16 size; int next_pos; uint32 totalSize; - uint8 updateCode; - uint8 fragmentation; - uint8 compression; - uint8 compressionFlags; + BYTE updateCode; + BYTE fragmentation; + BYTE compression; + BYTE compressionFlags; STREAM* update_stream; STREAM* comp_stream; rdpRdp *rdp; @@ -277,11 +277,11 @@ static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) fastpath_read_update_header(s, &updateCode, &fragmentation, &compression); if (compression == FASTPATH_OUTPUT_COMPRESSION_USED) - stream_read_uint8(s, compressionFlags); + stream_read_BYTE(s, compressionFlags); else compressionFlags = 0; - stream_read_uint16(s, size); + stream_read_UINT16(s, size); next_pos = stream_get_pos(s) + size; comp_stream = s; @@ -358,14 +358,14 @@ BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s) return TRUE; } -static BOOL fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode) +static BOOL fastpath_read_input_event_header(STREAM* s, BYTE* eventFlags, BYTE* eventCode) { - uint8 eventHeader; + BYTE eventHeader; if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, eventHeader); /* eventHeader (1 byte) */ + stream_read_BYTE(s, eventHeader); /* eventHeader (1 byte) */ *eventFlags = (eventHeader & 0x1F); *eventCode = (eventHeader >> 5); @@ -373,15 +373,15 @@ static BOOL fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8 return TRUE; } -static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags) { - uint16 flags; - uint16 code; + UINT16 flags; + UINT16 code; if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, code); /* keyCode (1 byte) */ + stream_read_BYTE(s, code); /* keyCode (1 byte) */ flags = 0; if ((eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE)) @@ -397,58 +397,58 @@ static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, return TRUE; } -static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags) { - uint16 pointerFlags; - uint16 xPos; - uint16 yPos; + UINT16 pointerFlags; + UINT16 xPos; + UINT16 yPos; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */ - stream_read_uint16(s, xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */ + stream_read_UINT16(s, xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, yPos); /* yPos (2 bytes) */ IFCALL(fastpath->rdp->input->MouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos); return TRUE; } -static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags) { - uint16 pointerFlags; - uint16 xPos; - uint16 yPos; + UINT16 pointerFlags; + UINT16 xPos; + UINT16 yPos; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */ - stream_read_uint16(s, xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */ + stream_read_UINT16(s, xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, yPos); /* yPos (2 bytes) */ IFCALL(fastpath->rdp->input->ExtendedMouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos); return TRUE; } -static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags) { IFCALL(fastpath->rdp->input->SynchronizeEvent, fastpath->rdp->input, eventFlags); return TRUE; } -static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags) +static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags) { - uint16 unicodeCode; - uint16 flags; + UINT16 unicodeCode; + UINT16 flags; if (stream_get_left(s) < 2) return FALSE; - stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */ + stream_read_UINT16(s, unicodeCode); /* unicodeCode (2 bytes) */ flags = 0; if ((eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE)) @@ -463,8 +463,8 @@ static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) { - uint8 eventFlags; - uint8 eventCode; + BYTE eventFlags; + BYTE eventCode; if (!fastpath_read_input_event_header(s, &eventFlags, &eventCode)) return FALSE; @@ -506,7 +506,7 @@ static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s) BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) { - uint8 i; + BYTE i; if (fastpath->numberEvents == 0) { @@ -518,7 +518,7 @@ BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, fastpath->numberEvents); /* eventHeader (1 byte) */ + stream_read_BYTE(s, fastpath->numberEvents); /* eventHeader (1 byte) */ } for (i = 0; i < fastpath->numberEvents; i++) @@ -545,7 +545,7 @@ static uint32 fastpath_get_sec_bytes(rdpRdp* rdp) return sec_bytes; } -STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode) +STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode) { rdpRdp *rdp; STREAM* s; @@ -560,15 +560,15 @@ STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 e rdp->sec_flags |= SEC_SECURE_CHECKSUM; } stream_seek(s, fastpath_get_sec_bytes(rdp)); - stream_write_uint8(s, eventFlags | (eventCode << 5)); /* eventHeader (1 byte) */ + stream_write_BYTE(s, eventFlags | (eventCode << 5)); /* eventHeader (1 byte) */ return s; } BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) { rdpRdp *rdp; - uint16 length; - uint8 eventHeader; + UINT16 length; + BYTE eventHeader; int sec_bytes; rdp = fastpath->rdp; @@ -588,7 +588,7 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) eventHeader |= (FASTPATH_INPUT_SECURE_CHECKSUM << 6); stream_set_pos(s, 0); - stream_write_uint8(s, eventHeader); + stream_write_BYTE(s, eventHeader); sec_bytes = fastpath_get_sec_bytes(fastpath->rdp); /* * We always encode length in two bytes, eventhough we could use @@ -596,12 +596,12 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s) * because we can leave room for fixed-length header, store all * the data first and then store the header. */ - stream_write_uint16_be(s, 0x8000 | length); + stream_write_UINT16_be(s, 0x8000 | length); if (sec_bytes > 0) { - uint8* fpInputEvents; - uint16 fpInputEvents_length; + BYTE* fpInputEvents; + UINT16 fpInputEvents_length; fpInputEvents = stream_get_tail(s) + sec_bytes; fpInputEvents_length = length - 3 - sec_bytes; @@ -631,13 +631,13 @@ STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath) return s; } -BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s) +BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s) { rdpRdp* rdp; - uint8* bm; - uint8* ptr_to_crypt; - uint8* ptr_sig; - uint8* holdp; + BYTE* bm; + BYTE* ptr_to_crypt; + BYTE* ptr_sig; + BYTE* holdp; int fragment; int sec_bytes; int try_comp; @@ -648,11 +648,11 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s int dlen; int bytes_to_crypt; BOOL result; - uint16 pduLength; - uint16 maxLength; + UINT16 pduLength; + UINT16 maxLength; uint32 totalLength; - uint8 fragmentation; - uint8 header; + BYTE fragmentation; + BYTE header; STREAM* update; STREAM* comp_update; STREAM* ls; @@ -686,7 +686,7 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s pdu_data_bytes = rdp->mppc_enc->bytes_in_opb; comp_flags = FASTPATH_OUTPUT_COMPRESSION_USED; header_bytes = 7 + sec_bytes; - bm = (uint8*) (rdp->mppc_enc->outputBuffer - header_bytes); + bm = (BYTE*) (rdp->mppc_enc->outputBuffer - header_bytes); stream_attach(comp_update, bm, pdu_data_bytes + header_bytes); ls = comp_update; } @@ -707,9 +707,9 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s header = 0; if (sec_bytes > 0) header |= (FASTPATH_OUTPUT_ENCRYPTED << 6); - stream_write_uint8(ls, header); /* fpOutputHeader (1 byte) */ - stream_write_uint8(ls, 0x80 | (pduLength >> 8)); /* length1 */ - stream_write_uint8(ls, pduLength & 0xFF); /* length2 */ + stream_write_BYTE(ls, header); /* fpOutputHeader (1 byte) */ + stream_write_BYTE(ls, 0x80 | (pduLength >> 8)); /* length1 */ + stream_write_BYTE(ls, pduLength & 0xFF); /* length2 */ if (sec_bytes > 0) stream_seek(ls, sec_bytes); @@ -719,13 +719,13 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s /* extra byte if compressed */ if (ls == comp_update) { - stream_write_uint8(ls, cflags); + stream_write_BYTE(ls, cflags); bytes_to_crypt = pdu_data_bytes + 4; } else bytes_to_crypt = pdu_data_bytes + 3; - stream_write_uint16(ls, pdu_data_bytes); + stream_write_UINT16(ls, pdu_data_bytes); stream_attach(update, bm, pduLength); stream_seek(update, pduLength); diff --git a/libfreerdp/core/fastpath.h b/libfreerdp/core/fastpath.h index d7104cbb5..4870205d6 100644 --- a/libfreerdp/core/fastpath.h +++ b/libfreerdp/core/fastpath.h @@ -97,24 +97,24 @@ enum FASTPATH_INPUT_KBDFLAGS struct rdp_fastpath { rdpRdp* rdp; - uint8 encryptionFlags; - uint8 numberEvents; + BYTE encryptionFlags; + BYTE numberEvents; STREAM* updateData; }; -uint16 fastpath_header_length(STREAM* s); -uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s); -uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s); +UINT16 fastpath_header_length(STREAM* s); +UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s); +UINT16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s); BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s); BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s); -STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode); +STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode); BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s); STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath); -BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s); +BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s); -BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId); +BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, uint32 frameId); rdpFastPath* fastpath_new(rdpRdp* rdp); void fastpath_free(rdpFastPath* fastpath); diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index 8738346a2..b1c3d443d 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -132,7 +132,7 @@ BOOL freerdp_connect(freerdp* instance) { pcap_get_next_record_header(update->pcap_rfx, &record); - s->data = (uint8*) realloc(s->data, record.length); + s->data = (BYTE*) realloc(s->data, record.length); record.data = s->data; s->size = record.length; @@ -182,7 +182,7 @@ BOOL freerdp_check_fds(freerdp* instance) return TRUE; } -static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* data, int size) +static int freerdp_send_channel_data(freerdp* instance, int channel_id, BYTE* data, int size) { return rdp_send_channel_data(instance->context->rdp, channel_id, data, size); } diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index d466ca4a3..85d4d0857 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -126,10 +126,10 @@ * { itu-t(0) recommendation(0) t(20) t124(124) version(0) 1 } * v.1 of ITU-T Recommendation T.124 (Feb 1998): "Generic Conference Control" */ -uint8 t124_02_98_oid[6] = { 0, 0, 20, 124, 0, 1 }; +BYTE t124_02_98_oid[6] = { 0, 0, 20, 124, 0, 1 }; -uint8 h221_cs_key[4] = "Duca"; -uint8 h221_sc_key[4] = "McDn"; +BYTE h221_cs_key[4] = "Duca"; +BYTE h221_sc_key[4] = "McDn"; /** * Read a GCC Conference Create Request.\n @@ -140,10 +140,10 @@ uint8 h221_sc_key[4] = "McDn"; BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings) { - uint16 length; - uint8 choice; - uint8 number; - uint8 selection; + UINT16 length; + BYTE choice; + BYTE number; + BYTE selection; /* ConnectData */ if (!per_read_choice(s, &choice)) @@ -209,7 +209,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data) per_write_selection(s, 0x08); /* select optional userData from ConferenceCreateRequest */ /* ConferenceCreateRequest::conferenceName */ - per_write_numeric_string(s, (uint8*)"1", 1, 1); /* ConferenceName::numeric */ + per_write_numeric_string(s, (BYTE*)"1", 1, 1); /* ConferenceName::numeric */ per_write_padding(s, 1); /* padding */ /* UserData (SET OF SEQUENCE) */ @@ -225,12 +225,12 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data) BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings) { - uint16 length; + UINT16 length; uint32 tag; - uint16 nodeID; - uint8 result; - uint8 choice; - uint8 number; + UINT16 nodeID; + BYTE result; + BYTE choice; + BYTE number; /* ConnectData */ per_read_choice(s, &choice); @@ -308,8 +308,8 @@ void gcc_write_conference_create_response(STREAM* s, STREAM* user_data) BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length) { - uint16 type; - uint16 blockLength; + UINT16 type; + UINT16 blockLength; int pos; while (length > 0) @@ -370,10 +370,10 @@ void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings) BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length) { - uint16 type; - uint16 offset = 0; - uint16 blockLength; - uint8* holdp; + UINT16 type; + UINT16 offset = 0; + UINT16 blockLength; + BYTE* holdp; while (offset < length) { @@ -429,10 +429,10 @@ void gcc_write_server_data_blocks(STREAM* s, rdpSettings* settings) gcc_write_server_security_data(s, settings); } -BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length) +BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length) { - stream_read_uint16(s, *type); /* type */ - stream_read_uint16(s, *length); /* length */ + stream_read_UINT16(s, *type); /* type */ + stream_read_UINT16(s, *length); /* length */ if (*length < 4) return FALSE; @@ -451,10 +451,10 @@ BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length) * @param length data block length */ -void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length) +void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length) { - stream_write_uint16(s, type); /* type */ - stream_write_uint16(s, length); /* length */ + stream_write_UINT16(s, type); /* type */ + stream_write_UINT16(s, length); /* length */ } /** @@ -464,16 +464,16 @@ void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length) * @param settings rdp settings */ -BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { char* str; uint32 version; uint32 color_depth; - uint16 colorDepth = 0; - uint16 postBeta2ColorDepth = 0; - uint16 highColorDepth = 0; - uint16 supportedColorDepths = 0; - uint16 earlyCapabilityFlags = 0; + UINT16 colorDepth = 0; + UINT16 postBeta2ColorDepth = 0; + UINT16 highColorDepth = 0; + UINT16 supportedColorDepths = 0; + UINT16 earlyCapabilityFlags = 0; uint32 serverSelectedProtocol = 0; /* Length of all required fields, until imeFileName */ @@ -483,10 +483,10 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen stream_read_uint32(s, version); /* version */ settings->rdp_version = (version == RDP_VERSION_4 ? 4 : 7); - stream_read_uint16(s, settings->width); /* desktopWidth */ - stream_read_uint16(s, settings->height); /* desktopHeight */ - stream_read_uint16(s, colorDepth); /* colorDepth */ - stream_seek_uint16(s); /* SASSequence (Secure Access Sequence) */ + stream_read_UINT16(s, settings->width); /* desktopWidth */ + stream_read_UINT16(s, settings->height); /* desktopHeight */ + stream_read_UINT16(s, colorDepth); /* colorDepth */ + stream_seek_UINT16(s); /* SASSequence (Secure Access Sequence) */ stream_read_uint32(s, settings->kbd_layout); /* keyboardLayout */ stream_read_uint32(s, settings->client_build); /* clientBuild */ @@ -516,12 +516,12 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen { if (blockLength < 2) break; - stream_read_uint16(s, postBeta2ColorDepth); /* postBeta2ColorDepth */ + stream_read_UINT16(s, postBeta2ColorDepth); /* postBeta2ColorDepth */ blockLength -= 2; if (blockLength < 2) break; - stream_seek_uint16(s); /* clientProductID */ + stream_seek_UINT16(s); /* clientProductID */ blockLength -= 2; if (blockLength < 4) @@ -531,17 +531,17 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen if (blockLength < 2) break; - stream_read_uint16(s, highColorDepth); /* highColorDepth */ + stream_read_UINT16(s, highColorDepth); /* highColorDepth */ blockLength -= 2; if (blockLength < 2) break; - stream_read_uint16(s, supportedColorDepths); /* supportedColorDepths */ + stream_read_UINT16(s, supportedColorDepths); /* supportedColorDepths */ blockLength -= 2; if (blockLength < 2) break; - stream_read_uint16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */ + stream_read_UINT16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */ blockLength -= 2; if (blockLength < 64) @@ -555,12 +555,12 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen if (blockLength < 1) break; - stream_read_uint8(s, settings->performance_flags); /* connectionType */ + stream_read_BYTE(s, settings->performance_flags); /* connectionType */ blockLength -= 1; if (blockLength < 1) break; - stream_seek_uint8(s); /* pad1octet */ + stream_seek_BYTE(s); /* pad1octet */ blockLength -= 1; if (blockLength < 4) @@ -634,10 +634,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) uint32 version; WCHAR* clientName; int clientNameLength; - uint8 connectionType; - uint16 highColorDepth; - uint16 supportedColorDepths; - uint16 earlyCapabilityFlags; + BYTE connectionType; + UINT16 highColorDepth; + UINT16 supportedColorDepths; + UINT16 earlyCapabilityFlags; WCHAR* clientDigProductId; int clientDigProductIdLength; @@ -649,10 +649,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->client_product_id, &clientDigProductId, 0); stream_write_uint32(s, version); /* version */ - stream_write_uint16(s, settings->width); /* desktopWidth */ - stream_write_uint16(s, settings->height); /* desktopHeight */ - stream_write_uint16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */ - stream_write_uint16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */ + stream_write_UINT16(s, settings->width); /* desktopWidth */ + stream_write_UINT16(s, settings->height); /* desktopHeight */ + stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */ + stream_write_UINT16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */ stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout */ stream_write_uint32(s, settings->client_build); /* clientBuild */ @@ -674,8 +674,8 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write_zero(s, 64); /* imeFileName */ - stream_write_uint16(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth */ - stream_write_uint16(s, 1); /* clientProductID */ + stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth */ + stream_write_UINT16(s, 1); /* clientProductID */ stream_write_uint32(s, 0); /* serialNumber (should be initialized to 0) */ highColorDepth = MIN(settings->color_depth, 24); @@ -700,10 +700,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) earlyCapabilityFlags |= RNS_UD_CS_WANT_32BPP_SESSION; } - stream_write_uint16(s, highColorDepth); /* highColorDepth */ - stream_write_uint16(s, supportedColorDepths); /* supportedColorDepths */ + stream_write_UINT16(s, highColorDepth); /* highColorDepth */ + stream_write_UINT16(s, supportedColorDepths); /* supportedColorDepths */ - stream_write_uint16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */ + stream_write_UINT16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */ /* clientDigProductId (64 bytes, null-terminated unicode, truncated to 30 characters) */ if (clientDigProductIdLength > 62) @@ -716,8 +716,8 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write_zero(s, 64 - clientDigProductIdLength - 2); free(clientDigProductId); - stream_write_uint8(s, connectionType); /* connectionType */ - stream_write_uint8(s, 0); /* pad1octet */ + stream_write_BYTE(s, connectionType); /* connectionType */ + stream_write_BYTE(s, 0); /* pad1octet */ stream_write_uint32(s, settings->selected_protocol); /* serverSelectedProtocol */ } @@ -753,7 +753,7 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { if (blockLength < 8) return FALSE; @@ -797,7 +797,7 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings) BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings) { - uint8* data; + BYTE* data; uint32 length; stream_read_uint32(s, settings->encryption_method); /* encryptionMethod */ @@ -848,7 +848,7 @@ BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings) return TRUE; } -static const uint8 initial_signature[] = +static const BYTE initial_signature[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -865,7 +865,7 @@ static const uint8 initial_signature[] = * Yes, Terminal Services Private Key is publicly available. */ -const uint8 tssk_modulus[] = +const BYTE tssk_modulus[] = { 0x3d, 0x3a, 0x5e, 0xbd, 0x72, 0x43, 0x3e, 0xc9, 0x4d, 0xbb, 0xc1, 0x1e, 0x4a, 0xba, 0x5f, 0xcb, @@ -877,7 +877,7 @@ const uint8 tssk_modulus[] = 0x20, 0x93, 0x09, 0x5f, 0x05, 0x6d, 0xea, 0x87 }; -const uint8 tssk_privateExponent[] = +const BYTE tssk_privateExponent[] = { 0x87, 0xa7, 0x19, 0x32, 0xda, 0x11, 0x87, 0x55, 0x58, 0x00, 0x16, 0x16, 0x25, 0x65, 0x68, 0xf8, @@ -889,7 +889,7 @@ const uint8 tssk_privateExponent[] = 0xc7, 0x10, 0x01, 0x13, 0xe7, 0x3f, 0xf3, 0x5f }; -const uint8 tssk_exponent[] = +const BYTE tssk_exponent[] = { 0x5b, 0x7b, 0x88, 0xc0 }; @@ -897,10 +897,10 @@ const uint8 tssk_exponent[] = void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) { CryptoMd5 md5; - uint8* sigData; + BYTE* sigData; int expLen, keyLen, sigDataLen; - uint8 encryptedSignature[TSSK_KEY_LENGTH]; - uint8 signature[sizeof(initial_signature)]; + BYTE encryptedSignature[TSSK_KEY_LENGTH]; + BYTE signature[sizeof(initial_signature)]; uint32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen; if (!settings->encryption) @@ -986,9 +986,9 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) stream_write_uint32(s, CERT_CHAIN_VERSION_1); /* dwVersion (4 bytes) */ stream_write_uint32(s, SIGNATURE_ALG_RSA); /* dwSigAlgId */ stream_write_uint32(s, KEY_EXCHANGE_ALG_RSA); /* dwKeyAlgId */ - stream_write_uint16(s, BB_RSA_KEY_BLOB); /* wPublicKeyBlobType */ + stream_write_UINT16(s, BB_RSA_KEY_BLOB); /* wPublicKeyBlobType */ - stream_write_uint16(s, wPublicKeyBlobLen); /* wPublicKeyBlobLen */ + stream_write_UINT16(s, wPublicKeyBlobLen); /* wPublicKeyBlobLen */ stream_write(s, "RSA1", 4); /* magic */ stream_write_uint32(s, keyLen + 8); /* keylen */ stream_write_uint32(s, keyLen * 8); /* bitlen */ @@ -1000,8 +1000,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) sigDataLen = stream_get_tail(s) - sigData; - stream_write_uint16(s, BB_RSA_SIGNATURE_BLOB); /* wSignatureBlobType */ - stream_write_uint16(s, keyLen + 8); /* wSignatureBlobLen */ + stream_write_UINT16(s, BB_RSA_SIGNATURE_BLOB); /* wSignatureBlobType */ + stream_write_UINT16(s, keyLen + 8); /* wSignatureBlobLen */ memcpy(signature, initial_signature, sizeof(initial_signature)); @@ -1023,7 +1023,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { int i; @@ -1058,7 +1058,7 @@ BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 block void gcc_write_client_network_data(STREAM* s, rdpSettings* settings) { int i; - uint16 length; + UINT16 length; if (settings->num_channels > 0) { @@ -1080,12 +1080,12 @@ void gcc_write_client_network_data(STREAM* s, rdpSettings* settings) BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings) { int i; - uint16 MCSChannelId; - uint16 channelCount; - uint16 channelId; + UINT16 MCSChannelId; + UINT16 channelCount; + UINT16 channelId; - stream_read_uint16(s, MCSChannelId); /* MCSChannelId */ - stream_read_uint16(s, channelCount); /* channelCount */ + stream_read_UINT16(s, MCSChannelId); /* MCSChannelId */ + stream_read_UINT16(s, channelCount); /* channelCount */ if (channelCount != settings->num_channels) { @@ -1095,7 +1095,7 @@ BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings) for (i = 0; i < channelCount; i++) { - stream_read_uint16(s, channelId); /* channelId */ + stream_read_UINT16(s, channelId); /* channelId */ settings->channels[i].channel_id = channelId; } @@ -1111,16 +1111,16 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings) gcc_write_user_data_header(s, SC_NET, 8 + settings->num_channels * 2 + (settings->num_channels % 2 == 1 ? 2 : 0)); - stream_write_uint16(s, MCS_GLOBAL_CHANNEL_ID); /* MCSChannelId */ - stream_write_uint16(s, settings->num_channels); /* channelCount */ + stream_write_UINT16(s, MCS_GLOBAL_CHANNEL_ID); /* MCSChannelId */ + stream_write_UINT16(s, settings->num_channels); /* channelCount */ for (i = 0; i < settings->num_channels; i++) { - stream_write_uint16(s, settings->channels[i].channel_id); + stream_write_UINT16(s, settings->channels[i].channel_id); } if (settings->num_channels % 2 == 1) - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); } /** @@ -1130,7 +1130,7 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { uint32 flags; @@ -1174,7 +1174,7 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings) * @param settings rdp settings */ -BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 blockLength) +BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { printf("CS_MONITOR\n"); return TRUE; @@ -1190,7 +1190,7 @@ BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 block void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings) { int i; - uint16 length; + UINT16 length; uint32 left, top, right, bottom, flags; if (settings->num_monitors > 1) diff --git a/libfreerdp/core/gcc.h b/libfreerdp/core/gcc.h index 1726c9b53..7117992af 100644 --- a/libfreerdp/core/gcc.h +++ b/libfreerdp/core/gcc.h @@ -89,23 +89,23 @@ BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length); void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings); BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length); void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings); -BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length); -void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length); -BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length); +void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length); +BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, UINT16 blockLength); void gcc_write_client_core_data(STREAM* s, rdpSettings *settings); BOOL gcc_read_server_core_data(STREAM* s, rdpSettings *settings); void gcc_write_server_core_data(STREAM* s, rdpSettings *settings); -BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, UINT16 blockLength); void gcc_write_client_security_data(STREAM* s, rdpSettings *settings); BOOL gcc_read_server_security_data(STREAM* s, rdpSettings *settings); void gcc_write_server_security_data(STREAM* s, rdpSettings *settings); -BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, UINT16 blockLength); void gcc_write_client_network_data(STREAM* s, rdpSettings *settings); BOOL gcc_read_server_network_data(STREAM* s, rdpSettings *settings); void gcc_write_server_network_data(STREAM* s, rdpSettings *settings); -BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, UINT16 blockLength); void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings); -BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength); +BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, UINT16 blockLength); void gcc_write_client_monitor_data(STREAM* s, rdpSettings *settings); #endif /* __GCC_H */ diff --git a/libfreerdp/core/graphics.c b/libfreerdp/core/graphics.c index fce81082d..05bf2e58f 100644 --- a/libfreerdp/core/graphics.c +++ b/libfreerdp/core/graphics.c @@ -62,7 +62,7 @@ void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap) } } -void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, uint16 left, uint16 top, uint16 right, uint16 bottom) +void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, UINT16 left, UINT16 top, UINT16 right, UINT16 bottom) { bitmap->left = left; bitmap->top = top; @@ -70,7 +70,7 @@ void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, uint16 left, ui bitmap->bottom = bottom; } -void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, uint16 height) +void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, UINT16 width, UINT16 height) { bitmap->width = width; bitmap->height = height; diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index 2534414b8..da25709ef 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -409,11 +409,11 @@ void http_response_print(HttpResponse* http_response) HttpResponse* http_response_recv(rdpTls* tls) { - uint8* p; + BYTE* p; int nbytes; int length; int status; - uint8* buffer; + BYTE* buffer; char* content; char* header_end; HttpResponse* http_response; @@ -432,7 +432,7 @@ HttpResponse* http_response_recv(rdpTls* tls) if (status > 0) { nbytes += status; - p = (uint8*) &buffer[nbytes]; + p = (BYTE*) &buffer[nbytes]; } else if (status == 0) { @@ -492,7 +492,7 @@ HttpResponse* http_response_recv(rdpTls* tls) { length *= 2; buffer = realloc(buffer, length); - p = (uint8*) &buffer[nbytes]; + p = (BYTE*) &buffer[nbytes]; } } diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index 445678f11..cf43e181e 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -110,13 +110,13 @@ void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) { - uint16 clientAddressFamily; - uint16 cbClientAddress; - uint16 cbClientDir; - uint16 cbAutoReconnectLen; + UINT16 clientAddressFamily; + UINT16 cbClientAddress; + UINT16 cbClientDir; + UINT16 cbAutoReconnectLen; - stream_read_uint16(s, clientAddressFamily); /* clientAddressFamily */ - stream_read_uint16(s, cbClientAddress); /* cbClientAddress */ + stream_read_UINT16(s, clientAddressFamily); /* clientAddressFamily */ + stream_read_UINT16(s, cbClientAddress); /* cbClientAddress */ settings->ipv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE); @@ -126,7 +126,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ip_address, cbClientAddress / 2); stream_seek(s, cbClientAddress); - stream_read_uint16(s, cbClientDir); /* cbClientDir */ + stream_read_UINT16(s, cbClientDir); /* cbClientDir */ if (stream_get_left(s) < cbClientDir) return FALSE; @@ -143,7 +143,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) stream_seek_uint32(s); /* clientSessionId, should be set to 0 */ stream_read_uint32(s, settings->performance_flags); /* performanceFlags */ - stream_read_uint16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ + stream_read_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ if (cbAutoReconnectLen > 0) return rdp_read_client_auto_reconnect_cookie(s, settings); /* autoReconnectCookie */ @@ -178,26 +178,26 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) cbAutoReconnectLen = (int) settings->client_auto_reconnect_cookie->cbLen; - stream_write_uint16(s, clientAddressFamily); /* clientAddressFamily */ + stream_write_UINT16(s, clientAddressFamily); /* clientAddressFamily */ - stream_write_uint16(s, cbClientAddress + 2); /* cbClientAddress */ + stream_write_UINT16(s, cbClientAddress + 2); /* cbClientAddress */ if (cbClientAddress > 0) stream_write(s, clientAddress, cbClientAddress); /* clientAddress */ - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); - stream_write_uint16(s, cbClientDir + 2); /* cbClientDir */ + stream_write_UINT16(s, cbClientDir + 2); /* cbClientDir */ if (cbClientDir > 0) stream_write(s, clientDir, cbClientDir); /* clientDir */ - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); rdp_write_client_time_zone(s, settings); /* clientTimeZone */ stream_write_uint32(s, 0); /* clientSessionId, should be set to 0 */ stream_write_uint32(s, settings->performance_flags); /* performanceFlags */ - stream_write_uint16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ + stream_write_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ if (cbAutoReconnectLen > 0) rdp_write_client_auto_reconnect_cookie(s, settings); /* autoReconnectCookie */ @@ -219,11 +219,11 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings) { uint32 flags; - uint16 cbDomain; - uint16 cbUserName; - uint16 cbPassword; - uint16 cbAlternateShell; - uint16 cbWorkingDir; + UINT16 cbDomain; + UINT16 cbUserName; + UINT16 cbPassword; + UINT16 cbAlternateShell; + UINT16 cbWorkingDir; stream_seek_uint32(s); /* CodePage */ stream_read_uint32(s, flags); /* flags */ @@ -233,11 +233,11 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings) settings->console_audio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE); settings->compression = ((flags & INFO_COMPRESSION) ? TRUE : FALSE); - stream_read_uint16(s, cbDomain); /* cbDomain */ - stream_read_uint16(s, cbUserName); /* cbUserName */ - stream_read_uint16(s, cbPassword); /* cbPassword */ - stream_read_uint16(s, cbAlternateShell); /* cbAlternateShell */ - stream_read_uint16(s, cbWorkingDir); /* cbWorkingDir */ + stream_read_UINT16(s, cbDomain); /* cbDomain */ + stream_read_UINT16(s, cbUserName); /* cbUserName */ + stream_read_UINT16(s, cbPassword); /* cbPassword */ + stream_read_UINT16(s, cbAlternateShell); /* cbAlternateShell */ + stream_read_UINT16(s, cbWorkingDir); /* cbWorkingDir */ if (stream_get_left(s) < cbDomain + 2) return FALSE; @@ -373,31 +373,31 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) stream_write_uint32(s, 0); /* CodePage */ stream_write_uint32(s, flags); /* flags */ - stream_write_uint16(s, cbDomain); /* cbDomain */ - stream_write_uint16(s, cbUserName); /* cbUserName */ - stream_write_uint16(s, cbPassword); /* cbPassword */ - stream_write_uint16(s, cbAlternateShell); /* cbAlternateShell */ - stream_write_uint16(s, cbWorkingDir); /* cbWorkingDir */ + stream_write_UINT16(s, cbDomain); /* cbDomain */ + stream_write_UINT16(s, cbUserName); /* cbUserName */ + stream_write_UINT16(s, cbPassword); /* cbPassword */ + stream_write_UINT16(s, cbAlternateShell); /* cbAlternateShell */ + stream_write_UINT16(s, cbWorkingDir); /* cbWorkingDir */ if (cbDomain > 0) stream_write(s, domain, cbDomain); - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); if (cbUserName > 0) stream_write(s, userName, cbUserName); - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); if (cbPassword > 0) stream_write(s, password, cbPassword); - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); if (cbAlternateShell > 0) stream_write(s, alternateShell, cbAlternateShell); - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); if (cbWorkingDir > 0) stream_write(s, workingDir, cbWorkingDir); - stream_write_uint16(s, 0); + stream_write_UINT16(s, 0); free(domain); free(userName); @@ -420,9 +420,9 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s) { - uint16 length; - uint16 channelId; - uint16 securityFlags; + UINT16 length; + UINT16 channelId; + UINT16 securityFlags; if (!rdp_read_header(rdp, s, &length, &channelId)) return FALSE; @@ -485,7 +485,7 @@ void rdp_recv_logon_info_v2(rdpRdp* rdp, STREAM* s) uint32 cbDomain; uint32 cbUserName; - stream_seek_uint16(s); /* version (2 bytes) */ + stream_seek_UINT16(s); /* version (2 bytes) */ stream_seek_uint32(s); /* size (4 bytes) */ stream_seek_uint32(s); /* sessionId (4 bytes) */ stream_read_uint32(s, cbDomain); /* cbDomain (4 bytes) */ @@ -513,9 +513,9 @@ void rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s) { uint32 cbFieldData; uint32 fieldsPresent; - uint16 Length; + UINT16 Length; - stream_read_uint16(s, Length); /* The total size in bytes of this structure */ + stream_read_UINT16(s, Length); /* The total size in bytes of this structure */ stream_read_uint32(s, fieldsPresent); /* fieldsPresent (4 bytes) */ /* logonFields */ diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 683840094..61f77662b 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -25,19 +25,19 @@ #include "input.h" -void rdp_write_client_input_pdu_header(STREAM* s, uint16 number) +void rdp_write_client_input_pdu_header(STREAM* s, UINT16 number) { - stream_write_uint16(s, 1); /* numberEvents (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, 1); /* numberEvents (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ } -void rdp_write_input_event_header(STREAM* s, uint32 time, uint16 type) +void rdp_write_input_event_header(STREAM* s, uint32 time, UINT16 type) { stream_write_uint32(s, time); /* eventTime (4 bytes) */ - stream_write_uint16(s, type); /* messageType (2 bytes) */ + stream_write_UINT16(s, type); /* messageType (2 bytes) */ } -STREAM* rdp_client_input_pdu_init(rdpRdp* rdp, uint16 type) +STREAM* rdp_client_input_pdu_init(rdpRdp* rdp, UINT16 type) { STREAM* s; s = rdp_data_pdu_init(rdp); @@ -53,7 +53,7 @@ void rdp_send_client_input_pdu(rdpRdp* rdp, STREAM* s) void input_write_synchronize_event(STREAM* s, uint32 flags) { - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ stream_write_uint32(s, flags); /* toggleFlags (4 bytes) */ } @@ -67,14 +67,14 @@ void input_send_synchronize_event(rdpInput* input, uint32 flags) rdp_send_client_input_pdu(rdp, s); } -void input_write_keyboard_event(STREAM* s, uint16 flags, uint16 code) +void input_write_keyboard_event(STREAM* s, UINT16 flags, UINT16 code) { - stream_write_uint16(s, flags); /* keyboardFlags (2 bytes) */ - stream_write_uint16(s, code); /* keyCode (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */ + stream_write_UINT16(s, code); /* keyCode (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ } -void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -84,17 +84,17 @@ void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code) rdp_send_client_input_pdu(rdp, s); } -void input_write_unicode_keyboard_event(STREAM* s, uint16 flags, uint16 code) +void input_write_unicode_keyboard_event(STREAM* s, UINT16 flags, UINT16 code) { - stream_write_uint16(s, flags); /* keyboardFlags (2 bytes) */ - stream_write_uint16(s, code); /* unicodeCode (2 bytes) */ - stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */ + stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */ + stream_write_UINT16(s, code); /* unicodeCode (2 bytes) */ + stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ } -void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { STREAM* s; - uint16 keyboardFlags = 0; + UINT16 keyboardFlags = 0; rdpRdp* rdp = input->context->rdp; /* @@ -113,14 +113,14 @@ void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 cod rdp_send_client_input_pdu(rdp, s); } -void input_write_mouse_event(STREAM* s, uint16 flags, uint16 x, uint16 y) +void input_write_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y) { - stream_write_uint16(s, flags); /* pointerFlags (2 bytes) */ - stream_write_uint16(s, x); /* xPos (2 bytes) */ - stream_write_uint16(s, y); /* yPos (2 bytes) */ + stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */ + stream_write_UINT16(s, x); /* xPos (2 bytes) */ + stream_write_UINT16(s, y); /* yPos (2 bytes) */ } -void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -130,14 +130,14 @@ void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) rdp_send_client_input_pdu(rdp, s); } -void input_write_extended_mouse_event(STREAM* s, uint16 flags, uint16 x, uint16 y) +void input_write_extended_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y) { - stream_write_uint16(s, flags); /* pointerFlags (2 bytes) */ - stream_write_uint16(s, x); /* xPos (2 bytes) */ - stream_write_uint16(s, y); /* yPos (2 bytes) */ + stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */ + stream_write_UINT16(s, x); /* xPos (2 bytes) */ + stream_write_UINT16(s, y); /* yPos (2 bytes) */ } -void input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -153,36 +153,36 @@ void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags) rdpRdp* rdp = input->context->rdp; /* The FastPath Synchronization eventFlags has identical values as SlowPath */ - s = fastpath_input_pdu_init(rdp->fastpath, (uint8) flags, FASTPATH_INPUT_EVENT_SYNC); + s = fastpath_input_pdu_init(rdp->fastpath, (BYTE) flags, FASTPATH_INPUT_EVENT_SYNC); fastpath_send_input_pdu(rdp->fastpath, s); } -void input_send_fastpath_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { STREAM* s; - uint8 eventFlags = 0; + BYTE eventFlags = 0; rdpRdp* rdp = input->context->rdp; eventFlags |= (flags & KBD_FLAGS_RELEASE) ? FASTPATH_INPUT_KBDFLAGS_RELEASE : 0; eventFlags |= (flags & KBD_FLAGS_EXTENDED) ? FASTPATH_INPUT_KBDFLAGS_EXTENDED : 0; s = fastpath_input_pdu_init(rdp->fastpath, eventFlags, FASTPATH_INPUT_EVENT_SCANCODE); - stream_write_uint8(s, code); /* keyCode (1 byte) */ + stream_write_BYTE(s, code); /* keyCode (1 byte) */ fastpath_send_input_pdu(rdp->fastpath, s); } -void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { STREAM* s; - uint8 eventFlags = 0; + BYTE eventFlags = 0; rdpRdp* rdp = input->context->rdp; eventFlags |= (flags & KBD_FLAGS_RELEASE) ? FASTPATH_INPUT_KBDFLAGS_RELEASE : 0; s = fastpath_input_pdu_init(rdp->fastpath, eventFlags, FASTPATH_INPUT_EVENT_UNICODE); - stream_write_uint16(s, code); /* unicodeCode (2 bytes) */ + stream_write_UINT16(s, code); /* unicodeCode (2 bytes) */ fastpath_send_input_pdu(rdp->fastpath, s); } -void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -192,7 +192,7 @@ void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, ui fastpath_send_input_pdu(rdp->fastpath, s); } -void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -219,13 +219,13 @@ static BOOL input_recv_sync_event(rdpInput* input, STREAM* s) static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s) { - uint16 keyboardFlags, keyCode; + UINT16 keyboardFlags, keyCode; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ - stream_read_uint16(s, keyCode); /* keyCode (2 bytes) */ + stream_read_UINT16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ + stream_read_UINT16(s, keyCode); /* keyCode (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ IFCALL(input->KeyboardEvent, input, keyboardFlags, keyCode); @@ -235,13 +235,13 @@ static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s) static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) { - uint16 keyboardFlags, unicodeCode; + UINT16 keyboardFlags, unicodeCode; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ - stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */ + stream_read_UINT16(s, keyboardFlags); /* keyboardFlags (2 bytes) */ + stream_read_UINT16(s, unicodeCode); /* unicodeCode (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ /* @@ -264,14 +264,14 @@ static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s) static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s) { - uint16 pointerFlags, xPos, yPos; + UINT16 pointerFlags, xPos, yPos; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */ - stream_read_uint16(s, xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */ + stream_read_UINT16(s, xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, yPos); /* yPos (2 bytes) */ IFCALL(input->MouseEvent, input, pointerFlags, xPos, yPos); @@ -280,14 +280,14 @@ static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s) static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s) { - uint16 pointerFlags, xPos, yPos; + UINT16 pointerFlags, xPos, yPos; if (stream_get_left(s) < 6) return FALSE; - stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */ - stream_read_uint16(s, xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */ + stream_read_UINT16(s, xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, yPos); /* yPos (2 bytes) */ IFCALL(input->ExtendedMouseEvent, input, pointerFlags, xPos, yPos); @@ -296,13 +296,13 @@ static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s) static BOOL input_recv_event(rdpInput* input, STREAM* s) { - uint16 messageType; + UINT16 messageType; if (stream_get_left(s) < 4) return FALSE; stream_seek(s, 4); /* eventTime (4 bytes), ignored by the server */ - stream_read_uint16(s, messageType); /* messageType (2 bytes) */ + stream_read_UINT16(s, messageType); /* messageType (2 bytes) */ switch (messageType) { @@ -343,12 +343,12 @@ static BOOL input_recv_event(rdpInput* input, STREAM* s) BOOL input_recv(rdpInput* input, STREAM* s) { - uint16 i, numberEvents; + UINT16 i, numberEvents; if (stream_get_left(s) < 4) return FALSE; - stream_read_uint16(s, numberEvents); /* numberEvents (2 bytes) */ + stream_read_UINT16(s, numberEvents); /* numberEvents (2 bytes) */ stream_seek(s, 2); /* pad2Octets (2 bytes) */ /* Each input event uses 6 exactly bytes. */ @@ -391,7 +391,7 @@ void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags) IFCALL(input->SynchronizeEvent, input, flags); } -void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { IFCALL(input->KeyboardEvent, input, flags, code); } @@ -404,17 +404,17 @@ void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp RDP_SCANCODE_CODE(rdp_scancode)); } -void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { IFCALL(input->UnicodeKeyboardEvent, input, flags, code); } -void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { IFCALL(input->MouseEvent, input, flags, x, y); } -void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { IFCALL(input->ExtendedMouseEvent, input, flags, x, y); } diff --git a/libfreerdp/core/input.h b/libfreerdp/core/input.h index 791969560..804eb3f16 100644 --- a/libfreerdp/core/input.h +++ b/libfreerdp/core/input.h @@ -38,16 +38,16 @@ #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4 void input_send_synchronize_event(rdpInput* input, uint32 flags); -void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -void input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); +void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags); -void input_send_fastpath_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); +void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); BOOL input_recv(rdpInput* input, STREAM* s); diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 8e3781d47..3b0d3fbbe 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -81,12 +81,12 @@ static const char* const state_transitions[] = * @param wMsgSize message size */ -void license_read_preamble(STREAM* s, uint8* bMsgType, uint8* flags, uint16* wMsgSize) +void license_read_preamble(STREAM* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize) { /* preamble (4 bytes) */ - stream_read_uint8(s, *bMsgType); /* bMsgType (1 byte) */ - stream_read_uint8(s, *flags); /* flags (1 byte) */ - stream_read_uint16(s, *wMsgSize); /* wMsgSize (2 bytes) */ + stream_read_BYTE(s, *bMsgType); /* bMsgType (1 byte) */ + stream_read_BYTE(s, *flags); /* flags (1 byte) */ + stream_read_UINT16(s, *wMsgSize); /* wMsgSize (2 bytes) */ } /** @@ -98,12 +98,12 @@ void license_read_preamble(STREAM* s, uint8* bMsgType, uint8* flags, uint16* wMs * @param wMsgSize message size */ -void license_write_preamble(STREAM* s, uint8 bMsgType, uint8 flags, uint16 wMsgSize) +void license_write_preamble(STREAM* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize) { /* preamble (4 bytes) */ - stream_write_uint8(s, bMsgType); /* bMsgType (1 byte) */ - stream_write_uint8(s, flags); /* flags (1 byte) */ - stream_write_uint16(s, wMsgSize); /* wMsgSize (2 bytes) */ + stream_write_BYTE(s, bMsgType); /* bMsgType (1 byte) */ + stream_write_BYTE(s, flags); /* flags (1 byte) */ + stream_write_UINT16(s, wMsgSize); /* wMsgSize (2 bytes) */ } /** @@ -127,12 +127,12 @@ STREAM* license_send_stream_init(rdpLicense* license) * @param s stream */ -BOOL license_send(rdpLicense* license, STREAM* s, uint8 type) +BOOL license_send(rdpLicense* license, STREAM* s, BYTE type) { int length; - uint8 flags; - uint16 wMsgSize; - uint16 sec_flags; + BYTE flags; + UINT16 wMsgSize; + UINT16 sec_flags; DEBUG_LICENSE("Sending %s Packet", LICENSE_MESSAGE_STRINGS[type & 0x1F]); @@ -172,12 +172,12 @@ BOOL license_send(rdpLicense* license, STREAM* s, uint8 type) BOOL license_recv(rdpLicense* license, STREAM* s) { - uint16 length; - uint16 channelId; - uint16 sec_flags; - uint8 flags; - uint8 bMsgType; - uint16 wMsgSize; + UINT16 length; + UINT16 channelId; + UINT16 sec_flags; + BYTE flags; + BYTE bMsgType; + UINT16 wMsgSize; if (!rdp_read_header(license->rdp, s, &length, &channelId)) { @@ -295,7 +295,7 @@ void license_generate_keys(rdpLicense* license) void license_generate_hwid(rdpLicense* license) { CryptoMd5 md5; - uint8* mac_address; + BYTE* mac_address; memset(license->hwid, 0, HWID_LENGTH); mac_address = license->rdp->transport->tcp->mac_address; @@ -307,11 +307,11 @@ void license_generate_hwid(rdpLicense* license) void license_encrypt_premaster_secret(rdpLicense* license) { - uint8* encrypted_premaster_secret; + BYTE* encrypted_premaster_secret; #if 0 int key_length; - uint8* modulus; - uint8* exponent; + BYTE* modulus; + BYTE* exponent; rdpCertificate *certificate; if (license->server_certificate->length) @@ -331,7 +331,7 @@ void license_encrypt_premaster_secret(rdpLicense* license) freerdp_hexdump(exponent, 4); #endif - encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE); + encrypted_premaster_secret = (BYTE*) malloc(MODULUS_MAX_SIZE); memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE); crypto_rsa_public_encrypt(license->premaster_secret, PREMASTER_SECRET_LENGTH, @@ -341,7 +341,7 @@ void license_encrypt_premaster_secret(rdpLicense* license) license->encrypted_premaster_secret->length = PREMASTER_SECRET_LENGTH; license->encrypted_premaster_secret->data = encrypted_premaster_secret; #else - encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE); + encrypted_premaster_secret = (BYTE*) malloc(MODULUS_MAX_SIZE); memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE); license->encrypted_premaster_secret->type = BB_RANDOM_BLOB; @@ -355,7 +355,7 @@ void license_decrypt_platform_challenge(rdpLicense* license) CryptoRc4 rc4; license->platform_challenge->data = - (uint8*) malloc(license->encrypted_platform_challenge->length); + (BYTE*) malloc(license->encrypted_platform_challenge->length); license->platform_challenge->length = license->encrypted_platform_challenge->length; @@ -390,12 +390,12 @@ void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo) stream_read_uint32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */ - productInfo->pbCompanyName = (uint8*) malloc(productInfo->cbCompanyName); + productInfo->pbCompanyName = (BYTE*) malloc(productInfo->cbCompanyName); stream_read(s, productInfo->pbCompanyName, productInfo->cbCompanyName); stream_read_uint32(s, productInfo->cbProductId); /* cbProductId (4 bytes) */ - productInfo->pbProductId = (uint8*) malloc(productInfo->cbProductId); + productInfo->pbProductId = (BYTE*) malloc(productInfo->cbProductId); stream_read(s, productInfo->pbProductId, productInfo->cbProductId); } @@ -446,10 +446,10 @@ void license_free_product_info(PRODUCT_INFO* productInfo) void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob) { - uint16 wBlobType; + UINT16 wBlobType; - stream_read_uint16(s, wBlobType); /* wBlobType (2 bytes) */ - stream_read_uint16(s, blob->length); /* wBlobLen (2 bytes) */ + stream_read_UINT16(s, wBlobType); /* wBlobType (2 bytes) */ + stream_read_UINT16(s, blob->length); /* wBlobLen (2 bytes) */ /* * Server can choose to not send data by setting len to 0. @@ -464,7 +464,7 @@ void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob) } blob->type = wBlobType; - blob->data = (uint8*) malloc(blob->length); + blob->data = (BYTE*) malloc(blob->length); stream_read(s, blob->data, blob->length); /* blobData */ } @@ -478,8 +478,8 @@ void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob) void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob) { - stream_write_uint16(s, blob->type); /* wBlobType (2 bytes) */ - stream_write_uint16(s, blob->length); /* wBlobLen (2 bytes) */ + stream_write_UINT16(s, blob->type); /* wBlobType (2 bytes) */ + stream_write_UINT16(s, blob->length); /* wBlobLen (2 bytes) */ if (blob->length > 0) stream_write(s, blob->data, blob->length); /* blobData */ @@ -487,11 +487,11 @@ void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob) void license_write_padded_binary_blob(STREAM* s, LICENSE_BLOB* blob) { - uint16 pad_len; + UINT16 pad_len; pad_len = 72 % blob->length; - stream_write_uint16(s, blob->type); /* wBlobType (2 bytes) */ - stream_write_uint16(s, blob->length + pad_len); /* wBlobLen (2 bytes) */ + stream_write_UINT16(s, blob->type); /* wBlobType (2 bytes) */ + stream_write_UINT16(s, blob->length + pad_len); /* wBlobLen (2 bytes) */ if (blob->length > 0) stream_write(s, blob->data, blob->length); /* blobData */ @@ -505,7 +505,7 @@ void license_write_padded_binary_blob(STREAM* s, LICENSE_BLOB* blob) * @return new license binary blob */ -LICENSE_BLOB* license_new_binary_blob(uint16 type) +LICENSE_BLOB* license_new_binary_blob(UINT16 type) { LICENSE_BLOB* blob; @@ -740,9 +740,9 @@ void license_read_error_alert_packet(rdpLicense* license, STREAM* s) void license_write_platform_id(rdpLicense* license, STREAM* s) { - stream_write_uint8(s, 0); /* Client Operating System Version */ - stream_write_uint8(s, 0); /* Independent Software Vendor (ISV) */ - stream_write_uint16(s, 0); /* Client Software Build */ + stream_write_BYTE(s, 0); /* Client Operating System Version */ + stream_write_BYTE(s, 0); /* Independent Software Vendor (ISV) */ + stream_write_UINT16(s, 0); /* Client Software Build */ } /** @@ -780,10 +780,10 @@ void license_send_new_license_request_packet(rdpLicense* license) else username = "username"; - license->client_user_name->data = (uint8*) username; + license->client_user_name->data = (BYTE*) username; license->client_user_name->length = strlen(username) + 1; - license->client_machine_name->data = (uint8*) license->rdp->settings->client_hostname; + license->client_machine_name->data = (BYTE*) license->rdp->settings->client_hostname; license->client_machine_name->length = strlen(license->rdp->settings->client_hostname) + 1; license_write_new_license_request_packet(license, s); @@ -805,7 +805,7 @@ void license_send_new_license_request_packet(rdpLicense* license) * @param mac_data signature */ -void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data) +void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* mac_data) { /* EncryptedPlatformChallengeResponse */ license_write_binary_blob(s, license->encrypted_platform_challenge); @@ -827,22 +827,22 @@ void license_send_platform_challenge_response_packet(rdpLicense* license) { STREAM* s; int length; - uint8* buffer; + BYTE* buffer; CryptoRc4 rc4; - uint8 mac_data[16]; + BYTE mac_data[16]; s = license_send_stream_init(license); DEBUG_LICENSE("Sending Platform Challenge Response Packet"); license->encrypted_platform_challenge->type = BB_DATA_BLOB; length = license->platform_challenge->length + HWID_LENGTH; - buffer = (uint8*) malloc(length); + buffer = (BYTE*) malloc(length); memcpy(buffer, license->platform_challenge->data, license->platform_challenge->length); memcpy(&buffer[license->platform_challenge->length], license->hwid, HWID_LENGTH); security_mac_data(license->mac_salt_key, buffer, length, mac_data); free(buffer); - buffer = (uint8*) malloc(HWID_LENGTH); + buffer = (BYTE*) malloc(HWID_LENGTH); rc4 = crypto_rc4_init(license->licensing_encryption_key, LICENSING_ENCRYPTION_KEY_LENGTH); crypto_rc4(rc4, HWID_LENGTH, license->hwid, buffer); crypto_rc4_free(rc4); diff --git a/libfreerdp/core/license.h b/libfreerdp/core/license.h index f90412ffc..4eb1bf863 100644 --- a/libfreerdp/core/license.h +++ b/libfreerdp/core/license.h @@ -102,16 +102,16 @@ typedef struct { uint32 dwVersion; uint32 cbCompanyName; - uint8* pbCompanyName; + BYTE* pbCompanyName; uint32 cbProductId; - uint8* pbProductId; + BYTE* pbProductId; } PRODUCT_INFO; typedef struct { - uint16 type; - uint16 length; - uint8* data; + UINT16 type; + UINT16 length; + BYTE* data; } LICENSE_BLOB; typedef struct @@ -133,16 +133,16 @@ struct rdp_license LICENSE_STATE state; struct rdp_rdp* rdp; struct rdp_certificate* certificate; - uint8 hwid[HWID_LENGTH]; - uint8 modulus[MODULUS_MAX_SIZE]; - uint8 exponent[EXPONENT_MAX_SIZE]; - uint8 client_random[CLIENT_RANDOM_LENGTH]; - uint8 server_random[SERVER_RANDOM_LENGTH]; - uint8 master_secret[MASTER_SECRET_LENGTH]; - uint8 premaster_secret[PREMASTER_SECRET_LENGTH]; - uint8 session_key_blob[SESSION_KEY_BLOB_LENGTH]; - uint8 mac_salt_key[MAC_SALT_KEY_LENGTH]; - uint8 licensing_encryption_key[LICENSING_ENCRYPTION_KEY_LENGTH]; + BYTE hwid[HWID_LENGTH]; + BYTE modulus[MODULUS_MAX_SIZE]; + BYTE exponent[EXPONENT_MAX_SIZE]; + BYTE client_random[CLIENT_RANDOM_LENGTH]; + BYTE server_random[SERVER_RANDOM_LENGTH]; + BYTE master_secret[MASTER_SECRET_LENGTH]; + BYTE premaster_secret[PREMASTER_SECRET_LENGTH]; + BYTE session_key_blob[SESSION_KEY_BLOB_LENGTH]; + BYTE mac_salt_key[MAC_SALT_KEY_LENGTH]; + BYTE licensing_encryption_key[LICENSING_ENCRYPTION_KEY_LENGTH]; PRODUCT_INFO* product_info; LICENSE_BLOB* error_info; LICENSE_BLOB* key_exchange_list; @@ -157,7 +157,7 @@ struct rdp_license }; BOOL license_recv(rdpLicense* license, STREAM* s); -BOOL license_send(rdpLicense* license, STREAM* s, uint8 type); +BOOL license_send(rdpLicense* license, STREAM* s, BYTE type); STREAM* license_send_stream_init(rdpLicense* license); void license_generate_randoms(rdpLicense* license); @@ -170,7 +170,7 @@ PRODUCT_INFO* license_new_product_info(); void license_free_product_info(PRODUCT_INFO* productInfo); void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo); -LICENSE_BLOB* license_new_binary_blob(uint16 type); +LICENSE_BLOB* license_new_binary_blob(UINT16 type); void license_free_binary_blob(LICENSE_BLOB* blob); void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob); void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob); @@ -188,7 +188,7 @@ void license_read_error_alert_packet(rdpLicense* license, STREAM* s); void license_write_new_license_request_packet(rdpLicense* license, STREAM* s); void license_send_new_license_request_packet(rdpLicense* license); -void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data); +void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* mac_data); void license_send_platform_challenge_response_packet(rdpLicense* license); BOOL license_send_valid_client_error_packet(rdpLicense* license); diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index ba268a6d7..a124a369b 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -73,7 +73,7 @@ static const char *inet_ntop(int af, const void* src, char* dst, socklen_t cnt) #endif #endif -static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, uint16 port) +static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, UINT16 port) { rdpListener* listener = (rdpListener*) instance->listener; int status; diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index ee95a03f1..bdeb6f4df 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -156,8 +156,8 @@ * */ -static const uint8 callingDomainSelector[1] = "\x01"; -static const uint8 calledDomainSelector[1] = "\x01"; +static const BYTE callingDomainSelector[1] = "\x01"; +static const BYTE calledDomainSelector[1] = "\x01"; /* static const char* const mcs_result_enumerated[] = @@ -189,9 +189,9 @@ static const char* const mcs_result_enumerated[] = * @return */ -BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length) +BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length) { - uint8 choice; + BYTE choice; enum DomainMCSPDU MCSPDU; *length = tpkt_read_header(s); @@ -216,7 +216,7 @@ BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, u * @param length TPKT length */ -void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, uint16 length, uint8 options) +void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options) { tpkt_write_header(s, length); tpdu_write_data(s); @@ -446,7 +446,7 @@ BOOL mcs_send_connect_initial(rdpMcs* mcs) { STREAM* s; int length; - uint8 *bm, *em; + BYTE *bm, *em; STREAM* gcc_CCrq; STREAM* client_data; int status; @@ -488,7 +488,7 @@ BOOL mcs_send_connect_initial(rdpMcs* mcs) BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s) { int length; - uint8 result; + BYTE result; uint32 calledConnectId; tpkt_read_header(s); @@ -524,7 +524,7 @@ BOOL mcs_send_connect_response(rdpMcs* mcs) { STREAM* s; int length; - uint8 *bm, *em; + BYTE *bm, *em; STREAM* gcc_CCrsp; STREAM* server_data; @@ -565,7 +565,7 @@ BOOL mcs_send_connect_response(rdpMcs* mcs) BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s) { - uint16 length; + UINT16 length; enum DomainMCSPDU MCSPDU; MCSPDU = DomainMCSPDU_ErectDomainRequest; @@ -584,7 +584,7 @@ BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s) BOOL mcs_send_erect_domain_request(rdpMcs* mcs) { STREAM* s; - uint16 length = 12; + UINT16 length = 12; s = transport_send_stream_init(mcs->transport, length); mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ErectDomainRequest, length, 0); @@ -607,7 +607,7 @@ BOOL mcs_send_erect_domain_request(rdpMcs* mcs) BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s) { - uint16 length; + UINT16 length; enum DomainMCSPDU MCSPDU; MCSPDU = DomainMCSPDU_AttachUserRequest; @@ -626,7 +626,7 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s) BOOL mcs_send_attach_user_request(rdpMcs* mcs) { STREAM* s; - uint16 length = 8; + UINT16 length = 8; s = transport_send_stream_init(mcs->transport, length); mcs_write_domain_mcspdu_header(s, DomainMCSPDU_AttachUserRequest, length, 0); @@ -645,8 +645,8 @@ BOOL mcs_send_attach_user_request(rdpMcs* mcs) BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s) { - uint16 length; - uint8 result; + UINT16 length; + BYTE result; enum DomainMCSPDU MCSPDU; MCSPDU = DomainMCSPDU_AttachUserConfirm; @@ -668,7 +668,7 @@ BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s) BOOL mcs_send_attach_user_confirm(rdpMcs* mcs) { STREAM* s; - uint16 length = 11; + UINT16 length = 11; s = transport_send_stream_init(mcs->transport, length); @@ -690,11 +690,11 @@ BOOL mcs_send_attach_user_confirm(rdpMcs* mcs) * @param s stream */ -BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id) +BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id) { - uint16 length; + UINT16 length; enum DomainMCSPDU MCSPDU; - uint16 user_id; + UINT16 user_id; MCSPDU = DomainMCSPDU_ChannelJoinRequest; if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length)) @@ -717,10 +717,10 @@ BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id) * @param channel_id channel id */ -BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id) +BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id) { STREAM* s; - uint16 length = 12; + UINT16 length = 12; s = transport_send_stream_init(mcs->transport, 12); mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ChannelJoinRequest, length, 0); @@ -740,12 +740,12 @@ BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id) * @param mcs mcs module */ -BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id) +BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id) { - uint16 length; - uint8 result; - uint16 initiator; - uint16 requested; + UINT16 length; + BYTE result; + UINT16 initiator; + UINT16 requested; enum DomainMCSPDU MCSPDU; MCSPDU = DomainMCSPDU_ChannelJoinConfirm; @@ -766,10 +766,10 @@ BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id) * @param mcs mcs module */ -BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) +BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id) { STREAM* s; - uint16 length = 15; + UINT16 length = 15; s = transport_send_stream_init(mcs->transport, 15); mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ChannelJoinConfirm, length, 2); @@ -792,7 +792,7 @@ BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id) BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs) { STREAM* s; - uint16 length = 9; + UINT16 length = 9; s = transport_send_stream_init(mcs->transport, 9); mcs_write_domain_mcspdu_header(s, DomainMCSPDU_DisconnectProviderUltimatum, length, 1); diff --git a/libfreerdp/core/mcs.h b/libfreerdp/core/mcs.h index 820606368..7276eda8c 100644 --- a/libfreerdp/core/mcs.h +++ b/libfreerdp/core/mcs.h @@ -112,7 +112,7 @@ typedef struct struct rdp_mcs { - uint16 user_id; + UINT16 user_id; struct rdp_transport* transport; DomainParameters domainParameters; DomainParameters targetParameters; @@ -142,13 +142,13 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s); BOOL mcs_send_attach_user_request(rdpMcs* mcs); BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s); BOOL mcs_send_attach_user_confirm(rdpMcs* mcs); -BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id); -BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id); -BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id); -BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id); +BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id); +BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id); +BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id); +BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id); BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs); -BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length); -void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, uint16 length, uint8 options); +BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length); +void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options); rdpMcs* mcs_new(rdpTransport* transport); void mcs_free(rdpMcs* mcs); diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index 61faf114a..86cb44409 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -235,7 +235,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego) { STREAM* s; uint32 cbSize; - uint16 cchPCB = 0; + UINT16 cchPCB = 0; WCHAR* wszPCB = NULL; if (!nego->send_preconnection_pdu) @@ -251,7 +251,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego) if (nego->preconnection_blob) { - cchPCB = (uint16) freerdp_AsciiToUnicodeAlloc(nego->preconnection_blob, &wszPCB, 0); + cchPCB = (UINT16) freerdp_AsciiToUnicodeAlloc(nego->preconnection_blob, &wszPCB, 0); cchPCB += 1; /* zero-termination */ cbSize += cchPCB * 2; } @@ -261,7 +261,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego) stream_write_uint32(s, 0); /* Flags */ stream_write_uint32(s, PRECONNECTION_PDU_V2); /* Version */ stream_write_uint32(s, nego->preconnection_id); /* Id */ - stream_write_uint16(s, cchPCB); /* cchPCB */ + stream_write_UINT16(s, cchPCB); /* cchPCB */ if (wszPCB) { @@ -413,8 +413,8 @@ BOOL nego_recv_response(rdpNego* nego) BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra) { - uint8 li; - uint8 type; + BYTE li; + BYTE type; rdpNego* nego = (rdpNego*) extra; if (tpkt_read_header(s) == 0) @@ -426,7 +426,7 @@ BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra) { /* rdpNegData (optional) */ - stream_read_uint8(s, type); /* Type */ + stream_read_BYTE(s, type); /* Type */ switch (type) { @@ -482,9 +482,9 @@ BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra) BOOL nego_read_request(rdpNego* nego, STREAM* s) { - uint8 li; - uint8 c; - uint8 type; + BYTE li; + BYTE c; + BYTE type; tpkt_read_header(s); li = tpdu_read_connection_request(s); @@ -500,17 +500,17 @@ BOOL nego_read_request(rdpNego* nego, STREAM* s) /* Optional routingToken or cookie, ending with CR+LF */ while (stream_get_left(s) > 0) { - stream_read_uint8(s, c); + stream_read_BYTE(s, c); if (c != '\x0D') continue; - stream_peek_uint8(s, c); + stream_peek_BYTE(s, c); if (c != '\x0A') continue; - stream_seek_uint8(s); + stream_seek_BYTE(s); break; } } @@ -519,7 +519,7 @@ BOOL nego_read_request(rdpNego* nego, STREAM* s) { /* rdpNegData (optional) */ - stream_read_uint8(s, type); /* Type */ + stream_read_BYTE(s, type); /* Type */ if (type != TYPE_RDP_NEG_REQ) { @@ -561,7 +561,7 @@ BOOL nego_send_negotiation_request(rdpNego* nego) { STREAM* s; int length; - uint8 *bm, *em; + BYTE *bm, *em; s = transport_send_stream_init(nego->transport, 256); length = TPDU_CONNECTION_REQUEST_LENGTH; @@ -577,9 +577,9 @@ BOOL nego_send_negotiation_request(rdpNego* nego) { int cookie_length = strlen(nego->cookie); stream_write(s, "Cookie: mstshash=", 17); - stream_write(s, (uint8*) nego->cookie, cookie_length); - stream_write_uint8(s, 0x0D); /* CR */ - stream_write_uint8(s, 0x0A); /* LF */ + stream_write(s, (BYTE*) nego->cookie, cookie_length); + stream_write_BYTE(s, 0x0D); /* CR */ + stream_write_BYTE(s, 0x0A); /* LF */ length += cookie_length + 19; } @@ -588,9 +588,9 @@ BOOL nego_send_negotiation_request(rdpNego* nego) if (nego->requested_protocols > PROTOCOL_RDP) { /* RDP_NEG_DATA must be present for TLS and NLA */ - stream_write_uint8(s, TYPE_RDP_NEG_REQ); - stream_write_uint8(s, 0); /* flags, must be set to zero */ - stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */ + stream_write_BYTE(s, TYPE_RDP_NEG_REQ); + stream_write_BYTE(s, 0); /* flags, must be set to zero */ + stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */ stream_write_uint32(s, nego->requested_protocols); /* requestedProtocols */ length += 8; } @@ -615,13 +615,13 @@ BOOL nego_send_negotiation_request(rdpNego* nego) void nego_process_negotiation_request(rdpNego* nego, STREAM* s) { - uint8 flags; - uint16 length; + BYTE flags; + UINT16 length; DEBUG_NEGO("RDP_NEG_REQ"); - stream_read_uint8(s, flags); - stream_read_uint16(s, length); + stream_read_BYTE(s, flags); + stream_read_UINT16(s, length); stream_read_uint32(s, nego->requested_protocols); DEBUG_NEGO("requested_protocols: %d", nego->requested_protocols); @@ -637,12 +637,12 @@ void nego_process_negotiation_request(rdpNego* nego, STREAM* s) void nego_process_negotiation_response(rdpNego* nego, STREAM* s) { - uint16 length; + UINT16 length; DEBUG_NEGO("RDP_NEG_RSP"); - stream_read_uint8(s, nego->flags); - stream_read_uint16(s, length); + stream_read_BYTE(s, nego->flags); + stream_read_UINT16(s, length); stream_read_uint32(s, nego->selected_protocol); nego->state = NEGO_STATE_FINAL; @@ -656,14 +656,14 @@ void nego_process_negotiation_response(rdpNego* nego, STREAM* s) void nego_process_negotiation_failure(rdpNego* nego, STREAM* s) { - uint8 flags; - uint16 length; + BYTE flags; + UINT16 length; uint32 failureCode; DEBUG_NEGO("RDP_NEG_FAILURE"); - stream_read_uint8(s, flags); - stream_read_uint16(s, length); + stream_read_BYTE(s, flags); + stream_read_UINT16(s, length); stream_read_uint32(s, failureCode); switch (failureCode) @@ -699,8 +699,8 @@ void nego_process_negotiation_failure(rdpNego* nego, STREAM* s) BOOL nego_send_negotiation_response(rdpNego* nego) { STREAM* s; - uint8* bm; - uint8* em; + BYTE* bm; + BYTE* em; int length; BOOL status; rdpSettings* settings; @@ -716,17 +716,17 @@ BOOL nego_send_negotiation_response(rdpNego* nego) if (nego->selected_protocol > PROTOCOL_RDP) { /* RDP_NEG_DATA must be present for TLS and NLA */ - stream_write_uint8(s, TYPE_RDP_NEG_RSP); - stream_write_uint8(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */ - stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */ + stream_write_BYTE(s, TYPE_RDP_NEG_RSP); + stream_write_BYTE(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */ + stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */ stream_write_uint32(s, nego->selected_protocol); /* selectedProtocol */ length += 8; } else if (!settings->rdp_security) { - stream_write_uint8(s, TYPE_RDP_NEG_FAILURE); - stream_write_uint8(s, 0); /* flags */ - stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */ + stream_write_BYTE(s, TYPE_RDP_NEG_FAILURE); + stream_write_BYTE(s, 0); /* flags */ + stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */ /* * TODO: Check for other possibilities, * like SSL_NOT_ALLOWED_BY_SERVER. diff --git a/libfreerdp/core/nego.h b/libfreerdp/core/nego.h index ce8bcd13a..1416af018 100644 --- a/libfreerdp/core/nego.h +++ b/libfreerdp/core/nego.h @@ -92,7 +92,7 @@ struct rdp_nego uint32 selected_protocol; uint32 requested_protocols; BOOL security_layer_negotiation_enabled; - uint8 enabled_protocols[3]; + BYTE enabled_protocols[3]; rdpTransport* transport; }; diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index 5ef0d24a1..f28ca1ea9 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -96,7 +96,7 @@ static const char* const ALTSEC_DRAWING_ORDER_STRINGS[] = #endif /* WITH_DEBUG_ORDERS */ -static const uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = +static const BYTE PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = { DSTBLT_ORDER_FIELD_BYTES, PATBLT_ORDER_FIELD_BYTES, @@ -127,86 +127,86 @@ static const uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = #define PRIMARY_DRAWING_ORDER_COUNT (ARRAY_SIZE(PRIMARY_DRAWING_ORDER_FIELD_BYTES)) -static const uint8 CBR2_BPP[] = +static const BYTE CBR2_BPP[] = { 0, 0, 0, 8, 16, 24, 32 }; -static const uint8 CBR23_BPP[] = +static const BYTE CBR23_BPP[] = { 0, 0, 0, 8, 16, 24, 32 }; -static const uint8 BMF_BPP[] = +static const BYTE BMF_BPP[] = { 0, 1, 0, 8, 16, 24, 32 }; static INLINE void update_read_coord(STREAM* s, sint32* coord, BOOL delta) { - sint8 lsi8; - sint16 lsi16; + INT8 lsi8; + INT16 lsi16; if (delta) { - stream_read_uint8(s, lsi8); + stream_read_BYTE(s, lsi8); *coord += lsi8; } else { - stream_read_uint16(s, lsi16); + stream_read_UINT16(s, lsi16); *coord = lsi16; } } static INLINE void update_read_color(STREAM* s, uint32* color) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color = byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= (byte << 16); } static INLINE void update_read_colorref(STREAM* s, uint32* color) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color = byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= (byte << 16); - stream_seek_uint8(s); + stream_seek_BYTE(s); } static INLINE void update_read_color_quad(STREAM* s, uint32* color) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color = (byte << 16); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *color |= byte; - stream_seek_uint8(s); + stream_seek_BYTE(s); } static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x80) { *value = (byte & 0x7F) << 8; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= byte; } else @@ -217,10 +217,10 @@ static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) { - uint8 byte; + BYTE byte; BOOL negative; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); negative = (byte & 0x40) ? TRUE : FALSE; @@ -228,7 +228,7 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) if (byte & 0x80) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value = (*value << 8) | byte; } @@ -238,10 +238,10 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) { - uint8 byte; - uint8 count; + BYTE byte; + BYTE count; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); count = (byte & 0xC0) >> 6; @@ -253,25 +253,25 @@ static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) case 1: *value = (byte & 0x3F) << 8; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= byte; break; case 2: *value = (byte & 0x3F) << 16; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= byte; break; case 3: *value = (byte & 0x3F) << 24; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= (byte << 16); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value |= byte; break; @@ -282,9 +282,9 @@ static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) static INLINE void update_read_delta(STREAM* s, sint32* value) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x40) *value = (byte | ~0x3F); @@ -293,46 +293,46 @@ static INLINE void update_read_delta(STREAM* s, sint32* value) if (byte & 0x80) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *value = (*value << 8) | byte; } } -static INLINE void update_read_glyph_delta(STREAM* s, uint16* value) +static INLINE void update_read_glyph_delta(STREAM* s, UINT16* value) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte == 0x80) - stream_read_uint16(s, *value); + stream_read_UINT16(s, *value); else *value = (byte & 0x3F); } static INLINE void update_seek_glyph_delta(STREAM* s) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x80) - stream_seek_uint8(s); + stream_seek_BYTE(s); } -static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlags) +static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, BYTE fieldFlags) { if (fieldFlags & ORDER_FIELD_01) - stream_read_uint8(s, brush->x); + stream_read_BYTE(s, brush->x); if (fieldFlags & ORDER_FIELD_02) - stream_read_uint8(s, brush->y); + stream_read_BYTE(s, brush->y); if (fieldFlags & ORDER_FIELD_03) - stream_read_uint8(s, brush->style); + stream_read_BYTE(s, brush->style); if (fieldFlags & ORDER_FIELD_04) - stream_read_uint8(s, brush->hatch); + stream_read_BYTE(s, brush->hatch); if (brush->style & CACHED_BRUSH) { @@ -346,14 +346,14 @@ static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlag if (fieldFlags & ORDER_FIELD_05) { - brush->data = (uint8*) brush->p8x8; - stream_read_uint8(s, brush->data[7]); - stream_read_uint8(s, brush->data[6]); - stream_read_uint8(s, brush->data[5]); - stream_read_uint8(s, brush->data[4]); - stream_read_uint8(s, brush->data[3]); - stream_read_uint8(s, brush->data[2]); - stream_read_uint8(s, brush->data[1]); + brush->data = (BYTE*) brush->p8x8; + stream_read_BYTE(s, brush->data[7]); + stream_read_BYTE(s, brush->data[6]); + stream_read_BYTE(s, brush->data[5]); + stream_read_BYTE(s, brush->data[4]); + stream_read_BYTE(s, brush->data[3]); + stream_read_BYTE(s, brush->data[2]); + stream_read_BYTE(s, brush->data[1]); brush->data[0] = brush->hatch; } } @@ -361,8 +361,8 @@ static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlag static INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int number) { int i; - uint8 flags = 0; - uint8* zeroBits; + BYTE flags = 0; + BYTE* zeroBits; int zeroBitsSize; if (number > 45) @@ -403,11 +403,11 @@ static INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, in } } -static INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, sint16 x, sint16 y) +static INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, INT16 x, INT16 y) { int i; - uint8 flags = 0; - uint8* zeroBits; + BYTE flags = 0; + BYTE* zeroBits; int zeroBitsSize; zeroBitsSize = ((number + 3) / 4); @@ -449,7 +449,7 @@ void update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* ds update_read_coord(s, &dstblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, dstblt->bRop); + stream_read_BYTE(s, dstblt->bRop); } void update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt) @@ -467,7 +467,7 @@ void update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* pa update_read_coord(s, &patblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, patblt->bRop); + stream_read_BYTE(s, patblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_06) update_read_color(s, &patblt->backColor); @@ -493,7 +493,7 @@ void update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* sc update_read_coord(s, &scrblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, scrblt->bRop); + stream_read_BYTE(s, scrblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_06) update_read_coord(s, &scrblt->nXSrc, orderInfo->deltaCoordinates); @@ -504,7 +504,7 @@ void update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* sc void update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect) { - uint8 byte; + BYTE byte; if (orderInfo->fieldFlags & ORDER_FIELD_01) update_read_coord(s, &opaque_rect->nLeftRect, orderInfo->deltaCoordinates); @@ -520,19 +520,19 @@ void update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT if (orderInfo->fieldFlags & ORDER_FIELD_05) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); opaque_rect->color = (opaque_rect->color & 0xFFFFFF00) | byte; } if (orderInfo->fieldFlags & ORDER_FIELD_06) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); opaque_rect->color = (opaque_rect->color & 0xFFFF00FF) | (byte << 8); } if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); opaque_rect->color = (opaque_rect->color & 0xFF00FFFF) | (byte << 16); } } @@ -552,7 +552,7 @@ void update_read_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, DRAW_NIN update_read_coord(s, &draw_nine_grid->srcBottom, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint16(s, draw_nine_grid->bitmapId); + stream_read_UINT16(s, draw_nine_grid->bitmapId); } void update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt) @@ -570,14 +570,14 @@ void update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTB update_read_coord(s, &multi_dstblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, multi_dstblt->bRop); + stream_read_BYTE(s, multi_dstblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, multi_dstblt->numRectangles); + stream_read_BYTE(s, multi_dstblt->numRectangles); if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint16(s, multi_dstblt->cbData); + stream_read_UINT16(s, multi_dstblt->cbData); update_read_delta_rects(s, multi_dstblt->rectangles, multi_dstblt->numRectangles); } } @@ -597,7 +597,7 @@ void update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATB update_read_coord(s, &multi_patblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, multi_patblt->bRop); + stream_read_BYTE(s, multi_patblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_06) update_read_color(s, &multi_patblt->backColor); @@ -608,11 +608,11 @@ void update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATB update_read_brush(s, &multi_patblt->brush, orderInfo->fieldFlags >> 7); if (orderInfo->fieldFlags & ORDER_FIELD_13) - stream_read_uint8(s, multi_patblt->numRectangles); + stream_read_BYTE(s, multi_patblt->numRectangles); if (orderInfo->fieldFlags & ORDER_FIELD_14) { - stream_read_uint16(s, multi_patblt->cbData); + stream_read_UINT16(s, multi_patblt->cbData); update_read_delta_rects(s, multi_patblt->rectangles, multi_patblt->numRectangles); } } @@ -632,7 +632,7 @@ void update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRB update_read_coord(s, &multi_scrblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, multi_scrblt->bRop); + stream_read_BYTE(s, multi_scrblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_06) update_read_coord(s, &multi_scrblt->nXSrc, orderInfo->deltaCoordinates); @@ -641,18 +641,18 @@ void update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRB update_read_coord(s, &multi_scrblt->nYSrc, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_08) - stream_read_uint8(s, multi_scrblt->numRectangles); + stream_read_BYTE(s, multi_scrblt->numRectangles); if (orderInfo->fieldFlags & ORDER_FIELD_09) { - stream_read_uint16(s, multi_scrblt->cbData); + stream_read_UINT16(s, multi_scrblt->cbData); update_read_delta_rects(s, multi_scrblt->rectangles, multi_scrblt->numRectangles); } } void update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect) { - uint8 byte; + BYTE byte; if (orderInfo->fieldFlags & ORDER_FIELD_01) update_read_coord(s, &multi_opaque_rect->nLeftRect, orderInfo->deltaCoordinates); @@ -668,28 +668,28 @@ void update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI if (orderInfo->fieldFlags & ORDER_FIELD_05) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); multi_opaque_rect->color = (multi_opaque_rect->color & 0xFFFFFF00) | byte; } if (orderInfo->fieldFlags & ORDER_FIELD_06) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); multi_opaque_rect->color = (multi_opaque_rect->color & 0xFFFF00FF) | (byte << 8); } if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); multi_opaque_rect->color = (multi_opaque_rect->color & 0xFF00FFFF) | (byte << 16); } if (orderInfo->fieldFlags & ORDER_FIELD_08) - stream_read_uint8(s, multi_opaque_rect->numRectangles); + stream_read_BYTE(s, multi_opaque_rect->numRectangles); if (orderInfo->fieldFlags & ORDER_FIELD_09) { - stream_read_uint16(s, multi_opaque_rect->cbData); + stream_read_UINT16(s, multi_opaque_rect->cbData); update_read_delta_rects(s, multi_opaque_rect->rectangles, multi_opaque_rect->numRectangles); } } @@ -709,14 +709,14 @@ void update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MU update_read_coord(s, &multi_draw_nine_grid->srcBottom, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint16(s, multi_draw_nine_grid->bitmapId); + stream_read_UINT16(s, multi_draw_nine_grid->bitmapId); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, multi_draw_nine_grid->nDeltaEntries); + stream_read_BYTE(s, multi_draw_nine_grid->nDeltaEntries); if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint16(s, multi_draw_nine_grid->cbData); + stream_read_UINT16(s, multi_draw_nine_grid->cbData); stream_seek(s, multi_draw_nine_grid->cbData); } } @@ -724,7 +724,7 @@ void update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MU void update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint16(s, line_to->backMode); + stream_read_UINT16(s, line_to->backMode); if (orderInfo->fieldFlags & ORDER_FIELD_02) update_read_coord(s, &line_to->nXStart, orderInfo->deltaCoordinates); @@ -742,13 +742,13 @@ void update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* update_read_color(s, &line_to->backColor); if (orderInfo->fieldFlags & ORDER_FIELD_07) - stream_read_uint8(s, line_to->bRop2); + stream_read_BYTE(s, line_to->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_08) - stream_read_uint8(s, line_to->penStyle); + stream_read_BYTE(s, line_to->penStyle); if (orderInfo->fieldFlags & ORDER_FIELD_09) - stream_read_uint8(s, line_to->penWidth); + stream_read_BYTE(s, line_to->penWidth); if (orderInfo->fieldFlags & ORDER_FIELD_10) update_read_color(s, &line_to->penColor); @@ -763,20 +763,20 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER update_read_coord(s, &polyline->yStart, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_03) - stream_read_uint8(s, polyline->bRop2); + stream_read_BYTE(s, polyline->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_04) - stream_seek_uint16(s); + stream_seek_UINT16(s); if (orderInfo->fieldFlags & ORDER_FIELD_05) update_read_color(s, &polyline->penColor); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, polyline->numPoints); + stream_read_BYTE(s, polyline->numPoints); if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint8(s, polyline->cbData); + stream_read_BYTE(s, polyline->cbData); if (polyline->points == NULL) polyline->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polyline->numPoints); @@ -790,7 +790,7 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint16(s, memblt->cacheId); + stream_read_UINT16(s, memblt->cacheId); if (orderInfo->fieldFlags & ORDER_FIELD_02) update_read_coord(s, &memblt->nLeftRect, orderInfo->deltaCoordinates); @@ -805,7 +805,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me update_read_coord(s, &memblt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, memblt->bRop); + stream_read_BYTE(s, memblt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_07) update_read_coord(s, &memblt->nXSrc, orderInfo->deltaCoordinates); @@ -814,7 +814,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me update_read_coord(s, &memblt->nYSrc, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_09) - stream_read_uint16(s, memblt->cacheIndex); + stream_read_UINT16(s, memblt->cacheIndex); memblt->colorIndex = (memblt->cacheId >> 8); memblt->cacheId = (memblt->cacheId & 0xFF); @@ -823,7 +823,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint16(s, mem3blt->cacheId); + stream_read_UINT16(s, mem3blt->cacheId); if (orderInfo->fieldFlags & ORDER_FIELD_02) update_read_coord(s, &mem3blt->nLeftRect, orderInfo->deltaCoordinates); @@ -838,7 +838,7 @@ void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* update_read_coord(s, &mem3blt->nHeight, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, mem3blt->bRop); + stream_read_BYTE(s, mem3blt->bRop); if (orderInfo->fieldFlags & ORDER_FIELD_07) update_read_coord(s, &mem3blt->nXSrc, orderInfo->deltaCoordinates); @@ -855,7 +855,7 @@ void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* update_read_brush(s, &mem3blt->brush, orderInfo->fieldFlags >> 10); if (orderInfo->fieldFlags & ORDER_FIELD_16) - stream_read_uint16(s, mem3blt->cacheIndex); + stream_read_UINT16(s, mem3blt->cacheIndex); mem3blt->colorIndex = (mem3blt->cacheId >> 8); mem3blt->cacheId = (mem3blt->cacheId & 0xFF); @@ -879,22 +879,22 @@ void update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP update_read_coord(s, &save_bitmap->nBottomRect, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, save_bitmap->operation); + stream_read_BYTE(s, save_bitmap->operation); } void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint8(s, glyph_index->cacheId); + stream_read_BYTE(s, glyph_index->cacheId); if (orderInfo->fieldFlags & ORDER_FIELD_02) - stream_read_uint8(s, glyph_index->flAccel); + stream_read_BYTE(s, glyph_index->flAccel); if (orderInfo->fieldFlags & ORDER_FIELD_03) - stream_read_uint8(s, glyph_index->ulCharInc); + stream_read_BYTE(s, glyph_index->ulCharInc); if (orderInfo->fieldFlags & ORDER_FIELD_04) - stream_read_uint8(s, glyph_index->fOpRedundant); + stream_read_BYTE(s, glyph_index->fOpRedundant); if (orderInfo->fieldFlags & ORDER_FIELD_05) update_read_color(s, &glyph_index->backColor); @@ -903,40 +903,40 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX update_read_color(s, &glyph_index->foreColor); if (orderInfo->fieldFlags & ORDER_FIELD_07) - stream_read_uint16(s, glyph_index->bkLeft); + stream_read_UINT16(s, glyph_index->bkLeft); if (orderInfo->fieldFlags & ORDER_FIELD_08) - stream_read_uint16(s, glyph_index->bkTop); + stream_read_UINT16(s, glyph_index->bkTop); if (orderInfo->fieldFlags & ORDER_FIELD_09) - stream_read_uint16(s, glyph_index->bkRight); + stream_read_UINT16(s, glyph_index->bkRight); if (orderInfo->fieldFlags & ORDER_FIELD_10) - stream_read_uint16(s, glyph_index->bkBottom); + stream_read_UINT16(s, glyph_index->bkBottom); if (orderInfo->fieldFlags & ORDER_FIELD_11) - stream_read_uint16(s, glyph_index->opLeft); + stream_read_UINT16(s, glyph_index->opLeft); if (orderInfo->fieldFlags & ORDER_FIELD_12) - stream_read_uint16(s, glyph_index->opTop); + stream_read_UINT16(s, glyph_index->opTop); if (orderInfo->fieldFlags & ORDER_FIELD_13) - stream_read_uint16(s, glyph_index->opRight); + stream_read_UINT16(s, glyph_index->opRight); if (orderInfo->fieldFlags & ORDER_FIELD_14) - stream_read_uint16(s, glyph_index->opBottom); + stream_read_UINT16(s, glyph_index->opBottom); update_read_brush(s, &glyph_index->brush, orderInfo->fieldFlags >> 14); if (orderInfo->fieldFlags & ORDER_FIELD_20) - stream_read_uint16(s, glyph_index->x); + stream_read_UINT16(s, glyph_index->x); if (orderInfo->fieldFlags & ORDER_FIELD_21) - stream_read_uint16(s, glyph_index->y); + stream_read_UINT16(s, glyph_index->y); if (orderInfo->fieldFlags & ORDER_FIELD_22) { - stream_read_uint8(s, glyph_index->cbData); + stream_read_BYTE(s, glyph_index->cbData); memcpy(glyph_index->data, s->p, glyph_index->cbData); stream_seek(s, glyph_index->cbData); } @@ -945,12 +945,12 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint8(s, fast_index->cacheId); + stream_read_BYTE(s, fast_index->cacheId); if (orderInfo->fieldFlags & ORDER_FIELD_02) { - stream_read_uint8(s, fast_index->ulCharInc); - stream_read_uint8(s, fast_index->flAccel); + stream_read_BYTE(s, fast_index->ulCharInc); + stream_read_BYTE(s, fast_index->flAccel); } if (orderInfo->fieldFlags & ORDER_FIELD_03) @@ -991,7 +991,7 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O if (orderInfo->fieldFlags & ORDER_FIELD_15) { - stream_read_uint8(s, fast_index->cbData); + stream_read_BYTE(s, fast_index->cbData); memcpy(fast_index->data, s->p, fast_index->cbData); stream_seek(s, fast_index->cbData); } @@ -1000,15 +1000,15 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph) { GLYPH_DATA_V2* glyph; - uint8* phold; + BYTE* phold; if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint8(s, fast_glyph->cacheId); + stream_read_BYTE(s, fast_glyph->cacheId); if (orderInfo->fieldFlags & ORDER_FIELD_02) { - stream_read_uint8(s, fast_glyph->ulCharInc); - stream_read_uint8(s, fast_glyph->flAccel); + stream_read_BYTE(s, fast_glyph->ulCharInc); + stream_read_BYTE(s, fast_glyph->flAccel); } if (orderInfo->fieldFlags & ORDER_FIELD_03) @@ -1049,7 +1049,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O if (orderInfo->fieldFlags & ORDER_FIELD_15) { - stream_read_uint8(s, fast_glyph->cbData); + stream_read_BYTE(s, fast_glyph->cbData); memcpy(fast_glyph->data, s->p, fast_glyph->cbData); phold = s->p; stream_seek(s, 1); @@ -1064,7 +1064,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O update_read_2byte_unsigned(s, &glyph->cy); glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) malloc(glyph->cb); + glyph->aj = (BYTE*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); fast_glyph->glyph_data = glyph; } @@ -1081,20 +1081,20 @@ void update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_O update_read_coord(s, &polygon_sc->yStart, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_03) - stream_read_uint8(s, polygon_sc->bRop2); + stream_read_BYTE(s, polygon_sc->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_04) - stream_read_uint8(s, polygon_sc->fillMode); + stream_read_BYTE(s, polygon_sc->fillMode); if (orderInfo->fieldFlags & ORDER_FIELD_05) update_read_color(s, &polygon_sc->brushColor); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, polygon_sc->numPoints); + stream_read_BYTE(s, polygon_sc->numPoints); if (orderInfo->fieldFlags & ORDER_FIELD_07) { - stream_read_uint8(s, polygon_sc->cbData); + stream_read_BYTE(s, polygon_sc->cbData); if (polygon_sc->points == NULL) polygon_sc->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_sc->numPoints); @@ -1114,10 +1114,10 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O update_read_coord(s, &polygon_cb->yStart, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_03) - stream_read_uint8(s, polygon_cb->bRop2); + stream_read_BYTE(s, polygon_cb->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_04) - stream_read_uint8(s, polygon_cb->fillMode); + stream_read_BYTE(s, polygon_cb->fillMode); if (orderInfo->fieldFlags & ORDER_FIELD_05) update_read_color(s, &polygon_cb->backColor); @@ -1128,11 +1128,11 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O update_read_brush(s, &polygon_cb->brush, orderInfo->fieldFlags >> 6); if (orderInfo->fieldFlags & ORDER_FIELD_12) - stream_read_uint8(s, polygon_cb->numPoints); + stream_read_BYTE(s, polygon_cb->numPoints); if (orderInfo->fieldFlags & ORDER_FIELD_13) { - stream_read_uint8(s, polygon_cb->cbData); + stream_read_BYTE(s, polygon_cb->cbData); if (polygon_cb->points == NULL) polygon_cb->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_cb->numPoints); @@ -1161,10 +1161,10 @@ void update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_O update_read_coord(s, &ellipse_sc->bottomRect, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, ellipse_sc->bRop2); + stream_read_BYTE(s, ellipse_sc->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, ellipse_sc->fillMode); + stream_read_BYTE(s, ellipse_sc->fillMode); if (orderInfo->fieldFlags & ORDER_FIELD_07) update_read_color(s, &ellipse_sc->color); @@ -1185,10 +1185,10 @@ void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O update_read_coord(s, &ellipse_cb->bottomRect, orderInfo->deltaCoordinates); if (orderInfo->fieldFlags & ORDER_FIELD_05) - stream_read_uint8(s, ellipse_cb->bRop2); + stream_read_BYTE(s, ellipse_cb->bRop2); if (orderInfo->fieldFlags & ORDER_FIELD_06) - stream_read_uint8(s, ellipse_cb->fillMode); + stream_read_BYTE(s, ellipse_cb->fillMode); if (orderInfo->fieldFlags & ORDER_FIELD_07) update_read_color(s, &ellipse_cb->backColor); @@ -1201,21 +1201,21 @@ void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O /* Secondary Drawing Orders */ -void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags) +void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags) { - stream_read_uint8(s, cache_bitmap_order->cacheId); /* cacheId (1 byte) */ - stream_seek_uint8(s); /* pad1Octet (1 byte) */ - stream_read_uint8(s, cache_bitmap_order->bitmapWidth); /* bitmapWidth (1 byte) */ - stream_read_uint8(s, cache_bitmap_order->bitmapHeight); /* bitmapHeight (1 byte) */ - stream_read_uint8(s, cache_bitmap_order->bitmapBpp); /* bitmapBpp (1 byte) */ - stream_read_uint16(s, cache_bitmap_order->bitmapLength); /* bitmapLength (2 bytes) */ - stream_read_uint16(s, cache_bitmap_order->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_BYTE(s, cache_bitmap_order->cacheId); /* cacheId (1 byte) */ + stream_seek_BYTE(s); /* pad1Octet (1 byte) */ + stream_read_BYTE(s, cache_bitmap_order->bitmapWidth); /* bitmapWidth (1 byte) */ + stream_read_BYTE(s, cache_bitmap_order->bitmapHeight); /* bitmapHeight (1 byte) */ + stream_read_BYTE(s, cache_bitmap_order->bitmapBpp); /* bitmapBpp (1 byte) */ + stream_read_UINT16(s, cache_bitmap_order->bitmapLength); /* bitmapLength (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_order->cacheIndex); /* cacheIndex (2 bytes) */ if (compressed) { if ((flags & NO_BITMAP_COMPRESSION_HDR) == 0) { - uint8* bitmapComprHdr = (uint8*) &(cache_bitmap_order->bitmapComprHdr); + BYTE* bitmapComprHdr = (BYTE*) &(cache_bitmap_order->bitmapComprHdr); stream_read(s, bitmapComprHdr, 8); /* bitmapComprHdr (8 bytes) */ cache_bitmap_order->bitmapLength -= 8; } @@ -1230,9 +1230,9 @@ void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_ cache_bitmap_order->compressed = compressed; } -void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags) +void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags) { - uint8 bitsPerPixelId; + BYTE bitsPerPixelId; cache_bitmap_v2_order->cacheId = flags & 0x0003; cache_bitmap_v2_order->flags = (flags & 0xFF80) >> 7; @@ -1267,10 +1267,10 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b { if (!(cache_bitmap_v2_order->flags & CBR2_NO_BITMAP_COMPRESSION_HDR)) { - stream_read_uint16(s, cache_bitmap_v2_order->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */ - stream_read_uint16(s, cache_bitmap_v2_order->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */ - stream_read_uint16(s, cache_bitmap_v2_order->cbScanWidth); /* cbScanWidth (2 bytes) */ - stream_read_uint16(s, cache_bitmap_v2_order->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_v2_order->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_v2_order->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_v2_order->cbScanWidth); /* cbScanWidth (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_v2_order->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */ cache_bitmap_v2_order->bitmapLength = cache_bitmap_v2_order->cbCompMainBodySize; } @@ -1285,9 +1285,9 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b cache_bitmap_v2_order->compressed = compressed; } -void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags) +void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags) { - uint8 bitsPerPixelId; + BYTE bitsPerPixelId; BITMAP_DATA_EX* bitmapData; cache_bitmap_v3_order->cacheId = flags & 0x00000003; @@ -1296,35 +1296,35 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b bitsPerPixelId = (flags & 0x00000078) >> 3; cache_bitmap_v3_order->bpp = CBR23_BPP[bitsPerPixelId]; - stream_read_uint16(s, cache_bitmap_v3_order->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, cache_bitmap_v3_order->cacheIndex); /* cacheIndex (2 bytes) */ stream_read_uint32(s, cache_bitmap_v3_order->key1); /* key1 (4 bytes) */ stream_read_uint32(s, cache_bitmap_v3_order->key2); /* key2 (4 bytes) */ bitmapData = &cache_bitmap_v3_order->bitmapData; - stream_read_uint8(s, bitmapData->bpp); - stream_seek_uint8(s); /* reserved1 (1 byte) */ - stream_seek_uint8(s); /* reserved2 (1 byte) */ - stream_read_uint8(s, bitmapData->codecID); /* codecID (1 byte) */ - stream_read_uint16(s, bitmapData->width); /* width (2 bytes) */ - stream_read_uint16(s, bitmapData->height); /* height (2 bytes) */ + stream_read_BYTE(s, bitmapData->bpp); + stream_seek_BYTE(s); /* reserved1 (1 byte) */ + stream_seek_BYTE(s); /* reserved2 (1 byte) */ + stream_read_BYTE(s, bitmapData->codecID); /* codecID (1 byte) */ + stream_read_UINT16(s, bitmapData->width); /* width (2 bytes) */ + stream_read_UINT16(s, bitmapData->height); /* height (2 bytes) */ stream_read_uint32(s, bitmapData->length); /* length (4 bytes) */ if (bitmapData->data == NULL) - bitmapData->data = (uint8*) malloc(bitmapData->length); + bitmapData->data = (BYTE*) malloc(bitmapData->length); else - bitmapData->data = (uint8*) realloc(bitmapData->data, bitmapData->length); + bitmapData->data = (BYTE*) realloc(bitmapData->data, bitmapData->length); stream_read(s, bitmapData->data, bitmapData->length); } -void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags) +void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags) { int i; uint32* colorTable; - stream_read_uint8(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */ - stream_read_uint8(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */ + stream_read_BYTE(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */ + stream_read_BYTE(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */ colorTable = cache_color_table_order->colorTable; @@ -1341,14 +1341,14 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac cache_color_table_order->colorTable = colorTable; } -void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags) +void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags) { int i; - sint16 lsi16; + INT16 lsi16; GLYPH_DATA* glyph; - stream_read_uint8(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */ - stream_read_uint8(s, cache_glyph_order->cGlyphs); /* cGlyphs (1 byte) */ + stream_read_BYTE(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */ + stream_read_BYTE(s, cache_glyph_order->cGlyphs); /* cGlyphs (1 byte) */ for (i = 0; i < (int) cache_glyph_order->cGlyphs; i++) { @@ -1358,18 +1358,18 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord } glyph = cache_glyph_order->glyphData[i]; - stream_read_uint16(s, glyph->cacheIndex); - stream_read_uint16(s, lsi16); + stream_read_UINT16(s, glyph->cacheIndex); + stream_read_UINT16(s, lsi16); glyph->x = lsi16; - stream_read_uint16(s, lsi16); + stream_read_UINT16(s, lsi16); glyph->y = lsi16; - stream_read_uint16(s, glyph->cx); - stream_read_uint16(s, glyph->cy); + stream_read_UINT16(s, glyph->cx); + stream_read_UINT16(s, glyph->cy); glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) malloc(glyph->cb); + glyph->aj = (BYTE*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); } @@ -1378,7 +1378,7 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord stream_seek(s, cache_glyph_order->cGlyphs * 2); } -void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags) +void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags) { int i; GLYPH_DATA_V2* glyph; @@ -1395,7 +1395,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly } glyph = cache_glyph_v2_order->glyphData[i]; - stream_read_uint8(s, glyph->cacheIndex); + stream_read_BYTE(s, glyph->cacheIndex); update_read_2byte_signed(s, &glyph->x); update_read_2byte_signed(s, &glyph->y); update_read_2byte_unsigned(s, &glyph->cx); @@ -1404,7 +1404,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy; glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0; - glyph->aj = (uint8*) malloc(glyph->cb); + glyph->aj = (BYTE*) malloc(glyph->cb); stream_read(s, glyph->aj, glyph->cb); } @@ -1413,12 +1413,12 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly stream_seek(s, cache_glyph_v2_order->cGlyphs * 2); } -void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp) +void update_decompress_brush(STREAM* s, BYTE* output, BYTE bpp) { int index; int x, y, k; - uint8 byte = 0; - uint8* palette; + BYTE byte = 0; + BYTE* palette; int bytesPerPixel; palette = s->p + 16; @@ -1429,7 +1429,7 @@ void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp) for (x = 0; x < 8; x++) { if ((x % 4) == 0) - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); index = ((byte >> ((3 - (x % 4)) * 2)) & 0x03); @@ -1441,28 +1441,28 @@ void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp) } } -void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, uint16 flags) +void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags) { int i; int size; - uint8 iBitmapFormat; + BYTE iBitmapFormat; BOOL compressed = FALSE; - stream_read_uint8(s, cache_brush_order->index); /* cacheEntry (1 byte) */ + stream_read_BYTE(s, cache_brush_order->index); /* cacheEntry (1 byte) */ - stream_read_uint8(s, iBitmapFormat); /* iBitmapFormat (1 byte) */ + stream_read_BYTE(s, iBitmapFormat); /* iBitmapFormat (1 byte) */ cache_brush_order->bpp = BMF_BPP[iBitmapFormat]; - stream_read_uint8(s, cache_brush_order->cx); /* cx (1 byte) */ - stream_read_uint8(s, cache_brush_order->cy); /* cy (1 byte) */ - stream_read_uint8(s, cache_brush_order->style); /* style (1 byte) */ - stream_read_uint8(s, cache_brush_order->length); /* iBytes (1 byte) */ + stream_read_BYTE(s, cache_brush_order->cx); /* cx (1 byte) */ + stream_read_BYTE(s, cache_brush_order->cy); /* cy (1 byte) */ + stream_read_BYTE(s, cache_brush_order->style); /* style (1 byte) */ + stream_read_BYTE(s, cache_brush_order->length); /* iBytes (1 byte) */ if ((cache_brush_order->cx == 8) && (cache_brush_order->cy == 8)) { size = (cache_brush_order->bpp == 1) ? 8 : 8 * 8 * cache_brush_order->bpp; - cache_brush_order->data = (uint8*) malloc(size); + cache_brush_order->data = (BYTE*) malloc(size); if (cache_brush_order->bpp == 1) { @@ -1476,7 +1476,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord for (i = 7; i >= 0; i--) { - stream_read_uint8(s, cache_brush_order->data[i]); + stream_read_BYTE(s, cache_brush_order->data[i]); } } else @@ -1511,23 +1511,23 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap) { - uint16 flags; + UINT16 flags; BOOL deleteListPresent; OFFSCREEN_DELETE_LIST* deleteList; - stream_read_uint16(s, flags); /* flags (2 bytes) */ + stream_read_UINT16(s, flags); /* flags (2 bytes) */ create_offscreen_bitmap->id = flags & 0x7FFF; deleteListPresent = (flags & 0x8000) ? TRUE : FALSE; - stream_read_uint16(s, create_offscreen_bitmap->cx); /* cx (2 bytes) */ - stream_read_uint16(s, create_offscreen_bitmap->cy); /* cy (2 bytes) */ + stream_read_UINT16(s, create_offscreen_bitmap->cx); /* cx (2 bytes) */ + stream_read_UINT16(s, create_offscreen_bitmap->cy); /* cy (2 bytes) */ deleteList = &(create_offscreen_bitmap->deleteList); if (deleteListPresent) { int i; - stream_read_uint16(s, deleteList->cIndices); + stream_read_UINT16(s, deleteList->cIndices); if (deleteList->cIndices > deleteList->sIndices) { @@ -1537,7 +1537,7 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA for (i = 0; i < (int) deleteList->cIndices; i++) { - stream_read_uint16(s, deleteList->indices[i]); + stream_read_UINT16(s, deleteList->indices[i]); } } else @@ -1548,22 +1548,22 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA void update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface) { - stream_read_uint16(s, switch_surface->bitmapId); /* bitmapId (2 bytes) */ + stream_read_UINT16(s, switch_surface->bitmapId); /* bitmapId (2 bytes) */ } void update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap) { NINE_GRID_BITMAP_INFO* nineGridInfo; - stream_read_uint8(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */ - stream_read_uint16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */ + stream_read_BYTE(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */ + stream_read_UINT16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */ nineGridInfo = &(create_nine_grid_bitmap->nineGridInfo); stream_read_uint32(s, nineGridInfo->flFlags); /* flFlags (4 bytes) */ - stream_read_uint16(s, nineGridInfo->ulLeftWidth); /* ulLeftWidth (2 bytes) */ - stream_read_uint16(s, nineGridInfo->ulRightWidth); /* ulRightWidth (2 bytes) */ - stream_read_uint16(s, nineGridInfo->ulTopHeight); /* ulTopHeight (2 bytes) */ - stream_read_uint16(s, nineGridInfo->ulBottomHeight); /* ulBottomHeight (2 bytes) */ + stream_read_UINT16(s, nineGridInfo->ulLeftWidth); /* ulLeftWidth (2 bytes) */ + stream_read_UINT16(s, nineGridInfo->ulRightWidth); /* ulRightWidth (2 bytes) */ + stream_read_UINT16(s, nineGridInfo->ulTopHeight); /* ulTopHeight (2 bytes) */ + stream_read_UINT16(s, nineGridInfo->ulBottomHeight); /* ulBottomHeight (2 bytes) */ update_read_colorref(s, &nineGridInfo->crTransparent); /* crTransparent (4 bytes) */ } @@ -1574,33 +1574,33 @@ void update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker) void update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first) { - stream_read_uint8(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */ - stream_read_uint8(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */ - stream_read_uint16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */ - stream_read_uint16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */ - stream_read_uint16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */ + stream_read_BYTE(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */ + stream_read_BYTE(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */ + stream_read_UINT16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */ + stream_read_UINT16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */ + stream_read_UINT16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */ if (stream_bitmap_first->bitmapFlags & STREAM_BITMAP_V2) stream_read_uint32(s, stream_bitmap_first->bitmapSize); /* bitmapSize (4 bytes) */ else - stream_read_uint16(s, stream_bitmap_first->bitmapSize); /* bitmapSize (2 bytes) */ + stream_read_UINT16(s, stream_bitmap_first->bitmapSize); /* bitmapSize (2 bytes) */ - stream_read_uint16(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */ + stream_read_UINT16(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */ stream_seek(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlock */ } void update_read_stream_bitmap_next_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_next) { - stream_read_uint8(s, stream_bitmap_next->bitmapFlags); /* bitmapFlags (1 byte) */ - stream_read_uint16(s, stream_bitmap_next->bitmapType); /* bitmapType (2 bytes) */ - stream_read_uint16(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */ + stream_read_BYTE(s, stream_bitmap_next->bitmapFlags); /* bitmapFlags (1 byte) */ + stream_read_UINT16(s, stream_bitmap_next->bitmapType); /* bitmapType (2 bytes) */ + stream_read_UINT16(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */ stream_seek(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlock */ } void update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first) { - stream_seek_uint8(s); /* pad1Octet (1 byte) */ - stream_read_uint16(s, draw_gdiplus_first->cbSize); /* cbSize (2 bytes) */ + stream_seek_BYTE(s); /* pad1Octet (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_first->cbSize); /* cbSize (2 bytes) */ stream_read_uint32(s, draw_gdiplus_first->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_read_uint32(s, draw_gdiplus_first->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ stream_seek(s, draw_gdiplus_first->cbSize); /* emfRecords */ @@ -1608,15 +1608,15 @@ void update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* d void update_read_draw_gdiplus_next_order(STREAM* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next) { - stream_seek_uint8(s); /* pad1Octet (1 byte) */ - stream_read_uint16(s, draw_gdiplus_next->cbSize); /* cbSize (2 bytes) */ + stream_seek_BYTE(s); /* pad1Octet (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_next->cbSize); /* cbSize (2 bytes) */ stream_seek(s, draw_gdiplus_next->cbSize); /* emfRecords */ } void update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end) { - stream_seek_uint8(s); /* pad1Octet (1 byte) */ - stream_read_uint16(s, draw_gdiplus_end->cbSize); /* cbSize (2 bytes) */ + stream_seek_BYTE(s); /* pad1Octet (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_end->cbSize); /* cbSize (2 bytes) */ stream_read_uint32(s, draw_gdiplus_end->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_read_uint32(s, draw_gdiplus_end->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ stream_seek(s, draw_gdiplus_end->cbSize); /* emfRecords */ @@ -1624,37 +1624,37 @@ void update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_ void update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first) { - stream_read_uint8(s, draw_gdiplus_cache_first->flags); /* flags (1 byte) */ - stream_read_uint16(s, draw_gdiplus_cache_first->cacheType); /* cacheType (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_first->cacheIndex); /* cacheIndex (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_first->cbSize); /* cbSize (2 bytes) */ + stream_read_BYTE(s, draw_gdiplus_cache_first->flags); /* flags (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_cache_first->cacheType); /* cacheType (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_first->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_first->cbSize); /* cbSize (2 bytes) */ stream_read_uint32(s, draw_gdiplus_cache_first->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_seek(s, draw_gdiplus_cache_first->cbSize); /* emfRecords */ } void update_read_draw_gdiplus_cache_next_order(STREAM* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next) { - stream_read_uint8(s, draw_gdiplus_cache_next->flags); /* flags (1 byte) */ - stream_read_uint16(s, draw_gdiplus_cache_next->cacheType); /* cacheType (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_next->cacheIndex); /* cacheIndex (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_next->cbSize); /* cbSize (2 bytes) */ + stream_read_BYTE(s, draw_gdiplus_cache_next->flags); /* flags (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_cache_next->cacheType); /* cacheType (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_next->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_next->cbSize); /* cbSize (2 bytes) */ stream_seek(s, draw_gdiplus_cache_next->cbSize); /* emfRecords */ } void update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end) { - stream_read_uint8(s, draw_gdiplus_cache_end->flags); /* flags (1 byte) */ - stream_read_uint16(s, draw_gdiplus_cache_end->cacheType); /* cacheType (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_end->cacheIndex); /* cacheIndex (2 bytes) */ - stream_read_uint16(s, draw_gdiplus_cache_end->cbSize); /* cbSize (2 bytes) */ + stream_read_BYTE(s, draw_gdiplus_cache_end->flags); /* flags (1 byte) */ + stream_read_UINT16(s, draw_gdiplus_cache_end->cacheType); /* cacheType (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_end->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, draw_gdiplus_cache_end->cbSize); /* cbSize (2 bytes) */ stream_read_uint32(s, draw_gdiplus_cache_end->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_seek(s, draw_gdiplus_cache_end->cbSize); /* emfRecords */ } -void update_read_field_flags(STREAM* s, uint32* fieldFlags, uint8 flags, uint8 fieldBytes) +void update_read_field_flags(STREAM* s, uint32* fieldFlags, BYTE flags, BYTE fieldBytes) { int i; - uint8 byte; + BYTE byte; if (flags & ORDER_ZERO_FIELD_BYTE_BIT0) fieldBytes--; @@ -1670,16 +1670,16 @@ void update_read_field_flags(STREAM* s, uint32* fieldFlags, uint8 flags, uint8 f *fieldFlags = 0; for (i = 0; i < fieldBytes; i++) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *fieldFlags |= byte << (i * 8); } } void update_read_bounds(STREAM* s, rdpBounds* bounds) { - uint8 flags; + BYTE flags; - stream_read_uint8(s, flags); /* field flags */ + stream_read_BYTE(s, flags); /* field flags */ if (flags & BOUND_LEFT) update_read_coord(s, &bounds->left, FALSE); @@ -1702,7 +1702,7 @@ void update_read_bounds(STREAM* s, rdpBounds* bounds) update_read_coord(s, &bounds->bottom, TRUE); } -BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) +BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, BYTE flags) { ORDER_INFO* orderInfo; rdpContext* context = update->context; @@ -1711,7 +1711,7 @@ BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) orderInfo = &(primary->order_info); if (flags & ORDER_TYPE_CHANGE) - stream_read_uint8(s, orderInfo->orderType); /* orderType (1 byte) */ + stream_read_BYTE(s, orderInfo->orderType); /* orderType (1 byte) */ if (orderInfo->orderType >= PRIMARY_DRAWING_ORDER_COUNT) { @@ -1860,20 +1860,20 @@ BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags) return TRUE; } -void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags) +void update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags) { - uint8* next; - uint8 orderType; - uint16 extraFlags; - uint16 orderLength; + BYTE* next; + BYTE orderType; + UINT16 extraFlags; + UINT16 orderLength; rdpContext* context = update->context; rdpSecondaryUpdate* secondary = update->secondary; - stream_read_uint16(s, orderLength); /* orderLength (2 bytes) */ - stream_read_uint16(s, extraFlags); /* extraFlags (2 bytes) */ - stream_read_uint8(s, orderType); /* orderType (1 byte) */ + stream_read_UINT16(s, orderLength); /* orderLength (2 bytes) */ + stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */ + stream_read_BYTE(s, orderType); /* orderType (1 byte) */ - next = s->p + ((sint16) orderLength) + 7; + next = s->p + ((INT16) orderLength) + 7; #ifdef WITH_DEBUG_ORDERS if (orderType < SECONDARY_DRAWING_ORDER_COUNT) @@ -1939,9 +1939,9 @@ void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags) s->p = next; } -void update_recv_altsec_order(rdpUpdate* update, STREAM* s, uint8 flags) +void update_recv_altsec_order(rdpUpdate* update, STREAM* s, BYTE flags) { - uint8 orderType; + BYTE orderType; rdpContext* context = update->context; rdpAltSecUpdate* altsec = update->altsec; @@ -2030,9 +2030,9 @@ void update_recv_altsec_order(rdpUpdate* update, STREAM* s, uint8 flags) BOOL update_recv_order(rdpUpdate* update, STREAM* s) { - uint8 controlFlags; + BYTE controlFlags; - stream_read_uint8(s, controlFlags); /* controlFlags (1 byte) */ + stream_read_BYTE(s, controlFlags); /* controlFlags (1 byte) */ if (!(controlFlags & ORDER_STANDARD)) update_recv_altsec_order(update, s, controlFlags); diff --git a/libfreerdp/core/orders.h b/libfreerdp/core/orders.h index c6b7e2d17..b75bb1d9a 100644 --- a/libfreerdp/core/orders.h +++ b/libfreerdp/core/orders.h @@ -209,13 +209,13 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O void update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc); void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb); -void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags); -void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags); -void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags); -void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags); -void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags); -void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags); -void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, uint16 flags); +void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags); +void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags); +void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags); +void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags); +void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags); +void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags); +void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags); void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap); void update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface); diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index 7feae92cf..ed8f9a5e3 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -67,11 +67,11 @@ static BOOL freerdp_peer_check_fds(freerdp_peer* client) static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s) { - uint8 type; - uint16 length; + BYTE type; + UINT16 length; uint32 share_id; - uint8 compressed_type; - uint16 compressed_len; + BYTE compressed_type; + UINT16 compressed_len; if (!rdp_read_share_data_header(s, &length, &type, &share_id, &compressed_type, &compressed_len)) return FALSE; @@ -156,12 +156,12 @@ static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s) static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) { rdpRdp* rdp; - uint16 length; - uint16 pduType; - uint16 pduLength; - uint16 pduSource; - uint16 channelId; - uint16 securityFlags; + UINT16 length; + UINT16 pduType; + UINT16 pduLength; + UINT16 pduSource; + UINT16 channelId; + UINT16 securityFlags; rdp = client->context->rdp; @@ -215,7 +215,7 @@ static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s) static BOOL peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s) { rdpRdp* rdp; - uint16 length; + UINT16 length; rdpFastPath* fastpath; rdp = client->context->rdp; @@ -350,7 +350,7 @@ static void freerdp_peer_disconnect(freerdp_peer* client) transport_disconnect(client->context->rdp->transport); } -static int freerdp_peer_send_channel_data(freerdp_peer* client, int channelId, uint8* data, int size) +static int freerdp_peer_send_channel_data(freerdp_peer* client, int channelId, BYTE* data, int size) { return rdp_send_channel_data(client->context->rdp, channelId, data, size); } diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 207ec7436..4b16778eb 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -75,10 +75,10 @@ static const char* const DATA_PDU_TYPE_STRINGS[] = * @param flags security flags */ -void rdp_read_security_header(STREAM* s, uint16* flags) +void rdp_read_security_header(STREAM* s, UINT16* flags) { /* Basic Security Header */ - stream_read_uint16(s, *flags); /* flags */ + stream_read_UINT16(s, *flags); /* flags */ stream_seek(s, 2); /* flagsHi (unused) */ } @@ -89,60 +89,60 @@ void rdp_read_security_header(STREAM* s, uint16* flags) * @param flags security flags */ -void rdp_write_security_header(STREAM* s, uint16 flags) +void rdp_write_security_header(STREAM* s, UINT16 flags) { /* Basic Security Header */ - stream_write_uint16(s, flags); /* flags */ - stream_write_uint16(s, 0); /* flagsHi (unused) */ + stream_write_UINT16(s, flags); /* flags */ + stream_write_UINT16(s, 0); /* flagsHi (unused) */ } -BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id) +BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id) { /* Share Control Header */ - stream_read_uint16(s, *length); /* totalLength */ + stream_read_UINT16(s, *length); /* totalLength */ if (*length - 2 > stream_get_left(s)) return FALSE; - stream_read_uint16(s, *type); /* pduType */ + stream_read_UINT16(s, *type); /* pduType */ *type &= 0x0F; /* type is in the 4 least significant bits */ if (*length > 4) - stream_read_uint16(s, *channel_id); /* pduSource */ + stream_read_UINT16(s, *channel_id); /* pduSource */ else /* Windows XP can send such short DEACTIVATE_ALL PDUs. */ *channel_id = 0; return TRUE; } -void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id) +void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id) { length -= RDP_PACKET_HEADER_MAX_LENGTH; /* Share Control Header */ - stream_write_uint16(s, length); /* totalLength */ - stream_write_uint16(s, type | 0x10); /* pduType */ - stream_write_uint16(s, channel_id); /* pduSource */ + stream_write_UINT16(s, length); /* totalLength */ + stream_write_UINT16(s, type | 0x10); /* pduType */ + stream_write_UINT16(s, channel_id); /* pduSource */ } -BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, - uint8 *compressed_type, uint16 *compressed_len) +BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id, + BYTE *compressed_type, UINT16 *compressed_len) { if (stream_get_left(s) < 12) return FALSE; /* Share Data Header */ stream_read_uint32(s, *share_id); /* shareId (4 bytes) */ - stream_seek_uint8(s); /* pad1 (1 byte) */ - stream_seek_uint8(s); /* streamId (1 byte) */ - stream_read_uint16(s, *length); /* uncompressedLength (2 bytes) */ - stream_read_uint8(s, *type); /* pduType2, Data PDU Type (1 byte) */ - stream_read_uint8(s, *compressed_type); /* compressedType (1 byte) */ - stream_read_uint16(s, *compressed_len); /* compressedLength (2 bytes) */ + stream_seek_BYTE(s); /* pad1 (1 byte) */ + stream_seek_BYTE(s); /* streamId (1 byte) */ + stream_read_UINT16(s, *length); /* uncompressedLength (2 bytes) */ + stream_read_BYTE(s, *type); /* pduType2, Data PDU Type (1 byte) */ + stream_read_BYTE(s, *compressed_type); /* compressedType (1 byte) */ + stream_read_UINT16(s, *compressed_len); /* compressedLength (2 bytes) */ return TRUE; } -void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id) +void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id) { length -= RDP_PACKET_HEADER_MAX_LENGTH; length -= RDP_SHARE_CONTROL_HEADER_LENGTH; @@ -150,12 +150,12 @@ void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 sh /* Share Data Header */ stream_write_uint32(s, share_id); /* shareId (4 bytes) */ - stream_write_uint8(s, 0); /* pad1 (1 byte) */ - stream_write_uint8(s, STREAM_LOW); /* streamId (1 byte) */ - stream_write_uint16(s, length); /* uncompressedLength (2 bytes) */ - stream_write_uint8(s, type); /* pduType2, Data PDU Type (1 byte) */ - stream_write_uint8(s, 0); /* compressedType (1 byte) */ - stream_write_uint16(s, 0); /* compressedLength (2 bytes) */ + stream_write_BYTE(s, 0); /* pad1 (1 byte) */ + stream_write_BYTE(s, STREAM_LOW); /* streamId (1 byte) */ + stream_write_UINT16(s, length); /* uncompressedLength (2 bytes) */ + stream_write_BYTE(s, type); /* pduType2, Data PDU Type (1 byte) */ + stream_write_BYTE(s, 0); /* compressedType (1 byte) */ + stream_write_UINT16(s, 0); /* compressedLength (2 bytes) */ } static int rdp_security_stream_init(rdpRdp* rdp, STREAM* s) @@ -222,9 +222,9 @@ STREAM* rdp_data_pdu_init(rdpRdp* rdp) * @param channel_id channel id */ -BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id) +BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id) { - uint16 initiator; + UINT16 initiator; enum DomainMCSPDU MCSPDU; MCSPDU = (rdp->settings->server_mode) ? DomainMCSPDU_SendDataRequest : DomainMCSPDU_SendDataIndication; @@ -240,7 +240,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id) if (MCSPDU == DomainMCSPDU_DisconnectProviderUltimatum) { - uint8 reason; + BYTE reason; (void) per_read_enumerated(s, &reason, 0); DEBUG_RDP("DisconnectProviderUltimatum from server, reason code 0x%02x\n", reason); @@ -269,7 +269,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id) * @param channel_id channel id */ -void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id) +void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id) { int body_length; enum DomainMCSPDU MCSPDU; @@ -289,7 +289,7 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id) mcs_write_domain_mcspdu_header(s, MCSPDU, length, 0); per_write_integer16(s, rdp->mcs->user_id, MCS_BASE_CHANNEL_ID); /* initiator */ per_write_integer16(s, channel_id, 0); /* channelId */ - stream_write_uint8(s, 0x70); /* dataPriority + segmentation */ + stream_write_BYTE(s, 0x70); /* dataPriority + segmentation */ /* * We always encode length in two bytes, eventhough we could use * only one byte if length <= 0x7F. It is just easier that way, @@ -297,12 +297,12 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id) * the data first and then store the header. */ length = (length - RDP_PACKET_HEADER_MAX_LENGTH) | 0x8000; - stream_write_uint16_be(s, length); /* userData (OCTET_STRING) */ + stream_write_UINT16_be(s, length); /* userData (OCTET_STRING) */ } static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) { - uint8* data; + BYTE* data; uint32 sec_flags; uint32 pad = 0; @@ -319,8 +319,8 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) data = s->p + 12; length = length - (data - s->data); - stream_write_uint16(s, 0x10); /* length */ - stream_write_uint8(s, 0x1); /* TSFIPS_VERSION 1*/ + stream_write_UINT16(s, 0x10); /* length */ + stream_write_BYTE(s, 0x1); /* TSFIPS_VERSION 1*/ /* handle padding */ pad = 8 - (length % 8); @@ -330,7 +330,7 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) if (pad) memset(data+length, 0, pad); - stream_write_uint8(s, pad); + stream_write_BYTE(s, pad); security_hmac_signature(data, length, s->p, rdp); stream_seek(s, 8); @@ -385,11 +385,11 @@ static uint32 rdp_get_sec_bytes(rdpRdp* rdp) * @param channel_id channel id */ -BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id) +BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id) { - uint16 length; + UINT16 length; uint32 sec_bytes; - uint8* sec_hold; + BYTE* sec_hold; length = stream_get_length(s); stream_set_pos(s, 0); @@ -410,11 +410,11 @@ BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id) return TRUE; } -BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id) +BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id) { - uint16 length; + UINT16 length; uint32 sec_bytes; - uint8* sec_hold; + BYTE* sec_hold; length = stream_get_length(s); stream_set_pos(s, 0); @@ -437,11 +437,11 @@ BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id) return TRUE; } -BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id) +BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id) { - uint16 length; + UINT16 length; uint32 sec_bytes; - uint8* sec_hold; + BYTE* sec_hold; length = stream_get_length(s); stream_set_pos(s, 0); @@ -475,11 +475,11 @@ void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s) BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) { - uint8 type; - uint16 length; + BYTE type; + UINT16 length; uint32 share_id; - uint8 compressed_type; - uint16 compressed_len; + BYTE compressed_type; + UINT16 compressed_len; uint32 roff; uint32 rlen; STREAM* comp_stream; @@ -609,9 +609,9 @@ BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) { - uint16 type; - uint16 length; - uint16 channelId; + UINT16 type; + UINT16 length; + UINT16 channelId; rdp_read_share_control_header(s, &length, &type, &channelId); @@ -637,19 +637,19 @@ BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s) * @param length int */ -BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) +BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags) { - uint8 cmac[8], wmac[8]; + BYTE cmac[8], wmac[8]; if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS) { - uint16 len; - uint8 version, pad; - uint8 *sig; + UINT16 len; + BYTE version, pad; + BYTE *sig; - stream_read_uint16(s, len); /* 0x10 */ - stream_read_uint8(s, version); /* 0x1 */ - stream_read_uint8(s, pad); + stream_read_UINT16(s, len); /* 0x10 */ + stream_read_BYTE(s, version); /* 0x1 */ + stream_read_BYTE(s, pad); sig = s->p; stream_seek(s, 8); /* signature */ @@ -703,13 +703,13 @@ BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags) static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) { - uint16 length; - uint16 pduType; - uint16 pduLength; - uint16 pduSource; - uint16 channelId; - uint16 securityFlags; - uint8* nextp; + UINT16 length; + UINT16 pduType; + UINT16 pduLength; + UINT16 pduSource; + UINT16 channelId; + UINT16 securityFlags; + BYTE* nextp; if (!rdp_read_header(rdp, s, &length, &channelId)) { @@ -786,7 +786,7 @@ static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s) static BOOL rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { - uint16 length; + UINT16 length; rdpFastPath* fastpath; fastpath = rdp->fastpath; @@ -883,7 +883,7 @@ static BOOL rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra) return TRUE; } -int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size) +int rdp_send_channel_data(rdpRdp* rdp, int channel_id, BYTE* data, int size) { return freerdp_channel_send(rdp, channel_id, data, size); } diff --git a/libfreerdp/core/rdp.h b/libfreerdp/core/rdp.h index 1ff51dd7a..35a73fab9 100644 --- a/libfreerdp/core/rdp.h +++ b/libfreerdp/core/rdp.h @@ -143,47 +143,47 @@ struct rdp_rdp uint32 sec_flags; BOOL do_crypt; BOOL do_secure_checksum; - uint8 sign_key[16]; - uint8 decrypt_key[16]; - uint8 encrypt_key[16]; - uint8 decrypt_update_key[16]; - uint8 encrypt_update_key[16]; + BYTE sign_key[16]; + BYTE decrypt_key[16]; + BYTE encrypt_key[16]; + BYTE decrypt_update_key[16]; + BYTE encrypt_update_key[16]; int rc4_key_len; - uint8 fips_sign_key[20]; - uint8 fips_encrypt_key[24]; - uint8 fips_decrypt_key[24]; + BYTE fips_sign_key[20]; + BYTE fips_encrypt_key[24]; + BYTE fips_decrypt_key[24]; uint32 errorInfo; uint32 finalize_sc_pdus; BOOL disconnect; }; -void rdp_read_security_header(STREAM* s, uint16* flags); -void rdp_write_security_header(STREAM* s, uint16 flags); +void rdp_read_security_header(STREAM* s, UINT16* flags); +void rdp_write_security_header(STREAM* s, UINT16 flags); -BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id); -void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id); +BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id); +void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id); -BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, - uint8 *compressed_type, uint16 *compressed_len); +BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id, + BYTE *compressed_type, UINT16 *compressed_len); -void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id); +void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id); STREAM* rdp_send_stream_init(rdpRdp* rdp); -BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id); -void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id); +BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id); +void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id); STREAM* rdp_pdu_init(rdpRdp* rdp); -BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id); +BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id); STREAM* rdp_data_pdu_init(rdpRdp* rdp); -BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id); +BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id); BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s); -BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id); +BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id); void rdp_recv(rdpRdp* rdp); -int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size); +int rdp_send_channel_data(rdpRdp* rdp, int channel_id, BYTE* data, int size); BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s); @@ -199,6 +199,6 @@ void rdp_free(rdpRdp* rdp); #define DEBUG_RDP(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) #endif -BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags); +BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags); #endif /* __RDP_H */ diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index a16dd596e..64699d82c 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -61,12 +61,12 @@ void rdp_print_redirection_flags(uint32 flags) BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) { - uint16 flags; - uint16 length; + UINT16 flags; + UINT16 length; rdpRedirection* redirection = rdp->redirection; - stream_read_uint16(s, flags); /* flags (2 bytes) */ - stream_read_uint16(s, length); /* length (2 bytes) */ + stream_read_UINT16(s, flags); /* flags (2 bytes) */ + stream_read_UINT16(s, length); /* length (2 bytes) */ stream_read_uint32(s, redirection->sessionID); /* sessionID (4 bytes) */ stream_read_uint32(s, redirection->flags); /* redirFlags (4 bytes) */ @@ -172,9 +172,9 @@ BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s) BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s) { - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ rdp_recv_server_redirection_pdu(rdp, s); - stream_seek_uint8(s); /* pad2Octets (1 byte) */ + stream_seek_BYTE(s); /* pad2Octets (1 byte) */ return TRUE; } diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index bef70f0f6..07e5427c0 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -213,7 +213,7 @@ BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc) { STREAM* s; int ntlm_token_length; - uint8* ntlm_token_data; + BYTE* ntlm_token_data; HttpResponse* http_response; rdpNtlm* ntlm = rpc->ntlm_http_out->ntlm; @@ -235,7 +235,7 @@ BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc) http_response = http_response_recv(rpc->tls_out); ntlm_token_data = NULL; - crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam), + crypto_base64_decode((BYTE*) http_response->AuthParam, strlen(http_response->AuthParam), &ntlm_token_data, &ntlm_token_length); ntlm->inputBuffer.pvBuffer = ntlm_token_data; @@ -263,7 +263,7 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc) { STREAM* s; int ntlm_token_length; - uint8* ntlm_token_data; + BYTE* ntlm_token_data; HttpResponse* http_response; rdpNtlm* ntlm = rpc->ntlm_http_in->ntlm; @@ -285,7 +285,7 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc) http_response = http_response_recv(rpc->tls_in); ntlm_token_data = NULL; - crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam), + crypto_base64_decode((BYTE*) http_response->AuthParam, strlen(http_response->AuthParam), &ntlm_token_data, &ntlm_token_length); ntlm->inputBuffer.pvBuffer = ntlm_token_data; @@ -311,20 +311,20 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc) void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header) { - stream_read_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */ - stream_read_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ - stream_read_uint8(s, header->ptype); /* PTYPE (1 byte) */ - stream_read_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */ - stream_read_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ - stream_read_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ - stream_read_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ - stream_read_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ - stream_read_uint16(s, header->frag_length); /* frag_length (2 bytes) */ - stream_read_uint16(s, header->auth_length); /* auth_length (2 bytes) */ + stream_read_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */ + stream_read_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ + stream_read_BYTE(s, header->ptype); /* PTYPE (1 byte) */ + stream_read_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */ + stream_read_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ + stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ + stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */ } -int rpc_out_write(rdpRpc* rpc, uint8* data, int length) +int rpc_out_write(rdpRpc* rpc, BYTE* data, int length) { int status; @@ -339,7 +339,7 @@ int rpc_out_write(rdpRpc* rpc, uint8* data, int length) return status; } -int rpc_in_write(rdpRpc* rpc, uint8* data, int length) +int rpc_in_write(rdpRpc* rpc, BYTE* data, int length) { int status; @@ -472,7 +472,7 @@ BOOL rpc_send_bind_pdu(rdpRpc* rpc) if (bind_pdu->auth_verifier.auth_pad_length > 0) stream_write(pdu, bind_pdu->auth_verifier.auth_pad, bind_pdu->auth_verifier.auth_pad_length); - stream_write(pdu, &bind_pdu->auth_verifier.auth_type, 8); /* assumed that uint8 pointer is 32bit long (4 bytes) */ + stream_write(pdu, &bind_pdu->auth_verifier.auth_type, 8); /* assumed that BYTE pointer is 32bit long (4 bytes) */ stream_write(pdu, bind_pdu->auth_verifier.auth_value, bind_pdu->auth_length); stream_seal(pdu); @@ -486,11 +486,11 @@ BOOL rpc_send_bind_pdu(rdpRpc* rpc) int rpc_recv_bind_ack_pdu(rdpRpc* rpc) { - uint8* p; + BYTE* p; STREAM* s; int status; - uint8* pdu; - uint8* auth_data; + BYTE* pdu; + BYTE* auth_data; RPC_PDU_HEADER header; int pdu_length = 0x8FFF; @@ -585,11 +585,11 @@ BOOL rpc_send_rpc_auth_3_pdu(rdpRpc* rpc) return TRUE; } -int rpc_out_read(rdpRpc* rpc, uint8* data, int length) +int rpc_out_read(rdpRpc* rpc, BYTE* data, int length) { STREAM* s; int status; - uint8* pdu; + BYTE* pdu; int content_length; RPC_PDU_HEADER header; @@ -661,7 +661,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length) return header.frag_length; } -int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) +int rpc_tsg_write(rdpRpc* rpc, BYTE* data, int length, UINT16 opnum) { int i; int status; @@ -672,7 +672,7 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) SECURITY_STATUS encrypt_status; rpcconn_request_hdr_t* request_pdu; - uint8 auth_pad_length = 16 - ((24 + length + 8 + 16) % 16); + BYTE auth_pad_length = 16 - ((24 + length + 8 + 16) % 16); ntlm = rpc->ntlm; @@ -773,17 +773,17 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum) return length; } -int rpc_read(rdpRpc* rpc, uint8* data, int length) +int rpc_read(rdpRpc* rpc, BYTE* data, int length) { int status; int read = 0; int data_length; - uint16 frag_length; - uint16 auth_length; - uint8 auth_pad_length; + UINT16 frag_length; + UINT16 auth_length; + BYTE auth_pad_length; uint32 call_id = -1; int rpc_length = length + 0xFF; - uint8* rpc_data = malloc(rpc_length); + BYTE* rpc_data = malloc(rpc_length); if (rpc_data == NULL) { @@ -825,8 +825,8 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length) return status; } - frag_length = *(uint16*)(rpc_data + 8); - auth_length = *(uint16*)(rpc_data + 10); + frag_length = *(UINT16*)(rpc_data + 8); + auth_length = *(UINT16*)(rpc_data + 10); call_id = *(uint32*)(rpc_data + 12); status = *(uint32*)(rpc_data + 16); /* alloc_hint */ auth_pad_length = *(rpc_data + frag_length - auth_length - 6); /* -6 = -8 + 2 (sec_trailer + 2) */ diff --git a/libfreerdp/core/rpc.h b/libfreerdp/core/rpc.h index 03bf81cfe..0f9926f95 100644 --- a/libfreerdp/core/rpc.h +++ b/libfreerdp/core/rpc.h @@ -44,18 +44,18 @@ typedef struct rdp_ntlm_http rdpNtlmHttp; struct _rpc_pdu_header { - uint8 rpc_vers; - uint8 rpc_vers_minor; - uint8 ptype; - uint8 pfc_flags; - uint8 packed_drep[4]; - uint16 frag_length; - uint16 auth_length; + BYTE rpc_vers; + BYTE rpc_vers_minor; + BYTE ptype; + BYTE pfc_flags; + BYTE packed_drep[4]; + UINT16 frag_length; + UINT16 auth_length; uint32 call_id; }; typedef struct _rpc_pdu_header RPC_PDU_HEADER; -typedef uint16 p_context_id_t; +typedef UINT16 p_context_id_t; typedef struct { uuid if_uuid; @@ -64,16 +64,16 @@ typedef struct { typedef struct { p_context_id_t p_cont_id; - uint8 n_transfer_syn; /* number of items */ - uint8 reserved; /* alignment pad, m.b.z. */ + BYTE n_transfer_syn; /* number of items */ + BYTE reserved; /* alignment pad, m.b.z. */ p_syntax_id_t abstract_syntax; /* transfer syntax list */ p_syntax_id_t* transfer_syntaxes; /*size_is(n_transfer_syn)*/ } p_cont_elem_t; typedef struct { - uint8 n_context_elem; /* number of items */ - uint8 reserved; /* alignment pad, m.b.z. */ - uint16 reserved2; /* alignment pad, m.b.z. */ + BYTE n_context_elem; /* number of items */ + BYTE reserved; /* alignment pad, m.b.z. */ + UINT16 reserved2; /* alignment pad, m.b.z. */ p_cont_elem_t* p_cont_elem; /*size_is(n_cont_elem)*/ } p_cont_list_t; @@ -101,25 +101,25 @@ typedef struct { /* Same order and number of elements as in bind request */ typedef struct { - uint8 n_results; /* count */ - uint8 reserved; /* alignment pad, m.b.z. */ - uint16 reserved2; /* alignment pad, m.b.z. */ + BYTE n_results; /* count */ + BYTE reserved; /* alignment pad, m.b.z. */ + UINT16 reserved2; /* alignment pad, m.b.z. */ p_result_t* p_results; /*size_is(n_results)*/ } p_result_list_t; typedef struct { - uint8 major; - uint8 minor; + BYTE major; + BYTE minor; } version_t; typedef version_t p_rt_version_t; typedef struct { - uint8 n_protocols; /* count */ + BYTE n_protocols; /* count */ p_rt_version_t* p_protocols; /* size_is(n_protocols) */ } p_rt_versions_supported_t; typedef struct { - uint16 length; + UINT16 length; char* port_spec; /* port string spec; size_is(length) */ } port_any_t; @@ -132,15 +132,15 @@ typedef struct { #define USER_DATA_NOT_READABLE 6 /* not used */ #define NO_PSAP_AVAILABLE 7 /* not used */ -typedef uint16 rpcrt_reason_code_t;/* 0..65535 */ +typedef UINT16 rpcrt_reason_code_t;/* 0..65535 */ typedef struct { - uint8 rpc_vers; - uint8 rpc_vers_minor; - uint8 reserved[2];/* must be zero */ - uint8 packed_drep[4]; + BYTE rpc_vers; + BYTE rpc_vers_minor; + BYTE reserved[2];/* must be zero */ + BYTE packed_drep[4]; uint32 reject_status; - uint8 reserved2[4]; + BYTE reserved2[4]; } rpcrt_optional_data_t; typedef struct { @@ -156,13 +156,13 @@ typedef struct { typedef struct{ /* restore 4 byte alignment */ - uint8* auth_pad; /* align(4); size_is(auth_pad_length) */ - uint8 auth_type; /* :01 which authent service */ - uint8 auth_level; /* :01 which level within service */ - uint8 auth_pad_length; /* :01 */ - uint8 auth_reserved; /* :01 reserved, m.b.z. */ + BYTE* auth_pad; /* align(4); size_is(auth_pad_length) */ + BYTE auth_type; /* :01 which authent service */ + BYTE auth_level; /* :01 which level within service */ + BYTE auth_pad_length; /* :01 */ + BYTE auth_reserved; /* :01 reserved, m.b.z. */ uint32 auth_context_id; /* :04 */ - uint8* auth_value; /* credentials; size_is(auth_length) */ + BYTE* auth_value; /* credentials; size_is(auth_length) */ } auth_verifier_co_t; /* Connection-oriented PDU Definitions */ @@ -171,19 +171,19 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor ; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 alter context PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor ; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 alter context PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - uint16 max_xmit_frag; /* ignored */ - uint16 max_recv_frag; /* ignored */ + UINT16 max_xmit_frag; /* ignored */ + UINT16 max_recv_frag; /* ignored */ uint32 assoc_group_id; /* ignored */ /* presentation context list */ @@ -201,26 +201,26 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 alter + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 alter context response PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - uint16 max_xmit_frag; /* ignored */ - uint16 max_recv_frag; /* ignored */ + UINT16 max_xmit_frag; /* ignored */ + UINT16 max_recv_frag; /* ignored */ uint32 assoc_group_id; /* ignored */ port_any_t sec_addr; /* ignored */ /* restore 4-octet alignment */ - uint8* pad2; /* size_is(align(4)) */ + BYTE* pad2; /* size_is(align(4)) */ /* presentation context result list, including hints */ @@ -237,19 +237,19 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 bind PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 bind PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - uint16 max_xmit_frag; /* 16:02 max transmit frag size, bytes */ - uint16 max_recv_frag; /* 18:02 max receive frag size, bytes */ + UINT16 max_xmit_frag; /* 16:02 max transmit frag size, bytes */ + UINT16 max_recv_frag; /* 18:02 max receive frag size, bytes */ uint32 assoc_group_id; /* 20:04 incarnation of client-server * assoc group */ /* presentation context list */ @@ -266,26 +266,26 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor ; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 bind ack PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor ; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 bind ack PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - uint16 max_xmit_frag; /* 16:02 max transmit frag size */ - uint16 max_recv_frag; /* 18:02 max receive frag size */ + UINT16 max_xmit_frag; /* 16:02 max transmit frag size */ + UINT16 max_recv_frag; /* 18:02 max receive frag size */ uint32 assoc_group_id; /* 20:04 returned assoc_group_id */ port_any_t sec_addr; /* 24:yy optional secondary address * for process incarnation; local port * part of address only */ /* restore 4-octet alignment */ - uint8* pad2; /* size_is(align(4)) */ + BYTE* pad2; /* size_is(align(4)) */ /* presentation context result list, including hints */ @@ -301,19 +301,19 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor ; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 bind ack PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor ; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 bind ack PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - uint16 max_xmit_frag; /* 16:02 max transmit frag size */ - uint16 max_recv_frag; /* 18:02 max receive frag size */ + UINT16 max_xmit_frag; /* 16:02 max transmit frag size */ + UINT16 max_recv_frag; /* 18:02 max receive frag size */ /* optional authentication verifier */ /* following fields present iff auth_length != 0 */ @@ -325,18 +325,18 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor ; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 bind nak PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor ; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 bind nak PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ - /*p_reject_reason_t*/uint16 provider_reject_reason; /* 16:02 presentation (TODO search definition of p_reject_reason_t) + /*p_reject_reason_t*/UINT16 provider_reject_reason; /* 16:02 presentation (TODO search definition of p_reject_reason_t) context reject */ p_rt_versions_supported_t versions; /* 18:yy array of protocol @@ -348,13 +348,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 CO cancel PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 CO cancel PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -370,13 +370,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 fault PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 fault PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -388,8 +388,8 @@ typedef struct { /* needed for response or fault */ - uint8 cancel_count; /* 22:01 received cancel count */ - uint8 reserved; /* 23:01 reserved, m.b.z. */ + BYTE cancel_count; /* 22:01 received cancel count */ + BYTE reserved; /* 23:01 reserved, m.b.z. */ /* fault code */ @@ -397,13 +397,13 @@ typedef struct { /* always pad to next 8-octet boundary */ - uint8 reserved2[4]; /* 28:04 reserved padding, m.b.z. */ + BYTE reserved2[4]; /* 28:04 reserved padding, m.b.z. */ /* stub data here, 8-octet aligned . . . */ - uint8* stub_data; + BYTE* stub_data; /* optional authentication verifier */ /* following fields present iff auth_length != 0 */ @@ -416,13 +416,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 orphaned PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 orphaned PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -438,13 +438,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 request PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 request PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -453,7 +453,7 @@ typedef struct { uint32 alloc_hint; /* 16:04 allocation hint */ p_context_id_t p_cont_id; /* 20:02 pres context, i.e. data rep */ - uint16 opnum; /* 22:02 operation # + UINT16 opnum; /* 22:02 operation # * within the interface */ /* optional field for request, only present if the PFC_OBJECT_UUID @@ -465,7 +465,7 @@ typedef struct { . . . */ - uint8* stub_data; + BYTE* stub_data; /* optional authentication verifier */ /* following fields present iff auth_length != 0 */ @@ -477,13 +477,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 response PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 length of auth_value */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 response PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 length of auth_value */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -496,14 +496,14 @@ typedef struct { /* needed for response or fault */ - uint8 cancel_count; /* 22:01 cancel count */ - uint8 reserved; /* 23:01 reserved, m.b.z. */ + BYTE cancel_count; /* 22:01 cancel count */ + BYTE reserved; /* 23:01 reserved, m.b.z. */ /* stub data here, 8-octet aligned . . . */ - uint8* stub_data; + BYTE* stub_data; /* optional authentication verifier */ /* following fields present iff auth_length != 0 */ @@ -516,13 +516,13 @@ typedef struct { /* start 8-octet aligned */ /* common fields */ - uint8 rpc_vers; /* 00:01 RPC version */ - uint8 rpc_vers_minor; /* 01:01 minor version */ - uint8 PTYPE; /* 02:01 shutdown PDU */ - uint8 pfc_flags; /* 03:01 flags */ - uint8 packed_drep[4]; /* 04:04 NDR data rep format label*/ - uint16 frag_length; /* 08:02 total length of fragment */ - uint16 auth_length; /* 10:02 */ + BYTE rpc_vers; /* 00:01 RPC version */ + BYTE rpc_vers_minor; /* 01:01 minor version */ + BYTE PTYPE; /* 02:01 shutdown PDU */ + BYTE pfc_flags; /* 03:01 flags */ + BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ + UINT16 frag_length; /* 08:02 total length of fragment */ + UINT16 auth_length; /* 10:02 */ uint32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -621,17 +621,17 @@ typedef enum _VIRTUAL_CONNECTION_STATE VIRTUAL_CONNECTION_STATE; struct rpc_virtual_connection { - uint8 Cookie[16]; /* Virtual Connection Cookie */ + BYTE Cookie[16]; /* Virtual Connection Cookie */ VIRTUAL_CONNECTION_STATE State; /* Virtual Connection State */ RpcInChannel* DefaultInChannel; /* Default IN Channel */ RpcInChannel* NonDefaultInChannel; /* Non-Default IN Channel */ - uint8 DefaultInChannelCookie[16]; /* Default IN Channel Cookie */ - uint8 NonDefaultInChannelCookie[16]; /* Non-Default Default IN Channel Cookie */ + BYTE DefaultInChannelCookie[16]; /* Default IN Channel Cookie */ + BYTE NonDefaultInChannelCookie[16]; /* Non-Default Default IN Channel Cookie */ RpcOutChannel* DefaultOutChannel; /* Default OUT Channel */ RpcOutChannel* NonDefaultOutChannel; /* Non-Default OUT Channel */ - uint8 DefaultOutChannelCookie[16]; /* Default OUT Channel Cookie */ - uint8 NonDefaultOutChannelCookie[16]; /* Non-Default Default OUT Channel Cookie */ - uint8 AssociationGroupId[16]; /* AssociationGroupId */ + BYTE DefaultOutChannelCookie[16]; /* Default OUT Channel Cookie */ + BYTE NonDefaultOutChannelCookie[16]; /* Non-Default Default OUT Channel Cookie */ + BYTE AssociationGroupId[16]; /* AssociationGroupId */ }; typedef struct rpc_virtual_connection RpcVirtualConnection; @@ -649,9 +649,9 @@ struct rdp_rpc rdpSettings* settings; rdpTransport* transport; - uint8* write_buffer; + BYTE* write_buffer; uint32 write_buffer_len; - uint8* read_buffer; + BYTE* read_buffer; uint32 read_buffer_len; uint32 call_id; @@ -677,13 +677,13 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc); void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header); -int rpc_out_write(rdpRpc* rpc, uint8* data, int length); -int rpc_in_write(rdpRpc* rpc, uint8* data, int length); +int rpc_out_write(rdpRpc* rpc, BYTE* data, int length); +int rpc_in_write(rdpRpc* rpc, BYTE* data, int length); -int rpc_out_read(rdpRpc* rpc, uint8* data, int length); +int rpc_out_read(rdpRpc* rpc, BYTE* data, int length); -int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum); -int rpc_read(rdpRpc* rpc, uint8* data, int length); +int rpc_tsg_write(rdpRpc* rpc, BYTE* data, int length, UINT16 opnum); +int rpc_read(rdpRpc* rpc, BYTE* data, int length); rdpRpc* rpc_new(rdpTransport* transport); void rpc_free(rdpRpc* rpc); diff --git a/libfreerdp/core/rts.c b/libfreerdp/core/rts.c index edb3aa6ec..d3e2af35c 100644 --- a/libfreerdp/core/rts.c +++ b/libfreerdp/core/rts.c @@ -124,36 +124,36 @@ static const char* const RTS_CMD_STRINGS[] = void rts_pdu_header_read(STREAM* s, RTS_PDU_HEADER* header) { - stream_read_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */ - stream_read_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ - stream_read_uint8(s, header->ptype); /* PTYPE (1 byte) */ - stream_read_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */ - stream_read_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ - stream_read_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ - stream_read_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ - stream_read_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ - stream_read_uint16(s, header->frag_length); /* frag_length (2 bytes) */ - stream_read_uint16(s, header->auth_length); /* auth_length (2 bytes) */ + stream_read_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */ + stream_read_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ + stream_read_BYTE(s, header->ptype); /* PTYPE (1 byte) */ + stream_read_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */ + stream_read_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ + stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ + stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ + stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */ - stream_read_uint16(s, header->flags); /* flags (2 bytes) */ - stream_read_uint16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ + stream_read_UINT16(s, header->flags); /* flags (2 bytes) */ + stream_read_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ } void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header) { - stream_write_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */ - stream_write_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ - stream_write_uint8(s, header->ptype); /* PTYPE (1 byte) */ - stream_write_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */ - stream_write_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ - stream_write_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ - stream_write_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ - stream_write_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ - stream_write_uint16(s, header->frag_length); /* frag_length (2 bytes) */ - stream_write_uint16(s, header->auth_length); /* auth_length (2 bytes) */ + stream_write_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */ + stream_write_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */ + stream_write_BYTE(s, header->ptype); /* PTYPE (1 byte) */ + stream_write_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */ + stream_write_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */ + stream_write_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */ + stream_write_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */ + stream_write_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ + stream_write_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ + stream_write_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ stream_write_uint32(s, header->call_id); /* call_id (4 bytes) */ - stream_write_uint16(s, header->flags); /* flags (2 bytes) */ - stream_write_uint16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ + stream_write_UINT16(s, header->flags); /* flags (2 bytes) */ + stream_write_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ } void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s) @@ -175,7 +175,7 @@ void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s) stream_seek(s, 16); /* ChannelCookie (16 bytes) */ } -void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, uint8* ChannelCookie) +void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie) { stream_write_uint32(s, RTS_CMD_FLOW_CONTROL_ACK); /* CommandType (4 bytes) */ @@ -201,7 +201,7 @@ void rts_cookie_command_read(rdpRpc* rpc, STREAM* s) stream_seek(s, 16); /* Cookie (16 bytes) */ } -void rts_cookie_command_write(STREAM* s, uint8* Cookie) +void rts_cookie_command_write(STREAM* s, BYTE* Cookie) { stream_write_uint32(s, RTS_CMD_COOKIE); /* CommandType (4 bytes) */ stream_write(s, Cookie, 16); /* Cookie (16 bytes) */ @@ -302,7 +302,7 @@ void rts_client_address_command_read(rdpRpc* rpc, STREAM* s) stream_seek(s, 12); /* padding (12 bytes) */ } -void rts_client_address_command_write(STREAM* s, uint32 AddressType, uint8* ClientAddress) +void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress) { stream_write_uint32(s, RTS_CMD_CLIENT_ADDRESS); /* CommandType (4 bytes) */ stream_write_uint32(s, AddressType); /* AddressType (4 bytes) */ @@ -324,7 +324,7 @@ void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s) stream_seek(s, 16); /* AssociationGroupId (16 bytes) */ } -void rts_association_group_id_command_write(STREAM* s, uint8* associationGroupId) +void rts_association_group_id_command_write(STREAM* s, BYTE* associationGroupId) { stream_write_uint32(s, RTS_CMD_ASSOCIATION_GROUP_ID); /* CommandType (4 bytes) */ stream_write(s, associationGroupId, 16); /* AssociationGroupId (16 bytes) */ @@ -352,7 +352,7 @@ void rts_ping_traffic_sent_notify_command_write(STREAM* s, uint32 PingTrafficSen stream_write_uint32(s, PingTrafficSent); /* PingTrafficSent (4 bytes) */ } -void rpc_generate_cookie(uint8* cookie) +void rpc_generate_cookie(BYTE* cookie) { RAND_pseudo_bytes(cookie, 16); } @@ -362,8 +362,8 @@ BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc) STREAM* s; RTS_PDU_HEADER header; uint32 ReceiveWindowSize; - uint8* OUTChannelCookie; - uint8* VirtualConnectionCookie; + BYTE* OUTChannelCookie; + BYTE* VirtualConnectionCookie; header.rpc_vers = 5; header.rpc_vers_minor = 0; @@ -383,11 +383,11 @@ BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc) s = stream_new(header.frag_length); - rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->Cookie)); - rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie)); + rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->Cookie)); + rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie)); - VirtualConnectionCookie = (uint8*) &(rpc->VirtualConnection->Cookie); - OUTChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie); + VirtualConnectionCookie = (BYTE*) &(rpc->VirtualConnection->Cookie); + OUTChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie); ReceiveWindowSize = rpc->VirtualConnection->DefaultOutChannel->ReceiveWindow; rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */ @@ -408,9 +408,9 @@ BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; - uint8* INChannelCookie; - uint8* AssociationGroupId; - uint8* VirtualConnectionCookie; + BYTE* INChannelCookie; + BYTE* AssociationGroupId; + BYTE* VirtualConnectionCookie; header.rpc_vers = 5; header.rpc_vers_minor = 0; @@ -430,12 +430,12 @@ BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc) s = stream_new(header.frag_length); - rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->DefaultInChannelCookie)); - rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->AssociationGroupId)); + rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->DefaultInChannelCookie)); + rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->AssociationGroupId)); - VirtualConnectionCookie = (uint8*) &(rpc->VirtualConnection->Cookie); - INChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultInChannelCookie); - AssociationGroupId = (uint8*) &(rpc->VirtualConnection->AssociationGroupId); + VirtualConnectionCookie = (BYTE*) &(rpc->VirtualConnection->Cookie); + INChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultInChannelCookie); + AssociationGroupId = (BYTE*) &(rpc->VirtualConnection->AssociationGroupId); rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */ rts_version_command_write(s); /* Version (8 bytes) */ @@ -492,7 +492,7 @@ BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc) RTS_PDU_HEADER header; uint32 BytesReceived; uint32 AvailableWindow; - uint8* ChannelCookie; + BYTE* ChannelCookie; header.rpc_vers = 5; header.rpc_vers_minor = 0; @@ -512,7 +512,7 @@ BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc) BytesReceived = rpc->VirtualConnection->DefaultOutChannel->BytesReceived; AvailableWindow = rpc->VirtualConnection->DefaultOutChannel->ReceiverAvailableWindow; - ChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie); + ChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie); s = stream_new(header.frag_length); rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */ @@ -667,11 +667,11 @@ int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu) STREAM* s; int status; int length; - uint8 header_buffer[20]; + BYTE header_buffer[20]; rdpTls* tls_out = rpc->tls_out; /* read first 20 bytes to get RTS PDU Header */ - status = tls_read(tls_out, (uint8*) &header_buffer, 20); + status = tls_read(tls_out, (BYTE*) &header_buffer, 20); if (status <= 0) { @@ -688,7 +688,7 @@ int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu) stream_free(s); length = rts_pdu->header.frag_length - 20; - rts_pdu->content = (uint8*) malloc(length); + rts_pdu->content = (BYTE*) malloc(length); status = tls_read(tls_out, rts_pdu->content, length); diff --git a/libfreerdp/core/rts.h b/libfreerdp/core/rts.h index b162dbe04..8b2df4880 100644 --- a/libfreerdp/core/rts.h +++ b/libfreerdp/core/rts.h @@ -93,23 +93,23 @@ struct _rts_pdu_header { - uint8 rpc_vers; - uint8 rpc_vers_minor; - uint8 ptype; - uint8 pfc_flags; - uint8 packed_drep[4]; - uint16 frag_length; - uint16 auth_length; + BYTE rpc_vers; + BYTE rpc_vers_minor; + BYTE ptype; + BYTE pfc_flags; + BYTE packed_drep[4]; + UINT16 frag_length; + UINT16 auth_length; uint32 call_id; - uint16 flags; - uint16 numberOfCommands; + UINT16 flags; + UINT16 numberOfCommands; }; typedef struct _rts_pdu_header RTS_PDU_HEADER; struct _rts_pdu { RTS_PDU_HEADER header; - uint8* content; + BYTE* content; }; typedef struct _rts_pdu RTS_PDU; @@ -121,11 +121,11 @@ void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header); void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s); void rts_receive_window_size_command_write(STREAM* s, uint32 ReceiveWindowSize); void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s); -void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, uint8* ChannelCookie); +void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie); void rts_connection_timeout_command_read(rdpRpc* rpc, STREAM* s); void rts_connection_timeout_command_write(STREAM* s, uint32 ConnectionTimeout); void rts_cookie_command_read(rdpRpc* rpc, STREAM* s); -void rts_cookie_command_write(STREAM* s, uint8* Cookie); +void rts_cookie_command_write(STREAM* s, BYTE* Cookie); void rts_channel_lifetime_command_read(rdpRpc* rpc, STREAM* s); void rts_channel_lifetime_command_write(STREAM* s, uint32 ChannelLifetime); void rts_client_keepalive_command_read(rdpRpc* rpc, STREAM* s); @@ -141,9 +141,9 @@ void rts_negative_ance_command_write(STREAM* s); void rts_ance_command_read(rdpRpc* rpc, STREAM* s); void rts_ance_command_write(STREAM* s); void rts_client_address_command_read(rdpRpc* rpc, STREAM* s); -void rts_client_address_command_write(STREAM* s, uint32 AddressType, uint8* ClientAddress); +void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress); void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s); -void rts_association_group_id_command_write(STREAM* s, uint8* AssociationGroupId); +void rts_association_group_id_command_write(STREAM* s, BYTE* AssociationGroupId); void rts_destination_command_read(rdpRpc* rpc, STREAM* s); void rts_destination_command_write(STREAM* s, uint32 Destination); void rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, STREAM* s); diff --git a/libfreerdp/core/security.c b/libfreerdp/core/security.c index 8c7bf4cda..7e810aac8 100644 --- a/libfreerdp/core/security.c +++ b/libfreerdp/core/security.c @@ -24,7 +24,7 @@ #include "security.h" /* 0x36 repeated 40 times */ -static const uint8 pad1[40] = +static const BYTE pad1[40] = { "\x36\x36\x36\x36\x36\x36\x36\x36" "\x36\x36\x36\x36\x36\x36\x36\x36" @@ -34,7 +34,7 @@ static const uint8 pad1[40] = }; /* 0x5C repeated 48 times */ -static const uint8 pad2[48] = +static const BYTE pad2[48] = { "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C" "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C" @@ -44,7 +44,7 @@ static const uint8 pad2[48] = "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C" }; -static const uint8 +static const BYTE fips_reverse_table[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, @@ -81,7 +81,7 @@ fips_reverse_table[256] = 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; -static const uint8 +static const BYTE fips_oddparity_table[256] = { 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x07, 0x07, @@ -118,11 +118,11 @@ fips_oddparity_table[256] = 0xf8, 0xf8, 0xfb, 0xfb, 0xfd, 0xfd, 0xfe, 0xfe }; -static void security_salted_hash(uint8* salt, uint8* input, int length, uint8* salt1, uint8* salt2, uint8* output) +static void security_salted_hash(BYTE* salt, BYTE* input, int length, BYTE* salt1, BYTE* salt2, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; - uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; + BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; /* SaltedHash(Salt, Input, Salt1, Salt2) = MD5(S + SHA1(Input + Salt + Salt1 + Salt2)) */ @@ -141,13 +141,13 @@ static void security_salted_hash(uint8* salt, uint8* input, int length, uint8* s crypto_md5_final(md5, output); } -static void security_premaster_hash(char* input, int length, uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output) +static void security_premaster_hash(char* input, int length, BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { /* PremasterHash(Input) = SaltedHash(PremasterSecret, Input, ClientRandom, ServerRandom) */ - security_salted_hash(premaster_secret, (uint8*)input, length, client_random, server_random, output); + security_salted_hash(premaster_secret, (BYTE*)input, length, client_random, server_random, output); } -void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output) +void security_master_secret(BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { /* MasterSecret = PremasterHash('A') + PremasterHash('BB') + PremasterHash('CCC') */ security_premaster_hash("A", 1, premaster_secret, client_random, server_random, &output[0]); @@ -155,13 +155,13 @@ void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8 security_premaster_hash("CCC", 3, premaster_secret, client_random, server_random, &output[32]); } -static void security_master_hash(char* input, int length, uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output) +static void security_master_hash(char* input, int length, BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { /* MasterHash(Input) = SaltedHash(MasterSecret, Input, ServerRandom, ClientRandom) */ - security_salted_hash(master_secret, (uint8*)input, length, server_random, client_random, output); + security_salted_hash(master_secret, (BYTE*)input, length, server_random, client_random, output); } -void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output) +void security_session_key_blob(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { /* MasterHash = MasterHash('A') + MasterHash('BB') + MasterHash('CCC') */ security_master_hash("A", 1, master_secret, client_random, server_random, &output[0]); @@ -169,13 +169,13 @@ void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8 security_master_hash("CCC", 3, master_secret, client_random, server_random, &output[32]); } -void security_mac_salt_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output) +void security_mac_salt_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output) { /* MacSaltKey = First128Bits(SessionKeyBlob) */ memcpy(output, session_key_blob, 16); } -void security_md5_16_32_32(uint8* in0, uint8* in1, uint8* in2, uint8* output) +void security_md5_16_32_32(BYTE* in0, BYTE* in1, BYTE* in2, BYTE* output) { CryptoMd5 md5; @@ -186,13 +186,13 @@ void security_md5_16_32_32(uint8* in0, uint8* in1, uint8* in2, uint8* output) crypto_md5_final(md5, output); } -void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output) +void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output) { /* LicensingEncryptionKey = MD5(Second128Bits(SessionKeyBlob) + ClientRandom + ServerRandom)) */ security_md5_16_32_32(&session_key_blob[16], client_random, server_random, output); } -void security_uint32_le(uint8* output, uint32 value) +void security_uint32_le(BYTE* output, uint32 value) { output[0] = (value) & 0xFF; output[1] = (value >> 8) & 0xFF; @@ -200,12 +200,12 @@ void security_uint32_le(uint8* output, uint32 value) output[3] = (value >> 24) & 0xFF; } -void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output) +void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; - uint8 length_le[4]; - uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; + BYTE length_le[4]; + BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; /* MacData = MD5(MacSaltKey + pad2 + SHA1(MacSaltKey + pad1 + length + data)) */ @@ -227,13 +227,13 @@ void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* o crypto_md5_final(md5, output); } -void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* output) +void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; - uint8 length_le[4]; - uint8 md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; - uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; + BYTE length_le[4]; + BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; + BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; security_uint32_le(length_le, length); /* length must be little-endian */ @@ -255,14 +255,14 @@ void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* outp memcpy(output, md5_digest, 8); } -void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output) +void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; - uint8 length_le[4]; - uint8 use_count_le[4]; - uint8 md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; - uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; + BYTE length_le[4]; + BYTE use_count_le[4]; + BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; + BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; security_uint32_le(length_le, length); /* length must be little-endian */ if (encryption) @@ -298,23 +298,23 @@ void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL memcpy(output, md5_digest, 8); } -static void security_A(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output) +static void security_A(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { security_premaster_hash("A", 1, master_secret, client_random, server_random, &output[0]); security_premaster_hash("BB", 2, master_secret, client_random, server_random, &output[16]); security_premaster_hash("CCC", 3, master_secret, client_random, server_random, &output[32]); } -static void security_X(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output) +static void security_X(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output) { security_premaster_hash("X", 1, master_secret, client_random, server_random, &output[0]); security_premaster_hash("YY", 2, master_secret, client_random, server_random, &output[16]); security_premaster_hash("ZZZ", 3, master_secret, client_random, server_random, &output[32]); } -static void fips_expand_key_bits(uint8* in, uint8* out) +static void fips_expand_key_bits(BYTE* in, BYTE* out) { - uint8 buf[21], c; + BYTE buf[21], c; int i, b, p, r; /* reverse every byte in the key */ @@ -345,13 +345,13 @@ static void fips_expand_key_bits(uint8* in, uint8* out) out[i] = fips_oddparity_table[fips_reverse_table[out[i]]]; } -BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp) +BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp) { - uint8 pre_master_secret[48]; - uint8 master_secret[48]; - uint8 session_key_blob[48]; - uint8* server_random; - uint8 salt40[] = { 0xD1, 0x26, 0x9E }; + BYTE pre_master_secret[48]; + BYTE master_secret[48]; + BYTE session_key_blob[48]; + BYTE* server_random; + BYTE salt40[] = { 0xD1, 0x26, 0x9E }; rdpSettings* settings; settings = rdp->settings; @@ -360,8 +360,8 @@ BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp) if (settings->encryption_method == ENCRYPTION_METHOD_FIPS) { CryptoSha1 sha1; - uint8 client_encrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1]; - uint8 client_decrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1]; + BYTE client_encrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1]; + BYTE client_decrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1]; printf("FIPS Compliant encryption level.\n"); @@ -435,13 +435,13 @@ BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp) return TRUE; } -BOOL security_key_update(uint8* key, uint8* update_key, int key_len) +BOOL security_key_update(BYTE* key, BYTE* update_key, int key_len) { - uint8 sha1h[CRYPTO_SHA1_DIGEST_LENGTH]; + BYTE sha1h[CRYPTO_SHA1_DIGEST_LENGTH]; CryptoMd5 md5; CryptoSha1 sha1; CryptoRc4 rc4; - uint8 salt40[] = { 0xD1, 0x26, 0x9E }; + BYTE salt40[] = { 0xD1, 0x26, 0x9E }; sha1 = crypto_sha1_init(); crypto_sha1_update(sha1, update_key, key_len); @@ -465,7 +465,7 @@ BOOL security_key_update(uint8* key, uint8* update_key, int key_len) return TRUE; } -BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp) { if (rdp->encrypt_use_count >= 4096) { @@ -480,7 +480,7 @@ BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp) return TRUE; } -BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp) { if (rdp->decrypt_use_count >= 4096) { @@ -495,10 +495,10 @@ BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp) return TRUE; } -void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp) +void security_hmac_signature(BYTE* data, int length, BYTE* output, rdpRdp* rdp) { - uint8 buf[20]; - uint8 use_count_le[4]; + BYTE buf[20]; + BYTE use_count_le[4]; security_uint32_le(use_count_le, rdp->encrypt_use_count); @@ -510,23 +510,23 @@ void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp memmove(output, buf, 8); } -BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp) { crypto_des3_encrypt(rdp->fips_encrypt, length, data, data); rdp->encrypt_use_count++; return TRUE; } -BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp) +BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp) { crypto_des3_decrypt(rdp->fips_decrypt, length, data, data); return TRUE; } -BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp) +BOOL security_fips_check_signature(BYTE* data, int length, BYTE* sig, rdpRdp* rdp) { - uint8 buf[20]; - uint8 use_count_le[4]; + BYTE buf[20]; + BYTE use_count_le[4]; security_uint32_le(use_count_le, rdp->decrypt_use_count); diff --git a/libfreerdp/core/security.h b/libfreerdp/core/security.h index 8747d56f4..cca4fa784 100644 --- a/libfreerdp/core/security.h +++ b/libfreerdp/core/security.h @@ -26,22 +26,22 @@ #include #include -void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output); -void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output); -void security_mac_salt_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output); -void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output); -void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output); +void security_master_secret(BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output); +void security_session_key_blob(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output); +void security_mac_salt_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output); +void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output); +void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output); -void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* output); -void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output); -BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp); +void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output); +void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output); +BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp); -BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp); -BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp); +BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp); +BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp); -void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp); -BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp); -BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp); -BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp); +void security_hmac_signature(BYTE* data, int length, BYTE* output, rdpRdp* rdp); +BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp); +BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp); +BOOL security_fips_check_signature(BYTE* data, int length, BYTE* sig, rdpRdp* rdp); #endif /* __SECURITY_H */ diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c index 8738feaa3..fe81d875f 100644 --- a/libfreerdp/core/surface.c +++ b/libfreerdp/core/surface.c @@ -30,15 +30,15 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s) int pos; SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; - stream_read_uint16(s, cmd->destLeft); - stream_read_uint16(s, cmd->destTop); - stream_read_uint16(s, cmd->destRight); - stream_read_uint16(s, cmd->destBottom); - stream_read_uint8(s, cmd->bpp); + stream_read_UINT16(s, cmd->destLeft); + stream_read_UINT16(s, cmd->destTop); + stream_read_UINT16(s, cmd->destRight); + stream_read_UINT16(s, cmd->destBottom); + stream_read_BYTE(s, cmd->bpp); stream_seek(s, 2); /* reserved1, reserved2 */ - stream_read_uint8(s, cmd->codecID); - stream_read_uint16(s, cmd->width); - stream_read_uint16(s, cmd->height); + stream_read_BYTE(s, cmd->codecID); + stream_read_UINT16(s, cmd->width); + stream_read_UINT16(s, cmd->height); stream_read_uint32(s, cmd->bitmapDataLength); pos = stream_get_pos(s) + cmd->bitmapDataLength; cmd->bitmapData = stream_get_tail(s); @@ -63,7 +63,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s) { SURFACE_FRAME_MARKER* marker = &update->surface_frame_marker; - stream_read_uint16(s, marker->frameAction); + stream_read_UINT16(s, marker->frameAction); stream_read_uint32(s, marker->frameId); IFCALL(update->SurfaceFrameMarker, update->context, marker); @@ -78,15 +78,15 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s) BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s) { - uint8* mark; - uint16 cmdType; + BYTE* mark; + UINT16 cmdType; uint32 cmdLength; while (size > 2) { stream_get_mark(s, mark); - stream_read_uint16(s, cmdType); + stream_read_UINT16(s, cmdType); size -= 2; switch (cmdType) @@ -120,27 +120,27 @@ void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* c { stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH); - stream_write_uint16(s, CMDTYPE_STREAM_SURFACE_BITS); + stream_write_UINT16(s, CMDTYPE_STREAM_SURFACE_BITS); - stream_write_uint16(s, cmd->destLeft); - stream_write_uint16(s, cmd->destTop); - stream_write_uint16(s, cmd->destRight); - stream_write_uint16(s, cmd->destBottom); - stream_write_uint8(s, cmd->bpp); - stream_write_uint16(s, 0); /* reserved1, reserved2 */ - stream_write_uint8(s, cmd->codecID); - stream_write_uint16(s, cmd->width); - stream_write_uint16(s, cmd->height); + stream_write_UINT16(s, cmd->destLeft); + stream_write_UINT16(s, cmd->destTop); + stream_write_UINT16(s, cmd->destRight); + stream_write_UINT16(s, cmd->destBottom); + stream_write_BYTE(s, cmd->bpp); + stream_write_UINT16(s, 0); /* reserved1, reserved2 */ + stream_write_BYTE(s, cmd->codecID); + stream_write_UINT16(s, cmd->width); + stream_write_UINT16(s, cmd->height); stream_write_uint32(s, cmd->bitmapDataLength); } -void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId) +void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId) { stream_check_size(s, SURFCMD_FRAME_MARKER_LENGTH); - stream_write_uint16(s, CMDTYPE_FRAME_MARKER); + stream_write_UINT16(s, CMDTYPE_FRAME_MARKER); - stream_write_uint16(s, frameAction); + stream_write_UINT16(s, frameAction); stream_write_uint32(s, frameId); } diff --git a/libfreerdp/core/surface.h b/libfreerdp/core/surface.h index 00c34337c..3890e0fd1 100644 --- a/libfreerdp/core/surface.h +++ b/libfreerdp/core/surface.h @@ -36,7 +36,7 @@ enum SURFCMD_CMDTYPE BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s); void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd); -void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId); +void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId); #endif /* __SURFACE */ diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index fe0a6e056..9be5cde90 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -61,7 +61,7 @@ void tcp_get_ip_address(rdpTcp * tcp) { - uint8* ip; + BYTE* ip; socklen_t length; struct sockaddr_in sockaddr; @@ -69,7 +69,7 @@ void tcp_get_ip_address(rdpTcp * tcp) if (getsockname(tcp->sockfd, (struct sockaddr*) &sockaddr, &length) == 0) { - ip = (uint8*) (&sockaddr.sin_addr); + ip = (BYTE*) (&sockaddr.sin_addr); snprintf(tcp->ip_address, sizeof(tcp->ip_address), "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]); } @@ -87,7 +87,7 @@ void tcp_get_ip_address(rdpTcp * tcp) void tcp_get_mac_address(rdpTcp * tcp) { #ifdef LINUX - uint8* mac; + BYTE* mac; struct ifreq if_req; struct if_nameindex* ni; @@ -117,7 +117,7 @@ void tcp_get_mac_address(rdpTcp * tcp) mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); */ } -BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) +BOOL tcp_connect(rdpTcp* tcp, const char* hostname, UINT16 port) { uint32 option_value; socklen_t option_len; @@ -160,12 +160,12 @@ BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port) return TRUE; } -int tcp_read(rdpTcp* tcp, uint8* data, int length) +int tcp_read(rdpTcp* tcp, BYTE* data, int length) { return freerdp_tcp_read(tcp->sockfd, data, length); } -int tcp_write(rdpTcp* tcp, uint8* data, int length) +int tcp_write(rdpTcp* tcp, BYTE* data, int length) { return freerdp_tcp_write(tcp->sockfd, data, length); } diff --git a/libfreerdp/core/tcp.h b/libfreerdp/core/tcp.h index fbdb1440f..fe602784a 100644 --- a/libfreerdp/core/tcp.h +++ b/libfreerdp/core/tcp.h @@ -37,17 +37,17 @@ struct rdp_tcp { int sockfd; char ip_address[32]; - uint8 mac_address[6]; + BYTE mac_address[6]; struct rdp_settings* settings; #ifdef _WIN32 WSAEVENT wsa_event; #endif }; -BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port); +BOOL tcp_connect(rdpTcp* tcp, const char* hostname, UINT16 port); BOOL tcp_disconnect(rdpTcp* tcp); -int tcp_read(rdpTcp* tcp, uint8* data, int length); -int tcp_write(rdpTcp* tcp, uint8* data, int length); +int tcp_read(rdpTcp* tcp, BYTE* data, int length); +int tcp_write(rdpTcp* tcp, BYTE* data, int length); BOOL tcp_set_blocking_mode(rdpTcp* tcp, BOOL blocking); BOOL tcp_set_keep_alive_mode(rdpTcp* tcp); diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index 1844bed80..5042ff42e 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -34,14 +34,14 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time) { - stream_read_uint16(s, system_time->wYear); /* wYear, must be set to 0 */ - stream_read_uint16(s, system_time->wMonth); /* wMonth */ - stream_read_uint16(s, system_time->wDayOfWeek); /* wDayOfWeek */ - stream_read_uint16(s, system_time->wDay); /* wDay */ - stream_read_uint16(s, system_time->wHour); /* wHour */ - stream_read_uint16(s, system_time->wMinute); /* wMinute */ - stream_read_uint16(s, system_time->wSecond); /* wSecond */ - stream_read_uint16(s, system_time->wMilliseconds); /* wMilliseconds */ + stream_read_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */ + stream_read_UINT16(s, system_time->wMonth); /* wMonth */ + stream_read_UINT16(s, system_time->wDayOfWeek); /* wDayOfWeek */ + stream_read_UINT16(s, system_time->wDay); /* wDay */ + stream_read_UINT16(s, system_time->wHour); /* wHour */ + stream_read_UINT16(s, system_time->wMinute); /* wMinute */ + stream_read_UINT16(s, system_time->wSecond); /* wSecond */ + stream_read_UINT16(s, system_time->wMilliseconds); /* wMilliseconds */ } /** @@ -53,14 +53,14 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time) void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time) { - stream_write_uint16(s, system_time->wYear); /* wYear, must be set to 0 */ - stream_write_uint16(s, system_time->wMonth); /* wMonth */ - stream_write_uint16(s, system_time->wDayOfWeek); /* wDayOfWeek */ - stream_write_uint16(s, system_time->wDay); /* wDay */ - stream_write_uint16(s, system_time->wHour); /* wHour */ - stream_write_uint16(s, system_time->wMinute); /* wMinute */ - stream_write_uint16(s, system_time->wSecond); /* wSecond */ - stream_write_uint16(s, system_time->wMilliseconds); /* wMilliseconds */ + stream_write_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */ + stream_write_UINT16(s, system_time->wMonth); /* wMonth */ + stream_write_UINT16(s, system_time->wDayOfWeek); /* wDayOfWeek */ + stream_write_UINT16(s, system_time->wDay); /* wDay */ + stream_write_UINT16(s, system_time->wHour); /* wHour */ + stream_write_UINT16(s, system_time->wMinute); /* wMinute */ + stream_write_UINT16(s, system_time->wSecond); /* wSecond */ + stream_write_UINT16(s, system_time->wMilliseconds); /* wMilliseconds */ DEBUG_TIMEZONE("Time: y=%d,m=%d,dow=%d,d=%d, %02d:%02d:%02d.%03d", system_time->wYear, system_time->wMonth, system_time->wDayOfWeek, system_time->wDay, system_time->wHour, system_time->wMinute, diff --git a/libfreerdp/core/tpdu.c b/libfreerdp/core/tpdu.c index de833759e..51cb78189 100644 --- a/libfreerdp/core/tpdu.c +++ b/libfreerdp/core/tpdu.c @@ -66,13 +66,13 @@ * @return TPDU length indicator (LI) */ -uint8 -tpdu_read_header(STREAM* s, uint8* code) +BYTE +tpdu_read_header(STREAM* s, BYTE* code) { - uint8 li; + BYTE li; - stream_read_uint8(s, li); /* LI */ - stream_read_uint8(s, *code); /* Code */ + stream_read_BYTE(s, li); /* LI */ + stream_read_BYTE(s, *code); /* Code */ if (*code == X224_TPDU_DATA) { @@ -98,20 +98,20 @@ tpdu_read_header(STREAM* s, uint8* code) */ void -tpdu_write_header(STREAM* s, uint16 length, uint8 code) +tpdu_write_header(STREAM* s, UINT16 length, BYTE code) { - stream_write_uint8(s, length); /* LI */ - stream_write_uint8(s, code); /* code */ + stream_write_BYTE(s, length); /* LI */ + stream_write_BYTE(s, code); /* code */ if (code == X224_TPDU_DATA) { - stream_write_uint8(s, 0x80); /* EOT */ + stream_write_BYTE(s, 0x80); /* EOT */ } else { - stream_write_uint16(s, 0); /* DST-REF */ - stream_write_uint16(s, 0); /* SRC-REF */ - stream_write_uint8(s, 0); /* Class 0 */ + stream_write_UINT16(s, 0); /* DST-REF */ + stream_write_UINT16(s, 0); /* SRC-REF */ + stream_write_BYTE(s, 0); /* Class 0 */ } } @@ -121,10 +121,10 @@ tpdu_write_header(STREAM* s, uint16 length, uint8 code) * @return length indicator (LI) */ -uint8 tpdu_read_connection_request(STREAM* s) +BYTE tpdu_read_connection_request(STREAM* s) { - uint8 li; - uint8 code; + BYTE li; + BYTE code; li = tpdu_read_header(s, &code); @@ -144,7 +144,7 @@ uint8 tpdu_read_connection_request(STREAM* s) */ void -tpdu_write_connection_request(STREAM* s, uint16 length) +tpdu_write_connection_request(STREAM* s, UINT16 length) { tpdu_write_header(s, length, X224_TPDU_CONNECTION_REQUEST); } @@ -155,11 +155,11 @@ tpdu_write_connection_request(STREAM* s, uint16 length) * @return length indicator (LI) */ -uint8 +BYTE tpdu_read_connection_confirm(STREAM* s) { - uint8 li; - uint8 code; + BYTE li; + BYTE code; li = tpdu_read_header(s, &code); @@ -179,7 +179,7 @@ tpdu_read_connection_confirm(STREAM* s) */ void -tpdu_write_connection_confirm(STREAM* s, uint16 length) +tpdu_write_connection_confirm(STREAM* s, UINT16 length) { tpdu_write_header(s, length, X224_TPDU_CONNECTION_CONFIRM); } @@ -191,7 +191,7 @@ tpdu_write_connection_confirm(STREAM* s, uint16 length) */ void -tpdu_write_disconnect_request(STREAM* s, uint16 length) +tpdu_write_disconnect_request(STREAM* s, UINT16 length) { tpdu_write_header(s, length, X224_TPDU_DISCONNECT_REQUEST); } @@ -212,11 +212,11 @@ tpdu_write_data(STREAM* s) * @param s stream */ -uint16 +UINT16 tpdu_read_data(STREAM* s) { - uint8 code; - uint16 li; + BYTE code; + UINT16 li; li = tpdu_read_header(s, &code); diff --git a/libfreerdp/core/tpdu.h b/libfreerdp/core/tpdu.h index 193f71913..cf92551f0 100644 --- a/libfreerdp/core/tpdu.h +++ b/libfreerdp/core/tpdu.h @@ -41,14 +41,14 @@ enum X224_TPDU_TYPE #define TPDU_CONNECTION_CONFIRM_LENGTH (TPKT_HEADER_LENGTH + TPDU_CONNECTION_CONFIRM_HEADER_LENGTH) #define TPDU_DISCONNECT_REQUEST_LENGTH (TPKT_HEADER_LENGTH + TPDU_DISCONNECT_REQUEST_HEADER_LENGTH) -uint8 tpdu_read_header(STREAM* s, uint8* code); -void tpdu_write_header(STREAM* s, uint16 length, uint8 code); -uint8 tpdu_read_connection_request(STREAM* s); -void tpdu_write_connection_request(STREAM* s, uint16 length); -uint8 tpdu_read_connection_confirm(STREAM* s); -void tpdu_write_connection_confirm(STREAM* s, uint16 length); -void tpdu_write_disconnect_request(STREAM* s, uint16 length); -uint16 tpdu_read_data(STREAM* s); +BYTE tpdu_read_header(STREAM* s, BYTE* code); +void tpdu_write_header(STREAM* s, UINT16 length, BYTE code); +BYTE tpdu_read_connection_request(STREAM* s); +void tpdu_write_connection_request(STREAM* s, UINT16 length); +BYTE tpdu_read_connection_confirm(STREAM* s); +void tpdu_write_connection_confirm(STREAM* s, UINT16 length); +void tpdu_write_disconnect_request(STREAM* s, UINT16 length); +UINT16 tpdu_read_data(STREAM* s); void tpdu_write_data(STREAM* s); #endif /* __TPDU_H */ diff --git a/libfreerdp/core/tpkt.c b/libfreerdp/core/tpkt.c index 5d6e17342..8f52285bc 100644 --- a/libfreerdp/core/tpkt.c +++ b/libfreerdp/core/tpkt.c @@ -65,9 +65,9 @@ BOOL tpkt_verify_header(STREAM* s) { - uint8 version; + BYTE version; - stream_peek_uint8(s, version); + stream_peek_BYTE(s, version); if (version == 3) return TRUE; else @@ -80,17 +80,17 @@ BOOL tpkt_verify_header(STREAM* s) * @return length */ -uint16 tpkt_read_header(STREAM* s) +UINT16 tpkt_read_header(STREAM* s) { - uint8 version; - uint16 length; + BYTE version; + UINT16 length; - stream_peek_uint8(s, version); + stream_peek_BYTE(s, version); if (version == 3) { stream_seek(s, 2); - stream_read_uint16_be(s, length); + stream_read_UINT16_be(s, length); } else { @@ -107,9 +107,9 @@ uint16 tpkt_read_header(STREAM* s) * @param length */ -void tpkt_write_header(STREAM* s, uint16 length) +void tpkt_write_header(STREAM* s, UINT16 length) { - stream_write_uint8(s, 3); /* version */ - stream_write_uint8(s, 0); /* reserved */ - stream_write_uint16_be(s, length); /* length */ + stream_write_BYTE(s, 3); /* version */ + stream_write_BYTE(s, 0); /* reserved */ + stream_write_UINT16_be(s, length); /* length */ } diff --git a/libfreerdp/core/tpkt.h b/libfreerdp/core/tpkt.h index ae0db9fef..73579d269 100644 --- a/libfreerdp/core/tpkt.h +++ b/libfreerdp/core/tpkt.h @@ -28,7 +28,7 @@ #define TPKT_HEADER_LENGTH 4 BOOL tpkt_verify_header(STREAM* s); -uint16 tpkt_read_header(STREAM* s); -void tpkt_write_header(STREAM* s, uint16 length); +UINT16 tpkt_read_header(STREAM* s); +void tpkt_write_header(STREAM* s, UINT16 length); #endif /* __TPKT_H */ diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 21bc13f4e..2e820e8a5 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -155,7 +155,7 @@ BOOL transport_connect_nla(rdpTransport* transport) return TRUE; } -BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16 port) +BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, UINT16 port) { rdpTsg* tsg = tsg_new(transport); @@ -184,7 +184,7 @@ BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16 return TRUE; } -BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port) +BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 port) { BOOL status = FALSE; rdpSettings* settings = transport->settings; @@ -386,7 +386,7 @@ int transport_check_fds(rdpTransport** ptransport) { int pos; int status; - uint16 length; + UINT16 length; STREAM* received; rdpTransport* transport = *ptransport; diff --git a/libfreerdp/core/transport.h b/libfreerdp/core/transport.h index 3c2641088..40d8d7b07 100644 --- a/libfreerdp/core/transport.h +++ b/libfreerdp/core/transport.h @@ -70,7 +70,7 @@ struct rdp_transport STREAM* transport_recv_stream_init(rdpTransport* transport, int size); STREAM* transport_send_stream_init(rdpTransport* transport, int size); -BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port); +BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 port); void transport_attach(rdpTransport* transport, int sockfd); BOOL transport_disconnect(rdpTransport* transport); BOOL transport_connect_rdp(rdpTransport* transport); diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index 80c15a716..353689bb7 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -41,7 +41,7 @@ * RPC NDR Interface Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/hh802752/ */ -uint8 tsg_packet1[108] = +BYTE tsg_packet1[108] = { 0x43, 0x56, 0x00, 0x00, 0x43, 0x56, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x54, 0x43, 0x56, 0x04, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -284,7 +284,7 @@ uint8 tsg_packet1[108] = HRESULT ReturnValue: 00 00 00 00 */ -uint8 tsg_packet2[112] = +BYTE tsg_packet2[112] = { 0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30, 0x53, 0x6C, 0x04, 0x33, 0x52, 0x51, 0x00, 0x00, 0x52, 0x51, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, @@ -330,7 +330,7 @@ uint8 tsg_packet2[112] = 0x00, 0x00 */ -uint8 tsg_packet3[40] = +BYTE tsg_packet3[40] = { 0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30, 0x53, 0x6C, 0x04, 0x33, 0x01, 0x00, 0x00, 0x00, 0x52, 0x47, 0x00, 0x00, 0x52, 0x47, 0x00, 0x00, @@ -349,7 +349,7 @@ uint8 tsg_packet3[40] = 0x01, 0x00, 0x00, 0x00 */ -uint8 tsg_packet4[48] = +BYTE tsg_packet4[48] = { 0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30, 0x53, 0x6C, 0x04, 0x33, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -366,7 +366,7 @@ uint8 tsg_packet4[48] = 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00 */ -uint8 tsg_packet5[20] = +BYTE tsg_packet5[20] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -453,9 +453,9 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, return length; } -BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) +BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port) { - uint8* data; + BYTE* data; uint32 length; STREAM* s_p4; int status = -1; @@ -582,7 +582,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) stream_write_uint32(s_p4, 0x00000000); /* Offset */ stream_write_uint32(s_p4, (dest_addr_unic_len / 2) + 1); /* ActualCount */ stream_write(s_p4, dest_addr_unic, dest_addr_unic_len); - stream_write_uint16(s_p4, 0x0000); /* unicode zero to terminate hostname string */ + stream_write_UINT16(s_p4, 0x0000); /* unicode zero to terminate hostname string */ free(dest_addr_unic); @@ -653,7 +653,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port) return TRUE; } -int tsg_read(rdpTsg* tsg, uint8* data, uint32 length) +int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length) { int status; @@ -662,7 +662,7 @@ int tsg_read(rdpTsg* tsg, uint8* data, uint32 length) return status; } -int tsg_write(rdpTsg* tsg, uint8* data, uint32 length) +int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length) { return TsProxySendToServer((handle_t) tsg, data, 1, &length); } diff --git a/libfreerdp/core/tsg.h b/libfreerdp/core/tsg.h index 4fcbb12b3..03d0c3120 100644 --- a/libfreerdp/core/tsg.h +++ b/libfreerdp/core/tsg.h @@ -42,8 +42,8 @@ struct rdp_tsg rdpRpc* rpc; rdpSettings* settings; rdpTransport* transport; - uint8 TunnelContext[16]; - uint8 ChannelContext[16]; + BYTE TunnelContext[16]; + BYTE ChannelContext[16]; }; typedef wchar_t* RESOURCENAME; @@ -241,10 +241,10 @@ typedef struct _TSG_PACKET DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, uint32* lengths); -BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port); +BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port); -int tsg_write(rdpTsg* tsg, uint8* data, uint32 length); -int tsg_read(rdpTsg* tsg, uint8* data, uint32 length); +int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length); +int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length); rdpTsg* tsg_new(rdpTransport* transport); void tsg_free(rdpTsg* tsg); diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 9825fb987..1490c44ce 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -38,11 +38,11 @@ static const char* const UPDATE_TYPE_STRINGS[] = BOOL update_recv_orders(rdpUpdate* update, STREAM* s) { - uint16 numberOrders; + UINT16 numberOrders; - stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */ - stream_read_uint16(s, numberOrders); /* numberOrders (2 bytes) */ - stream_seek_uint16(s); /* pad2OctetsB (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ + stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */ + stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */ while (numberOrders > 0) { @@ -56,24 +56,24 @@ BOOL update_recv_orders(rdpUpdate* update, STREAM* s) void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data) { - stream_read_uint16(s, bitmap_data->destLeft); - stream_read_uint16(s, bitmap_data->destTop); - stream_read_uint16(s, bitmap_data->destRight); - stream_read_uint16(s, bitmap_data->destBottom); - stream_read_uint16(s, bitmap_data->width); - stream_read_uint16(s, bitmap_data->height); - stream_read_uint16(s, bitmap_data->bitsPerPixel); - stream_read_uint16(s, bitmap_data->flags); - stream_read_uint16(s, bitmap_data->bitmapLength); + stream_read_UINT16(s, bitmap_data->destLeft); + stream_read_UINT16(s, bitmap_data->destTop); + stream_read_UINT16(s, bitmap_data->destRight); + stream_read_UINT16(s, bitmap_data->destBottom); + stream_read_UINT16(s, bitmap_data->width); + stream_read_UINT16(s, bitmap_data->height); + stream_read_UINT16(s, bitmap_data->bitsPerPixel); + stream_read_UINT16(s, bitmap_data->flags); + stream_read_UINT16(s, bitmap_data->bitmapLength); if (bitmap_data->flags & BITMAP_COMPRESSION) { if (!(bitmap_data->flags & NO_BITMAP_COMPRESSION_HDR)) { - stream_read_uint16(s, bitmap_data->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */ - stream_read_uint16(s, bitmap_data->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */ - stream_read_uint16(s, bitmap_data->cbScanWidth); /* cbScanWidth (2 bytes) */ - stream_read_uint16(s, bitmap_data->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */ + stream_read_UINT16(s, bitmap_data->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */ + stream_read_UINT16(s, bitmap_data->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */ + stream_read_UINT16(s, bitmap_data->cbScanWidth); /* cbScanWidth (2 bytes) */ + stream_read_UINT16(s, bitmap_data->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */ bitmap_data->bitmapLength = bitmap_data->cbCompMainBodySize; } @@ -93,11 +93,11 @@ void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_upda { int i; - stream_read_uint16(s, bitmap_update->number); /* numberRectangles (2 bytes) */ + stream_read_UINT16(s, bitmap_update->number); /* numberRectangles (2 bytes) */ if (bitmap_update->number > bitmap_update->count) { - uint16 count; + UINT16 count; count = bitmap_update->number * 2; @@ -122,7 +122,7 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u int i; PALETTE_ENTRY* entry; - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ stream_read_uint32(s, palette_update->number); /* numberColors (4 bytes), must be set to 256 */ if (palette_update->number > 256) @@ -133,15 +133,15 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u { entry = &palette_update->entries[i]; - stream_read_uint8(s, entry->blue); - stream_read_uint8(s, entry->green); - stream_read_uint8(s, entry->red); + stream_read_BYTE(s, entry->blue); + stream_read_BYTE(s, entry->green); + stream_read_BYTE(s, entry->red); } } void update_read_synchronize(rdpUpdate* update, STREAM* s) { - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ /** * The Synchronize Update is an artifact from the @@ -163,8 +163,8 @@ void update_recv_play_sound(rdpUpdate* update, STREAM* s) void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_position) { - stream_read_uint16(s, pointer_position->xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, pointer_position->yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointer_position->xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, pointer_position->yPos); /* yPos (2 bytes) */ } void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system) @@ -174,13 +174,13 @@ void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color) { - stream_read_uint16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */ - stream_read_uint16(s, pointer_color->xPos); /* xPos (2 bytes) */ - stream_read_uint16(s, pointer_color->yPos); /* yPos (2 bytes) */ - stream_read_uint16(s, pointer_color->width); /* width (2 bytes) */ - stream_read_uint16(s, pointer_color->height); /* height (2 bytes) */ - stream_read_uint16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */ - stream_read_uint16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */ + stream_read_UINT16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, pointer_color->xPos); /* xPos (2 bytes) */ + stream_read_UINT16(s, pointer_color->yPos); /* yPos (2 bytes) */ + stream_read_UINT16(s, pointer_color->width); /* width (2 bytes) */ + stream_read_UINT16(s, pointer_color->height); /* height (2 bytes) */ + stream_read_UINT16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */ + stream_read_UINT16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */ /** * There does not seem to be any documentation on why @@ -195,39 +195,39 @@ void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color) if (pointer_color->lengthXorMask > 0) { - pointer_color->xorMaskData = (uint8*) malloc(pointer_color->lengthXorMask); + pointer_color->xorMaskData = (BYTE*) malloc(pointer_color->lengthXorMask); stream_read(s, pointer_color->xorMaskData, pointer_color->lengthXorMask); } if (pointer_color->lengthAndMask > 0) { - pointer_color->andMaskData = (uint8*) malloc(pointer_color->lengthAndMask); + pointer_color->andMaskData = (BYTE*) malloc(pointer_color->lengthAndMask); stream_read(s, pointer_color->andMaskData, pointer_color->lengthAndMask); } if (stream_get_left(s) > 0) - stream_seek_uint8(s); /* pad (1 byte) */ + stream_seek_BYTE(s); /* pad (1 byte) */ } void update_read_pointer_new(STREAM* s, POINTER_NEW_UPDATE* pointer_new) { - stream_read_uint16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */ + stream_read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */ update_read_pointer_color(s, &pointer_new->colorPtrAttr); /* colorPtrAttr */ } void update_read_pointer_cached(STREAM* s, POINTER_CACHED_UPDATE* pointer_cached) { - stream_read_uint16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */ + stream_read_UINT16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */ } void update_recv_pointer(rdpUpdate* update, STREAM* s) { - uint16 messageType; + UINT16 messageType; rdpContext* context = update->context; rdpPointerUpdate* pointer = update->pointer; - stream_read_uint16(s, messageType); /* messageType (2 bytes) */ - stream_seek_uint16(s); /* pad2Octets (2 bytes) */ + stream_read_UINT16(s, messageType); /* messageType (2 bytes) */ + stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ switch (messageType) { @@ -263,10 +263,10 @@ void update_recv_pointer(rdpUpdate* update, STREAM* s) BOOL update_recv(rdpUpdate* update, STREAM* s) { - uint16 updateType; + UINT16 updateType; rdpContext* context = update->context; - stream_read_uint16(s, updateType); /* updateType (2 bytes) */ + stream_read_UINT16(s, updateType); /* updateType (2 bytes) */ //printf("%s Update Data PDU\n", UPDATE_TYPE_STRINGS[updateType]); @@ -347,23 +347,23 @@ static void update_end_paint(rdpContext* context) } -static void update_write_refresh_rect(STREAM* s, uint8 count, RECTANGLE_16* areas) +static void update_write_refresh_rect(STREAM* s, BYTE count, RECTANGLE_16* areas) { int i; - stream_write_uint8(s, count); /* numberOfAreas (1 byte) */ + stream_write_BYTE(s, count); /* numberOfAreas (1 byte) */ stream_seek(s, 3); /* pad3Octets (3 bytes) */ for (i = 0; i < count; i++) { - stream_write_uint16(s, areas[i].left); /* left (2 bytes) */ - stream_write_uint16(s, areas[i].top); /* top (2 bytes) */ - stream_write_uint16(s, areas[i].right); /* right (2 bytes) */ - stream_write_uint16(s, areas[i].bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, areas[i].left); /* left (2 bytes) */ + stream_write_UINT16(s, areas[i].top); /* top (2 bytes) */ + stream_write_UINT16(s, areas[i].right); /* right (2 bytes) */ + stream_write_UINT16(s, areas[i].bottom); /* bottom (2 bytes) */ } } -static void update_send_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* areas) +static void update_send_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas) { STREAM* s; rdpRdp* rdp = context->rdp; @@ -377,21 +377,21 @@ static void update_send_refresh_rect(rdpContext* context, uint8 count, RECTANGLE } } -static void update_write_suppress_output(STREAM* s, uint8 allow, RECTANGLE_16* area) +static void update_write_suppress_output(STREAM* s, BYTE allow, RECTANGLE_16* area) { - stream_write_uint8(s, allow); /* allowDisplayUpdates (1 byte) */ + stream_write_BYTE(s, allow); /* allowDisplayUpdates (1 byte) */ stream_seek(s, 3); /* pad3Octets (3 bytes) */ if (allow > 0) { - stream_write_uint16(s, area->left); /* left (2 bytes) */ - stream_write_uint16(s, area->top); /* top (2 bytes) */ - stream_write_uint16(s, area->right); /* right (2 bytes) */ - stream_write_uint16(s, area->bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, area->left); /* left (2 bytes) */ + stream_write_UINT16(s, area->top); /* top (2 bytes) */ + stream_write_UINT16(s, area->right); /* right (2 bytes) */ + stream_write_UINT16(s, area->bottom); /* bottom (2 bytes) */ } } -static void update_send_suppress_output(rdpContext* context, uint8 allow, RECTANGLE_16* area) +static void update_send_suppress_output(rdpContext* context, BYTE allow, RECTANGLE_16* area) { STREAM* s; rdpRdp* rdp = context->rdp; @@ -460,18 +460,18 @@ static void update_send_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) s = fastpath_update_pdu_init(rdp->fastpath); - stream_write_uint16(s, 1); /* numberOrders (2 bytes) */ - stream_write_uint8(s, ORDER_STANDARD | ORDER_TYPE_CHANGE); /* controlFlags (1 byte) */ - stream_write_uint8(s, ORDER_TYPE_SCRBLT); /* orderType (1 byte) */ - stream_write_uint8(s, 0x7F); /* fieldFlags (variable) */ + stream_write_UINT16(s, 1); /* numberOrders (2 bytes) */ + stream_write_BYTE(s, ORDER_STANDARD | ORDER_TYPE_CHANGE); /* controlFlags (1 byte) */ + stream_write_BYTE(s, ORDER_TYPE_SCRBLT); /* orderType (1 byte) */ + stream_write_BYTE(s, 0x7F); /* fieldFlags (variable) */ - stream_write_uint16(s, scrblt->nLeftRect); - stream_write_uint16(s, scrblt->nTopRect); - stream_write_uint16(s, scrblt->nWidth); - stream_write_uint16(s, scrblt->nHeight); - stream_write_uint8(s, scrblt->bRop); - stream_write_uint16(s, scrblt->nXSrc); - stream_write_uint16(s, scrblt->nYSrc); + stream_write_UINT16(s, scrblt->nLeftRect); + stream_write_UINT16(s, scrblt->nTopRect); + stream_write_UINT16(s, scrblt->nWidth); + stream_write_UINT16(s, scrblt->nHeight); + stream_write_BYTE(s, scrblt->bRop); + stream_write_UINT16(s, scrblt->nXSrc); + stream_write_UINT16(s, scrblt->nYSrc); fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_ORDERS, s); } @@ -479,7 +479,7 @@ static void update_send_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) static void update_send_pointer_system(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer_system) { STREAM* s; - uint8 updateCode; + BYTE updateCode; rdpRdp* rdp = context->rdp; s = fastpath_update_pdu_init(rdp->fastpath); @@ -496,13 +496,13 @@ static void update_write_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_ { stream_check_size(s, 15 + (int) pointer_color->lengthAndMask + (int) pointer_color->lengthXorMask); - stream_write_uint16(s, pointer_color->cacheIndex); - stream_write_uint16(s, pointer_color->xPos); - stream_write_uint16(s, pointer_color->yPos); - stream_write_uint16(s, pointer_color->width); - stream_write_uint16(s, pointer_color->height); - stream_write_uint16(s, pointer_color->lengthAndMask); - stream_write_uint16(s, pointer_color->lengthXorMask); + stream_write_UINT16(s, pointer_color->cacheIndex); + stream_write_UINT16(s, pointer_color->xPos); + stream_write_UINT16(s, pointer_color->yPos); + stream_write_UINT16(s, pointer_color->width); + stream_write_UINT16(s, pointer_color->height); + stream_write_UINT16(s, pointer_color->lengthAndMask); + stream_write_UINT16(s, pointer_color->lengthXorMask); if (pointer_color->lengthXorMask > 0) stream_write(s, pointer_color->xorMaskData, pointer_color->lengthXorMask); @@ -510,7 +510,7 @@ static void update_write_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_ if (pointer_color->lengthAndMask > 0) stream_write(s, pointer_color->andMaskData, pointer_color->lengthAndMask); - stream_write_uint8(s, 0); /* pad (1 byte) */ + stream_write_BYTE(s, 0); /* pad (1 byte) */ } static void update_send_pointer_color(rdpContext* context, POINTER_COLOR_UPDATE* pointer_color) @@ -529,7 +529,7 @@ static void update_send_pointer_new(rdpContext* context, POINTER_NEW_UPDATE* poi rdpRdp* rdp = context->rdp; s = fastpath_update_pdu_init(rdp->fastpath); - stream_write_uint16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */ + stream_write_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */ update_write_pointer_color(s, &pointer_new->colorPtrAttr); fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_POINTER, s); } @@ -540,30 +540,30 @@ static void update_send_pointer_cached(rdpContext* context, POINTER_CACHED_UPDAT rdpRdp* rdp = context->rdp; s = fastpath_update_pdu_init(rdp->fastpath); - stream_write_uint16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */ + stream_write_UINT16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */ fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_CACHED, s); } BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s) { int index; - uint8 numberOfAreas; + BYTE numberOfAreas; RECTANGLE_16* areas; if (stream_get_left(s) < 4) return FALSE; - stream_read_uint8(s, numberOfAreas); + stream_read_BYTE(s, numberOfAreas); stream_seek(s, 3); /* pad3Octects */ areas = (RECTANGLE_16*) malloc(sizeof(RECTANGLE_16) * numberOfAreas); for (index = 0; index < numberOfAreas; index++) { - stream_read_uint16(s, areas[index].left); - stream_read_uint16(s, areas[index].top); - stream_read_uint16(s, areas[index].right); - stream_read_uint16(s, areas[index].bottom); + stream_read_UINT16(s, areas[index].left); + stream_read_UINT16(s, areas[index].top); + stream_read_UINT16(s, areas[index].right); + stream_read_UINT16(s, areas[index].bottom); } IFCALL(update->RefreshRect, update->context, numberOfAreas, areas); @@ -575,12 +575,12 @@ BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s) BOOL update_read_suppress_output(rdpUpdate* update, STREAM* s) { - uint8 allowDisplayUpdates; + BYTE allowDisplayUpdates; if (stream_get_left(s) < 4) return FALSE; - stream_read_uint8(s, allowDisplayUpdates); + stream_read_BYTE(s, allowDisplayUpdates); stream_seek(s, 3); /* pad3Octects */ if (allowDisplayUpdates > 0 && stream_get_left(s) < 8) diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c index 20dad3902..075f3baec 100644 --- a/libfreerdp/core/window.c +++ b/libfreerdp/core/window.c @@ -29,47 +29,47 @@ void update_read_icon_info(STREAM* s, ICON_INFO* icon_info) { - stream_read_uint16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */ - stream_read_uint8(s, icon_info->cacheId); /* cacheId (1 byte) */ - stream_read_uint8(s, icon_info->bpp); /* bpp (1 byte) */ - stream_read_uint16(s, icon_info->width); /* width (2 bytes) */ - stream_read_uint16(s, icon_info->height); /* height (2 bytes) */ + stream_read_UINT16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */ + stream_read_BYTE(s, icon_info->cacheId); /* cacheId (1 byte) */ + stream_read_BYTE(s, icon_info->bpp); /* bpp (1 byte) */ + stream_read_UINT16(s, icon_info->width); /* width (2 bytes) */ + stream_read_UINT16(s, icon_info->height); /* height (2 bytes) */ /* cbColorTable is only present when bpp is 1, 2 or 4 */ if (icon_info->bpp == 1 || icon_info->bpp == 2 || icon_info->bpp == 4) - stream_read_uint16(s, icon_info->cbColorTable); /* cbColorTable (2 bytes) */ + stream_read_UINT16(s, icon_info->cbColorTable); /* cbColorTable (2 bytes) */ else icon_info->cbColorTable = 0; - stream_read_uint16(s, icon_info->cbBitsMask); /* cbBitsMask (2 bytes) */ - stream_read_uint16(s, icon_info->cbBitsColor); /* cbBitsColor (2 bytes) */ + stream_read_UINT16(s, icon_info->cbBitsMask); /* cbBitsMask (2 bytes) */ + stream_read_UINT16(s, icon_info->cbBitsColor); /* cbBitsColor (2 bytes) */ /* bitsMask */ if (icon_info->bitsMask == NULL) - icon_info->bitsMask = (uint8*) malloc(icon_info->cbBitsMask); + icon_info->bitsMask = (BYTE*) malloc(icon_info->cbBitsMask); else - icon_info->bitsMask = (uint8*) realloc(icon_info->bitsMask, icon_info->cbBitsMask); + icon_info->bitsMask = (BYTE*) realloc(icon_info->bitsMask, icon_info->cbBitsMask); stream_read(s, icon_info->bitsMask, icon_info->cbBitsMask); /* colorTable */ if (icon_info->colorTable == NULL) - icon_info->colorTable = (uint8*) malloc(icon_info->cbColorTable); + icon_info->colorTable = (BYTE*) malloc(icon_info->cbColorTable); else - icon_info->colorTable = (uint8*) realloc(icon_info->colorTable, icon_info->cbColorTable); + icon_info->colorTable = (BYTE*) realloc(icon_info->colorTable, icon_info->cbColorTable); stream_read(s, icon_info->colorTable, icon_info->cbColorTable); /* bitsColor */ if (icon_info->bitsColor == NULL) - icon_info->bitsColor = (uint8*) malloc(icon_info->cbBitsColor); + icon_info->bitsColor = (BYTE*) malloc(icon_info->cbBitsColor); else - icon_info->bitsColor = (uint8*) realloc(icon_info->bitsColor, icon_info->cbBitsColor); + icon_info->bitsColor = (BYTE*) realloc(icon_info->bitsColor, icon_info->cbBitsColor); stream_read(s, icon_info->bitsColor, icon_info->cbBitsColor); } void update_read_cached_icon_info(STREAM* s, CACHED_ICON_INFO* cached_icon_info) { - stream_read_uint16(s, cached_icon_info->cacheEntry); /* cacheEntry (2 bytes) */ - stream_read_uint8(s, cached_icon_info->cacheId); /* cacheId (1 byte) */ + stream_read_UINT16(s, cached_icon_info->cacheEntry); /* cacheEntry (2 bytes) */ + stream_read_BYTE(s, cached_icon_info->cacheId); /* cacheId (1 byte) */ } void update_read_notify_icon_infotip(STREAM* s, NOTIFY_ICON_INFOTIP* notify_icon_infotip) @@ -95,7 +95,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW) - stream_read_uint8(s, window_state->showState); /* showState (1 byte) */ + stream_read_BYTE(s, window_state->showState); /* showState (1 byte) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE) rail_read_unicode_string(s, &window_state->titleInfo); /* titleInfo */ @@ -113,7 +113,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT) - stream_read_uint8(s, window_state->RPContent); /* RPContent (1 byte) */ + stream_read_BYTE(s, window_state->RPContent); /* RPContent (1 byte) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT) stream_read_uint32(s, window_state->rootParentHandle);/* rootParentHandle (4 bytes) */ @@ -138,7 +138,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS) { - stream_read_uint16(s, window_state->numWindowRects); /* numWindowRects (2 bytes) */ + stream_read_UINT16(s, window_state->numWindowRects); /* numWindowRects (2 bytes) */ size = sizeof(RECTANGLE_16) * window_state->numWindowRects; window_state->windowRects = (RECTANGLE_16*) malloc(size); @@ -146,10 +146,10 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN /* windowRects */ for (i = 0; i < (int) window_state->numWindowRects; i++) { - stream_read_uint16(s, window_state->windowRects[i].left); /* left (2 bytes) */ - stream_read_uint16(s, window_state->windowRects[i].top); /* top (2 bytes) */ - stream_read_uint16(s, window_state->windowRects[i].right); /* right (2 bytes) */ - stream_read_uint16(s, window_state->windowRects[i].bottom); /* bottom (2 bytes) */ + stream_read_UINT16(s, window_state->windowRects[i].left); /* left (2 bytes) */ + stream_read_UINT16(s, window_state->windowRects[i].top); /* top (2 bytes) */ + stream_read_UINT16(s, window_state->windowRects[i].right); /* right (2 bytes) */ + stream_read_UINT16(s, window_state->windowRects[i].bottom); /* bottom (2 bytes) */ } } @@ -161,7 +161,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY) { - stream_read_uint16(s, window_state->numVisibilityRects); /* numVisibilityRects (2 bytes) */ + stream_read_UINT16(s, window_state->numVisibilityRects); /* numVisibilityRects (2 bytes) */ size = sizeof(RECTANGLE_16) * window_state->numVisibilityRects; window_state->visibilityRects = (RECTANGLE_16*) malloc(size); @@ -169,10 +169,10 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN /* visibilityRects */ for (i = 0; i < (int) window_state->numVisibilityRects; i++) { - stream_read_uint16(s, window_state->visibilityRects[i].left); /* left (2 bytes) */ - stream_read_uint16(s, window_state->visibilityRects[i].top); /* top (2 bytes) */ - stream_read_uint16(s, window_state->visibilityRects[i].right); /* right (2 bytes) */ - stream_read_uint16(s, window_state->visibilityRects[i].bottom); /* bottom (2 bytes) */ + stream_read_UINT16(s, window_state->visibilityRects[i].left); /* left (2 bytes) */ + stream_read_UINT16(s, window_state->visibilityRects[i].top); /* top (2 bytes) */ + stream_read_UINT16(s, window_state->visibilityRects[i].right); /* right (2 bytes) */ + stream_read_UINT16(s, window_state->visibilityRects[i].bottom); /* bottom (2 bytes) */ } } } @@ -292,7 +292,7 @@ void update_read_desktop_actively_monitored_order(STREAM* s, WINDOW_ORDER_INFO* if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_DESKTOP_ZORDER) { - stream_read_uint8(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */ + stream_read_BYTE(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */ size = sizeof(uint32) * monitored_desktop->numWindowIds; @@ -335,10 +335,10 @@ void update_recv_desktop_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_I void update_recv_altsec_window_order(rdpUpdate* update, STREAM* s) { - uint16 orderSize; + UINT16 orderSize; rdpWindowUpdate* window = update->window; - stream_read_uint16(s, orderSize); /* orderSize (2 bytes) */ + stream_read_UINT16(s, orderSize); /* orderSize (2 bytes) */ stream_read_uint32(s, window->orderInfo.fieldFlags); /* FieldsPresentFlags (4 bytes) */ if (window->orderInfo.fieldFlags & WINDOW_ORDER_TYPE_WINDOW) diff --git a/libfreerdp/crypto/ber.c b/libfreerdp/crypto/ber.c index b45b6f432..bab56f888 100644 --- a/libfreerdp/crypto/ber.c +++ b/libfreerdp/crypto/ber.c @@ -25,18 +25,18 @@ void ber_read_length(STREAM* s, int* length) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x80) { byte &= ~(0x80); if (byte == 1) - stream_read_uint8(s, *length); + stream_read_BYTE(s, *length); if (byte == 2) - stream_read_uint16_be(s, *length); + stream_read_UINT16_be(s, *length); } else { @@ -54,13 +54,13 @@ int ber_write_length(STREAM* s, int length) { if (length > 0x7F) { - stream_write_uint8(s, 0x82); - stream_write_uint16_be(s, length); + stream_write_BYTE(s, 0x82); + stream_write_UINT16_be(s, length); return 3; } else { - stream_write_uint8(s, length); + stream_write_BYTE(s, length); return 1; } } @@ -88,11 +88,11 @@ int ber_get_content_length(int length) * @return */ -BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) +BOOL ber_read_universal_tag(STREAM* s, BYTE tag, BOOL pc) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != (BER_CLASS_UNIV | BER_PC(pc) | (BER_TAG_MASK & tag))) return FALSE; @@ -107,9 +107,9 @@ BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) * @param pc primitive (FALSE) or constructed (TRUE) */ -void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) +void ber_write_universal_tag(STREAM* s, BYTE tag, BOOL pc) { - stream_write_uint8(s, (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag)); + stream_write_BYTE(s, (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag)); } /** @@ -119,18 +119,18 @@ void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) * @param length length */ -BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length) +BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length) { - uint8 byte; + BYTE byte; if (tag > 30) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK)) return FALSE; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != tag) return FALSE; @@ -139,7 +139,7 @@ BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length) } else { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag))) return FALSE; @@ -157,26 +157,26 @@ BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length) * @param length length */ -void ber_write_application_tag(STREAM* s, uint8 tag, int length) +void ber_write_application_tag(STREAM* s, BYTE tag, int length) { if (tag > 30) { - stream_write_uint8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK); - stream_write_uint8(s, tag); + stream_write_BYTE(s, (BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK); + stream_write_BYTE(s, tag); ber_write_length(s, length); } else { - stream_write_uint8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag)); + stream_write_BYTE(s, (BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag)); ber_write_length(s, length); } } -BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) +BOOL ber_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag))) { @@ -189,9 +189,9 @@ BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) return TRUE; } -int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc) +int ber_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc) { - stream_write_uint8(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)); + stream_write_BYTE(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)); return ber_write_length(s, length) + 1; } @@ -202,9 +202,9 @@ int ber_skip_contextual_tag(int length) BOOL ber_read_sequence_tag(STREAM* s, int* length) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_SEQUENCE_OF))) return FALSE; @@ -222,7 +222,7 @@ BOOL ber_read_sequence_tag(STREAM* s, int* length) int ber_write_sequence_tag(STREAM* s, int length) { - stream_write_uint8(s, (BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_MASK & BER_TAG_SEQUENCE)); + stream_write_BYTE(s, (BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_MASK & BER_TAG_SEQUENCE)); return ber_write_length(s, length) + 1; } @@ -236,7 +236,7 @@ int ber_skip_sequence_tag(int length) return 1 + _ber_skip_length(length); } -BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL ber_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count) { int length; @@ -244,7 +244,7 @@ BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) ber_read_length(s, &length); if (length == 1) - stream_read_uint8(s, *enumerated); + stream_read_BYTE(s, *enumerated); else return FALSE; @@ -255,18 +255,18 @@ BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) return TRUE; } -void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count) +void ber_write_enumerated(STREAM* s, BYTE enumerated, BYTE count) { ber_write_universal_tag(s, BER_TAG_ENUMERATED, FALSE); ber_write_length(s, 1); - stream_write_uint8(s, enumerated); + stream_write_BYTE(s, enumerated); } -BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding) +BOOL ber_read_bit_string(STREAM* s, int* length, BYTE* padding) { ber_read_universal_tag(s, BER_TAG_BIT_STRING, FALSE); ber_read_length(s, length); - stream_read_uint8(s, *padding); + stream_read_BYTE(s, *padding); return TRUE; } @@ -278,7 +278,7 @@ BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding) * @param length string length */ -void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length) +void ber_write_octet_string(STREAM* s, const BYTE* oct_str, int length) { ber_write_universal_tag(s, BER_TAG_OCTET_STRING, FALSE); ber_write_length(s, length); @@ -313,14 +313,14 @@ int ber_skip_octet_string(int length) BOOL ber_read_BOOL(STREAM* s, BOOL* value) { int length; - uint8 v; + BYTE v; if (!ber_read_universal_tag(s, BER_TAG_BOOLEAN, FALSE)) return FALSE; ber_read_length(s, &length); if (length != 1) return FALSE; - stream_read_uint8(s, v); + stream_read_BYTE(s, v); *value = (v ? TRUE : FALSE); return TRUE; } @@ -335,7 +335,7 @@ void ber_write_BOOL(STREAM* s, BOOL value) { ber_write_universal_tag(s, BER_TAG_BOOLEAN, FALSE); ber_write_length(s, 1); - stream_write_uint8(s, (value == TRUE) ? 0xFF : 0); + stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0); } BOOL ber_read_integer(STREAM* s, uint32* value) @@ -352,14 +352,14 @@ BOOL ber_read_integer(STREAM* s, uint32* value) } if (length == 1) - stream_read_uint8(s, *value); + stream_read_BYTE(s, *value); else if (length == 2) - stream_read_uint16_be(s, *value); + stream_read_UINT16_be(s, *value); else if (length == 3) { - uint8 byte; - stream_read_uint8(s, byte); - stream_read_uint16_be(s, *value); + BYTE byte; + stream_read_BYTE(s, byte); + stream_read_UINT16_be(s, *value); *value += (byte << 16); } else if (length == 4) @@ -383,20 +383,20 @@ int ber_write_integer(STREAM* s, uint32 value) if (value <= 0xFF) { ber_write_length(s, 1); - stream_write_uint8(s, value); + stream_write_BYTE(s, value); return 2; } else if (value < 0xFF80) { ber_write_length(s, 2); - stream_write_uint16_be(s, value); + stream_write_UINT16_be(s, value); return 3; } else if (value < 0xFF8000) { ber_write_length(s, 3); - stream_write_uint8(s, (value >> 16)); - stream_write_uint16_be(s, (value & 0xFFFF)); + stream_write_BYTE(s, (value >> 16)); + stream_write_UINT16_be(s, (value & 0xFFFF)); return 4; } else if (value <= 0xFFFFFFFF) diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index bb6fb8fcf..f0bd6ae9d 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -30,12 +30,12 @@ CryptoSha1 crypto_sha1_init(void) return sha1; } -void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length) +void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length) { SHA1_Update(&sha1->sha_ctx, data, length); } -void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data) +void crypto_sha1_final(CryptoSha1 sha1, BYTE* out_data) { SHA1_Final(out_data, &sha1->sha_ctx); free(sha1); @@ -48,25 +48,25 @@ CryptoMd5 crypto_md5_init(void) return md5; } -void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length) +void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length) { MD5_Update(&md5->md5_ctx, data, length); } -void crypto_md5_final(CryptoMd5 md5, uint8* out_data) +void crypto_md5_final(CryptoMd5 md5, BYTE* out_data) { MD5_Final(out_data, &md5->md5_ctx); free(md5); } -CryptoRc4 crypto_rc4_init(const uint8* key, uint32 length) +CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length) { CryptoRc4 rc4 = malloc(sizeof(*rc4)); RC4_set_key(&rc4->rc4_key, length, key); return rc4; } -void crypto_rc4(CryptoRc4 rc4, uint32 length, const uint8* in_data, uint8* out_data) +void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data) { RC4(&rc4->rc4_key, length, in_data, out_data); } @@ -77,7 +77,7 @@ void crypto_rc4_free(CryptoRc4 rc4) free(rc4); } -CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec) +CryptoDes3 crypto_des3_encrypt_init(const BYTE* key, const BYTE* ivec) { CryptoDes3 des3 = malloc(sizeof(*des3)); EVP_CIPHER_CTX_init(&des3->des3_ctx); @@ -86,7 +86,7 @@ CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec) return des3; } -CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec) +CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec) { CryptoDes3 des3 = malloc(sizeof(*des3)); EVP_CIPHER_CTX_init(&des3->des3_ctx); @@ -95,13 +95,13 @@ CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec) return des3; } -void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const uint8* in_data, uint8* out_data) +void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data) { int len; EVP_EncryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length); } -void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const uint8* in_data, uint8* out_data) +void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data) { int len; EVP_DecryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length); @@ -125,17 +125,17 @@ CryptoHmac crypto_hmac_new(void) return hmac; } -void crypto_hmac_sha1_init(CryptoHmac hmac, const uint8* data, uint32 length) +void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE* data, uint32 length) { HMAC_Init_ex(&hmac->hmac_ctx, data, length, EVP_sha1(), NULL); } -void crypto_hmac_update(CryptoHmac hmac, const uint8* data, uint32 length) +void crypto_hmac_update(CryptoHmac hmac, const BYTE* data, uint32 length) { HMAC_Update(&hmac->hmac_ctx, data, length); } -void crypto_hmac_final(CryptoHmac hmac, uint8* out_data, uint32 length) +void crypto_hmac_final(CryptoHmac hmac, BYTE* out_data, uint32 length) { HMAC_Final(&hmac->hmac_ctx, out_data, &length); } @@ -148,11 +148,11 @@ void crypto_hmac_free(CryptoHmac hmac) free(hmac); } -CryptoCert crypto_cert_read(uint8* data, uint32 length) +CryptoCert crypto_cert_read(BYTE* data, uint32 length) { CryptoCert cert = malloc(sizeof(*cert)); /* this will move the data pointer but we don't care, we don't use it again */ - cert->px509 = d2i_X509(NULL, (D2I_X509_CONST uint8 **) &data, length); + cert->px509 = d2i_X509(NULL, (D2I_X509_CONST BYTE **) &data, length); return cert; } @@ -204,16 +204,16 @@ exit: return status; } -static void crypto_rsa_common(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, int exponent_size, uint8* output) +static void crypto_rsa_common(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, int exponent_size, BYTE* output) { BN_CTX* ctx; int output_length; - uint8* input_reverse; - uint8* modulus_reverse; - uint8* exponent_reverse; + BYTE* input_reverse; + BYTE* modulus_reverse; + BYTE* exponent_reverse; BIGNUM mod, exp, x, y; - input_reverse = (uint8*) malloc(2 * key_length + exponent_size); + input_reverse = (BYTE*) malloc(2 * key_length + exponent_size); modulus_reverse = input_reverse + key_length; exponent_reverse = modulus_reverse + key_length; @@ -249,51 +249,51 @@ static void crypto_rsa_common(const uint8* input, int length, uint32 key_length, free(input_reverse); } -static void crypto_rsa_public(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output) +static void crypto_rsa_public(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, exponent, EXPONENT_MAX_SIZE, output); } -static void crypto_rsa_private(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output) +static void crypto_rsa_private(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output); } -void crypto_rsa_public_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output) +void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_public(input, length, key_length, modulus, exponent, output); } -void crypto_rsa_public_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output) +void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_public(input, length, key_length, modulus, exponent, output); } -void crypto_rsa_private_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output) +void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_private(input, length, key_length, modulus, private_exponent, output); } -void crypto_rsa_private_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output) +void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_private(input, length, key_length, modulus, private_exponent, output); } -void crypto_rsa_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output) +void crypto_rsa_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output); } -void crypto_reverse(uint8* data, int length) +void crypto_reverse(BYTE* data, int length) { int i, j; - uint8 temp; + BYTE temp; for (i = 0, j = length - 1; i < j; i++, j--) { @@ -303,7 +303,7 @@ void crypto_reverse(uint8* data, int length) } } -void crypto_nonce(uint8* nonce, int size) +void crypto_nonce(BYTE* nonce, int size) { RAND_bytes((void*) nonce, size); } @@ -314,7 +314,7 @@ char* crypto_cert_fingerprint(X509* xcert) char* p; char* fp_buffer; uint32 fp_len; - uint8 fp[EVP_MAX_MD_SIZE]; + BYTE fp[EVP_MAX_MD_SIZE]; X509_digest(xcert, EVP_sha1(), fp, &fp_len); @@ -357,7 +357,7 @@ char* crypto_cert_subject(X509* xcert) char* crypto_cert_subject_common_name(X509* xcert, int* length) { int index; - uint8* common_name; + BYTE* common_name; X509_NAME* subject_name; X509_NAME_ENTRY* entry; ASN1_STRING* entry_data; @@ -395,7 +395,7 @@ char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths) int index; int length; char** strings; - uint8* string; + BYTE* string; int num_subject_alt_names; GENERAL_NAMES* subject_alt_names; GENERAL_NAME* subject_alt_name; @@ -525,7 +525,7 @@ void crypto_cert_print_info(X509* xcert) free(fp); } -char* crypto_base64_encode(uint8* data, int length) +char* crypto_base64_encode(BYTE* data, int length) { BIO* bmem; BIO* b64; @@ -552,7 +552,7 @@ char* crypto_base64_encode(uint8* data, int length) return base64_string; } -void crypto_base64_decode(uint8* enc_data, int length, uint8** dec_data, int* res_length) +void crypto_base64_decode(BYTE* enc_data, int length, BYTE** dec_data, int* res_length) { BIO *b64, *bmem; diff --git a/libfreerdp/crypto/der.c b/libfreerdp/crypto/der.c index feb91565f..ef77b2a7f 100644 --- a/libfreerdp/crypto/der.c +++ b/libfreerdp/crypto/der.c @@ -37,19 +37,19 @@ int der_write_length(STREAM* s, int length) { if (length > 0x7F && length <= 0xFF) { - stream_write_uint8(s, 0x81); - stream_write_uint8(s, length); + stream_write_BYTE(s, 0x81); + stream_write_BYTE(s, length); return 2; } else if (length > 0xFF) { - stream_write_uint8(s, 0x82); - stream_write_uint16_be(s, length); + stream_write_BYTE(s, 0x82); + stream_write_UINT16_be(s, length); return 3; } else { - stream_write_uint8(s, length); + stream_write_BYTE(s, length); return 1; } } @@ -69,15 +69,15 @@ int der_skip_contextual_tag(int length) return _der_skip_length(length) + 1; } -int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc) +int der_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc) { - stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); + stream_write_BYTE(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); return der_write_length(s, length) + 1; } -void der_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) +void der_write_universal_tag(STREAM* s, BYTE tag, BOOL pc) { - stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); + stream_write_BYTE(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); } int der_skip_octet_string(int length) @@ -85,7 +85,7 @@ int der_skip_octet_string(int length) return 1 + _der_skip_length(length) + length; } -void der_write_octet_string(STREAM* s, uint8* oct_str, int length) +void der_write_octet_string(STREAM* s, BYTE* oct_str, int length) { der_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); der_write_length(s, length); @@ -99,7 +99,7 @@ int der_skip_sequence_tag(int length) int der_write_sequence_tag(STREAM* s, int length) { - stream_write_uint8(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE)); + stream_write_BYTE(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE)); return der_write_length(s, length) + 1; } diff --git a/libfreerdp/crypto/er.c b/libfreerdp/crypto/er.c index ec540a295..c2415f7a1 100644 --- a/libfreerdp/crypto/er.c +++ b/libfreerdp/crypto/er.c @@ -28,18 +28,18 @@ void er_read_length(STREAM* s, int* length) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x80) { byte &= ~(0x80); if (byte == 1) - stream_read_uint8(s, *length); + stream_read_BYTE(s, *length); if (byte == 2) - stream_read_uint16_be(s, *length); + stream_read_UINT16_be(s, *length); } else { @@ -84,11 +84,11 @@ int er_get_content_length(int length) * @return */ -BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) +BOOL er_read_universal_tag(STREAM* s, BYTE tag, BOOL pc) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != (ER_CLASS_UNIV | ER_PC(pc) | (ER_TAG_MASK & tag))) return FALSE; @@ -103,9 +103,9 @@ BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc) * @param pc primitive (FALSE) or constructed (TRUE) */ -void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) +void er_write_universal_tag(STREAM* s, BYTE tag, BOOL pc) { - stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); + stream_write_BYTE(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag)); } /** @@ -115,18 +115,18 @@ void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc) * @param length length */ -BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length) +BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length) { - uint8 byte; + BYTE byte; if (tag > 30) { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK)) return FALSE; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != tag) return FALSE; @@ -135,7 +135,7 @@ BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length) } else { - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag))) return FALSE; @@ -153,26 +153,26 @@ BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length) * @param length length */ -void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag) +void er_write_application_tag(STREAM* s, BYTE tag, int length, BOOL flag) { if (tag > 30) { - stream_write_uint8(s, (ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK); - stream_write_uint8(s, tag); + stream_write_BYTE(s, (ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK); + stream_write_BYTE(s, tag); er_write_length(s, length, flag); } else { - stream_write_uint8(s, (ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag)); + stream_write_BYTE(s, (ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag)); er_write_length(s, length, flag); } } -BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) +BOOL er_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag))) { @@ -185,9 +185,9 @@ BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc) return TRUE; } -int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag) +int er_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc, BOOL flag) { - stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); + stream_write_BYTE(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)); return er_write_length(s, length, flag) + 1; } @@ -198,9 +198,9 @@ int er_skip_contextual_tag(int length) BOOL er_read_sequence_tag(STREAM* s, int* length) { - uint8 byte; + BYTE byte; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte != ((ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_SEQUENCE_OF))) return FALSE; @@ -218,7 +218,7 @@ BOOL er_read_sequence_tag(STREAM* s, int* length) int er_write_sequence_tag(STREAM* s, int length, BOOL flag) { - stream_write_uint8(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE)); + stream_write_BYTE(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE)); return er_write_length(s, length, flag) + 1; } @@ -232,7 +232,7 @@ int er_skip_sequence_tag(int length) return 1 + _er_skip_length(length); } -BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL er_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count) { int length; @@ -240,7 +240,7 @@ BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) er_read_length(s, &length); if (length == 1) - stream_read_uint8(s, *enumerated); + stream_read_BYTE(s, *enumerated); else return FALSE; @@ -251,27 +251,27 @@ BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) return TRUE; } -void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag) +void er_write_enumerated(STREAM* s, BYTE enumerated, BYTE count, BOOL flag) { er_write_universal_tag(s, ER_TAG_ENUMERATED, FALSE); er_write_length(s, 1, flag); - stream_write_uint8(s, enumerated); + stream_write_BYTE(s, enumerated); } -BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding) +BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding) { er_read_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_read_length(s, length); - stream_read_uint8(s, *padding); + stream_read_BYTE(s, *padding); return TRUE; } -BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag) +BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag) { er_write_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_write_length(s, length, flag); - stream_write_uint8(s, padding); + stream_write_BYTE(s, padding); return TRUE; } @@ -291,7 +291,7 @@ BOOL er_read_octet_string(STREAM* s, int* length) * @param length string length */ -void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag) +void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag) { er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE); er_write_length(s, length, flag); @@ -319,14 +319,14 @@ int er_skip_octet_string(int length) BOOL er_read_BOOL(STREAM* s, BOOL* value) { int length; - uint8 v; + BYTE v; if (!er_read_universal_tag(s, ER_TAG_BOOLEAN, FALSE)) return FALSE; er_read_length(s, &length); if (length != 1) return FALSE; - stream_read_uint8(s, v); + stream_read_BYTE(s, v); *value = (v ? TRUE : FALSE); return TRUE; } @@ -341,7 +341,7 @@ void er_write_BOOL(STREAM* s, BOOL value) { er_write_universal_tag(s, ER_TAG_BOOLEAN, FALSE); er_write_length(s, 1, FALSE); - stream_write_uint8(s, (value == TRUE) ? 0xFF : 0); + stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0); } BOOL er_read_integer(STREAM* s, uint32* value) @@ -358,14 +358,14 @@ BOOL er_read_integer(STREAM* s, uint32* value) } if (length == 1) - stream_read_uint8(s, *value); + stream_read_BYTE(s, *value); else if (length == 2) - stream_read_uint16_be(s, *value); + stream_read_UINT16_be(s, *value); else if (length == 3) { - uint8 byte; - stream_read_uint8(s, byte); - stream_read_uint16_be(s, *value); + BYTE byte; + stream_read_BYTE(s, byte); + stream_read_UINT16_be(s, *value); *value += (byte << 16); } else if (length == 4) @@ -389,13 +389,13 @@ int er_write_integer(STREAM* s, sint32 value) if (value <= 127 && value >= -128) { er_write_length(s, 1, FALSE); - stream_write_uint8(s, value); + stream_write_BYTE(s, value); return 2; } else if (value <= 32767 && value >= -32768) { er_write_length(s, 2, FALSE); - stream_write_uint16_be(s, value); + stream_write_UINT16_be(s, value); return 3; } else diff --git a/libfreerdp/crypto/nla.c b/libfreerdp/crypto/nla.c index fb3e155a9..19ee58684 100644 --- a/libfreerdp/crypto/nla.c +++ b/libfreerdp/crypto/nla.c @@ -1108,7 +1108,7 @@ void credssp_send(rdpCredssp* credssp) length -= der_write_sequence_tag(s, length); /* SEQUENCE OF NegoDataItem */ length -= der_write_sequence_tag(s, length); /* NegoDataItem */ length -= der_write_contextual_tag(s, 0, length, TRUE); /* [0] negoToken */ - der_write_octet_string(s, (uint8*) credssp->negoToken.pvBuffer, length); /* OCTET STRING */ + der_write_octet_string(s, (BYTE*) credssp->negoToken.pvBuffer, length); /* OCTET STRING */ } /* [2] authInfo (OCTET STRING) */ diff --git a/libfreerdp/crypto/per.c b/libfreerdp/crypto/per.c index 3d858f439..741451ed3 100644 --- a/libfreerdp/crypto/per.c +++ b/libfreerdp/crypto/per.c @@ -30,14 +30,14 @@ * @return */ -BOOL per_read_length(STREAM* s, uint16* length) +BOOL per_read_length(STREAM* s, UINT16* length) { - uint8 byte; + BYTE byte; if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); if (byte & 0x80) { @@ -46,7 +46,7 @@ BOOL per_read_length(STREAM* s, uint16* length) byte &= ~(0x80); *length = (byte << 8); - stream_read_uint8(s, byte); + stream_read_BYTE(s, byte); *length += byte; } else @@ -66,9 +66,9 @@ BOOL per_read_length(STREAM* s, uint16* length) void per_write_length(STREAM* s, int length) { if (length > 0x7F) - stream_write_uint16_be(s, (length | 0x8000)); + stream_write_UINT16_be(s, (length | 0x8000)); else - stream_write_uint8(s, length); + stream_write_BYTE(s, length); } /** @@ -78,12 +78,12 @@ void per_write_length(STREAM* s, int length) * @return */ -BOOL per_read_choice(STREAM* s, uint8* choice) +BOOL per_read_choice(STREAM* s, BYTE* choice) { if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, *choice); + stream_read_BYTE(s, *choice); return TRUE; } @@ -93,9 +93,9 @@ BOOL per_read_choice(STREAM* s, uint8* choice) * @param choice index of chosen field */ -void per_write_choice(STREAM* s, uint8 choice) +void per_write_choice(STREAM* s, BYTE choice) { - stream_write_uint8(s, choice); + stream_write_BYTE(s, choice); } /** @@ -105,12 +105,12 @@ void per_write_choice(STREAM* s, uint8 choice) * @return */ -BOOL per_read_selection(STREAM* s, uint8* selection) +BOOL per_read_selection(STREAM* s, BYTE* selection) { if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, *selection); + stream_read_BYTE(s, *selection); return TRUE; } @@ -120,9 +120,9 @@ BOOL per_read_selection(STREAM* s, uint8* selection) * @param selection bit map of selected fields */ -void per_write_selection(STREAM* s, uint8 selection) +void per_write_selection(STREAM* s, BYTE selection) { - stream_write_uint8(s, selection); + stream_write_BYTE(s, selection); } /** @@ -132,12 +132,12 @@ void per_write_selection(STREAM* s, uint8 selection) * @return */ -BOOL per_read_number_of_sets(STREAM* s, uint8* number) +BOOL per_read_number_of_sets(STREAM* s, BYTE* number) { if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, *number); + stream_read_BYTE(s, *number); return TRUE; } @@ -147,9 +147,9 @@ BOOL per_read_number_of_sets(STREAM* s, uint8* number) * @param number number of sets */ -void per_write_number_of_sets(STREAM* s, uint8 number) +void per_write_number_of_sets(STREAM* s, BYTE number) { - stream_write_uint8(s, number); + stream_write_BYTE(s, number); } /** @@ -178,7 +178,7 @@ void per_write_padding(STREAM* s, int length) int i; for (i = 0; i < length; i++) - stream_write_uint8(s, 0); + stream_write_BYTE(s, 0); } /** @@ -190,7 +190,7 @@ void per_write_padding(STREAM* s, int length) BOOL per_read_integer(STREAM* s, uint32* integer) { - uint16 length; + UINT16 length; if (!per_read_length(s, &length)) return FALSE; @@ -199,9 +199,9 @@ BOOL per_read_integer(STREAM* s, uint32* integer) return FALSE; if (length == 1) - stream_read_uint8(s, *integer); + stream_read_BYTE(s, *integer); else if (length == 2) - stream_read_uint16_be(s, *integer); + stream_read_UINT16_be(s, *integer); else return FALSE; @@ -219,12 +219,12 @@ void per_write_integer(STREAM* s, uint32 integer) if (integer <= 0xFF) { per_write_length(s, 1); - stream_write_uint8(s, integer); + stream_write_BYTE(s, integer); } else if (integer <= 0xFFFF) { per_write_length(s, 2); - stream_write_uint16_be(s, integer); + stream_write_UINT16_be(s, integer); } else if (integer <= 0xFFFFFFFF) { @@ -234,19 +234,19 @@ void per_write_integer(STREAM* s, uint32 integer) } /** - * Read PER INTEGER (uint16). + * Read PER INTEGER (UINT16). * @param s stream * @param integer integer * @param min minimum value * @return */ -BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min) +BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min) { if (stream_get_left(s) < 2) return FALSE; - stream_read_uint16_be(s, *integer); + stream_read_UINT16_be(s, *integer); if (*integer + min > 0xFFFF) return FALSE; @@ -257,15 +257,15 @@ BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min) } /** - * Write PER INTEGER (uint16). + * Write PER INTEGER (UINT16). * @param s stream * @param integer integer * @param min minimum value */ -void per_write_integer16(STREAM* s, uint16 integer, uint16 min) +void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min) { - stream_write_uint16_be(s, integer - min); + stream_write_UINT16_be(s, integer - min); } /** @@ -276,12 +276,12 @@ void per_write_integer16(STREAM* s, uint16 integer, uint16 min) * @return */ -BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) +BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count) { if (stream_get_left(s) < 1) return FALSE; - stream_read_uint8(s, *enumerated); + stream_read_BYTE(s, *enumerated); /* check that enumerated value falls within expected range */ if (*enumerated + 1 > count) @@ -298,9 +298,9 @@ BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count) * @return */ -void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count) +void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count) { - stream_write_uint8(s, enumerated); + stream_write_BYTE(s, enumerated); } /** @@ -310,11 +310,11 @@ void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count) * @return */ -BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]) +BOOL per_read_object_identifier(STREAM* s, BYTE oid[6]) { - uint8 t12; - uint16 length; - uint8 a_oid[6]; + BYTE t12; + UINT16 length; + BYTE a_oid[6]; if (!per_read_length(s, &length)) return FALSE; @@ -325,14 +325,14 @@ BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]) if (stream_get_left(s) < length) return FALSE; - stream_read_uint8(s, t12); /* first two tuples */ + stream_read_BYTE(s, t12); /* first two tuples */ a_oid[0] = (t12 >> 4); a_oid[1] = (t12 & 0x0F); - stream_read_uint8(s, a_oid[2]); /* tuple 3 */ - stream_read_uint8(s, a_oid[3]); /* tuple 4 */ - stream_read_uint8(s, a_oid[4]); /* tuple 5 */ - stream_read_uint8(s, a_oid[5]); /* tuple 6 */ + stream_read_BYTE(s, a_oid[2]); /* tuple 3 */ + stream_read_BYTE(s, a_oid[3]); /* tuple 4 */ + stream_read_BYTE(s, a_oid[4]); /* tuple 5 */ + stream_read_BYTE(s, a_oid[5]); /* tuple 6 */ if ((a_oid[0] == oid[0]) && (a_oid[1] == oid[1]) && (a_oid[2] == oid[2]) && (a_oid[3] == oid[3]) && @@ -352,15 +352,15 @@ BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]) * @param oid object identifier (oid) */ -void per_write_object_identifier(STREAM* s, uint8 oid[6]) +void per_write_object_identifier(STREAM* s, BYTE oid[6]) { - uint8 t12 = (oid[0] << 4) & (oid[1] & 0x0F); - stream_write_uint8(s, 5); /* length */ - stream_write_uint8(s, t12); /* first two tuples */ - stream_write_uint8(s, oid[2]); /* tuple 3 */ - stream_write_uint8(s, oid[3]); /* tuple 4 */ - stream_write_uint8(s, oid[4]); /* tuple 5 */ - stream_write_uint8(s, oid[5]); /* tuple 6 */ + BYTE t12 = (oid[0] << 4) & (oid[1] & 0x0F); + stream_write_BYTE(s, 5); /* length */ + stream_write_BYTE(s, t12); /* first two tuples */ + stream_write_BYTE(s, oid[2]); /* tuple 3 */ + stream_write_BYTE(s, oid[3]); /* tuple 4 */ + stream_write_BYTE(s, oid[4]); /* tuple 5 */ + stream_write_BYTE(s, oid[5]); /* tuple 6 */ } /** @@ -370,12 +370,12 @@ void per_write_object_identifier(STREAM* s, uint8 oid[6]) * @param length string length */ -void per_write_string(STREAM* s, uint8* str, int length) +void per_write_string(STREAM* s, BYTE* str, int length) { int i; for (i = 0; i < length; i++) - stream_write_uint8(s, str[i]); + stream_write_BYTE(s, str[i]); } /** @@ -387,11 +387,11 @@ void per_write_string(STREAM* s, uint8* str, int length) * @return */ -BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min) +BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min) { int i; - uint16 mlength; - uint8* a_oct_str; + UINT16 mlength; + BYTE* a_oct_str; if (!per_read_length(s, &mlength)) return FALSE; @@ -422,7 +422,7 @@ BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min) * @param min minimum string length */ -void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min) +void per_write_octet_string(STREAM* s, BYTE* oct_str, int length, int min) { int i; int mlength; @@ -432,7 +432,7 @@ void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min) per_write_length(s, mlength); for (i = 0; i < length; i++) - stream_write_uint8(s, oct_str[i]); + stream_write_BYTE(s, oct_str[i]); } /** @@ -446,7 +446,7 @@ void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min) BOOL per_read_numeric_string(STREAM* s, int min) { int length; - uint16 mlength; + UINT16 mlength; if (!per_read_length(s, &mlength)) return FALSE; @@ -468,11 +468,11 @@ BOOL per_read_numeric_string(STREAM* s, int min) * @param min minimum string length */ -void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min) +void per_write_numeric_string(STREAM* s, BYTE* num_str, int length, int min) { int i; int mlength; - uint8 num, c1, c2; + BYTE num, c1, c2; mlength = (length - min >= 0) ? length - min : min; @@ -487,6 +487,6 @@ void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min) c2 = (c2 - 0x30) % 10; num = (c1 << 4) | c2; - stream_write_uint8(s, num); /* string */ + stream_write_BYTE(s, num); /* string */ } } diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index f05067905..acaf4243c 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -286,7 +286,7 @@ BOOL tls_disconnect(rdpTls* tls) return TRUE; } -int tls_read(rdpTls* tls, uint8* data, int length) +int tls_read(rdpTls* tls, BYTE* data, int length) { int status; @@ -311,7 +311,7 @@ int tls_read(rdpTls* tls, uint8* data, int length) return status; } -int tls_read_all(rdpTls* tls, uint8* data, int length) +int tls_read_all(rdpTls* tls, BYTE* data, int length) { int status; @@ -324,7 +324,7 @@ int tls_read_all(rdpTls* tls, uint8* data, int length) return status; } -int tls_write(rdpTls* tls, uint8* data, int length) +int tls_write(rdpTls* tls, BYTE* data, int length) { int status; @@ -350,7 +350,7 @@ int tls_write(rdpTls* tls, uint8* data, int length) } -int tls_write_all(rdpTls* tls, uint8* data, int length) +int tls_write_all(rdpTls* tls, BYTE* data, int length) { int status; int sent = 0; diff --git a/libfreerdp/gdi/16bpp.c b/libfreerdp/gdi/16bpp.c index fd4b59043..77eb60f98 100644 --- a/libfreerdp/gdi/16bpp.c +++ b/libfreerdp/gdi/16bpp.c @@ -38,10 +38,10 @@ #include -uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color) +UINT16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color) { - uint8 r, g, b; - uint16 color16; + BYTE r, g, b; + UINT16 color16; GetBGR32(r, g, b, color); @@ -74,11 +74,11 @@ uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color) int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) { int x, y; - uint16 *dstp; + UINT16 *dstp; int nXDest, nYDest; int nWidth, nHeight; - uint16 color16; + UINT16 color16; gdi_RectToCRgn(rect, &nXDest, &nYDest, &nWidth, &nHeight); @@ -89,7 +89,7 @@ int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y); if (dstp != 0) { @@ -108,7 +108,7 @@ int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -124,7 +124,7 @@ static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -140,8 +140,8 @@ static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; if ((hdcDest->selectedObject != hdcSrc->selectedObject) || gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0) @@ -201,13 +201,13 @@ static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -226,11 +226,11 @@ static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint16* dstp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -248,13 +248,13 @@ static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -273,13 +273,13 @@ static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -298,13 +298,13 @@ static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -323,13 +323,13 @@ static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -348,13 +348,13 @@ static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -373,10 +373,10 @@ static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint16* dstp; - uint16 src16; - uint16 color16; + BYTE* srcp; + UINT16* dstp; + UINT16 src16; + UINT16 color16; HGDI_BITMAP hSrcBmp; /* D = (S & P) | (~S & D) */ @@ -394,8 +394,8 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi for (y = 0; y < nHeight; y++) { - srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -415,22 +415,22 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; - uint16* patp; - uint16 color16; + UINT16* srcp; + UINT16* dstp; + UINT16* patp; + UINT16 color16; /* D = (S & D) | (~S & P) */ if (hdcDest->brush->style == GDI_BS_SOLID) { color16 = gdi_get_color_16bpp(hdcDest, hdcDest->brush->color); - patp = (uint16*) &color16; + patp = (UINT16*) &color16; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -447,14 +447,14 @@ static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi { for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = (*srcp & *dstp) | (~(*srcp) & *patp); srcp++; dstp++; @@ -469,20 +469,20 @@ static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; - uint16* patp; + UINT16* srcp; + UINT16* dstp; + UINT16* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *srcp & ~(*patp); srcp++; dstp++; @@ -496,18 +496,18 @@ static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_DPa_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint16* dstp; - uint16* patp; + UINT16* dstp; + UINT16* patp; for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp & *patp; dstp++; @@ -521,18 +521,18 @@ static int BitBlt_DPa_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint16* dstp; - uint16* patp; + UINT16* dstp; + UINT16* patp; for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp ^ ~(*patp); dstp++; } @@ -545,13 +545,13 @@ static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -571,20 +571,20 @@ static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; - uint16* patp; + UINT16* srcp; + UINT16* dstp; + UINT16* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *srcp & *patp; srcp++; dstp++; @@ -598,13 +598,13 @@ static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; + UINT16* srcp; + UINT16* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -623,9 +623,9 @@ static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint16* dstp; - uint16* patp; - uint16 color16; + UINT16* dstp; + UINT16* patp; + UINT16 color16; if (hdcDest->brush->style == GDI_BS_SOLID) { @@ -633,7 +633,7 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -649,13 +649,13 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi { for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *patp; dstp++; } @@ -669,9 +669,9 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint16* dstp; - uint16* patp; - uint16 color16; + UINT16* dstp; + UINT16* patp; + UINT16 color16; if (hdcDest->brush->style == GDI_BS_SOLID) { @@ -679,7 +679,7 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -695,13 +695,13 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n { for (y = 0; y < nHeight; y++) { - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *patp ^ *dstp; dstp++; } @@ -715,20 +715,20 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_PATPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint16* srcp; - uint16* dstp; - uint16* patp; + UINT16* srcp; + UINT16* dstp; + UINT16* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp | (*patp | ~(*srcp)); srcp++; dstp++; @@ -883,102 +883,102 @@ int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i return 1; } -static INLINE void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_BLACK_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = 0 */ *pixel = 0; } -static INLINE void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTMERGEPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -static INLINE void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKNOTPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -static INLINE void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTCOPYPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = ~P */ *pixel = ~(*pen); } -static INLINE void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKPENNOT_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -static INLINE void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOT_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = ~D */ *pixel = ~(*pixel); } -static INLINE void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_XORPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -static INLINE void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTMASKPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -static INLINE void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = D & P */ *pixel &= *pen; } -static INLINE void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTXORPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -static INLINE void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOP_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = D */ } -static INLINE void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGENOTPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -static INLINE void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_COPYPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = P */ *pixel = *pen; } -static INLINE void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGEPENNOT_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -static INLINE void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGEPEN_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = P | D */ *pixel |= *pen; } -static INLINE void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_WHITE_16bpp(UINT16 *pixel, UINT16 *pen) { /* D = 1 */ *pixel = 0xFFFF; } -#define PIXEL_TYPE uint16 +#define PIXEL_TYPE UINT16 #define GDI_GET_POINTER gdi_GetPointer_16bpp #define GDI_GET_PEN_COLOR gdi_GetPenColor_16bpp diff --git a/libfreerdp/gdi/32bpp.c b/libfreerdp/gdi/32bpp.c index 9ed9e4386..a3e4b17c0 100644 --- a/libfreerdp/gdi/32bpp.c +++ b/libfreerdp/gdi/32bpp.c @@ -41,7 +41,7 @@ uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color) { uint32 color32; - uint8 a, r, g, b; + BYTE a, r, g, b; a = 0xFF; GetBGR32(r, g, b, color); @@ -96,7 +96,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n if (hdcDest->alpha) { int x, y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -124,7 +124,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n else { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -141,7 +141,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -157,8 +157,8 @@ static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; if ((hdcDest->selectedObject != hdcSrc->selectedObject) || gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0) @@ -393,7 +393,7 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi uint32* srcp; uint32* dstp; uint32* patp; - uint8* srcp8; + BYTE* srcp8; uint32 src32; uint32 color32; HGDI_BITMAP hSrcBmp; @@ -413,7 +413,7 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi for (y = 0; y < nHeight; y++) { - srcp8 = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + srcp8 = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) diff --git a/libfreerdp/gdi/8bpp.c b/libfreerdp/gdi/8bpp.c index 5c1dd543d..c604a94d6 100644 --- a/libfreerdp/gdi/8bpp.c +++ b/libfreerdp/gdi/8bpp.c @@ -38,7 +38,7 @@ #include -uint8 gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color) +BYTE gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color) { /* TODO: Implement 8bpp gdi_get_color_8bpp() */ return 0; @@ -53,7 +53,7 @@ int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -69,7 +69,7 @@ static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -85,8 +85,8 @@ static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; if ((hdcDest->selectedObject != hdcSrc->selectedObject) || gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0) @@ -146,8 +146,8 @@ static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -171,7 +171,7 @@ static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint8* dstp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -193,8 +193,8 @@ static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -218,8 +218,8 @@ static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -243,8 +243,8 @@ static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -268,8 +268,8 @@ static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -293,8 +293,8 @@ static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidt static int BitBlt_SRCPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -324,22 +324,22 @@ static int BitBlt_DSPDxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; - uint8* patp; - uint8 color8; + BYTE* srcp; + BYTE* dstp; + BYTE* patp; + BYTE color8; /* D = (S & D) | (~S & P) */ if (hdcDest->brush->style == GDI_BS_SOLID) { color8 = gdi_get_color_8bpp(hdcDest, hdcDest->brush->color); - patp = (uint8*) &color8; + patp = (BYTE*) &color8; for (y = 0; y < nHeight; y++) { - srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint8*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (BYTE*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -356,14 +356,14 @@ static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid { for (y = 0; y < nHeight; y++) { - srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint8*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (BYTE*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint8*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (BYTE*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = (*srcp & *dstp) | (~(*srcp) & *patp); srcp++; dstp++; @@ -378,9 +378,9 @@ static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; - uint8* patp; + BYTE* srcp; + BYTE* dstp; + BYTE* patp; for (y = 0; y < nHeight; y++) { @@ -407,8 +407,8 @@ static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_DPa_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint8* dstp; - uint8* patp; + BYTE* dstp; + BYTE* patp; for (y = 0; y < nHeight; y++) { @@ -432,8 +432,8 @@ static int BitBlt_DPa_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint8* dstp; - uint8* patp; + BYTE* dstp; + BYTE* patp; for (y = 0; y < nHeight; y++) { @@ -458,8 +458,8 @@ static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -483,9 +483,9 @@ static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; - uint8* patp; + BYTE* srcp; + BYTE* dstp; + BYTE* patp; for (y = 0; y < nHeight; y++) { @@ -512,8 +512,8 @@ static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; + BYTE* srcp; + BYTE* dstp; for (y = 0; y < nHeight; y++) { @@ -537,9 +537,9 @@ static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint8* dstp; - uint8* patp; - uint8 palIndex; + BYTE* dstp; + BYTE* patp; + BYTE palIndex; if(hdcDest->brush->style == GDI_BS_SOLID) { @@ -583,9 +583,9 @@ static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint8* dstp; - uint8* patp; - uint8 palIndex; + BYTE* dstp; + BYTE* patp; + BYTE palIndex; if(hdcDest->brush->style == GDI_BS_SOLID) { @@ -629,9 +629,9 @@ static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_PATPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint8* srcp; - uint8* dstp; - uint8* patp; + BYTE* srcp; + BYTE* dstp; + BYTE* patp; for (y = 0; y < nHeight; y++) { @@ -798,102 +798,102 @@ int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, in return 1; } -static INLINE void SetPixel_BLACK_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_BLACK_8bpp(BYTE* pixel, BYTE* pen) { /* D = 0 */ *pixel = 0; } -static INLINE void SetPixel_NOTMERGEPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTMERGEPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -static INLINE void SetPixel_MASKNOTPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKNOTPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -static INLINE void SetPixel_NOTCOPYPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTCOPYPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = ~P */ *pixel = ~(*pen); } -static INLINE void SetPixel_MASKPENNOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKPENNOT_8bpp(BYTE* pixel, BYTE* pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -static INLINE void SetPixel_NOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOT_8bpp(BYTE* pixel, BYTE* pen) { /* D = ~D */ *pixel = ~(*pixel); } -static INLINE void SetPixel_XORPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_XORPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -static INLINE void SetPixel_NOTMASKPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTMASKPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -static INLINE void SetPixel_MASKPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = D & P */ *pixel &= *pen; } -static INLINE void SetPixel_NOTXORPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTXORPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -static INLINE void SetPixel_NOP_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOP_8bpp(BYTE* pixel, BYTE* pen) { /* D = D */ } -static INLINE void SetPixel_MERGENOTPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGENOTPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -static INLINE void SetPixel_COPYPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_COPYPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = P */ *pixel = *pen; } -static INLINE void SetPixel_MERGEPENNOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGEPENNOT_8bpp(BYTE* pixel, BYTE* pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -static INLINE void SetPixel_MERGEPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGEPEN_8bpp(BYTE* pixel, BYTE* pen) { /* D = P | D */ *pixel |= *pen; } -static INLINE void SetPixel_WHITE_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_WHITE_8bpp(BYTE* pixel, BYTE* pen) { /* D = 1 */ *pixel = 0xFF; } -#define PIXEL_TYPE uint8 +#define PIXEL_TYPE BYTE #define GDI_GET_POINTER gdi_GetPointer_8bpp #define GDI_GET_PEN_COLOR gdi_GetPenColor_8bpp diff --git a/libfreerdp/gdi/bitmap.c b/libfreerdp/gdi/bitmap.c index 4ca68ed2c..cd0ee68ee 100644 --- a/libfreerdp/gdi/bitmap.c +++ b/libfreerdp/gdi/bitmap.c @@ -62,14 +62,14 @@ INLINE GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos) return (GDI_COLOR) *colorp; } -INLINE uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE BYTE gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y) { - return *((uint8*)&(hBmp->data[(Y * hBmp->width) + X])); + return *((BYTE*)&(hBmp->data[(Y * hBmp->width) + X])); } -INLINE uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y) { - return *((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); + return *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); } INLINE uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y) @@ -77,14 +77,14 @@ INLINE uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y) return *((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])); } -INLINE uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y) { - return ((uint8*)&(hBmp->data[(Y * hBmp->width) + X])); + return ((BYTE*)&(hBmp->data[(Y * hBmp->width) + X])); } -INLINE uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y) { - return ((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); + return ((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); } INLINE uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y) @@ -109,14 +109,14 @@ INLINE GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor) return 0; } -INLINE void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel) +INLINE void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, BYTE pixel) { - *((uint8*)&(hBmp->data[(Y * hBmp->width) + X])) = pixel; + *((BYTE*)&(hBmp->data[(Y * hBmp->width) + X])) = pixel; } -INLINE void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel) +INLINE void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel) { - *((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel; + *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel; } INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel) @@ -134,7 +134,7 @@ INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel) * @return new bitmap */ -HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data) +HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, BYTE* data) { HGDI_BITMAP hBitmap = (HGDI_BITMAP) malloc(sizeof(GDI_BITMAP)); hBitmap->objectType = GDIOBJECT_BITMAP; diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index 540d2bf73..c5d85ed63 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -313,14 +313,14 @@ static const uint32 rop3_code_table[] = /* GDI Helper Functions */ -INLINE uint32 gdi_rop3_code(uint8 code) +INLINE uint32 gdi_rop3_code(BYTE code) { return rop3_code_table[code]; } -INLINE uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y) +INLINE BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y) { - uint8* p; + BYTE* p; HGDI_BITMAP hBmp = (HGDI_BITMAP) hdcBmp->selectedObject; if (x >= 0 && x < hBmp->width && y >= 0 && y < hBmp->height) @@ -335,9 +335,9 @@ INLINE uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y) } } -INLINE uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y) +INLINE BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y) { - uint8 * p; + BYTE * p; if (hdcBrush->brush != NULL) { @@ -355,11 +355,11 @@ INLINE uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y) } } - p = (uint8*) &(hdcBrush->textColor); + p = (BYTE*) &(hdcBrush->textColor); return p; } -INLINE int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width) +INLINE int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width) { int byte; int shift; @@ -373,7 +373,7 @@ INLINE int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width) gdiBitmap* gdi_glyph_new(rdpGdi* gdi, GLYPH_DATA* glyph) { - uint8* extra; + BYTE* extra; gdiBitmap* gdi_bmp; gdi_bmp = (gdiBitmap*) malloc(sizeof(gdiBitmap)); @@ -404,7 +404,7 @@ void gdi_glyph_free(gdiBitmap *gdi_bmp) } } -gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* data) +gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, BYTE* data) { gdiBitmap* bitmap; @@ -467,7 +467,7 @@ void gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt) void gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { - uint8* data; + BYTE* data; rdpBrush* brush; HGDI_BRUSH originalBrush; rdpGdi* gdi = context->gdi; @@ -748,7 +748,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co gdi->image->bitmap->height = surface_bits_command->height; gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp; gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8; - gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); + gdi->image->bitmap->data = (BYTE*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); freerdp_image_flip(nsc_context->bmpdata, gdi->image->bitmap->data, gdi->image->bitmap->width, gdi->image->bitmap->height, 32); gdi_BitBlt(gdi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, gdi->image->hdc, 0, 0, GDI_SRCCOPY); } @@ -759,12 +759,12 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp; gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8; - gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data, + gdi->image->bitmap->data = (BYTE*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4); if ((surface_bits_command->bpp != 32) || (gdi->clrconv->alpha == TRUE)) { - uint8* temp_image; + BYTE* temp_image; freerdp_image_convert(surface_bits_command->bitmapData, gdi->image->bitmap->data, gdi->image->bitmap->width, gdi->image->bitmap->height, @@ -773,7 +773,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co surface_bits_command->bpp = 32; surface_bits_command->bitmapData = gdi->image->bitmap->data; - temp_image = (uint8*) malloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4); + temp_image = (BYTE*) malloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4); freerdp_image_flip(gdi->image->bitmap->data, temp_image, gdi->image->bitmap->width, gdi->image->bitmap->height, 32); free(gdi->image->bitmap->data); gdi->image->bitmap->data = temp_image; @@ -875,7 +875,7 @@ void gdi_resize(rdpGdi* gdi, int width, int height) * @return */ -int gdi_init(freerdp* instance, uint32 flags, uint8* buffer) +int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer) { rdpGdi* gdi; rdpCache* cache; diff --git a/libfreerdp/gdi/gdi.h b/libfreerdp/gdi/gdi.h index 90d2f9016..6176c8b15 100644 --- a/libfreerdp/gdi/gdi.h +++ b/libfreerdp/gdi/gdi.h @@ -22,7 +22,7 @@ #include "graphics.h" -gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* data); +gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, BYTE* data); void gdi_bitmap_free_ex(gdiBitmap* gdi_bmp); #endif /* __GDI_CORE_H */ diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index 6886f7409..f214e2236 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -40,9 +40,9 @@ /* Bitmap Class */ -HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, uint8* data) +HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, BYTE* data) { - uint8* bmpData; + BYTE* bmpData; HGDI_BITMAP bitmap; bmpData = freerdp_image_convert(data, NULL, width, height, gdi->srcBpp, bpp, gdi->clrconv); @@ -93,13 +93,13 @@ void gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap) } void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, + BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id) { - uint16 size; + UINT16 size; RFX_MESSAGE* msg; - uint8* src; - uint8* dst; + BYTE* src; + BYTE* dst; int yindex; int xindex; rdpGdi* gdi; @@ -108,9 +108,9 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, size = width * height * (bpp + 7) / 8; if (bitmap->data == NULL) - bitmap->data = (uint8*) malloc(size); + bitmap->data = (BYTE*) malloc(size); else - bitmap->data = (uint8*) realloc(bitmap->data, size); + bitmap->data = (BYTE*) realloc(bitmap->data, size); switch (codec_id) { @@ -188,7 +188,7 @@ void gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) void gdi_Glyph_New(rdpContext* context, rdpGlyph* glyph) { - uint8* data; + BYTE* data; gdiGlyph* gdi_glyph; gdi_glyph = (gdiGlyph*) glyph; diff --git a/libfreerdp/gdi/graphics.h b/libfreerdp/gdi/graphics.h index 796d97d96..eaa79aca9 100644 --- a/libfreerdp/gdi/graphics.h +++ b/libfreerdp/gdi/graphics.h @@ -23,12 +23,12 @@ #include #include -HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, uint8* data); +HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, BYTE* data); void gdi_Bitmap_New(rdpContext* context, rdpBitmap* bitmap); void gdi_Bitmap_Free(rdpContext* context, rdpBitmap* bitmap); void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, - uint8* data, int width, int height, int bpp, int length, + BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id); void gdi_register_graphics(rdpGraphics* graphics); diff --git a/libfreerdp/gdi/pen.c b/libfreerdp/gdi/pen.c index c727d42c7..b65c5355d 100644 --- a/libfreerdp/gdi/pen.c +++ b/libfreerdp/gdi/pen.c @@ -53,15 +53,15 @@ HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor) return hPen; } -INLINE uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen) +INLINE BYTE gdi_GetPenColor_8bpp(HGDI_PEN pen) { /* TODO: implement conversion using palette */ return 0xFF; } -INLINE uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen) +INLINE UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen) { - uint16 p; + UINT16 p; int r, g, b; GetRGB32(r, g, b, pen->color); RGB_888_565(r, g, b); diff --git a/libfreerdp/gdi/shape.c b/libfreerdp/gdi/shape.c index 08197fede..6e86c3036 100644 --- a/libfreerdp/gdi/shape.c +++ b/libfreerdp/gdi/shape.c @@ -52,8 +52,8 @@ static void Ellipse_Bresenham(HGDI_DC hdc, int x1, int y1, int x2, int y2) int a, b, c; HGDI_BITMAP bmp; - uint8 pixel8; - uint16 pixel16; + BYTE pixel8; + UINT16 pixel16; uint32 pixel32; int bpp = hdc->bitsPerPixel; diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 757ca2531..665e31cd0 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -40,14 +40,14 @@ struct _SYSTEM_TIME_ENTRY { - uint16 wYear; - uint16 wMonth; - uint16 wDayOfWeek; - uint16 wDay; - uint16 wHour; - uint16 wMinute; - uint16 wSecond; - uint16 wMilliseconds; + UINT16 wYear; + UINT16 wMonth; + UINT16 wDayOfWeek; + UINT16 wDay; + UINT16 wHour; + UINT16 wMinute; + UINT16 wSecond; + UINT16 wMilliseconds; }; typedef struct _SYSTEM_TIME_ENTRY SYSTEM_TIME_ENTRY; diff --git a/libfreerdp/rail/icon.c b/libfreerdp/rail/icon.c index 5ab656c06..3b26b158e 100644 --- a/libfreerdp/rail/icon.c +++ b/libfreerdp/rail/icon.c @@ -28,7 +28,7 @@ #include -ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** extra) +ICON_INFO* icon_cache_get(rdpIconCache* cache, BYTE id, UINT16 index, void** extra) { ICON_INFO* entry; @@ -52,7 +52,7 @@ ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** ex return entry; } -void icon_cache_put(rdpIconCache* cache, uint8 id, uint16 index, ICON_INFO* entry, void* extra) +void icon_cache_put(rdpIconCache* cache, BYTE id, UINT16 index, ICON_INFO* entry, void* extra) { if (id >= cache->numCaches) { @@ -83,7 +83,7 @@ rdpIconCache* icon_cache_new(rdpRail* rail) int i; cache->rail = rail; - cache->numCaches = (uint8) rail->settings->num_icon_cache_entries; + cache->numCaches = (BYTE) rail->settings->num_icon_cache_entries; cache->numCacheEntries = rail->settings->num_icon_cache_entries; cache->caches = xzalloc(cache->numCaches * sizeof(WINDOW_ICON_CACHE)); diff --git a/libfreerdp/utils/args.c b/libfreerdp/utils/args.c index c11412841..9d90df9f7 100644 --- a/libfreerdp/utils/args.c +++ b/libfreerdp/utils/args.c @@ -252,11 +252,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } else { - settings->width = (uint16) strtol(argv[index], &p, 10); + settings->width = (UINT16) strtol(argv[index], &p, 10); if (*p == 'x') { - settings->height = (uint16) strtol(p + 1, &p, 10); + settings->height = (UINT16) strtol(p + 1, &p, 10); } if (*p == '%') { diff --git a/libfreerdp/utils/bitmap.c b/libfreerdp/utils/bitmap.c index 8fa5ebccb..9fb07a5a1 100644 --- a/libfreerdp/utils/bitmap.c +++ b/libfreerdp/utils/bitmap.c @@ -30,14 +30,14 @@ typedef struct { - uint8 magic[2]; + BYTE magic[2]; } BITMAP_MAGIC; typedef struct { uint32 filesz; - uint16 creator1; - uint16 creator2; + UINT16 creator1; + UINT16 creator2; uint32 bmp_offset; } BITMAP_CORE_HEADER; @@ -46,8 +46,8 @@ typedef struct uint32 header_sz; sint32 width; sint32 height; - uint16 nplanes; - uint16 bitspp; + UINT16 nplanes; + UINT16 bitspp; uint32 compress_type; uint32 bmp_bytesz; sint32 hres; diff --git a/libfreerdp/utils/dsp.c b/libfreerdp/utils/dsp.c index 673dc59eb..503901fd4 100644 --- a/libfreerdp/utils/dsp.c +++ b/libfreerdp/utils/dsp.c @@ -30,12 +30,12 @@ #include static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context, - const uint8* src, int bytes_per_sample, + const BYTE* src, int bytes_per_sample, uint32 schan, uint32 srate, int sframes, uint32 rchan, uint32 rrate) { - uint8* dst; - uint8* p; + BYTE* dst; + BYTE* p; int rframes; int rsize; int i, j; @@ -50,7 +50,7 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context, if (rsize > (int) context->resampled_maxlength) { context->resampled_maxlength = rsize + 1024; - context->resampled_buffer = (uint8*) realloc(context->resampled_buffer, context->resampled_maxlength); + context->resampled_buffer = (BYTE*) realloc(context->resampled_buffer, context->resampled_maxlength); } dst = context->resampled_buffer; @@ -81,13 +81,13 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context, * http://wiki.multimedia.cx/index.php?title=IMA_ADPCM */ -static const sint16 ima_step_index_table[] = +static const INT16 ima_step_index_table[] = { -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 }; -static const sint16 ima_step_size_table[] = +static const INT16 ima_step_size_table[] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, @@ -100,8 +100,8 @@ static const sint16 ima_step_size_table[] = 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 }; -static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, - int channel, uint8 sample) +static UINT16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, + int channel, BYTE sample) { sint32 ss; sint32 d; @@ -123,7 +123,7 @@ static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, else if (d > 32767) d = 32767; - adpcm->ima.last_sample[channel] = (sint16) d; + adpcm->ima.last_sample[channel] = (INT16) d; adpcm->ima.last_step[channel] += ima_step_index_table[sample]; if (adpcm->ima.last_step[channel] < 0) @@ -131,15 +131,15 @@ static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, else if (adpcm->ima.last_step[channel] > 88) adpcm->ima.last_step[channel] = 88; - return (uint16) d; + return (UINT16) d; } static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size) + const BYTE* src, int size, int channels, int block_size) { - uint8* dst; - uint8 sample; - uint16 decoded; + BYTE* dst; + BYTE sample; + UINT16 decoded; uint32 out_size; int channel; int i; @@ -155,15 +155,15 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, { if (size % block_size == 0) { - context->adpcm.ima.last_sample[0] = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8)); - context->adpcm.ima.last_step[0] = (sint16) (*(src + 2)); + context->adpcm.ima.last_sample[0] = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8)); + context->adpcm.ima.last_step[0] = (INT16) (*(src + 2)); src += 4; size -= 4; out_size -= 16; if (channels > 1) { - context->adpcm.ima.last_sample[1] = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8)); - context->adpcm.ima.last_step[1] = (sint16) (*(src + 2)); + context->adpcm.ima.last_sample[1] = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8)); + context->adpcm.ima.last_step[1] = (INT16) (*(src + 2)); src += 4; size -= 4; out_size -= 16; @@ -215,8 +215,8 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, */ static const struct { - uint8 byte_num; - uint8 byte_shift; + BYTE byte_num; + BYTE byte_shift; } ima_stereo_encode_map[] = { { 0, 0 }, @@ -237,13 +237,13 @@ static const struct { 7, 4 } }; -static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm, - int channel, sint16 sample) +static BYTE dsp_encode_ima_adpcm_sample(ADPCM* adpcm, + int channel, INT16 sample) { sint32 e; sint32 d; sint32 ss; - uint8 enc; + BYTE enc; sint32 diff; ss = ima_step_size_table[adpcm->ima.last_step[channel]]; @@ -283,7 +283,7 @@ static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm, diff = -32768; else if (diff > 32767) diff = 32767; - adpcm->ima.last_sample[channel] = (sint16) diff; + adpcm->ima.last_sample[channel] = (INT16) diff; adpcm->ima.last_step[channel] += ima_step_index_table[enc]; if (adpcm->ima.last_step[channel] < 0) @@ -295,11 +295,11 @@ static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm, } static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size) + const BYTE* src, int size, int channels, int block_size) { - uint8* dst; - sint16 sample; - uint8 encoded; + BYTE* dst; + INT16 sample; + BYTE encoded; uint32 out_size; int i; @@ -316,13 +316,13 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, { *dst++ = context->adpcm.ima.last_sample[0] & 0xff; *dst++ = (context->adpcm.ima.last_sample[0] >> 8) & 0xff; - *dst++ = (uint8) context->adpcm.ima.last_step[0]; + *dst++ = (BYTE) context->adpcm.ima.last_step[0]; *dst++ = 0; if (channels > 1) { *dst++ = context->adpcm.ima.last_sample[1] & 0xff; *dst++ = (context->adpcm.ima.last_sample[1] >> 8) & 0xff; - *dst++ = (uint8) context->adpcm.ima.last_step[1]; + *dst++ = (BYTE) context->adpcm.ima.last_step[1]; *dst++ = 0; } } @@ -332,7 +332,7 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, memset(dst, 0, 8); for (i = 0; i < 16; i++) { - sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8)); + sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8)); src += 2; encoded = dsp_encode_ima_adpcm_sample(&context->adpcm, i % 2, sample); dst[ima_stereo_encode_map[i].byte_num] |= encoded << ima_stereo_encode_map[i].byte_shift; @@ -342,10 +342,10 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, } else { - sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8)); + sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8)); src += 2; encoded = dsp_encode_ima_adpcm_sample(&context->adpcm, 0, sample); - sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8)); + sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8)); src += 2; encoded |= dsp_encode_ima_adpcm_sample(&context->adpcm, 0, sample) << 4; *dst++ = encoded; @@ -362,28 +362,28 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, * http://wiki.multimedia.cx/index.php?title=Microsoft_ADPCM */ -static const sint16 ms_adpcm_adaptation_table[] = +static const INT16 ms_adpcm_adaptation_table[] = { 230, 230, 230, 230, 307, 409, 512, 614, 768, 614, 512, 409, 307, 230, 230, 230 }; -static const sint16 ms_adpcm_coeff1_table[] = +static const INT16 ms_adpcm_coeff1_table[] = { 256, 512, 0, 192, 240, 460, 392 }; -static const sint16 ms_adpcm_coeff2_table[] = +static const INT16 ms_adpcm_coeff2_table[] = { 0, -256, 0, 64, 0, -208, -232 }; -static sint16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, uint8 sample, int channel) +static INT16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, BYTE sample, int channel) { - sint8 nibble; + INT8 nibble; sint32 presample; - nibble = (sample & 0x08 ? (sint8)sample - 16 : sample); + nibble = (sample & 0x08 ? (INT8)sample - 16 : sample); presample = ((adpcm->ms.sample1[channel] * ms_adpcm_coeff1_table[adpcm->ms.predictor[channel]]) + (adpcm->ms.sample2[channel] * ms_adpcm_coeff2_table[adpcm->ms.predictor[channel]])) / 256; presample += nibble * adpcm->ms.delta[channel]; @@ -396,14 +396,14 @@ static sint16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, uint8 sample, int adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[sample] / 256; if (adpcm->ms.delta[channel] < 16) adpcm->ms.delta[channel] = 16; - return (sint16) presample; + return (INT16) presample; } static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size) + const BYTE* src, int size, int channels, int block_size) { - uint8* dst; - uint8 sample; + BYTE* dst; + BYTE sample; uint32 out_size; out_size = size * 4; @@ -421,43 +421,43 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, { context->adpcm.ms.predictor[0] = *src++; context->adpcm.ms.predictor[1] = *src++; - context->adpcm.ms.delta[0] = *((sint16*)src); + context->adpcm.ms.delta[0] = *((INT16*)src); src += 2; - context->adpcm.ms.delta[1] = *((sint16*)src); + context->adpcm.ms.delta[1] = *((INT16*)src); src += 2; - context->adpcm.ms.sample1[0] = *((sint16*)src); + context->adpcm.ms.sample1[0] = *((INT16*)src); src += 2; - context->adpcm.ms.sample1[1] = *((sint16*)src); + context->adpcm.ms.sample1[1] = *((INT16*)src); src += 2; - context->adpcm.ms.sample2[0] = *((sint16*)src); + context->adpcm.ms.sample2[0] = *((INT16*)src); src += 2; - context->adpcm.ms.sample2[1] = *((sint16*)src); + context->adpcm.ms.sample2[1] = *((INT16*)src); src += 2; size -= 14; - *((sint16*)dst) = context->adpcm.ms.sample2[0]; + *((INT16*)dst) = context->adpcm.ms.sample2[0]; dst += 2; - *((sint16*)dst) = context->adpcm.ms.sample2[1]; + *((INT16*)dst) = context->adpcm.ms.sample2[1]; dst += 2; - *((sint16*)dst) = context->adpcm.ms.sample1[0]; + *((INT16*)dst) = context->adpcm.ms.sample1[0]; dst += 2; - *((sint16*)dst) = context->adpcm.ms.sample1[1]; + *((INT16*)dst) = context->adpcm.ms.sample1[1]; dst += 2; } else { context->adpcm.ms.predictor[0] = *src++; - context->adpcm.ms.delta[0] = *((sint16*)src); + context->adpcm.ms.delta[0] = *((INT16*)src); src += 2; - context->adpcm.ms.sample1[0] = *((sint16*)src); + context->adpcm.ms.sample1[0] = *((INT16*)src); src += 2; - context->adpcm.ms.sample2[0] = *((sint16*)src); + context->adpcm.ms.sample2[0] = *((INT16*)src); src += 2; size -= 7; - *((sint16*)dst) = context->adpcm.ms.sample2[0]; + *((INT16*)dst) = context->adpcm.ms.sample2[0]; dst += 2; - *((sint16*)dst) = context->adpcm.ms.sample1[0]; + *((INT16*)dst) = context->adpcm.ms.sample1[0]; dst += 2; } } @@ -466,25 +466,25 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, { sample = *src++; size--; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); dst += 2; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1); dst += 2; sample = *src++; size--; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); dst += 2; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1); dst += 2; } else { sample = *src++; size--; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0); dst += 2; - *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 0); + *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 0); dst += 2; } } @@ -492,7 +492,7 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, context->adpcm_size = dst - context->adpcm_buffer; } -static uint8 freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int channel) +static BYTE freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int channel) { sint32 presample; sint32 errordelta; @@ -513,16 +513,16 @@ static uint8 freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int presample = -32768; adpcm->ms.sample2[channel] = adpcm->ms.sample1[channel]; adpcm->ms.sample1[channel] = presample; - adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[(((uint8)errordelta) & 0x0F)] / 256; + adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[(((BYTE)errordelta) & 0x0F)] / 256; if (adpcm->ms.delta[channel] < 16) adpcm->ms.delta[channel] = 16; - return ((uint8)errordelta) & 0x0F; + return ((BYTE)errordelta) & 0x0F; } static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, - const uint8* src, int size, int channels, int block_size) + const BYTE* src, int size, int channels, int block_size) { - uint8* dst; + BYTE* dst; sint32 sample; uint32 out_size; @@ -547,18 +547,18 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, { *dst++ = context->adpcm.ms.predictor[0]; *dst++ = context->adpcm.ms.predictor[1]; - *dst++ = (uint8) (context->adpcm.ms.delta[0] & 0xff); - *dst++ = (uint8) ((context->adpcm.ms.delta[0] >> 8) & 0xff); - *dst++ = (uint8) (context->adpcm.ms.delta[1] & 0xff); - *dst++ = (uint8) ((context->adpcm.ms.delta[1] >> 8) & 0xff); - context->adpcm.ms.sample1[0] = *((sint16*) (src + 4)); - context->adpcm.ms.sample1[1] = *((sint16*) (src + 6)); - context->adpcm.ms.sample2[0] = *((sint16*) (src + 0)); - context->adpcm.ms.sample2[1] = *((sint16*) (src + 2)); - *((sint16*) (dst + 0)) = (sint16) context->adpcm.ms.sample1[0]; - *((sint16*) (dst + 2)) = (sint16) context->adpcm.ms.sample1[1]; - *((sint16*) (dst + 4)) = (sint16) context->adpcm.ms.sample2[0]; - *((sint16*) (dst + 6)) = (sint16) context->adpcm.ms.sample2[1]; + *dst++ = (BYTE) (context->adpcm.ms.delta[0] & 0xff); + *dst++ = (BYTE) ((context->adpcm.ms.delta[0] >> 8) & 0xff); + *dst++ = (BYTE) (context->adpcm.ms.delta[1] & 0xff); + *dst++ = (BYTE) ((context->adpcm.ms.delta[1] >> 8) & 0xff); + context->adpcm.ms.sample1[0] = *((INT16*) (src + 4)); + context->adpcm.ms.sample1[1] = *((INT16*) (src + 6)); + context->adpcm.ms.sample2[0] = *((INT16*) (src + 0)); + context->adpcm.ms.sample2[1] = *((INT16*) (src + 2)); + *((INT16*) (dst + 0)) = (INT16) context->adpcm.ms.sample1[0]; + *((INT16*) (dst + 2)) = (INT16) context->adpcm.ms.sample1[1]; + *((INT16*) (dst + 4)) = (INT16) context->adpcm.ms.sample2[0]; + *((INT16*) (dst + 6)) = (INT16) context->adpcm.ms.sample2[1]; dst += 8; src += 8; size -= 8; @@ -566,22 +566,22 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, else { *dst++ = context->adpcm.ms.predictor[0]; - *dst++ = (uint8) (context->adpcm.ms.delta[0] & 0xff); - *dst++ = (uint8) ((context->adpcm.ms.delta[0] >> 8) & 0xff); - context->adpcm.ms.sample1[0] = *((sint16*) (src + 2)); - context->adpcm.ms.sample2[0] = *((sint16*) (src + 0)); - *((sint16*) (dst + 0)) = (sint16) context->adpcm.ms.sample1[0]; - *((sint16*) (dst + 2)) = (sint16) context->adpcm.ms.sample2[0]; + *dst++ = (BYTE) (context->adpcm.ms.delta[0] & 0xff); + *dst++ = (BYTE) ((context->adpcm.ms.delta[0] >> 8) & 0xff); + context->adpcm.ms.sample1[0] = *((INT16*) (src + 2)); + context->adpcm.ms.sample2[0] = *((INT16*) (src + 0)); + *((INT16*) (dst + 0)) = (INT16) context->adpcm.ms.sample1[0]; + *((INT16*) (dst + 2)) = (INT16) context->adpcm.ms.sample2[0]; dst += 4; src += 4; size -= 4; } } - sample = *((sint16*) src); + sample = *((INT16*) src); src += 2; *dst = freerdp_dsp_encode_ms_adpcm_sample(&context->adpcm, sample, 0) << 4; - sample = *((sint16*) src); + sample = *((INT16*) src); src += 2; *dst += freerdp_dsp_encode_ms_adpcm_sample(&context->adpcm, sample, channels > 1 ? 1 : 0); dst++; diff --git a/libfreerdp/utils/event.c b/libfreerdp/utils/event.c index 91608da96..48ee7109b 100644 --- a/libfreerdp/utils/event.c +++ b/libfreerdp/utils/event.c @@ -31,7 +31,7 @@ #include #include -static RDP_EVENT* freerdp_cliprdr_event_new(uint16 event_type) +static RDP_EVENT* freerdp_cliprdr_event_new(UINT16 event_type) { RDP_EVENT* event = NULL; @@ -54,7 +54,7 @@ static RDP_EVENT* freerdp_cliprdr_event_new(uint16 event_type) return event; } -static RDP_EVENT* freerdp_tsmf_event_new(uint16 event_type) +static RDP_EVENT* freerdp_tsmf_event_new(UINT16 event_type) { RDP_EVENT* event = NULL; @@ -71,14 +71,14 @@ static RDP_EVENT* freerdp_tsmf_event_new(uint16 event_type) return event; } -static RDP_EVENT* freerdp_rail_event_new(uint16 event_type) +static RDP_EVENT* freerdp_rail_event_new(UINT16 event_type) { RDP_EVENT* event = NULL; event = xnew(RDP_EVENT); return event; } -RDP_EVENT* freerdp_event_new(uint16 event_class, uint16 event_type, +RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type, RDP_EVENT_CALLBACK on_event_free_callback, void* user_data) { RDP_EVENT* event = NULL; diff --git a/libfreerdp/utils/hexdump.c b/libfreerdp/utils/hexdump.c index 8e80f2615..0f20709e0 100644 --- a/libfreerdp/utils/hexdump.c +++ b/libfreerdp/utils/hexdump.c @@ -28,9 +28,9 @@ #include -void freerdp_hexdump(uint8* data, int length) +void freerdp_hexdump(BYTE* data, int length) { - uint8* p = data; + BYTE* p = data; int i, line, offset = 0; while (offset < length) diff --git a/libfreerdp/utils/msusb.c b/libfreerdp/utils/msusb.c index b1378df50..3ec293bd7 100644 --- a/libfreerdp/utils/msusb.c +++ b/libfreerdp/utils/msusb.c @@ -60,7 +60,7 @@ msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, MSUSB_PIPE_DESCR } static MSUSB_PIPE_DESCRIPTOR ** -msusb_mspipes_read(uint8 * data, uint32 data_size, uint32 NumberOfPipes, int * offset) +msusb_mspipes_read(BYTE * data, uint32 data_size, uint32 NumberOfPipes, int * offset) { MSUSB_PIPE_DESCRIPTOR ** MsPipes; int pnum, move = 0; @@ -72,7 +72,7 @@ msusb_mspipes_read(uint8 * data, uint32 data_size, uint32 NumberOfPipes, int * o { MSUSB_PIPE_DESCRIPTOR * MsPipe = msusb_mspipe_new(); - data_read_uint16(data + move, MsPipe->MaximumPacketSize); + data_read_UINT16(data + move, MsPipe->MaximumPacketSize); data_read_uint32(data + move + 4, MsPipe->MaximumTransferSize); data_read_uint32(data + move + 8, MsPipe->PipeFlags); move += 12; @@ -126,23 +126,23 @@ msusb_msinterface_free_list(MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces, uint32 N } void -msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR * MsConfig, uint8 InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR * NewMsInterface) +msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR * MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR * NewMsInterface) { msusb_msinterface_free(MsConfig->MsInterfaces[InterfaceNumber]); MsConfig->MsInterfaces[InterfaceNumber] = NewMsInterface; } MSUSB_INTERFACE_DESCRIPTOR * -msusb_msinterface_read(uint8 * data, uint32 data_size, int * offset) +msusb_msinterface_read(BYTE * data, uint32 data_size, int * offset) { MSUSB_INTERFACE_DESCRIPTOR * MsInterface; MsInterface = msusb_msinterface_new(); - data_read_uint16(data, MsInterface->Length); - data_read_uint16(data + 2, MsInterface->NumberOfPipesExpected); - data_read_uint8(data + 4, MsInterface->InterfaceNumber); - data_read_uint8(data + 5, MsInterface->AlternateSetting); + data_read_UINT16(data, MsInterface->Length); + data_read_UINT16(data + 2, MsInterface->NumberOfPipesExpected); + data_read_BYTE(data + 4, MsInterface->InterfaceNumber); + data_read_BYTE(data + 5, MsInterface->AlternateSetting); data_read_uint32(data + 8, MsInterface->NumberOfPipes); *offset += 12; @@ -163,26 +163,26 @@ msusb_msinterface_read(uint8 * data, uint32 data_size, int * offset) } int -msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data, int * offset) +msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, BYTE * data, int * offset) { MSUSB_PIPE_DESCRIPTOR ** MsPipes; MSUSB_PIPE_DESCRIPTOR * MsPipe; int pnum = 0, move = 0; /* Length */ - data_write_uint16(data, MsInterface->Length); + data_write_UINT16(data, MsInterface->Length); /* InterfaceNumber */ - data_write_uint8(data + 2, MsInterface->InterfaceNumber); + data_write_BYTE(data + 2, MsInterface->InterfaceNumber); /* AlternateSetting */ - data_write_uint8(data + 3, MsInterface->AlternateSetting); + data_write_BYTE(data + 3, MsInterface->AlternateSetting); /* bInterfaceClass */ - data_write_uint8(data + 4, MsInterface->bInterfaceClass); + data_write_BYTE(data + 4, MsInterface->bInterfaceClass); /* bInterfaceSubClass */ - data_write_uint8(data + 5, MsInterface->bInterfaceSubClass); + data_write_BYTE(data + 5, MsInterface->bInterfaceSubClass); /* bInterfaceProtocol */ - data_write_uint8(data + 6, MsInterface->bInterfaceProtocol); + data_write_BYTE(data + 6, MsInterface->bInterfaceProtocol); /* Padding */ - data_write_uint8(data + 7, 0); + data_write_BYTE(data + 7, 0); /* InterfaceHandle */ data_write_uint32(data + 8, MsInterface->InterfaceHandle); /* NumberOfPipes */ @@ -194,11 +194,11 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data, { MsPipe = MsPipes[pnum]; /* MaximumPacketSize */ - data_write_uint16(data + move, MsPipe->MaximumPacketSize); + data_write_UINT16(data + move, MsPipe->MaximumPacketSize); /* EndpointAddress */ - data_write_uint8(data + move + 2, MsPipe->bEndpointAddress); + data_write_BYTE(data + move + 2, MsPipe->bEndpointAddress); /* Interval */ - data_write_uint8(data + move + 3, MsPipe->bInterval); + data_write_BYTE(data + move + 3, MsPipe->bInterval); /* PipeType */ data_write_uint32(data + move + 4, MsPipe->PipeType); /* PipeHandle */ @@ -217,7 +217,7 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data, } static MSUSB_INTERFACE_DESCRIPTOR ** -msusb_msinterface_read_list(uint8 * data, uint32 data_size, uint32 NumInterfaces) +msusb_msinterface_read_list(BYTE * data, uint32 data_size, uint32 NumInterfaces) { MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; int inum, offset = 0; @@ -235,7 +235,7 @@ msusb_msinterface_read_list(uint8 * data, uint32 data_size, uint32 NumInterfaces } int -msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR * MsConfg, uint8 * data, int * offset) +msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR * MsConfg, BYTE * data, int * offset) { MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; MSUSB_INTERFACE_DESCRIPTOR * MsInterface; @@ -279,29 +279,29 @@ msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR * MsConfig) } MSUSB_CONFIG_DESCRIPTOR * -msusb_msconfig_read(uint8 * data, uint32 data_size, uint32 NumInterfaces) +msusb_msconfig_read(BYTE * data, uint32 data_size, uint32 NumInterfaces) { MSUSB_CONFIG_DESCRIPTOR * MsConfig; - uint8 lenConfiguration, typeConfiguration; - uint16 lenInterface; + BYTE lenConfiguration, typeConfiguration; + UINT16 lenInterface; int i, offset = 0; MsConfig = msusb_msconfig_new(); for(i = 0; i < NumInterfaces; i++) { - data_read_uint16(data + offset, lenInterface); + data_read_UINT16(data + offset, lenInterface); offset += lenInterface; } - data_read_uint8(data + offset, lenConfiguration); - data_read_uint8(data + offset + 1, typeConfiguration); + data_read_BYTE(data + offset, lenConfiguration); + data_read_BYTE(data + offset + 1, typeConfiguration); if (lenConfiguration != 0x9 || typeConfiguration != 0x2) { DEBUG("%s: len and type must be 0x9 and 0x2 , but it is 0x%x and 0x%x", lenConfiguration, typeConfiguration); } - data_read_uint16(data + offset + 2, MsConfig->wTotalLength); - data_read_uint8(data + offset + 5, MsConfig->bConfigurationValue); + data_read_UINT16(data + offset + 2, MsConfig->wTotalLength); + data_read_BYTE(data + offset + 5, MsConfig->bConfigurationValue); MsConfig->NumInterfaces = NumInterfaces; MsConfig->ConfigurationHandle = 0; MsConfig->InitCompleted = 0; diff --git a/libfreerdp/utils/rail.c b/libfreerdp/utils/rail.c index fa9b535cf..90b65487d 100644 --- a/libfreerdp/utils/rail.c +++ b/libfreerdp/utils/rail.c @@ -31,7 +31,7 @@ #include -void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, uint16 cbString) +void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString) { unicode_string->length = cbString; unicode_string->string = malloc(cbString); @@ -48,12 +48,12 @@ void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string) void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string) { - stream_read_uint16(s, unicode_string->length); /* cbString (2 bytes) */ + stream_read_UINT16(s, unicode_string->length); /* cbString (2 bytes) */ if (unicode_string->string == NULL) - unicode_string->string = (uint8*) malloc(unicode_string->length); + unicode_string->string = (BYTE*) malloc(unicode_string->length); else - unicode_string->string = (uint8*) realloc(unicode_string->string, unicode_string->length); + unicode_string->string = (BYTE*) realloc(unicode_string->string, unicode_string->length); stream_read(s, unicode_string->string, unicode_string->length); } @@ -61,7 +61,7 @@ void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string) void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string) { stream_check_size(s, 2 + unicode_string->length); - stream_write_uint16(s, unicode_string->length); /* cbString (2 bytes) */ + stream_write_UINT16(s, unicode_string->length); /* cbString (2 bytes) */ stream_write(s, unicode_string->string, unicode_string->length); /* string */ } @@ -76,18 +76,18 @@ void rail_write_unicode_string_value(STREAM* s, RAIL_UNICODE_STRING* unicode_str void rail_read_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16) { - stream_read_uint16(s, rectangle_16->left); /* left (2 bytes) */ - stream_read_uint16(s, rectangle_16->top); /* top (2 bytes) */ - stream_read_uint16(s, rectangle_16->right); /* right (2 bytes) */ - stream_read_uint16(s, rectangle_16->bottom); /* bottom (2 bytes) */ + stream_read_UINT16(s, rectangle_16->left); /* left (2 bytes) */ + stream_read_UINT16(s, rectangle_16->top); /* top (2 bytes) */ + stream_read_UINT16(s, rectangle_16->right); /* right (2 bytes) */ + stream_read_UINT16(s, rectangle_16->bottom); /* bottom (2 bytes) */ } void rail_write_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16) { - stream_write_uint16(s, rectangle_16->left); /* left (2 bytes) */ - stream_write_uint16(s, rectangle_16->top); /* top (2 bytes) */ - stream_write_uint16(s, rectangle_16->right); /* right (2 bytes) */ - stream_write_uint16(s, rectangle_16->bottom); /* bottom (2 bytes) */ + stream_write_UINT16(s, rectangle_16->left); /* left (2 bytes) */ + stream_write_UINT16(s, rectangle_16->top); /* top (2 bytes) */ + stream_write_UINT16(s, rectangle_16->right); /* right (2 bytes) */ + stream_write_UINT16(s, rectangle_16->bottom); /* bottom (2 bytes) */ } void* rail_clone_order(uint32 event_type, void* order) diff --git a/libfreerdp/utils/stream.c b/libfreerdp/utils/stream.c index 13e05041b..599c5e797 100644 --- a/libfreerdp/utils/stream.c +++ b/libfreerdp/utils/stream.c @@ -56,7 +56,7 @@ STREAM* stream_new(int size) if (size != 0) { size = size > 0 ? size : 0x400; - stream->data = (uint8*) xzalloc(size); + stream->data = (BYTE*) xzalloc(size); stream->p = stream->data; stream->size = size; } @@ -107,9 +107,9 @@ void stream_extend(STREAM* stream, int request_size) stream->size += increased_size; if (original_size == 0) - stream->data = (uint8*) malloc(stream->size); + stream->data = (BYTE*) malloc(stream->size); else - stream->data = (uint8*) realloc(stream->data, stream->size); + stream->data = (BYTE*) realloc(stream->data, stream->size); memset(stream->data + original_size, 0, increased_size); stream_set_pos(stream, pos); diff --git a/libfreerdp/utils/tcp.c b/libfreerdp/utils/tcp.c index 99b287e5b..44f862b37 100644 --- a/libfreerdp/utils/tcp.c +++ b/libfreerdp/utils/tcp.c @@ -112,7 +112,7 @@ int freerdp_tcp_connect(const char* hostname, int port) return sockfd; } -int freerdp_tcp_read(int sockfd, uint8* data, int length) +int freerdp_tcp_read(int sockfd, BYTE* data, int length) { int status; @@ -145,7 +145,7 @@ int freerdp_tcp_read(int sockfd, uint8* data, int length) return status; } -int freerdp_tcp_write(int sockfd, uint8* data, int length) +int freerdp_tcp_write(int sockfd, BYTE* data, int length) { int status; diff --git a/scripts/LECHash.c b/scripts/LECHash.c index 7c73438f2..285205ff2 100644 --- a/scripts/LECHash.c +++ b/scripts/LECHash.c @@ -1,7 +1,7 @@ #include -typedef unsigned short uint16; +typedef unsigned short UINT16; -static uint16 HuffCodeLEC[] = { +static UINT16 HuffCodeLEC[] = { 0x0004, 0x0024, 0x0014, 0x0011, 0x0051, 0x0031, 0x0071, 0x0009, 0x0049, 0x0029, 0x0069, 0x0015, 0x0095, 0x0055, 0x00d5, 0x0035, 0x00b5, 0x0075, 0x001d, 0x00f5, 0x011d, 0x009d, 0x019d, 0x005d, 0x000d, 0x008d, 0x015d, 0x00dd, 0x01dd, 0x003d, 0x013d, 0x00bd, 0x004d, 0x01bd, 0x007d, 0x006b, 0x017d, 0x00fd, 0x01fd, 0x0003, 0x0103, @@ -24,20 +24,20 @@ static uint16 HuffCodeLEC[] = { 0x002c, 0x001c, 0x0000, 0x003c, 0x0002, 0x0022, 0x0010, 0x0012, 0x0008, 0x0032, 0x000a, 0x002a, 0x001a, 0x003a, 0x0006, 0x0026, 0x0016, 0x0036, 0x000e, 0x002e, 0x001e, 0x003e, 0x0001, 0x00ed, 0x0018, 0x0021, 0x0025, 0x0065 }; -uint16 HashTable[512] = { [0 ... 511] = 0xffff }; +UINT16 HashTable[512] = { [0 ... 511] = 0xffff }; -static uint16 tab[8] = {511, 0, 508, 448, 494, 347, 486, 482}; +static UINT16 tab[8] = {511, 0, 508, 448, 494, 347, 486, 482}; -uint16 hash(uint16 key) +UINT16 hash(UINT16 key) { - uint16 h; + UINT16 h; h = (key & 0x1ff) ^ (key >> 9) ^ (key >> 4) ^ (key >> 7); return h; } -uint16 minihash(uint16 key) +UINT16 minihash(UINT16 key) { - uint16 h; + UINT16 h; h = ((((key >> 8) ^ (key & 0xff)) >> 2) & 0xf); if(key >> 9) h = ~h; @@ -47,7 +47,7 @@ uint16 minihash(uint16 key) void buildhashtable(void) { int i,j; - uint16 h; + UINT16 h; for(i=0;i<293;i++) { h=hash(HuffCodeLEC[i]); @@ -64,9 +64,9 @@ void buildhashtable(void) } } -uint16 getvalue(uint16 huff) +UINT16 getvalue(UINT16 huff) { - uint16 h = HashTable[hash(huff)]; + UINT16 h = HashTable[hash(huff)]; if((h ^ huff) >> 9) return h & 0x1ff; else @@ -77,7 +77,7 @@ main() { int i; buildhashtable(); - printf("static uint16 HuffIndexLEC[512] = {\n"); + printf("static UINT16 HuffIndexLEC[512] = {\n"); for(i=0;i<512;i++) { if(i == 511) diff --git a/scripts/LOMHash.c b/scripts/LOMHash.c index 0644fb11f..c1d4e36ea 100644 --- a/scripts/LOMHash.c +++ b/scripts/LOMHash.c @@ -1,23 +1,23 @@ #include -typedef unsigned short uint16; -typedef unsigned char uint8; -static uint16 HuffCodeLOM[] = { +typedef unsigned short UINT16; +typedef unsigned char BYTE; +static UINT16 HuffCodeLOM[] = { 0x0001, 0x0000, 0x0002, 0x0009, 0x0006, 0x0005, 0x000d, 0x000b, 0x0003, 0x001b, 0x0007, 0x0017, 0x0037, 0x000f, 0x004f, 0x006f, 0x002f, 0x00ef, 0x001f, 0x005f, 0x015f, 0x009f, 0x00df, 0x01df, 0x003f, 0x013f, 0x00bf, 0x01bf, 0x007f, 0x017f, 0x00ff, 0x01ff }; -uint16 HashTable[32] = { [0 ... 31] = 0xffff }; +UINT16 HashTable[32] = { [0 ... 31] = 0xffff }; -uint8 tab[4] = { 0, 4, 10, 19 }; +BYTE tab[4] = { 0, 4, 10, 19 }; -uint16 hash(uint16 key) +UINT16 hash(UINT16 key) { return ((key & 0x1f) ^ (key >> 5) ^ (key >> 9)); } -uint8 minihash(uint16 key) +BYTE minihash(UINT16 key) { - uint8 h; + BYTE h; h = (key >> 4) & 0xf; return ((h ^ (h >> 2) ^ (h >> 3)) & 0x3); } @@ -25,7 +25,7 @@ uint8 minihash(uint16 key) void buildhashtable(void) { int i,j; - uint16 h; + UINT16 h; for(i=0;i<32;i++) { h=hash(HuffCodeLOM[i]); @@ -43,9 +43,9 @@ void buildhashtable(void) } } -uint8 getvalue(uint16 huff) +BYTE getvalue(UINT16 huff) { - uint16 h = HashTable[hash(huff)]; + UINT16 h = HashTable[hash(huff)]; if((h ^ huff) >> 5) { return h & 0x1f; @@ -58,7 +58,7 @@ main() { int i; buildhashtable(); - printf("static uint16 HuffIndexLOM[32] = {\n"); + printf("static UINT16 HuffIndexLOM[32] = {\n"); for(i=0;i<32;i++) { if(i == 31) diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 82479b92f..08941af9b 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -144,7 +144,7 @@ static void test_peer_draw_background(freerdp_peer* client) int size; STREAM* s; RFX_RECT rect; - uint8* rgb_data; + BYTE* rgb_data; rdpUpdate* update = client->update; SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command; testPeerContext* context = (testPeerContext*) client->context; @@ -200,7 +200,7 @@ static void test_peer_load_icon(freerdp_peer* client) FILE* fp; int i; char line[50]; - uint8* rgb_data; + BYTE* rgb_data; int c; if (!client->settings->rfx_codec && !client->settings->ns_codec) @@ -226,7 +226,7 @@ static void test_peer_load_icon(freerdp_peer* client) if (fgets(line, sizeof(line), fp)) { sscanf(line, "%d", &c); - rgb_data[i] = (uint8)c; + rgb_data[i] = (BYTE)c; } } @@ -414,7 +414,7 @@ static void* tf_debug_channel_thread_func(void* arg) s = stream_new(4096); - WTSVirtualChannelWrite(context->debug_channel, (uint8*) "test1", 5, NULL); + WTSVirtualChannelWrite(context->debug_channel, (BYTE*) "test1", 5, NULL); while (1) { @@ -542,7 +542,7 @@ void tf_peer_synchronize_event(rdpInput* input, uint32 flags) printf("Client sent a synchronize event (flags:0x%X)\n", flags); } -void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void tf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { freerdp_peer* client = input->context->peer; rdpUpdate* update = client->update; @@ -569,7 +569,7 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) { if (context->debug_channel) { - WTSVirtualChannelWrite(context->debug_channel, (uint8*) "test2", 5, NULL); + WTSVirtualChannelWrite(context->debug_channel, (BYTE*) "test2", 5, NULL); } } else if ((flags & 0x4000) && code == 0x2D) /* 'x' key */ @@ -595,26 +595,26 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) } } -void tf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void tf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { printf("Client sent a unicode keyboard event (flags:0x%X code:0x%X)\n", flags, code); } -void tf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void tf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { //printf("Client sent a mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); test_peer_draw_icon(input->context->peer, x + 10, y); } -void tf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void tf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { //printf("Client sent an extended mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y); } -static void tf_peer_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* areas) +static void tf_peer_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas) { - uint8 i; + BYTE i; printf("Client requested to refresh:\n"); @@ -624,7 +624,7 @@ static void tf_peer_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* } } -static void tf_peer_suppress_output(rdpContext* context, uint8 allow, RECTANGLE_16* area) +static void tf_peer_suppress_output(rdpContext* context, BYTE allow, RECTANGLE_16* area) { if (allow > 0) { diff --git a/server/Sample/sfreerdp.h b/server/Sample/sfreerdp.h index 2ef6c1f64..616899ca1 100644 --- a/server/Sample/sfreerdp.h +++ b/server/Sample/sfreerdp.h @@ -36,8 +36,8 @@ struct test_peer_context RFX_CONTEXT* rfx_context; NSC_CONTEXT* nsc_context; STREAM* s; - uint8* icon_data; - uint8* bg_data; + BYTE* icon_data; + BYTE* bg_data; int icon_width; int icon_height; int icon_x; diff --git a/server/Windows/wf_info.c b/server/Windows/wf_info.c index ba6cac3e0..15fa7edbb 100644 --- a/server/Windows/wf_info.c +++ b/server/Windows/wf_info.c @@ -295,7 +295,7 @@ BOOL wf_info_have_invalid_region(wfInfo* wfi) return IsRectEmpty(&wfi->invalid); } -void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits, int* pitch) +void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, BYTE** pBits, int* pitch) { *width = (wfi->invalid.right - wfi->invalid.left); *height = (wfi->invalid.bottom - wfi->invalid.top); @@ -312,7 +312,7 @@ void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits *height += 1; offset = (4 * wfi->invalid.left) + (wfi->invalid.top * wfi->width * 4); - *pBits = ((uint8*) (changes->Userbuffer)) + offset; + *pBits = ((BYTE*) (changes->Userbuffer)) + offset; *pitch = wfi->width * 4; } #endif diff --git a/server/Windows/wf_info.h b/server/Windows/wf_info.h index e207a3794..bad196d21 100644 --- a/server/Windows/wf_info.h +++ b/server/Windows/wf_info.h @@ -36,6 +36,6 @@ void wf_info_find_invalid_region(wfInfo* wfi); void wf_info_clear_invalid_region(wfInfo* wfi); void wf_info_invalidate_full_screen(wfInfo* wfi); BOOL wf_info_have_invalid_region(wfInfo* wfi); -void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits, int* pitch); +void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, BYTE** pBits, int* pitch); #endif /* WF_INFO_H */ \ No newline at end of file diff --git a/server/Windows/wf_input.c b/server/Windows/wf_input.c index ecb0c2dba..09fd9b077 100644 --- a/server/Windows/wf_input.c +++ b/server/Windows/wf_input.c @@ -25,7 +25,7 @@ #include "wf_input.h" -void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { INPUT keyboard_event; @@ -45,7 +45,7 @@ void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code) SendInput(1, &keyboard_event, sizeof(INPUT)); } -void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { INPUT keyboard_event; @@ -62,7 +62,7 @@ void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) SendInput(1, &keyboard_event, sizeof(INPUT)); } -void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { INPUT mouse_event; float width, height; @@ -127,7 +127,7 @@ void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) } } -void wf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2)) { diff --git a/server/Windows/wf_input.h b/server/Windows/wf_input.h index 861bc8d97..8409cfdb0 100644 --- a/server/Windows/wf_input.h +++ b/server/Windows/wf_input.h @@ -22,9 +22,9 @@ #include "wf_interface.h" -void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -void wf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); +void wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +void wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); #endif /* WF_INPUT_H */ diff --git a/server/Windows/wf_interface.c b/server/Windows/wf_interface.c index 3c225a69a..3a50a9dd8 100644 --- a/server/Windows/wf_interface.c +++ b/server/Windows/wf_interface.c @@ -92,7 +92,7 @@ BOOL wfreerdp_server_start(wfServer* server) wf_settings_read_dword(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("DefaultPort"), &server->port); - if (instance->Open(instance, NULL, (uint16) server->port)) + if (instance->Open(instance, NULL, (UINT16) server->port)) { server->thread = CreateThread(NULL, 0, wf_server_main_loop, (void*) instance, 0, NULL); return TRUE; diff --git a/server/Windows/wf_update.c b/server/Windows/wf_update.c index 90450752a..cb9e29ffc 100644 --- a/server/Windows/wf_update.c +++ b/server/Windows/wf_update.c @@ -107,7 +107,7 @@ void wf_update_encode(wfInfo* wfi) RFX_RECT rect; long height, width; - uint8* pDataBits = NULL; + BYTE* pDataBits = NULL; int stride; SURFACE_BITS_COMMAND* cmd; @@ -122,8 +122,8 @@ void wf_update_encode(wfInfo* wfi) rect.x = 0; rect.y = 0; - rect.width = (uint16) width; - rect.height = (uint16) height; + rect.width = (UINT16) width; + rect.height = (UINT16) height; //printf("x:%d y:%d w:%d h:%d\n", wfi->invalid.left, wfi->invalid.top, width, height); diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index c1afbcae5..a646b58eb 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -32,7 +32,7 @@ void xf_input_synchronize_event(rdpInput* input, uint32 flags) printf("Client sent a synchronize event (flags:0x%X)\n", flags); } -void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void xf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { #ifdef WITH_XTEST unsigned int keycode; @@ -63,12 +63,12 @@ void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code) #endif } -void xf_input_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code) +void xf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) { printf("Client sent a unicode keyboard event (flags:0x%X code:0x%X)\n", flags, code); } -void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void xf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { #ifdef WITH_XTEST xfPeerContext* xfp = (xfPeerContext*) input->context; @@ -115,7 +115,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) #endif } -void xf_input_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y) +void xf_input_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { #ifdef WITH_XTEST xfPeerContext* xfp = (xfPeerContext*) input->context; diff --git a/server/X11/xf_input.h b/server/X11/xf_input.h index 465a024b3..b53b27db5 100644 --- a/server/X11/xf_input.h +++ b/server/X11/xf_input.h @@ -25,10 +25,10 @@ #include "xfreerdp.h" void xf_input_synchronize_event(rdpInput* input, uint32 flags); -void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void xf_input_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); -void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); -void xf_input_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); +void xf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void xf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); +void xf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); +void xf_input_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); void xf_input_register_callbacks(rdpInput* input); #endif /* __XF_INPUT_H */ diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 36d062e3f..2fcb19b89 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -398,7 +398,7 @@ void xf_peer_dump_rfx(freerdp_peer* client) void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int height) { STREAM* s; - uint8* data; + BYTE* data; xfInfo* xfi; RFX_RECT rect; XImage* image; @@ -429,7 +429,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh image = xf_snapshot(xfp, x, y, width, height); - data = (uint8*) image->data; + data = (BYTE*) image->data; data = &data[(y * image->bytes_per_line) + (x * image->bits_per_pixel / 8)]; rfx_compose_message(xfp->rfx_context, s, &rect, 1, data, @@ -450,7 +450,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh image = xf_snapshot(xfp, x, y, width, height); rfx_compose_message(xfp->rfx_context, s, &rect, 1, - (uint8*) image->data, width, height, width * xfi->bytesPerPixel); + (BYTE*) image->data, width, height, width * xfi->bytesPerPixel); cmd->destLeft = x; cmd->destTop = y; From 9d064171a73d0894de6e1510d305f1eccbc184d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 03:26:39 -0400 Subject: [PATCH 38/43] freerdp: get rid of old types --- channels/audin/client/alsa/audin_alsa.c | 12 +- channels/audin/client/audin_main.c | 52 +- channels/audin/client/audin_main.h | 4 +- channels/audin/client/pulse/audin_pulse.c | 12 +- channels/audin/server/audin.c | 46 +- channels/cliprdr/client/cliprdr_format.c | 26 +- channels/cliprdr/client/cliprdr_format.h | 8 +- channels/cliprdr/client/cliprdr_main.c | 26 +- channels/cliprdr/client/cliprdr_main.h | 4 +- channels/disk/client/disk_file.c | 156 ++--- channels/disk/client/disk_file.h | 26 +- channels/disk/client/disk_main.c | 124 ++-- channels/drdynvc/client/drdynvc_main.c | 34 +- channels/drdynvc/client/drdynvc_main.h | 2 +- channels/drdynvc/client/dvcman.c | 22 +- channels/drdynvc/client/dvcman.h | 8 +- channels/parallel/client/parallel_main.c | 32 +- channels/printer/client/printer_cups.c | 4 +- channels/printer/client/printer_main.c | 30 +- channels/printer/client/printer_main.h | 6 +- channels/printer/client/printer_win.c | 4 +- channels/rail/client/rail_orders.c | 42 +- channels/rdpdr/client/devman.c | 2 +- channels/rdpdr/client/devman.h | 2 +- channels/rdpdr/client/irp.c | 20 +- channels/rdpdr/client/rdpdr_capabilities.c | 20 +- channels/rdpdr/client/rdpdr_main.c | 34 +- .../rdpsnd/client/MacAudio/rdpsnd_audio_q.c | 2 +- channels/rdpsnd/client/alsa/rdpsnd_alsa.c | 10 +- channels/rdpsnd/client/pulse/rdpsnd_pulse.c | 8 +- channels/rdpsnd/client/rdpsnd_main.c | 38 +- channels/rdpsnd/client/rdpsnd_main.h | 2 +- channels/rdpsnd/server/rdpsnd.c | 28 +- channels/serial/client/serial_main.c | 76 +-- channels/serial/client/serial_tty.c | 94 +-- channels/serial/client/serial_tty.h | 38 +- channels/smartcard/client/scard_main.c | 6 +- channels/smartcard/client/scard_main.h | 2 +- channels/smartcard/client/scard_operations.c | 402 ++++++------ channels/tsmf/client/alsa/tsmf_alsa.c | 20 +- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 26 +- .../tsmf/client/gstreamer/tsmf_gstreamer.c | 22 +- channels/tsmf/client/pulse/tsmf_pulse.c | 16 +- channels/tsmf/client/tsmf_audio.h | 8 +- channels/tsmf/client/tsmf_codec.c | 68 +- channels/tsmf/client/tsmf_decoder.h | 20 +- channels/tsmf/client/tsmf_ifman.c | 176 ++--- channels/tsmf/client/tsmf_ifman.h | 8 +- channels/tsmf/client/tsmf_main.c | 36 +- channels/tsmf/client/tsmf_main.h | 2 +- channels/tsmf/client/tsmf_media.c | 94 +-- channels/tsmf/client/tsmf_media.h | 12 +- channels/tsmf/client/tsmf_types.h | 18 +- channels/urbdrc/client/data_transfer.c | 618 +++++++++--------- channels/urbdrc/client/isoch_queue.h | 2 +- channels/urbdrc/client/searchman.c | 2 +- channels/urbdrc/client/searchman.h | 4 +- channels/urbdrc/client/urbdrc_main.c | 146 ++--- channels/urbdrc/client/urbdrc_main.h | 86 +-- channels/urbdrc/libusb/libusb_udevice.c | 98 +-- channels/urbdrc/libusb/libusb_udevice.h | 6 +- channels/urbdrc/libusb/libusb_udevman.c | 10 +- channels/urbdrc/libusb/request_queue.c | 4 +- channels/urbdrc/libusb/request_queue.h | 6 +- client/DirectFB/df_event.c | 2 +- client/DirectFB/dfreerdp.h | 4 +- client/Mac/MRDPView.h | 2 +- client/Windows/wf_gdi.c | 14 +- client/Windows/wf_rail.c | 4 +- client/Windows/wf_rail.h | 4 +- client/Windows/wfreerdp.c | 8 +- client/X11/xf_cliprdr.c | 38 +- client/X11/xf_event.c | 6 +- client/X11/xf_gdi.c | 22 +- client/X11/xf_graphics.c | 4 +- client/X11/xf_keyboard.c | 6 +- client/X11/xf_rail.c | 26 +- client/X11/xf_rail.h | 4 +- client/X11/xf_tsmf.c | 10 +- client/X11/xf_window.c | 16 +- client/X11/xf_window.h | 4 +- client/X11/xfreerdp.c | 18 +- client/X11/xfreerdp.h | 10 +- cunit/test_cliprdr.c | 2 +- cunit/test_color.c | 4 +- cunit/test_mppc.c | 4 +- cunit/test_mppc_enc.c | 4 +- cunit/test_pcap.c | 2 +- cunit/test_rail.c | 2 +- include/freerdp/altsec.h | 100 +-- include/freerdp/cache/bitmap.h | 12 +- include/freerdp/cache/brush.h | 14 +- include/freerdp/cache/glyph.h | 14 +- include/freerdp/cache/nine_grid.h | 12 +- include/freerdp/cache/offscreen.h | 12 +- include/freerdp/cache/palette.h | 6 +- include/freerdp/cache/pointer.h | 6 +- include/freerdp/channels/rdpdr.h | 16 +- include/freerdp/channels/rdpsnd.h | 2 +- include/freerdp/channels/wtsvc.h | 14 +- include/freerdp/client/cliprdr.h | 8 +- include/freerdp/client/tsmf.h | 4 +- include/freerdp/codec/color.h | 18 +- include/freerdp/codec/mppc_dec.h | 10 +- include/freerdp/codec/nsc.h | 10 +- include/freerdp/codec/rfx.h | 18 +- include/freerdp/crypto/ber.h | 6 +- include/freerdp/crypto/crypto.h | 28 +- include/freerdp/crypto/er.h | 8 +- include/freerdp/crypto/per.h | 4 +- include/freerdp/dvc.h | 12 +- include/freerdp/extension.h | 8 +- include/freerdp/freerdp.h | 18 +- include/freerdp/gdi/32bpp.h | 2 +- include/freerdp/gdi/bitmap.h | 6 +- include/freerdp/gdi/gdi.h | 4 +- include/freerdp/gdi/pen.h | 2 +- include/freerdp/graphics.h | 66 +- include/freerdp/input.h | 10 +- include/freerdp/locale/keyboard.h | 14 +- include/freerdp/locale/locale.h | 6 +- include/freerdp/locale/vkcodes.h | 4 +- include/freerdp/peer.h | 2 +- include/freerdp/pointer.h | 28 +- include/freerdp/primary.h | 444 ++++++------- include/freerdp/rail.h | 38 +- include/freerdp/rail/window.h | 36 +- include/freerdp/rail/window_list.h | 2 +- include/freerdp/scancode.h | 2 +- include/freerdp/secondary.h | 116 ++-- include/freerdp/server/audin.h | 2 +- include/freerdp/settings.h | 154 ++--- include/freerdp/svc.h | 34 +- include/freerdp/types.h | 36 +- include/freerdp/update.h | 72 +- include/freerdp/utils/dsp.h | 20 +- include/freerdp/utils/msusb.h | 76 +-- include/freerdp/utils/pcap.h | 22 +- include/freerdp/utils/rail.h | 4 +- include/freerdp/utils/sleep.h | 4 +- include/freerdp/utils/stopwatch.h | 2 +- include/freerdp/utils/stream.h | 92 +-- include/freerdp/utils/string.h | 2 +- include/freerdp/utils/time.h | 6 +- include/freerdp/window.h | 84 +-- libfreerdp/cache/bitmap.c | 4 +- libfreerdp/cache/brush.c | 4 +- libfreerdp/cache/glyph.c | 28 +- libfreerdp/cache/nine_grid.c | 4 +- libfreerdp/cache/offscreen.c | 6 +- libfreerdp/cache/palette.c | 4 +- libfreerdp/cache/pointer.c | 4 +- libfreerdp/channels/libchannels.c | 12 +- libfreerdp/channels/wtsvc.c | 60 +- libfreerdp/channels/wtsvc.h | 6 +- libfreerdp/codec/bitmap.c | 10 +- libfreerdp/codec/color.c | 72 +- libfreerdp/codec/include/bitmap.c | 18 +- libfreerdp/codec/mppc_dec.c | 32 +- libfreerdp/codec/mppc_enc.c | 20 +- libfreerdp/codec/nsc.c | 28 +- libfreerdp/codec/nsc_encode.c | 34 +- libfreerdp/codec/nsc_sse2.c | 8 +- libfreerdp/codec/nsc_types.h | 2 +- libfreerdp/codec/rfx.c | 72 +- libfreerdp/codec/rfx_decode.c | 14 +- libfreerdp/codec/rfx_decode.h | 6 +- libfreerdp/codec/rfx_encode.c | 10 +- libfreerdp/codec/rfx_encode.h | 2 +- libfreerdp/codec/rfx_neon.c | 6 +- libfreerdp/codec/rfx_quantization.c | 8 +- libfreerdp/codec/rfx_quantization.h | 4 +- libfreerdp/codec/rfx_rlgr.c | 28 +- libfreerdp/codec/rfx_sse2.c | 8 +- libfreerdp/core/activation.c | 18 +- libfreerdp/core/capabilities.c | 182 +++--- libfreerdp/core/certificate.c | 50 +- libfreerdp/core/certificate.h | 2 +- libfreerdp/core/channel.c | 22 +- libfreerdp/core/connection.c | 10 +- libfreerdp/core/errinfo.c | 2 +- libfreerdp/core/errinfo.h | 4 +- libfreerdp/core/extension.c | 6 +- libfreerdp/core/fastpath.c | 14 +- libfreerdp/core/fastpath.h | 2 +- libfreerdp/core/freerdp.c | 2 +- libfreerdp/core/gcc.c | 134 ++-- libfreerdp/core/graphics.c | 4 +- libfreerdp/core/info.c | 82 +-- libfreerdp/core/input.c | 20 +- libfreerdp/core/input.h | 4 +- libfreerdp/core/license.c | 28 +- libfreerdp/core/license.h | 8 +- libfreerdp/core/mcs.c | 4 +- libfreerdp/core/mcs.h | 16 +- libfreerdp/core/nego.c | 26 +- libfreerdp/core/nego.h | 10 +- libfreerdp/core/orders.c | 54 +- libfreerdp/core/peer.c | 4 +- libfreerdp/core/rdp.c | 32 +- libfreerdp/core/rdp.h | 10 +- libfreerdp/core/redirection.c | 18 +- libfreerdp/core/redirection.h | 6 +- libfreerdp/core/rpc.c | 10 +- libfreerdp/core/rpc.h | 82 +-- libfreerdp/core/rts.c | 108 +-- libfreerdp/core/rts.h | 20 +- libfreerdp/core/security.c | 22 +- libfreerdp/core/security.h | 6 +- libfreerdp/core/surface.c | 18 +- libfreerdp/core/surface.h | 4 +- libfreerdp/core/tcp.c | 4 +- libfreerdp/core/timezone.c | 26 +- libfreerdp/core/transport.h | 2 +- libfreerdp/core/tsg.c | 36 +- libfreerdp/core/tsg.h | 6 +- libfreerdp/core/update.c | 8 +- libfreerdp/core/window.c | 58 +- libfreerdp/crypto/ber.c | 10 +- libfreerdp/crypto/crypto.c | 38 +- libfreerdp/crypto/er.c | 12 +- libfreerdp/crypto/per.c | 6 +- libfreerdp/gdi/32bpp.c | 228 +++---- libfreerdp/gdi/bitmap.c | 12 +- libfreerdp/gdi/gdi.c | 24 +- libfreerdp/gdi/graphics.c | 4 +- libfreerdp/gdi/pen.c | 2 +- libfreerdp/gdi/shape.c | 2 +- libfreerdp/locale/keyboard.c | 14 +- libfreerdp/locale/keyboard_keymap.c | 8 +- libfreerdp/locale/keyboard_keymap.h | 4 +- libfreerdp/locale/keyboard_layout.c | 10 +- libfreerdp/locale/keyboard_sun.c | 8 +- libfreerdp/locale/keyboard_sun.h | 2 +- libfreerdp/locale/keyboard_x11.c | 12 +- libfreerdp/locale/keyboard_x11.h | 2 +- libfreerdp/locale/keyboard_xkbfile.c | 8 +- libfreerdp/locale/keyboard_xkbfile.h | 4 +- libfreerdp/locale/locale.c | 14 +- libfreerdp/locale/timezone.c | 24 +- libfreerdp/locale/virtual_key_codes.c | 6 +- libfreerdp/locale/xkb_layout_ids.c | 6 +- libfreerdp/locale/xkb_layout_ids.h | 2 +- libfreerdp/rail/window.c | 6 +- libfreerdp/rail/window_list.c | 2 +- libfreerdp/utils/bitmap.c | 22 +- libfreerdp/utils/dsp.c | 34 +- libfreerdp/utils/msusb.c | 36 +- libfreerdp/utils/pcap.c | 2 +- libfreerdp/utils/rail.c | 8 +- libfreerdp/utils/sleep.c | 10 +- libfreerdp/utils/stopwatch.c | 6 +- libfreerdp/utils/string.c | 2 +- libfreerdp/utils/svc_plugin.c | 22 +- libfreerdp/utils/tcp.c | 2 +- libfreerdp/utils/time.c | 10 +- server/Sample/sf_audin.c | 2 +- server/Sample/sfreerdp.c | 12 +- server/Sample/sfreerdp.h | 2 +- server/Windows/wf_peer.c | 2 +- server/Windows/wf_peer.h | 2 +- server/X11/xf_encode.c | 4 +- server/X11/xf_input.c | 2 +- server/X11/xf_input.h | 2 +- server/X11/xf_peer.c | 8 +- 265 files changed, 3634 insertions(+), 3668 deletions(-) diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index baeec2edd..bb2e04dd3 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -37,12 +37,12 @@ typedef struct _AudinALSADevice IAudinDevice iface; char device_name[32]; - uint32 frames_per_packet; - uint32 target_rate; - uint32 actual_rate; + UINT32 frames_per_packet; + UINT32 target_rate; + UINT32 actual_rate; snd_pcm_format_t format; - uint32 target_channels; - uint32 actual_channels; + UINT32 target_channels; + UINT32 actual_channels; int bytes_per_channel; int wformat; int block_size; @@ -265,7 +265,7 @@ static BOOL audin_alsa_format_supported(IAudinDevice* device, audinFormat* forma return FALSE; } -static void audin_alsa_set_format(IAudinDevice* device, audinFormat* format, uint32 FramesPerPacket) +static void audin_alsa_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket) { int bs; AudinALSADevice* alsa = (AudinALSADevice*) device; diff --git a/channels/audin/client/audin_main.c b/channels/audin/client/audin_main.c index 6d6f397d3..f4546319d 100644 --- a/channels/audin/client/audin_main.c +++ b/channels/audin/client/audin_main.c @@ -76,7 +76,7 @@ struct _AUDIN_PLUGIN /* Parsed plugin data */ UINT16 fixed_format; UINT16 fixed_channel; - uint32 fixed_rate; + UINT32 fixed_rate; /* Device interface */ IAudinDevice* device; @@ -86,16 +86,16 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S { int error; STREAM* out; - uint32 Version; + UINT32 Version; AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; - stream_read_uint32(s, Version); + stream_read_UINT32(s, Version); DEBUG_DVC("Version=%d", Version); out = stream_new(5); stream_write_BYTE(out, MSG_SNDIN_VERSION); - stream_write_uint32(out, Version); + stream_write_UINT32(out, Version); error = callback->channel->Write(callback->channel, stream_get_length(s), stream_get_head(s), NULL); stream_free(out); @@ -115,22 +115,22 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S { AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin; - uint32 i; + UINT32 i; BYTE* fm; int error; STREAM* out; - uint32 NumFormats; + UINT32 NumFormats; audinFormat format; - uint32 cbSizeFormatsPacket; + UINT32 cbSizeFormatsPacket; - stream_read_uint32(s, NumFormats); + stream_read_UINT32(s, NumFormats); DEBUG_DVC("NumFormats %d", NumFormats); if ((NumFormats < 1) || (NumFormats > 1000)) { DEBUG_WARN("bad NumFormats %d", NumFormats); return 1; } - stream_seek_uint32(s); /* cbSizeFormatsPacket */ + stream_seek_UINT32(s); /* cbSizeFormatsPacket */ callback->formats = (audinFormat*) xzalloc(NumFormats * sizeof(audinFormat)); @@ -143,8 +143,8 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S stream_get_mark(s, fm); stream_read_UINT16(s, format.wFormatTag); stream_read_UINT16(s, format.nChannels); - stream_read_uint32(s, format.nSamplesPerSec); - stream_seek_uint32(s); /* nAvgBytesPerSec */ + stream_read_UINT32(s, format.nSamplesPerSec); + stream_seek_UINT32(s); /* nAvgBytesPerSec */ stream_read_UINT16(s, format.nBlockAlign); stream_read_UINT16(s, format.wBitsPerSample); stream_read_UINT16(s, format.cbSize); @@ -180,8 +180,8 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S stream_set_pos(out, 0); stream_write_BYTE(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */ - stream_write_uint32(out, callback->formats_count); /* NumFormats (4 bytes) */ - stream_write_uint32(out, cbSizeFormatsPacket); /* cbSizeFormatsPacket (4 bytes) */ + stream_write_UINT32(out, callback->formats_count); /* NumFormats (4 bytes) */ + stream_write_UINT32(out, cbSizeFormatsPacket); /* cbSizeFormatsPacket (4 bytes) */ error = callback->channel->Write(callback->channel, cbSizeFormatsPacket, stream_get_head(out), NULL); stream_free(out); @@ -189,7 +189,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S return error; } -static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCallback, uint32 NewFormat) +static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 NewFormat) { int error; STREAM* out; @@ -197,14 +197,14 @@ static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCall out = stream_new(5); stream_write_BYTE(out, MSG_SNDIN_FORMATCHANGE); - stream_write_uint32(out, NewFormat); + stream_write_UINT32(out, NewFormat); error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL); stream_free(out); return error; } -static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallback, uint32 Result) +static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallback, UINT32 Result) { int error; STREAM* out; @@ -212,7 +212,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac out = stream_new(5); stream_write_BYTE(out, MSG_SNDIN_OPEN_REPLY); - stream_write_uint32(out, Result); + stream_write_UINT32(out, Result); error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL); stream_free(out); @@ -244,16 +244,16 @@ static int audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, STRE AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin; audinFormat* format; - uint32 initialFormat; - uint32 FramesPerPacket; + UINT32 initialFormat; + UINT32 FramesPerPacket; - stream_read_uint32(s, FramesPerPacket); - stream_read_uint32(s, initialFormat); + stream_read_UINT32(s, FramesPerPacket); + stream_read_UINT32(s, initialFormat); DEBUG_DVC("FramesPerPacket=%d initialFormat=%d", FramesPerPacket, initialFormat); - if (initialFormat >= (uint32) callback->formats_count) + if (initialFormat >= (UINT32) callback->formats_count) { DEBUG_WARN("invalid format index %d (total %d)", initialFormat, callback->formats_count); @@ -277,14 +277,14 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb { AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback; AUDIN_PLUGIN * audin = (AUDIN_PLUGIN*) callback->plugin; - uint32 NewFormat; + UINT32 NewFormat; audinFormat* format; - stream_read_uint32(s, NewFormat); + stream_read_UINT32(s, NewFormat); DEBUG_DVC("NewFormat=%d", NewFormat); - if (NewFormat >= (uint32) callback->formats_count) + if (NewFormat >= (UINT32) callback->formats_count) { DEBUG_WARN("invalid format index %d (total %d)", NewFormat, callback->formats_count); @@ -305,7 +305,7 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb return 0; } -static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* pBuffer) +static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, UINT32 cbSize, BYTE* pBuffer) { int error; STREAM* s; diff --git a/channels/audin/client/audin_main.h b/channels/audin/client/audin_main.h index 60bfbcd25..761cf572c 100644 --- a/channels/audin/client/audin_main.h +++ b/channels/audin/client/audin_main.h @@ -41,7 +41,7 @@ struct audin_format { UINT16 wFormatTag; UINT16 nChannels; - uint32 nSamplesPerSec; + UINT32 nSamplesPerSec; UINT16 nBlockAlign; UINT16 wBitsPerSample; UINT16 cbSize; @@ -53,7 +53,7 @@ struct _IAudinDevice { void (*Open) (IAudinDevice* devplugin, AudinReceive receive, void* user_data); BOOL (*FormatSupported) (IAudinDevice* devplugin, audinFormat* format); - void (*SetFormat) (IAudinDevice* devplugin, audinFormat* format, uint32 FramesPerPacket); + void (*SetFormat) (IAudinDevice* devplugin, audinFormat* format, UINT32 FramesPerPacket); void (*Close) (IAudinDevice* devplugin); void (*Free) (IAudinDevice* devplugin); }; diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 3b86afac5..9797b275e 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -37,7 +37,7 @@ typedef struct _AudinPulseDevice IAudinDevice iface; char device_name[32]; - uint32 frames_per_packet; + UINT32 frames_per_packet; pa_threaded_mainloop* mainloop; pa_context* context; pa_sample_spec sample_spec; @@ -197,7 +197,7 @@ static BOOL audin_pulse_format_supported(IAudinDevice* device, audinFormat* form return FALSE; } -static void audin_pulse_set_format(IAudinDevice* device, audinFormat* format, uint32 FramesPerPacket) +static void audin_pulse_set_format(IAudinDevice* device, audinFormat* format, UINT32 FramesPerPacket) { int bs; pa_sample_spec sample_spec = { 0 }; @@ -387,10 +387,10 @@ static void audin_pulse_open(IAudinDevice* device, AudinReceive receive, void* u audin_pulse_stream_state_callback, pulse); pa_stream_set_read_callback(pulse->stream, audin_pulse_stream_request_callback, pulse); - buffer_attr.maxlength = (uint32_t) -1; - buffer_attr.tlength = (uint32_t) -1; - buffer_attr.prebuf = (uint32_t) -1; - buffer_attr.minreq = (uint32_t) -1; + buffer_attr.maxlength = (UINT32_t) -1; + buffer_attr.tlength = (UINT32_t) -1; + buffer_attr.prebuf = (UINT32_t) -1; + buffer_attr.minreq = (UINT32_t) -1; /* 500ms latency */ buffer_attr.fragsize = pa_usec_to_bytes(500000, &pulse->sample_spec); if (pa_stream_connect_record(pulse->stream, diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 92987902e..8ed36382b 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -69,17 +69,17 @@ static void audin_server_select_format(audin_server_context* context, int client static void audin_server_send_version(audin_server* audin, STREAM* s) { stream_write_BYTE(s, MSG_SNDIN_VERSION); - stream_write_uint32(s, 1); /* Version (4 bytes) */ + stream_write_UINT32(s, 1); /* Version (4 bytes) */ WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, UINT32 length) { - uint32 Version; + UINT32 Version; if (length < 4) return FALSE; - stream_read_uint32(s, Version); + stream_read_UINT32(s, Version); if (Version < 1) return FALSE; @@ -89,12 +89,12 @@ static BOOL audin_server_recv_version(audin_server* audin, STREAM* s, uint32 len static void audin_server_send_formats(audin_server* audin, STREAM* s) { int i; - uint32 nAvgBytesPerSec; + UINT32 nAvgBytesPerSec; stream_set_pos(s, 0); stream_write_BYTE(s, MSG_SNDIN_FORMATS); - stream_write_uint32(s, audin->context.num_server_formats); /* NumFormats (4 bytes) */ - stream_write_uint32(s, 0); /* cbSizeFormatsPacket (4 bytes), client-to-server only */ + stream_write_UINT32(s, audin->context.num_server_formats); /* NumFormats (4 bytes) */ + stream_write_UINT32(s, 0); /* cbSizeFormatsPacket (4 bytes), client-to-server only */ for (i = 0; i < audin->context.num_server_formats; i++) { @@ -104,8 +104,8 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s) stream_check_size(s, 18); stream_write_UINT16(s, audin->context.server_formats[i].wFormatTag); stream_write_UINT16(s, audin->context.server_formats[i].nChannels); - stream_write_uint32(s, audin->context.server_formats[i].nSamplesPerSec); - stream_write_uint32(s, nAvgBytesPerSec); + stream_write_UINT32(s, audin->context.server_formats[i].nSamplesPerSec); + stream_write_UINT32(s, nAvgBytesPerSec); stream_write_UINT16(s, audin->context.server_formats[i].nBlockAlign); stream_write_UINT16(s, audin->context.server_formats[i].wBitsPerSample); stream_write_UINT16(s, audin->context.server_formats[i].cbSize); @@ -120,15 +120,15 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s) WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, UINT32 length) { int i; if (length < 8) return FALSE; - stream_read_uint32(s, audin->context.num_client_formats); /* NumFormats (4 bytes) */ - stream_seek_uint32(s); /* cbSizeFormatsPacket (4 bytes) */ + stream_read_UINT32(s, audin->context.num_client_formats); /* NumFormats (4 bytes) */ + stream_seek_UINT32(s); /* cbSizeFormatsPacket (4 bytes) */ length -= 8; if (audin->context.num_client_formats <= 0) @@ -146,8 +146,8 @@ static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 len stream_read_UINT16(s, audin->context.client_formats[i].wFormatTag); stream_read_UINT16(s, audin->context.client_formats[i].nChannels); - stream_read_uint32(s, audin->context.client_formats[i].nSamplesPerSec); - stream_seek_uint32(s); /* nAvgBytesPerSec */ + stream_read_UINT32(s, audin->context.client_formats[i].nSamplesPerSec); + stream_seek_UINT32(s); /* nAvgBytesPerSec */ stream_read_UINT16(s, audin->context.client_formats[i].nBlockAlign); stream_read_UINT16(s, audin->context.client_formats[i].wBitsPerSample); stream_read_UINT16(s, audin->context.client_formats[i].cbSize); @@ -171,8 +171,8 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) stream_set_pos(s, 0); stream_write_BYTE(s, MSG_SNDIN_OPEN); - stream_write_uint32(s, audin->context.frames_per_packet); /* FramesPerPacket (4 bytes) */ - stream_write_uint32(s, audin->context.selected_client_format); /* initialFormat (4 bytes) */ + stream_write_UINT32(s, audin->context.frames_per_packet); /* FramesPerPacket (4 bytes) */ + stream_write_UINT32(s, audin->context.selected_client_format); /* initialFormat (4 bytes) */ /* * [MS-RDPEAI] 3.2.5.1.6 * The second format specify the format that SHOULD be used to capture data from @@ -180,8 +180,8 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) */ stream_write_UINT16(s, 1); /* wFormatTag = PCM */ stream_write_UINT16(s, 2); /* nChannels */ - stream_write_uint32(s, 44100); /* nSamplesPerSec */ - stream_write_uint32(s, 44100 * 2 * 2); /* nAvgBytesPerSec */ + stream_write_UINT32(s, 44100); /* nSamplesPerSec */ + stream_write_UINT32(s, 44100 * 2 * 2); /* nAvgBytesPerSec */ stream_write_UINT16(s, 4); /* nBlockAlign */ stream_write_UINT16(s, 16); /* wBitsPerSample */ stream_write_UINT16(s, 0); /* cbSize */ @@ -189,20 +189,20 @@ static void audin_server_send_open(audin_server* audin, STREAM* s) WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL); } -static BOOL audin_server_recv_open_reply(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_open_reply(audin_server* audin, STREAM* s, UINT32 length) { - uint32 Result; + UINT32 Result; if (length < 4) return FALSE; - stream_read_uint32(s, Result); + stream_read_UINT32(s, Result); IFCALL(audin->context.OpenResult, &audin->context, Result); return TRUE; } -static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length) +static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, UINT32 length) { rdpsndFormat* format; int sbytes_per_sample; @@ -267,7 +267,7 @@ static void* audin_server_thread_func(void* arg) void* buffer; BYTE MessageId; BOOL ready = FALSE; - uint32 bytes_returned = 0; + UINT32 bytes_returned = 0; audin_server* audin = (audin_server*) arg; freerdp_thread* thread = audin->audin_channel_thread; diff --git a/channels/cliprdr/client/cliprdr_format.c b/channels/cliprdr/client/cliprdr_format.c index d079dee4e..895d75269 100644 --- a/channels/cliprdr/client/cliprdr_format.c +++ b/channels/cliprdr/client/cliprdr_format.c @@ -89,7 +89,7 @@ void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIS stream_extend(body, stream_get_size(body) + 4 + name_length); - stream_write_uint32(body, cb_event->formats[i]); + stream_write_UINT32(body, cb_event->formats[i]); stream_write(body, name, name_length); } @@ -109,7 +109,7 @@ static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr) cliprdr_packet_send(cliprdr, s); } -void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags) +void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT32 length, UINT16 flags) { int i; BOOL ascii; @@ -137,7 +137,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3 { format_name = &cliprdr->format_names[i]; - stream_read_uint32(s, format_name->id); + stream_read_UINT32(s, format_name->id); if (ascii) { @@ -153,7 +153,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3 } } -void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags) +void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT32 length, UINT16 flags) { int allocated_formats = 8; BYTE* end_mark; @@ -178,7 +178,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 } format_name = &cliprdr->format_names[cliprdr->num_format_names++]; - stream_read_uint32(s, format_name->id); + stream_read_UINT32(s, format_name->id); format_name->name = NULL; format_name->length = 0; @@ -194,10 +194,10 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 } } -void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) +void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags) { int i; - uint32 format; + UINT32 format; BOOL supported; CLIPRDR_FORMAT_NAME* format_name; RDP_CB_FORMAT_LIST_EVENT* cb_event; @@ -218,7 +218,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL cliprdr_process_short_format_names(cliprdr, s, dataLen, msgFlags); if (cliprdr->num_format_names > 0) - cb_event->formats = (uint32*) malloc(sizeof(uint32) * cliprdr->num_format_names); + cb_event->formats = (UINT32*) malloc(sizeof(UINT32) * cliprdr->num_format_names); cb_event->num_formats = 0; @@ -286,7 +286,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL cliprdr_send_format_list_response(cliprdr); } -void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) +void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags) { /* where is this documented? */ #if 0 @@ -300,14 +300,14 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uin #endif } -void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) +void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags) { RDP_CB_DATA_REQUEST_EVENT* cb_event; cb_event = (RDP_CB_DATA_REQUEST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_DATA_REQUEST, NULL, NULL); - stream_read_uint32(s, cb_event->format); + stream_read_UINT32(s, cb_event->format); svc_plugin_send_event((rdpSvcPlugin*) cliprdr, (RDP_EVENT*) cb_event); } @@ -337,11 +337,11 @@ void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DA DEBUG_CLIPRDR("Sending Format Data Request"); s = cliprdr_packet_new(CB_FORMAT_DATA_REQUEST, 0, 4); - stream_write_uint32(s, cb_event->format); + stream_write_UINT32(s, cb_event->format); cliprdr_packet_send(cliprdr, s); } -void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags) +void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags) { RDP_CB_DATA_RESPONSE_EVENT* cb_event; diff --git a/channels/cliprdr/client/cliprdr_format.h b/channels/cliprdr/client/cliprdr_format.h index df0424007..ec6bb343d 100644 --- a/channels/cliprdr/client/cliprdr_format.h +++ b/channels/cliprdr/client/cliprdr_format.h @@ -22,13 +22,13 @@ #define __CLIPRDR_FORMAT_H void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event); -void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); -void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); +void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags); +void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags); -void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); +void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags); void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event); void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event); -void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags); +void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, UINT32 dataLen, UINT16 msgFlags); #endif /* __CLIPRDR_FORMAT_H */ diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index 101c2fa9e..b42338579 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -55,7 +55,7 @@ static const char* const CB_MSG_TYPE_STRINGS[] = "CB_UNLOCK_CLIPDATA" }; -STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen) +STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen) { STREAM* s; @@ -71,12 +71,12 @@ STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen) void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* s) { int pos; - uint32 dataLen; + UINT32 dataLen; pos = stream_get_pos(s); dataLen = pos - 8; stream_set_pos(s, 4); - stream_write_uint32(s, dataLen); + stream_write_UINT32(s, dataLen); stream_set_pos(s, pos); svc_plugin_send((rdpSvcPlugin*) cliprdr, s); @@ -87,7 +87,7 @@ static void cliprdr_process_connect(rdpSvcPlugin* plugin) DEBUG_CLIPRDR("connecting"); } -void cliprdr_print_general_capability_flags(uint32 flags) +void cliprdr_print_general_capability_flags(UINT32 flags) { printf("generalFlags (0x%08X) {\n", flags); @@ -105,11 +105,11 @@ void cliprdr_print_general_capability_flags(uint32 flags) static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s) { - uint32 version; - uint32 generalFlags; + UINT32 version; + UINT32 generalFlags; - stream_read_uint32(s, version); /* version (4 bytes) */ - stream_read_uint32(s, generalFlags); /* generalFlags (4 bytes) */ + stream_read_UINT32(s, version); /* version (4 bytes) */ + stream_read_UINT32(s, generalFlags); /* generalFlags (4 bytes) */ DEBUG_CLIPRDR("Version: %d", version); @@ -165,7 +165,7 @@ static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16 static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr) { STREAM* s; - uint32 flags; + UINT32 flags; s = cliprdr_packet_new(CB_CLIP_CAPS, 0, 4 + CB_CAPSTYPE_GENERAL_LEN); @@ -177,8 +177,8 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr) stream_write_UINT16(s, 0); /* pad1 */ stream_write_UINT16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */ stream_write_UINT16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */ - stream_write_uint32(s, CB_CAPS_VERSION_2); /* version */ - stream_write_uint32(s, flags); /* generalFlags */ + stream_write_UINT32(s, CB_CAPS_VERSION_2); /* version */ + stream_write_UINT32(s, flags); /* generalFlags */ cliprdr_packet_send(cliprdr, s); } @@ -198,12 +198,12 @@ static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* s) { UINT16 msgType; UINT16 msgFlags; - uint32 dataLen; + UINT32 dataLen; cliprdrPlugin* cliprdr = (cliprdrPlugin*) plugin; stream_read_UINT16(s, msgType); stream_read_UINT16(s, msgFlags); - stream_read_uint32(s, dataLen); + stream_read_UINT32(s, dataLen); DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d", CB_MSG_TYPE_STRINGS[msgType], msgType, msgFlags, dataLen); diff --git a/channels/cliprdr/client/cliprdr_main.h b/channels/cliprdr/client/cliprdr_main.h index 6daf7d42e..f48a4a742 100644 --- a/channels/cliprdr/client/cliprdr_main.h +++ b/channels/cliprdr/client/cliprdr_main.h @@ -26,7 +26,7 @@ struct _CLIPRDR_FORMAT_NAME { - uint32 id; + UINT32 id; char* name; int length; }; @@ -45,7 +45,7 @@ struct cliprdr_plugin }; typedef struct cliprdr_plugin cliprdrPlugin; -STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen); +STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, UINT32 dataLen); void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out); #ifdef WITH_DEBUG_CLIPRDR diff --git a/channels/disk/client/disk_file.c b/channels/disk/client/disk_file.c index f513c2268..7afa38575 100644 --- a/channels/disk/client/disk_file.c +++ b/channels/disk/client/disk_file.c @@ -200,7 +200,7 @@ static void disk_file_set_fullpath(DISK_FILE* file, char* fullpath) file->filename += 1; } -static BOOL disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions) +static BOOL disk_file_init(DISK_FILE* file, UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions) { struct STAT st; BOOL exists; @@ -306,8 +306,8 @@ static BOOL disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 CreateD return TRUE; } -DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id, - uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions) +DISK_FILE* disk_file_new(const char* base_path, const char* path, UINT32 id, + UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions) { DISK_FILE* file; @@ -346,7 +346,7 @@ void disk_file_free(DISK_FILE* file) free(file); } -BOOL disk_file_seek(DISK_FILE* file, uint64 Offset) +BOOL disk_file_seek(DISK_FILE* file, UINT64 Offset) { if (file->is_dir || file->fd == -1) return FALSE; @@ -357,7 +357,7 @@ BOOL disk_file_seek(DISK_FILE* file, uint64 Offset) return TRUE; } -BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length) +BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, UINT32* Length) { ssize_t r; @@ -367,12 +367,12 @@ BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length) r = read(file->fd, buffer, *Length); if (r < 0) return FALSE; - *Length = (uint32)r; + *Length = (UINT32)r; return TRUE; } -BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length) +BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, UINT32 Length) { ssize_t r; @@ -391,36 +391,36 @@ BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length) return TRUE; } -BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output) +BOOL disk_file_query_information(DISK_FILE* file, UINT32 FsInformationClass, STREAM* output) { struct STAT st; if (STAT(file->fullpath, &st) != 0) { - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ return FALSE; } switch (FsInformationClass) { case FileBasicInformation: /* http://msdn.microsoft.com/en-us/library/cc232094.aspx */ - stream_write_uint32(output, 36); /* Length */ + stream_write_UINT32(output, 36); /* Length */ stream_check_size(output, 36); - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ - stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ + stream_write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ /* Reserved(4), MUST NOT be added! */ break; case FileStandardInformation: /* http://msdn.microsoft.com/en-us/library/cc232088.aspx */ - stream_write_uint32(output, 22); /* Length */ + stream_write_UINT32(output, 22); /* Length */ stream_check_size(output, 22); - stream_write_uint64(output, st.st_size); /* AllocationSize */ - stream_write_uint64(output, st.st_size); /* EndOfFile */ - stream_write_uint32(output, st.st_nlink); /* NumberOfLinks */ + stream_write_UINT64(output, st.st_size); /* AllocationSize */ + stream_write_UINT64(output, st.st_size); /* EndOfFile */ + stream_write_UINT32(output, st.st_nlink); /* NumberOfLinks */ stream_write_BYTE(output, file->delete_pending ? 1 : 0); /* DeletePending */ stream_write_BYTE(output, file->is_dir ? 1 : 0); /* Directory */ /* Reserved(2), MUST NOT be added! */ @@ -428,42 +428,42 @@ BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STR case FileAttributeTagInformation: /* http://msdn.microsoft.com/en-us/library/cc232093.aspx */ - stream_write_uint32(output, 8); /* Length */ + stream_write_UINT32(output, 8); /* Length */ stream_check_size(output, 8); - stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ - stream_write_uint32(output, 0); /* ReparseTag */ + stream_write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ + stream_write_UINT32(output, 0); /* ReparseTag */ break; default: - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass); return FALSE; } return TRUE; } -BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input) +BOOL disk_file_set_information(DISK_FILE* file, UINT32 FsInformationClass, UINT32 Length, STREAM* input) { char* s; mode_t m; - uint64 size; + UINT64 size; char* fullpath; struct STAT st; struct timeval tv[2]; - uint64 LastWriteTime; - uint32 FileAttributes; - uint32 FileNameLength; + UINT64 LastWriteTime; + UINT32 FileAttributes; + UINT32 FileNameLength; switch (FsInformationClass) { case FileBasicInformation: /* http://msdn.microsoft.com/en-us/library/cc232094.aspx */ - stream_seek_uint64(input); /* CreationTime */ - stream_seek_uint64(input); /* LastAccessTime */ - stream_read_uint64(input, LastWriteTime); - stream_seek_uint64(input); /* ChangeTime */ - stream_read_uint32(input, FileAttributes); + stream_seek_UINT64(input); /* CreationTime */ + stream_seek_UINT64(input); /* LastAccessTime */ + stream_read_UINT64(input, LastWriteTime); + stream_seek_UINT64(input); /* ChangeTime */ + stream_read_UINT32(input, FileAttributes); if (FSTAT(file->fd, &st) != 0) return FALSE; @@ -493,7 +493,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3 /* http://msdn.microsoft.com/en-us/library/cc232067.aspx */ case FileAllocationInformation: /* http://msdn.microsoft.com/en-us/library/cc232076.aspx */ - stream_read_uint64(input, size); + stream_read_UINT64(input, size); if (ftruncate(file->fd, size) != 0) return FALSE; break; @@ -511,7 +511,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3 /* http://msdn.microsoft.com/en-us/library/cc232085.aspx */ stream_seek_BYTE(input); /* ReplaceIfExists */ stream_seek_BYTE(input); /* RootDirectory */ - stream_read_uint32(input, FileNameLength); + stream_read_UINT32(input, FileNameLength); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(input), &s, FileNameLength / 2); @@ -541,7 +541,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3 return TRUE; } -BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery, +BOOL disk_file_query_directory(DISK_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery, const char* path, STREAM* output) { int length; @@ -554,7 +554,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE if (!file->dir) { - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ stream_write_BYTE(output, 0); /* Padding */ return FALSE; } @@ -591,7 +591,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE if (ent == NULL) { DEBUG_SVC(" pattern %s not found.", file->pattern); - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ stream_write_BYTE(output, 0); /* Padding */ return FALSE; } @@ -616,54 +616,54 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE { case FileDirectoryInformation: /* http://msdn.microsoft.com/en-us/library/cc232097.aspx */ - stream_write_uint32(output, 64 + length); /* Length */ + stream_write_UINT32(output, 64 + length); /* Length */ stream_check_size(output, 64 + length); - stream_write_uint32(output, 0); /* NextEntryOffset */ - stream_write_uint32(output, 0); /* FileIndex */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ - stream_write_uint64(output, st.st_size); /* EndOfFile */ - stream_write_uint64(output, st.st_size); /* AllocationSize */ - stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ - stream_write_uint32(output, length); /* FileNameLength */ + stream_write_UINT32(output, 0); /* NextEntryOffset */ + stream_write_UINT32(output, 0); /* FileIndex */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ + stream_write_UINT64(output, st.st_size); /* EndOfFile */ + stream_write_UINT64(output, st.st_size); /* AllocationSize */ + stream_write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ + stream_write_UINT32(output, length); /* FileNameLength */ stream_write(output, ent_path, length); break; case FileFullDirectoryInformation: /* http://msdn.microsoft.com/en-us/library/cc232068.aspx */ - stream_write_uint32(output, 68 + length); /* Length */ + stream_write_UINT32(output, 68 + length); /* Length */ stream_check_size(output, 68 + length); - stream_write_uint32(output, 0); /* NextEntryOffset */ - stream_write_uint32(output, 0); /* FileIndex */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ - stream_write_uint64(output, st.st_size); /* EndOfFile */ - stream_write_uint64(output, st.st_size); /* AllocationSize */ - stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ - stream_write_uint32(output, length); /* FileNameLength */ - stream_write_uint32(output, 0); /* EaSize */ + stream_write_UINT32(output, 0); /* NextEntryOffset */ + stream_write_UINT32(output, 0); /* FileIndex */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ + stream_write_UINT64(output, st.st_size); /* EndOfFile */ + stream_write_UINT64(output, st.st_size); /* AllocationSize */ + stream_write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ + stream_write_UINT32(output, length); /* FileNameLength */ + stream_write_UINT32(output, 0); /* EaSize */ stream_write(output, ent_path, length); break; case FileBothDirectoryInformation: /* http://msdn.microsoft.com/en-us/library/cc232095.aspx */ - stream_write_uint32(output, 93 + length); /* Length */ + stream_write_UINT32(output, 93 + length); /* Length */ stream_check_size(output, 93 + length); - stream_write_uint32(output, 0); /* NextEntryOffset */ - stream_write_uint32(output, 0); /* FileIndex */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ - stream_write_uint64(output, st.st_size); /* EndOfFile */ - stream_write_uint64(output, st.st_size); /* AllocationSize */ - stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ - stream_write_uint32(output, length); /* FileNameLength */ - stream_write_uint32(output, 0); /* EaSize */ + stream_write_UINT32(output, 0); /* NextEntryOffset */ + stream_write_UINT32(output, 0); /* FileIndex */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* CreationTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_atime)); /* LastAccessTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_mtime)); /* LastWriteTime */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* ChangeTime */ + stream_write_UINT64(output, st.st_size); /* EndOfFile */ + stream_write_UINT64(output, st.st_size); /* AllocationSize */ + stream_write_UINT32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */ + stream_write_UINT32(output, length); /* FileNameLength */ + stream_write_UINT32(output, 0); /* EaSize */ stream_write_BYTE(output, 0); /* ShortNameLength */ /* Reserved(1), MUST NOT be added! */ stream_write_zero(output, 24); /* ShortName */ @@ -672,16 +672,16 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE case FileNamesInformation: /* http://msdn.microsoft.com/en-us/library/cc232077.aspx */ - stream_write_uint32(output, 12 + length); /* Length */ + stream_write_UINT32(output, 12 + length); /* Length */ stream_check_size(output, 12 + length); - stream_write_uint32(output, 0); /* NextEntryOffset */ - stream_write_uint32(output, 0); /* FileIndex */ - stream_write_uint32(output, length); /* FileNameLength */ + stream_write_UINT32(output, 0); /* NextEntryOffset */ + stream_write_UINT32(output, 0); /* FileIndex */ + stream_write_UINT32(output, length); /* FileNameLength */ stream_write(output, ent_path, length); break; default: - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ stream_write_BYTE(output, 0); /* Padding */ DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass); ret = FALSE; diff --git a/channels/disk/client/disk_file.h b/channels/disk/client/disk_file.h index b0c9a4e50..60147fc9b 100644 --- a/channels/disk/client/disk_file.h +++ b/channels/disk/client/disk_file.h @@ -49,8 +49,8 @@ #define unlink(a) _unlink(a) #define ftruncate(a,b) _chsize(a,b) -typedef uint32 ssize_t ; -typedef uint32 mode_t ; +typedef UINT32 ssize_t ; +typedef UINT32 mode_t ; #elif defined(__APPLE__) || defined(__FreeBSD__) #define STAT stat @@ -70,9 +70,9 @@ typedef uint32 mode_t ; #define EPOCH_DIFF 11644473600LL #define FILE_TIME_SYSTEM_TO_RDP(_t) \ - (((uint64)(_t) + EPOCH_DIFF) * 10000000LL) + (((UINT64)(_t) + EPOCH_DIFF) * 10000000LL) #define FILE_TIME_RDP_TO_SYSTEM(_t) \ - (((_t) == 0LL || (_t) == (uint64)(-1LL)) ? 0 : (time_t)((_t) / 10000000LL - EPOCH_DIFF)) + (((_t) == 0LL || (_t) == (UINT64)(-1LL)) ? 0 : (time_t)((_t) / 10000000LL - EPOCH_DIFF)) #define FILE_ATTR_SYSTEM_TO_RDP(_f, _st) ( \ (S_ISDIR(_st.st_mode) ? FILE_ATTRIBUTE_DIRECTORY : 0) | \ @@ -83,7 +83,7 @@ typedef uint32 mode_t ; typedef struct _DISK_FILE DISK_FILE; struct _DISK_FILE { - uint32 id; + UINT32 id; BOOL is_dir; int fd; int err; @@ -95,16 +95,16 @@ struct _DISK_FILE BOOL delete_pending; }; -DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id, - uint32 DesiredAccess, uint32 CreateDisposition, uint32 CreateOptions); +DISK_FILE* disk_file_new(const char* base_path, const char* path, UINT32 id, + UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions); void disk_file_free(DISK_FILE* file); -BOOL disk_file_seek(DISK_FILE* file, uint64 Offset); -BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length); -BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length); -BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output); -BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input); -BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery, +BOOL disk_file_seek(DISK_FILE* file, UINT64 Offset); +BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, UINT32* Length); +BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, UINT32 Length); +BOOL disk_file_query_information(DISK_FILE* file, UINT32 FsInformationClass, STREAM* output); +BOOL disk_file_set_information(DISK_FILE* file, UINT32 FsInformationClass, UINT32 Length, STREAM* input); +BOOL disk_file_query_directory(DISK_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery, const char* path, STREAM* output); #endif /* __DISK_FILE_H */ diff --git a/channels/disk/client/disk_main.c b/channels/disk/client/disk_main.c index 0a13571d5..e721f67ae 100644 --- a/channels/disk/client/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -66,9 +66,9 @@ struct _DISK_DEVICE DEVMAN* devman; }; -static uint32 disk_map_posix_err(int fs_errno) +static UINT32 disk_map_posix_err(int fs_errno) { - uint32 rc; + UINT32 rc; /* try to return NTSTATUS version of error code */ @@ -101,7 +101,7 @@ static uint32 disk_map_posix_err(int fs_errno) return rc; } -static DISK_FILE* disk_get_file_by_id(DISK_DEVICE* disk, uint32 id) +static DISK_FILE* disk_get_file_by_id(DISK_DEVICE* disk, UINT32 id) { LIST_ITEM* item; DISK_FILE* file; @@ -120,19 +120,19 @@ static DISK_FILE* disk_get_file_by_id(DISK_DEVICE* disk, uint32 id) static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) { char* path; - uint32 FileId; + UINT32 FileId; DISK_FILE* file; BYTE Information; - uint32 DesiredAccess; - uint32 CreateDisposition; - uint32 CreateOptions; - uint32 PathLength; + UINT32 DesiredAccess; + UINT32 CreateDisposition; + UINT32 CreateOptions; + UINT32 PathLength; - stream_read_uint32(irp->input, DesiredAccess); + stream_read_UINT32(irp->input, DesiredAccess); stream_seek(irp->input, 16); /* AllocationSize(8), FileAttributes(4), SharedAccess(4) */ - stream_read_uint32(irp->input, CreateDisposition); - stream_read_uint32(irp->input, CreateOptions); - stream_read_uint32(irp->input, PathLength); + stream_read_UINT32(irp->input, CreateDisposition); + stream_read_UINT32(irp->input, CreateOptions); + stream_read_UINT32(irp->input, PathLength); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(irp->input), &path, PathLength / 2); @@ -183,7 +183,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) DEBUG_SVC("%s(%d) created.", file->fullpath, file->id); } - stream_write_uint32(irp->output, FileId); + stream_write_UINT32(irp->output, FileId); stream_write_BYTE(irp->output, Information); free(path); @@ -219,12 +219,12 @@ static void disk_process_irp_close(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) { DISK_FILE* file; - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; BYTE* buffer = NULL; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); file = disk_get_file_by_id(disk, irp->FileId); @@ -260,7 +260,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) } } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); if (Length > 0) { @@ -276,11 +276,11 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp) { DISK_FILE* file; - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); stream_seek(irp->input, 20); /* Padding */ file = disk_get_file_by_id(disk, irp->FileId); @@ -311,7 +311,7 @@ static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp) DEBUG_SVC("write %llu-%llu to %s(%d).", Offset, Offset + Length, file->fullpath, file->id); } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); @@ -320,9 +320,9 @@ static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp_query_information(DISK_DEVICE* disk, IRP* irp) { DISK_FILE* file; - uint32 FsInformationClass; + UINT32 FsInformationClass; - stream_read_uint32(irp->input, FsInformationClass); + stream_read_UINT32(irp->input, FsInformationClass); file = disk_get_file_by_id(disk, irp->FileId); @@ -349,11 +349,11 @@ static void disk_process_irp_query_information(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp_set_information(DISK_DEVICE* disk, IRP* irp) { DISK_FILE* file; - uint32 FsInformationClass; - uint32 Length; + UINT32 FsInformationClass; + UINT32 Length; - stream_read_uint32(irp->input, FsInformationClass); - stream_read_uint32(irp->input, Length); + stream_read_UINT32(irp->input, FsInformationClass); + stream_read_UINT32(irp->input, Length); stream_seek(irp->input, 24); /* Padding */ file = disk_get_file_by_id(disk, irp->FileId); @@ -375,14 +375,14 @@ static void disk_process_irp_set_information(DISK_DEVICE* disk, IRP* irp) DEBUG_SVC("FsInformationClass %d on %s(%d) ok.", FsInformationClass, file->fullpath, file->id); } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); irp->Complete(irp); } static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* irp) { - uint32 FsInformationClass; + UINT32 FsInformationClass; STREAM* output = irp->output; struct STATVFS svfst; struct STAT st; @@ -391,7 +391,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir WCHAR* outStr; int length; - stream_read_uint32(irp->input, FsInformationClass); + stream_read_UINT32(irp->input, FsInformationClass); STATVFS(disk->path, &svfst); STAT(disk->path, &st); @@ -401,11 +401,11 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir case FileFsVolumeInformation: /* http://msdn.microsoft.com/en-us/library/cc232108.aspx */ length = freerdp_AsciiToUnicodeAlloc(volumeLabel, &outStr, 0) * 2; - stream_write_uint32(output, 17 + length); /* Length */ + stream_write_UINT32(output, 17 + length); /* Length */ stream_check_size(output, 17 + length); - stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* VolumeCreationTime */ - stream_write_uint32(output, svfst.f_fsid); /* VolumeSerialNumber */ - stream_write_uint32(output, length); /* VolumeLabelLength */ + stream_write_UINT64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* VolumeCreationTime */ + stream_write_UINT32(output, svfst.f_fsid); /* VolumeSerialNumber */ + stream_write_UINT32(output, length); /* VolumeLabelLength */ stream_write_BYTE(output, 0); /* SupportsObjects */ /* Reserved(1), MUST NOT be added! */ stream_write(output, outStr, length); /* VolumeLabel (Unicode) */ @@ -414,51 +414,51 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir case FileFsSizeInformation: /* http://msdn.microsoft.com/en-us/library/cc232107.aspx */ - stream_write_uint32(output, 24); /* Length */ + stream_write_UINT32(output, 24); /* Length */ stream_check_size(output, 24); - stream_write_uint64(output, svfst.f_blocks); /* TotalAllocationUnits */ - stream_write_uint64(output, svfst.f_bavail); /* AvailableAllocationUnits */ - stream_write_uint32(output, 1); /* SectorsPerAllocationUnit */ - stream_write_uint32(output, svfst.f_bsize); /* BytesPerSector */ + stream_write_UINT64(output, svfst.f_blocks); /* TotalAllocationUnits */ + stream_write_UINT64(output, svfst.f_bavail); /* AvailableAllocationUnits */ + stream_write_UINT32(output, 1); /* SectorsPerAllocationUnit */ + stream_write_UINT32(output, svfst.f_bsize); /* BytesPerSector */ break; case FileFsAttributeInformation: /* http://msdn.microsoft.com/en-us/library/cc232101.aspx */ length = freerdp_AsciiToUnicodeAlloc(diskType, &outStr, 0) * 2; - stream_write_uint32(output, 12 + length); /* Length */ + stream_write_UINT32(output, 12 + length); /* Length */ stream_check_size(output, 12 + length); - stream_write_uint32(output, + stream_write_UINT32(output, FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES | FILE_UNICODE_ON_DISK); /* FileSystemAttributes */ - stream_write_uint32(output, svfst.f_namemax/*510*/); /* MaximumComponentNameLength */ - stream_write_uint32(output, length); /* FileSystemNameLength */ + stream_write_UINT32(output, svfst.f_namemax/*510*/); /* MaximumComponentNameLength */ + stream_write_UINT32(output, length); /* FileSystemNameLength */ stream_write(output, outStr, length); /* FileSystemName (Unicode) */ free(outStr); break; case FileFsFullSizeInformation: /* http://msdn.microsoft.com/en-us/library/cc232104.aspx */ - stream_write_uint32(output, 32); /* Length */ + stream_write_UINT32(output, 32); /* Length */ stream_check_size(output, 32); - stream_write_uint64(output, svfst.f_blocks); /* TotalAllocationUnits */ - stream_write_uint64(output, svfst.f_bavail); /* CallerAvailableAllocationUnits */ - stream_write_uint64(output, svfst.f_bfree); /* AvailableAllocationUnits */ - stream_write_uint32(output, 1); /* SectorsPerAllocationUnit */ - stream_write_uint32(output, svfst.f_bsize); /* BytesPerSector */ + stream_write_UINT64(output, svfst.f_blocks); /* TotalAllocationUnits */ + stream_write_UINT64(output, svfst.f_bavail); /* CallerAvailableAllocationUnits */ + stream_write_UINT64(output, svfst.f_bfree); /* AvailableAllocationUnits */ + stream_write_UINT32(output, 1); /* SectorsPerAllocationUnit */ + stream_write_UINT32(output, svfst.f_bsize); /* BytesPerSector */ break; case FileFsDeviceInformation: /* http://msdn.microsoft.com/en-us/library/cc232109.aspx */ - stream_write_uint32(output, 8); /* Length */ + stream_write_UINT32(output, 8); /* Length */ stream_check_size(output, 8); - stream_write_uint32(output, FILE_DEVICE_DISK); /* DeviceType */ - stream_write_uint32(output, 0); /* Characteristics */ + stream_write_UINT32(output, FILE_DEVICE_DISK); /* DeviceType */ + stream_write_UINT32(output, 0); /* Characteristics */ break; default: irp->IoStatus = STATUS_UNSUCCESSFUL; - stream_write_uint32(output, 0); /* Length */ + stream_write_UINT32(output, 0); /* Length */ DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass); break; } @@ -471,12 +471,12 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp) char* path; DISK_FILE* file; BYTE InitialQuery; - uint32 PathLength; - uint32 FsInformationClass; + UINT32 PathLength; + UINT32 FsInformationClass; - stream_read_uint32(irp->input, FsInformationClass); + stream_read_UINT32(irp->input, FsInformationClass); stream_read_BYTE(irp->input, InitialQuery); - stream_read_uint32(irp->input, PathLength); + stream_read_UINT32(irp->input, PathLength); stream_seek(irp->input, 23); /* Padding */ freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(irp->input), &path, PathLength / 2); @@ -486,7 +486,7 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp) if (file == NULL) { irp->IoStatus = STATUS_UNSUCCESSFUL; - stream_write_uint32(irp->output, 0); /* Length */ + stream_write_UINT32(irp->output, 0); /* Length */ DEBUG_WARN("FileId %d not valid.", irp->FileId); } else if (!disk_file_query_directory(file, FsInformationClass, InitialQuery, path, irp->output)) @@ -514,7 +514,7 @@ static void disk_process_irp_directory_control(DISK_DEVICE* disk, IRP* irp) default: DEBUG_WARN("MinorFunction 0x%X not supported", irp->MinorFunction); irp->IoStatus = STATUS_NOT_SUPPORTED; - stream_write_uint32(irp->output, 0); /* Length */ + stream_write_UINT32(irp->output, 0); /* Length */ irp->Complete(irp); break; } @@ -522,7 +522,7 @@ static void disk_process_irp_directory_control(DISK_DEVICE* disk, IRP* irp) static void disk_process_irp_device_control(DISK_DEVICE* disk, IRP* irp) { - stream_write_uint32(irp->output, 0); /* OutputBufferLength */ + stream_write_UINT32(irp->output, 0); /* OutputBufferLength */ irp->Complete(irp); } diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 692f28a92..3f581159d 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -57,7 +57,7 @@ struct drdynvc_plugin IWTSVirtualChannelManager* channel_mgr; }; -static int drdynvc_write_variable_uint(STREAM* stream, uint32 val) +static int drdynvc_write_variable_uint(STREAM* stream, UINT32 val) { int cb; @@ -74,18 +74,18 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val) else { cb = 2; - stream_write_uint32(stream, val); + stream_write_UINT32(stream, val); } return cb; } -int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, BYTE* data, uint32 data_size) +int drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId, BYTE* data, UINT32 data_size) { STREAM* data_out; - uint32 pos = 0; - uint32 cbChId; - uint32 cbLen; - uint32 chunk_len; + UINT32 pos = 0; + UINT32 cbChId; + UINT32 cbLen; + UINT32 chunk_len; int error; DEBUG_DVC("ChannelId=%d size=%d", ChannelId, data_size); @@ -199,9 +199,9 @@ static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, in return 0; } -static uint32 drdynvc_read_variable_uint(STREAM* stream, int cbLen) +static UINT32 drdynvc_read_variable_uint(STREAM* stream, int cbLen) { - uint32 val; + UINT32 val; switch (cbLen) { @@ -212,7 +212,7 @@ static uint32 drdynvc_read_variable_uint(STREAM* stream, int cbLen) stream_read_UINT16(stream, val); break; default: - stream_read_uint32(stream, val); + stream_read_UINT32(stream, val); break; } return val; @@ -223,7 +223,7 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb STREAM* data_out; int pos; int error; - uint32 ChannelId; + UINT32 ChannelId; ChannelId = drdynvc_read_variable_uint(s, cbChId); pos = stream_get_pos(s); @@ -239,12 +239,12 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb if (error == 0) { DEBUG_DVC("channel created"); - stream_write_uint32(data_out, 0); + stream_write_UINT32(data_out, 0); } else { DEBUG_DVC("no listener"); - stream_write_uint32(data_out, (uint32)(-1)); + stream_write_UINT32(data_out, (UINT32)(-1)); } error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out); @@ -258,8 +258,8 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb static int drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s) { - uint32 ChannelId; - uint32 Length; + UINT32 ChannelId; + UINT32 Length; int error; ChannelId = drdynvc_read_variable_uint(s, cbChId); @@ -276,7 +276,7 @@ static int drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp, int cbChId static int drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s) { - uint32 ChannelId; + UINT32 ChannelId; ChannelId = drdynvc_read_variable_uint(s, cbChId); DEBUG_DVC("ChannelId=%d", ChannelId); @@ -287,7 +287,7 @@ static int drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId, STRE static int drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp, int cbChId, STREAM* s) { - uint32 ChannelId; + UINT32 ChannelId; ChannelId = drdynvc_read_variable_uint(s, cbChId); DEBUG_DVC("ChannelId=%d", ChannelId); diff --git a/channels/drdynvc/client/drdynvc_main.h b/channels/drdynvc/client/drdynvc_main.h index 70892626e..3cfdcd6d3 100644 --- a/channels/drdynvc/client/drdynvc_main.h +++ b/channels/drdynvc/client/drdynvc_main.h @@ -24,7 +24,7 @@ typedef struct drdynvc_plugin drdynvcPlugin; -int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, BYTE* data, uint32 data_size); +int drdynvc_write_data(drdynvcPlugin* plugin, UINT32 ChannelId, BYTE* data, UINT32 data_size); int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event); #endif diff --git a/channels/drdynvc/client/dvcman.c b/channels/drdynvc/client/dvcman.c index c0d496e07..6db0744fa 100644 --- a/channels/drdynvc/client/dvcman.c +++ b/channels/drdynvc/client/dvcman.c @@ -62,7 +62,7 @@ struct _DVCMAN_LISTENER DVCMAN* dvcman; char* channel_name; - uint32 flags; + UINT32 flags; IWTSListenerCallback* listener_callback; }; @@ -82,7 +82,7 @@ struct _DVCMAN_CHANNEL DVCMAN* dvcman; DVCMAN_CHANNEL* next; - uint32 channel_id; + UINT32 channel_id; IWTSVirtualChannelCallback* channel_callback; STREAM* dvc_data; @@ -97,7 +97,7 @@ static int dvcman_get_configuration(IWTSListener* pListener, void** ppPropertyBa } static int dvcman_create_listener(IWTSVirtualChannelManager* pChannelMgr, - const char* pszChannelName, uint32 ulFlags, + const char* pszChannelName, UINT32 ulFlags, IWTSListenerCallback* pListenerCallback, IWTSListener** ppListener) { DVCMAN* dvcman = (DVCMAN*)pChannelMgr; @@ -186,12 +186,12 @@ RDP_PLUGIN_DATA* dvcman_get_plugin_data(IDRDYNVC_ENTRY_POINTS* pEntryPoints) return ((DVCMAN_ENTRY_POINTS*) pEntryPoints)->plugin_data; } -uint32 dvcman_get_channel_id(IWTSVirtualChannel * channel) +UINT32 dvcman_get_channel_id(IWTSVirtualChannel * channel) { return ((DVCMAN_CHANNEL*)channel)->channel_id; } -IWTSVirtualChannel* dvcman_find_channel_by_id(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId) +IWTSVirtualChannel* dvcman_find_channel_by_id(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId) { LIST_ITEM* curr; DVCMAN* dvcman = (DVCMAN*) pChannelMgr; @@ -303,7 +303,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr) return 0; } -static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, BYTE* pBuffer, void* pReserved) +static int dvcman_write_channel(IWTSVirtualChannel* pChannel, UINT32 cbSize, BYTE* pBuffer, void* pReserved) { int status; DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel; @@ -330,7 +330,7 @@ static int dvcman_close_channel_iface(IWTSVirtualChannel* pChannel) return 1; } -int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName) +int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName) { int i; int bAccept; @@ -378,7 +378,7 @@ int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 Channel } -int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId) +int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId) { DVCMAN_CHANNEL* channel; IWTSVirtualChannel* ichannel; @@ -404,7 +404,7 @@ int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelI return 0; } -int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length) +int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length) { DVCMAN_CHANNEL* channel; @@ -424,7 +424,7 @@ int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, ui return 0; } -int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size) +int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, BYTE* data, UINT32 data_size) { int error = 0; DVCMAN_CHANNEL* channel; @@ -440,7 +440,7 @@ int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 C if (channel->dvc_data) { /* Fragmented data */ - if (stream_get_length(channel->dvc_data) + data_size > (uint32) stream_get_size(channel->dvc_data)) + if (stream_get_length(channel->dvc_data) + data_size > (UINT32) stream_get_size(channel->dvc_data)) { DEBUG_WARN("data exceeding declared length!"); stream_free(channel->dvc_data); diff --git a/channels/drdynvc/client/dvcman.h b/channels/drdynvc/client/dvcman.h index 95d5a119b..479434187 100644 --- a/channels/drdynvc/client/dvcman.h +++ b/channels/drdynvc/client/dvcman.h @@ -27,10 +27,10 @@ IWTSVirtualChannelManager* dvcman_new(drdynvcPlugin* plugin); int dvcman_load_plugin(IWTSVirtualChannelManager* pChannelMgr, RDP_PLUGIN_DATA* data); void dvcman_free(IWTSVirtualChannelManager* pChannelMgr); int dvcman_init(IWTSVirtualChannelManager* pChannelMgr); -int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName); -int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId); -int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length); -int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size); +int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, const char* ChannelName); +int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId); +int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, UINT32 length); +int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, UINT32 ChannelId, BYTE* data, UINT32 data_size); #endif diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index 9f55bf03b..a8ddab6e0 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -65,7 +65,7 @@ struct _PARALLEL_DEVICE int file; char* path; - uint32 id; + UINT32 id; PSLIST_HEADER pIrpList; freerdp_thread* thread; @@ -75,12 +75,12 @@ typedef struct _PARALLEL_DEVICE PARALLEL_DEVICE; static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp) { char* path; - uint32 PathLength; + UINT32 PathLength; stream_seek(irp->input, 28); /* DesiredAccess(4) AllocationSize(8), FileAttributes(4) */ /* SharedAccess(4) CreateDisposition(4), CreateOptions(4) */ - stream_read_uint32(irp->input, PathLength); + stream_read_UINT32(irp->input, PathLength); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(irp->input), &path, PathLength / 2); @@ -103,7 +103,7 @@ static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp) DEBUG_SVC("%s(%d) created", parallel->path, parallel->file); } - stream_write_uint32(irp->output, parallel->id); + stream_write_UINT32(irp->output, parallel->id); stream_write_BYTE(irp->output, 0); free(path); @@ -125,13 +125,13 @@ static void parallel_process_irp_close(PARALLEL_DEVICE* parallel, IRP* irp) static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) { - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; ssize_t status; BYTE* buffer = NULL; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); buffer = (BYTE*) malloc(Length); @@ -151,7 +151,7 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) DEBUG_SVC("read %llu-%llu from %d", Offset, Offset + Length, parallel->id); } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); if (Length > 0) { stream_check_size(irp->output, Length); @@ -164,13 +164,13 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp) static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp) { - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; ssize_t status; - uint32 len; + UINT32 len; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); stream_seek(irp->input, 20); /* Padding */ DEBUG_SVC("Length %u Offset %llu", Length, Offset); @@ -194,7 +194,7 @@ static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp) len -= status; } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); @@ -203,7 +203,7 @@ static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp) static void parallel_process_irp_device_control(PARALLEL_DEVICE* parallel, IRP* irp) { DEBUG_SVC("in"); - stream_write_uint32(irp->output, 0); /* OutputBufferLength */ + stream_write_UINT32(irp->output, 0); /* OutputBufferLength */ irp->Complete(irp); } diff --git a/channels/printer/client/printer_cups.c b/channels/printer/client/printer_cups.c index 40b71f598..08c9f1483 100644 --- a/channels/printer/client/printer_cups.c +++ b/channels/printer/client/printer_cups.c @@ -136,7 +136,7 @@ static void printer_cups_close_printjob(rdpPrintJob* printjob) free(cups_printjob) ; } -static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) +static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, UINT32 id) { rdpCupsPrinter* cups_printer = (rdpCupsPrinter*)printer; rdpCupsPrintJob* cups_printjob; @@ -191,7 +191,7 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id) return (rdpPrintJob*)cups_printjob; } -static rdpPrintJob* printer_cups_find_printjob(rdpPrinter* printer, uint32 id) +static rdpPrintJob* printer_cups_find_printjob(rdpPrinter* printer, UINT32 id) { rdpCupsPrinter* cups_printer = (rdpCupsPrinter*)printer; diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index ac20f1d5f..da235cefd 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -67,13 +67,13 @@ static void printer_process_irp_create(PRINTER_DEVICE* printer_dev, IRP* irp) if (printjob != NULL) { - stream_write_uint32(irp->output, printjob->id); /* FileId */ + stream_write_UINT32(irp->output, printjob->id); /* FileId */ DEBUG_SVC("printjob id: %d", printjob->id); } else { - stream_write_uint32(irp->output, 0); /* FileId */ + stream_write_UINT32(irp->output, 0); /* FileId */ irp->IoStatus = STATUS_PRINT_QUEUE_FULL; DEBUG_WARN("error creating print job."); @@ -109,12 +109,12 @@ static void printer_process_irp_close(PRINTER_DEVICE* printer_dev, IRP* irp) static void printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp) { - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; rdpPrintJob* printjob = NULL; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); stream_seek(irp->input, 20); /* Padding */ if (printer_dev->printer != NULL) @@ -134,7 +134,7 @@ static void printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp) DEBUG_SVC("printjob id %d written %d bytes.", irp->FileId, Length); } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); @@ -235,12 +235,12 @@ static void printer_free(DEVICE* device) void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* printer) { char* port; - uint32 Flags; + UINT32 Flags; int DriverNameLen; WCHAR* DriverName; int PrintNameLen; WCHAR* PrintName; - uint32 CachedFieldsLen; + UINT32 CachedFieldsLen; BYTE* CachedPrinterConfigData; PRINTER_DEVICE* printer_dev; @@ -271,12 +271,12 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri printer_dev->device.data = stream_new(28 + DriverNameLen + PrintNameLen + CachedFieldsLen); - stream_write_uint32(printer_dev->device.data, Flags); - stream_write_uint32(printer_dev->device.data, 0); /* CodePage, reserved */ - stream_write_uint32(printer_dev->device.data, 0); /* PnPNameLen */ - stream_write_uint32(printer_dev->device.data, DriverNameLen + 2); - stream_write_uint32(printer_dev->device.data, PrintNameLen + 2); - stream_write_uint32(printer_dev->device.data, CachedFieldsLen); + stream_write_UINT32(printer_dev->device.data, Flags); + stream_write_UINT32(printer_dev->device.data, 0); /* CodePage, reserved */ + stream_write_UINT32(printer_dev->device.data, 0); /* PnPNameLen */ + stream_write_UINT32(printer_dev->device.data, DriverNameLen + 2); + stream_write_UINT32(printer_dev->device.data, PrintNameLen + 2); + stream_write_UINT32(printer_dev->device.data, CachedFieldsLen); stream_write(printer_dev->device.data, DriverName, DriverNameLen); stream_write_UINT16(printer_dev->device.data, 0); stream_write(printer_dev->device.data, PrintName, PrintNameLen); diff --git a/channels/printer/client/printer_main.h b/channels/printer/client/printer_main.h index a2c70ee30..55df7309b 100644 --- a/channels/printer/client/printer_main.h +++ b/channels/printer/client/printer_main.h @@ -48,8 +48,8 @@ struct rdp_printer_driver pcGetPrinter GetPrinter; }; -typedef rdpPrintJob* (*pcCreatePrintJob) (rdpPrinter* printer, uint32 id); -typedef rdpPrintJob* (*pcFindPrintJob) (rdpPrinter* printer, uint32 id); +typedef rdpPrintJob* (*pcCreatePrintJob) (rdpPrinter* printer, UINT32 id); +typedef rdpPrintJob* (*pcFindPrintJob) (rdpPrinter* printer, UINT32 id); typedef void (*pcFreePrinter) (rdpPrinter* printer); struct rdp_printer @@ -69,7 +69,7 @@ typedef void (*pcClosePrintJob) (rdpPrintJob* printjob); struct rdp_print_job { - uint32 id; + UINT32 id; rdpPrinter* printer; pcWritePrintJob Write; diff --git a/channels/printer/client/printer_win.c b/channels/printer/client/printer_win.c index 35e7bac88..787de648c 100644 --- a/channels/printer/client/printer_win.c +++ b/channels/printer/client/printer_win.c @@ -111,7 +111,7 @@ static void printer_win_close_printjob(rdpPrintJob* printjob) free(win_printjob) ; } -static rdpPrintJob* printer_win_create_printjob(rdpPrinter* printer, uint32 id) +static rdpPrintJob* printer_win_create_printjob(rdpPrinter* printer, UINT32 id) { rdpWinPrinter* win_printer = (rdpWinPrinter*)printer; rdpWinPrintJob* win_printjob; @@ -145,7 +145,7 @@ static rdpPrintJob* printer_win_create_printjob(rdpPrinter* printer, uint32 id) return (rdpPrintJob*)win_printjob; } -static rdpPrintJob* printer_win_find_printjob(rdpPrinter* printer, uint32 id) +static rdpPrintJob* printer_win_find_printjob(rdpPrinter* printer, UINT32 id) { rdpWinPrinter* win_printer = (rdpWinPrinter*)printer; diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index 34ab88bf4..c9c529ebe 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -129,21 +129,21 @@ void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType) void rail_write_high_contrast(STREAM* s, HIGH_CONTRAST* high_contrast) { high_contrast->colorSchemeLength = high_contrast->colorScheme.length + 2; - stream_write_uint32(s, high_contrast->flags); /* flags (4 bytes) */ - stream_write_uint32(s, high_contrast->colorSchemeLength); /* colorSchemeLength (4 bytes) */ + stream_write_UINT32(s, high_contrast->flags); /* flags (4 bytes) */ + stream_write_UINT32(s, high_contrast->colorSchemeLength); /* colorSchemeLength (4 bytes) */ rail_write_unicode_string(s, &high_contrast->colorScheme); /* colorScheme */ } void rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake) { - stream_read_uint32(s, handshake->buildNumber); /* buildNumber (4 bytes) */ + stream_read_UINT32(s, handshake->buildNumber); /* buildNumber (4 bytes) */ } void rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result) { stream_read_UINT16(s, exec_result->flags); /* flags (2 bytes) */ stream_read_UINT16(s, exec_result->execResult); /* execResult (2 bytes) */ - stream_read_uint32(s, exec_result->rawResult); /* rawResult (4 bytes) */ + stream_read_UINT32(s, exec_result->rawResult); /* rawResult (4 bytes) */ stream_seek_UINT16(s); /* padding (2 bytes) */ rail_read_unicode_string(s, &exec_result->exeOrFile); /* exeOrFile */ } @@ -151,7 +151,7 @@ void rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) { BYTE body; - stream_read_uint32(s, sysparam->param); /* systemParam (4 bytes) */ + stream_read_UINT32(s, sysparam->param); /* systemParam (4 bytes) */ stream_read_BYTE(s, body); /* body (1 byte) */ switch (sysparam->param) @@ -171,7 +171,7 @@ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) void rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo) { - stream_read_uint32(s, minmaxinfo->windowId); /* windowId (4 bytes) */ + stream_read_UINT32(s, minmaxinfo->windowId); /* windowId (4 bytes) */ stream_read_UINT16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */ stream_read_UINT16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */ stream_read_UINT16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */ @@ -185,7 +185,7 @@ void rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxi void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize) { UINT16 isMoveSizeStart; - stream_read_uint32(s, localmovesize->windowId); /* windowId (4 bytes) */ + stream_read_UINT32(s, localmovesize->windowId); /* windowId (4 bytes) */ stream_read_UINT16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */ localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? TRUE : FALSE; @@ -197,7 +197,7 @@ void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* l void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp) { - stream_read_uint32(s, get_appid_resp->windowId); /* windowId (4 bytes) */ + stream_read_UINT32(s, get_appid_resp->windowId); /* windowId (4 bytes) */ stream_read(s, &get_appid_resp->applicationIdBuffer[0], 512); /* applicationId (256 UNICODE chars) */ get_appid_resp->applicationId.length = 512; @@ -206,17 +206,17 @@ void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* void rail_read_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info) { - stream_read_uint32(s, langbar_info->languageBarStatus); /* languageBarStatus (4 bytes) */ + stream_read_UINT32(s, langbar_info->languageBarStatus); /* languageBarStatus (4 bytes) */ } void rail_write_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake) { - stream_write_uint32(s, handshake->buildNumber); /* buildNumber (4 bytes) */ + stream_write_UINT32(s, handshake->buildNumber); /* buildNumber (4 bytes) */ } void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_status) { - stream_write_uint32(s, client_status->flags); /* flags (4 bytes) */ + stream_write_UINT32(s, client_status->flags); /* flags (4 bytes) */ } void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec) @@ -233,7 +233,7 @@ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec) void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam) { BYTE body; - stream_write_uint32(s, sysparam->param); /* systemParam (4 bytes) */ + stream_write_UINT32(s, sysparam->param); /* systemParam (4 bytes) */ switch (sysparam->param) { @@ -288,7 +288,7 @@ void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate) { BYTE enabled; - stream_write_uint32(s, activate->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, activate->windowId); /* windowId (4 bytes) */ enabled = activate->enabled; stream_write_BYTE(s, enabled); /* enabled (1 byte) */ @@ -296,27 +296,27 @@ void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate) void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu) { - stream_write_uint32(s, sysmenu->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, sysmenu->windowId); /* windowId (4 bytes) */ stream_write_UINT16(s, sysmenu->left); /* left (2 bytes) */ stream_write_UINT16(s, sysmenu->top); /* top (2 bytes) */ } void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand) { - stream_write_uint32(s, syscommand->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, syscommand->windowId); /* windowId (4 bytes) */ stream_write_UINT16(s, syscommand->command); /* command (2 bytes) */ } void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event) { - stream_write_uint32(s, notify_event->windowId); /* windowId (4 bytes) */ - stream_write_uint32(s, notify_event->notifyIconId); /* notifyIconId (4 bytes) */ - stream_write_uint32(s, notify_event->message); /* notifyIconId (4 bytes) */ + stream_write_UINT32(s, notify_event->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, notify_event->notifyIconId); /* notifyIconId (4 bytes) */ + stream_write_UINT32(s, notify_event->message); /* notifyIconId (4 bytes) */ } void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move) { - stream_write_uint32(s, window_move->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, window_move->windowId); /* windowId (4 bytes) */ stream_write_UINT16(s, window_move->left); /* left (2 bytes) */ stream_write_UINT16(s, window_move->top); /* top (2 bytes) */ stream_write_UINT16(s, window_move->right); /* right (2 bytes) */ @@ -325,12 +325,12 @@ void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* wind void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req) { - stream_write_uint32(s, get_appid_req->windowId); /* windowId (4 bytes) */ + stream_write_UINT32(s, get_appid_req->windowId); /* windowId (4 bytes) */ } void rail_write_langbar_info_order(STREAM* s, RAIL_LANGBAR_INFO_ORDER* langbar_info) { - stream_write_uint32(s, langbar_info->languageBarStatus); /* languageBarStatus (4 bytes) */ + stream_write_UINT32(s, langbar_info->languageBarStatus); /* languageBarStatus (4 bytes) */ } void rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s) diff --git a/channels/rdpdr/client/devman.c b/channels/rdpdr/client/devman.c index 9fd28c4c2..2273d2aa8 100644 --- a/channels/rdpdr/client/devman.c +++ b/channels/rdpdr/client/devman.c @@ -100,7 +100,7 @@ BOOL devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data) return TRUE; } -DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id) +DEVICE* devman_get_device_by_id(DEVMAN* devman, UINT32 id) { LIST_ITEM* item; DEVICE* device; diff --git a/channels/rdpdr/client/devman.h b/channels/rdpdr/client/devman.h index fb23f3987..290e897a5 100644 --- a/channels/rdpdr/client/devman.h +++ b/channels/rdpdr/client/devman.h @@ -24,6 +24,6 @@ DEVMAN* devman_new(rdpSvcPlugin* plugin); void devman_free(DEVMAN* devman); BOOL devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data); -DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id); +DEVICE* devman_get_device_by_id(DEVMAN* devman, UINT32 id); #endif /* FREERDP_CHANNEL_RDPDR_CLIENT_DEVMAN_H */ diff --git a/channels/rdpdr/client/irp.c b/channels/rdpdr/client/irp.c index 3b20ee8da..154540fba 100644 --- a/channels/rdpdr/client/irp.c +++ b/channels/rdpdr/client/irp.c @@ -54,7 +54,7 @@ static void irp_complete(IRP* irp) pos = stream_get_pos(irp->output); stream_set_pos(irp->output, 12); - stream_write_uint32(irp->output, irp->IoStatus); + stream_write_UINT32(irp->output, irp->IoStatus); stream_set_pos(irp->output, pos); svc_plugin_send(irp->devman->plugin, irp->output); @@ -66,10 +66,10 @@ static void irp_complete(IRP* irp) IRP* irp_new(DEVMAN* devman, STREAM* data_in) { IRP* irp; - uint32 DeviceId; + UINT32 DeviceId; DEVICE* device; - stream_read_uint32(data_in, DeviceId); + stream_read_UINT32(data_in, DeviceId); device = devman_get_device_by_id(devman, DeviceId); if (device == NULL) @@ -83,18 +83,18 @@ IRP* irp_new(DEVMAN* devman, STREAM* data_in) irp->device = device; irp->devman = devman; - stream_read_uint32(data_in, irp->FileId); - stream_read_uint32(data_in, irp->CompletionId); - stream_read_uint32(data_in, irp->MajorFunction); - stream_read_uint32(data_in, irp->MinorFunction); + stream_read_UINT32(data_in, irp->FileId); + stream_read_UINT32(data_in, irp->CompletionId); + stream_read_UINT32(data_in, irp->MajorFunction); + stream_read_UINT32(data_in, irp->MinorFunction); irp->input = data_in; irp->output = stream_new(256); stream_write_UINT16(irp->output, RDPDR_CTYP_CORE); stream_write_UINT16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION); - stream_write_uint32(irp->output, DeviceId); - stream_write_uint32(irp->output, irp->CompletionId); - stream_seek_uint32(irp->output); /* IoStatus */ + stream_write_UINT32(irp->output, DeviceId); + stream_write_UINT32(irp->output, irp->CompletionId); + stream_seek_UINT32(irp->output); /* IoStatus */ irp->Complete = irp_complete; irp->Discard = irp_free; diff --git a/channels/rdpdr/client/rdpdr_capabilities.c b/channels/rdpdr/client/rdpdr_capabilities.c index 4b1656841..de983d8ea 100644 --- a/channels/rdpdr/client/rdpdr_capabilities.c +++ b/channels/rdpdr/client/rdpdr_capabilities.c @@ -33,11 +33,11 @@ #include "rdpdr_capabilities.h" /* Output device redirection capability set header */ -static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, uint32 version) +static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, UINT32 version) { stream_write_UINT16(data_out, capabilityType); stream_write_UINT16(data_out, capabilityLength); - stream_write_uint32(data_out, version); + stream_write_UINT32(data_out, version); } /* Output device direction general capability set */ @@ -45,16 +45,16 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out) { rdpdr_write_capset_header(data_out, CAP_GENERAL_TYPE, 44, GENERAL_CAPABILITY_VERSION_02); - stream_write_uint32(data_out, 0); /* osType, ignored on receipt */ - stream_write_uint32(data_out, 0); /* osVersion, unused and must be set to zero */ + stream_write_UINT32(data_out, 0); /* osType, ignored on receipt */ + stream_write_UINT32(data_out, 0); /* osVersion, unused and must be set to zero */ stream_write_UINT16(data_out, 1); /* protocolMajorVersion, must be set to 1 */ stream_write_UINT16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */ - stream_write_uint32(data_out, 0x0000FFFF); /* ioCode1 */ - stream_write_uint32(data_out, 0); /* ioCode2, must be set to zero, reserved for future use */ - stream_write_uint32(data_out, RDPDR_DEVICE_REMOVE_PDUS | RDPDR_CLIENT_DISPLAY_NAME_PDU | RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */ - stream_write_uint32(data_out, ENABLE_ASYNCIO); /* extraFlags1 */ - stream_write_uint32(data_out, 0); /* extraFlags2, must be set to zero, reserved for future use */ - stream_write_uint32(data_out, 0); /* SpecialTypeDeviceCap, number of special devices to be redirected before logon */ + stream_write_UINT32(data_out, 0x0000FFFF); /* ioCode1 */ + stream_write_UINT32(data_out, 0); /* ioCode2, must be set to zero, reserved for future use */ + stream_write_UINT32(data_out, RDPDR_DEVICE_REMOVE_PDUS | RDPDR_CLIENT_DISPLAY_NAME_PDU | RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */ + stream_write_UINT32(data_out, ENABLE_ASYNCIO); /* extraFlags1 */ + stream_write_UINT32(data_out, 0); /* extraFlags2, must be set to zero, reserved for future use */ + stream_write_UINT32(data_out, 0); /* SpecialTypeDeviceCap, number of special devices to be redirected before logon */ } /* Process device direction general capability set */ diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index ea7ee87ce..379555e3e 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -75,7 +75,7 @@ static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* da { stream_read_UINT16(data_in, rdpdr->versionMajor); stream_read_UINT16(data_in, rdpdr->versionMinor); - stream_read_uint32(data_in, rdpdr->clientID); + stream_read_UINT32(data_in, rdpdr->clientID); DEBUG_SVC("version %d.%d clientID %d", rdpdr->versionMajor, rdpdr->versionMinor, rdpdr->clientID); } @@ -91,7 +91,7 @@ static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr) stream_write_UINT16(data_out, rdpdr->versionMajor); stream_write_UINT16(data_out, rdpdr->versionMinor); - stream_write_uint32(data_out, (uint32) rdpdr->clientID); + stream_write_UINT32(data_out, (UINT32) rdpdr->clientID); svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out); } @@ -112,9 +112,9 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr) stream_write_UINT16(data_out, RDPDR_CTYP_CORE); stream_write_UINT16(data_out, PAKID_CORE_CLIENT_NAME); - stream_write_uint32(data_out, 1); /* unicodeFlag, 0 for ASCII and 1 for Unicode */ - stream_write_uint32(data_out, 0); /* codePage, must be set to zero */ - stream_write_uint32(data_out, computerNameLenW + 2); /* computerNameLen, including null terminator */ + stream_write_UINT32(data_out, 1); /* unicodeFlag, 0 for ASCII and 1 for Unicode */ + stream_write_UINT32(data_out, 0); /* codePage, must be set to zero */ + stream_write_UINT32(data_out, computerNameLenW + 2); /* computerNameLen, including null terminator */ stream_write(data_out, computerNameW, computerNameLenW); stream_write_UINT16(data_out, 0); /* null terminator */ @@ -127,11 +127,11 @@ static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* da { UINT16 versionMajor; UINT16 versionMinor; - uint32 clientID; + UINT32 clientID; stream_read_UINT16(data_in, versionMajor); stream_read_UINT16(data_in, versionMinor); - stream_read_uint32(data_in, clientID); + stream_read_UINT32(data_in, clientID); if (versionMajor != rdpdr->versionMajor || versionMinor != rdpdr->versionMinor) { @@ -152,7 +152,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use int i; int pos; BYTE c; - uint32 count; + UINT32 count; int data_len; int count_pos; STREAM* data_out; @@ -166,7 +166,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use count_pos = stream_get_pos(data_out); count = 0; - stream_seek_uint32(data_out); /* deviceCount */ + stream_seek_UINT32(data_out); /* deviceCount */ for (item = rdpdr->devman->devices->head; item; item = item->next) { @@ -184,8 +184,8 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use data_len = (device->data == NULL ? 0 : stream_get_length(device->data)); stream_check_size(data_out, 20 + data_len); - stream_write_uint32(data_out, device->type); /* deviceType */ - stream_write_uint32(data_out, device->id); /* deviceID */ + stream_write_UINT32(data_out, device->type); /* deviceType */ + stream_write_UINT32(data_out, device->id); /* deviceID */ strncpy((char*) stream_get_tail(data_out), device->name, 8); for (i = 0; i < 8; i++) @@ -198,7 +198,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use stream_seek_BYTE(data_out); } - stream_write_uint32(data_out, data_len); + stream_write_UINT32(data_out, data_len); if (data_len > 0) stream_write(data_out, stream_get_data(device->data), data_len); @@ -212,7 +212,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use pos = stream_get_pos(data_out); stream_set_pos(data_out, count_pos); - stream_write_uint32(data_out, count); + stream_write_UINT32(data_out, count); stream_set_pos(data_out, pos); stream_seal(data_out); @@ -237,8 +237,8 @@ static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in) { UINT16 component; UINT16 packetID; - uint32 deviceID; - uint32 status; + UINT32 deviceID; + UINT32 status; rdpdrPlugin* rdpdr = (rdpdrPlugin*) plugin; stream_read_UINT16(data_in, component); @@ -274,8 +274,8 @@ static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in) case PAKID_CORE_DEVICE_REPLY: /* connect to a specific resource */ - stream_read_uint32(data_in, deviceID); - stream_read_uint32(data_in, status); + stream_read_UINT32(data_in, deviceID); + stream_read_UINT32(data_in, status); DEBUG_SVC("RDPDR_CTYP_CORE / PAKID_CORE_DEVICE_REPLY (deviceID=%d status=0x%08X)", deviceID, status); break; diff --git a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c index 1f0c61e5e..477c90256 100644 --- a/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c +++ b/channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c @@ -146,7 +146,7 @@ static void rdpsnd_audio_set_format(rdpsndDevicePlugin* device, rdpsndFormat* fo { } -static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value) +static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, UINT32 value) { } diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c index aadb8085c..8331b5e08 100644 --- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c +++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c @@ -45,11 +45,11 @@ struct rdpsnd_alsa_plugin char* device_name; snd_pcm_t* out_handle; snd_mixer_t* mixer_handle; - uint32 source_rate; - uint32 actual_rate; + UINT32 source_rate; + UINT32 actual_rate; snd_pcm_format_t format; - uint32 source_channels; - uint32 actual_channels; + UINT32 source_channels; + UINT32 actual_channels; int bytes_per_channel; int wformat; int block_size; @@ -291,7 +291,7 @@ static BOOL rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndForma return FALSE; } -static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, uint32 value) +static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, UINT32 value) { long left; long right; diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c index aeabe087f..4710eb88f 100644 --- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c +++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c @@ -288,9 +288,9 @@ static void rdpsnd_pulse_open(rdpsndDevicePlugin* device, rdpsndFormat* format, { buffer_attr.maxlength = pa_usec_to_bytes(pulse->latency * 2 * 1000, &pulse->sample_spec); buffer_attr.tlength = pa_usec_to_bytes(pulse->latency * 1000, &pulse->sample_spec); - buffer_attr.prebuf = (uint32_t) -1; - buffer_attr.minreq = (uint32_t) -1; - buffer_attr.fragsize = (uint32_t) -1; + buffer_attr.prebuf = (UINT32_t) -1; + buffer_attr.minreq = (UINT32_t) -1; + buffer_attr.fragsize = (UINT32_t) -1; flags |= PA_STREAM_ADJUST_LATENCY; } @@ -424,7 +424,7 @@ static void rdpsnd_pulse_set_format(rdpsndDevicePlugin* device, rdpsndFormat* fo rdpsnd_pulse_open(device, format, latency); } -static void rdpsnd_pulse_set_volume(rdpsndDevicePlugin* device, uint32 value) +static void rdpsnd_pulse_set_volume(rdpsndDevicePlugin* device, UINT32 value) { pa_cvolume cv; pa_volume_t left; diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index 7fba7bfa8..182457311 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -56,15 +56,15 @@ struct rdpsnd_plugin BOOL expectingWave; BYTE waveData[4]; UINT16 waveDataSize; - uint32 wTimeStamp; /* server timestamp */ - uint32 wave_timestamp; /* client timestamp */ + UINT32 wTimeStamp; /* server timestamp */ + UINT32 wave_timestamp; /* client timestamp */ BOOL is_open; - uint32 close_timestamp; + UINT32 close_timestamp; UINT16 fixed_format; UINT16 fixed_channel; - uint32 fixed_rate; + UINT32 fixed_rate; int latency; /* Device plugin */ @@ -74,11 +74,11 @@ struct rdpsnd_plugin struct data_out_item { STREAM* data_out; - uint32 out_timestamp; + UINT32 out_timestamp; }; /* get time in milliseconds */ -static uint32 get_mstime(void) +static UINT32 get_mstime(void) { struct timeval tp; @@ -91,7 +91,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin) { rdpsndPlugin* rdpsnd = (rdpsndPlugin*)plugin; struct data_out_item* item; - uint32 cur_time; + UINT32 cur_time; while (list_size(rdpsnd->data_out_list) > 0) { @@ -159,9 +159,9 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in rdpsnd_free_supported_formats(rdpsnd); - stream_seek_uint32(data_in); /* dwFlags */ - stream_seek_uint32(data_in); /* dwVolume */ - stream_seek_uint32(data_in); /* dwPitch */ + stream_seek_UINT32(data_in); /* dwFlags */ + stream_seek_UINT32(data_in); /* dwVolume */ + stream_seek_UINT32(data_in); /* dwPitch */ stream_seek_UINT16(data_in); /* wDGramPort */ stream_read_UINT16(data_in, wNumberOfFormats); stream_read_BYTE(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */ @@ -182,9 +182,9 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in stream_write_BYTE(data_out, SNDC_FORMATS); /* msgType */ stream_write_BYTE(data_out, 0); /* bPad */ stream_seek_UINT16(data_out); /* BodySize */ - stream_write_uint32(data_out, TSSNDCAPS_ALIVE | TSSNDCAPS_VOLUME); /* dwFlags */ - stream_write_uint32(data_out, 0xFFFFFFFF); /* dwVolume */ - stream_write_uint32(data_out, 0); /* dwPitch */ + stream_write_UINT32(data_out, TSSNDCAPS_ALIVE | TSSNDCAPS_VOLUME); /* dwFlags */ + stream_write_UINT32(data_out, 0xFFFFFFFF); /* dwVolume */ + stream_write_UINT32(data_out, 0); /* dwPitch */ stream_write_UINT16_be(data_out, 0); /* wDGramPort */ stream_seek_UINT16(data_out); /* wNumberOfFormats */ stream_write_BYTE(data_out, 0); /* cLastBlockConfirmed */ @@ -197,8 +197,8 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in format = &out_formats[n_out_formats]; stream_read_UINT16(data_in, format->wFormatTag); stream_read_UINT16(data_in, format->nChannels); - stream_read_uint32(data_in, format->nSamplesPerSec); - stream_seek_uint32(data_in); /* nAvgBytesPerSec */ + stream_read_UINT32(data_in, format->nSamplesPerSec); + stream_seek_UINT32(data_in); /* nAvgBytesPerSec */ stream_read_UINT16(data_in, format->nBlockAlign); stream_read_UINT16(data_in, format->wBitsPerSample); stream_read_UINT16(data_in, format->cbSize); @@ -321,8 +321,8 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_ static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in) { UINT16 wTimeStamp; - uint32 delay_ms; - uint32 process_ms; + UINT32 delay_ms; + UINT32 process_ms; struct data_out_item* item; rdpsnd->expectingWave = 0; @@ -367,9 +367,9 @@ static void rdpsnd_process_message_close(rdpsndPlugin* rdpsnd) static void rdpsnd_process_message_setvolume(rdpsndPlugin* rdpsnd, STREAM* data_in) { - uint32 dwVolume; + UINT32 dwVolume; - stream_read_uint32(data_in, dwVolume); + stream_read_UINT32(data_in, dwVolume); DEBUG_SVC("dwVolume 0x%X", dwVolume); if (rdpsnd->device) IFCALL(rdpsnd->device->SetVolume, rdpsnd->device, dwVolume); diff --git a/channels/rdpsnd/client/rdpsnd_main.h b/channels/rdpsnd/client/rdpsnd_main.h index 1ca778428..d92bdafe3 100644 --- a/channels/rdpsnd/client/rdpsnd_main.h +++ b/channels/rdpsnd/client/rdpsnd_main.h @@ -29,7 +29,7 @@ typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* format); typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency); -typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value); +typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, UINT32 value); typedef void (*pcPlay) (rdpsndDevicePlugin* device, BYTE* data, int size); typedef void (*pcStart) (rdpsndDevicePlugin* device); typedef void (*pcClose) (rdpsndDevicePlugin* device); diff --git a/channels/rdpsnd/server/rdpsnd.c b/channels/rdpsnd/server/rdpsnd.c index 2427044f8..c4f261751 100644 --- a/channels/rdpsnd/server/rdpsnd.c +++ b/channels/rdpsnd/server/rdpsnd.c @@ -47,8 +47,8 @@ typedef struct _rdpsnd_server int out_frames; int out_pending_frames; - uint32 src_bytes_per_sample; - uint32 src_bytes_per_frame; + UINT32 src_bytes_per_sample; + UINT32 src_bytes_per_frame; } rdpsnd_server; #define RDPSND_PDU_INIT(_s, _msgType) \ @@ -77,9 +77,9 @@ static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) RDPSND_PDU_INIT(s, SNDC_FORMATS); - stream_write_uint32(s, 0); /* dwFlags */ - stream_write_uint32(s, 0); /* dwVolume */ - stream_write_uint32(s, 0); /* dwPitch */ + stream_write_UINT32(s, 0); /* dwFlags */ + stream_write_UINT32(s, 0); /* dwVolume */ + stream_write_UINT32(s, 0); /* dwPitch */ stream_write_UINT16(s, 0); /* wDGramPort */ stream_write_UINT16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */ stream_write_BYTE(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */ @@ -90,9 +90,9 @@ static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s) { stream_write_UINT16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */ stream_write_UINT16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */ - stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */ + stream_write_UINT32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */ - stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec * + stream_write_UINT32(s, rdpsnd->context.server_formats[i].nSamplesPerSec * rdpsnd->context.server_formats[i].nChannels * rdpsnd->context.server_formats[i].wBitsPerSample / 8); /* nAvgBytesPerSec */ @@ -116,9 +116,9 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) if (stream_get_left(s) < 20) return FALSE; - stream_seek_uint32(s); /* dwFlags */ - stream_seek_uint32(s); /* dwVolume */ - stream_seek_uint32(s); /* dwPitch */ + stream_seek_UINT32(s); /* dwFlags */ + stream_seek_UINT32(s); /* dwVolume */ + stream_seek_UINT32(s); /* dwPitch */ stream_seek_UINT16(s); /* wDGramPort */ stream_read_UINT16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */ stream_seek_BYTE(s); /* cLastBlockConfirmed */ @@ -140,8 +140,8 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s) stream_read_UINT16(s, rdpsnd->context.client_formats[i].wFormatTag); stream_read_UINT16(s, rdpsnd->context.client_formats[i].nChannels); - stream_read_uint32(s, rdpsnd->context.client_formats[i].nSamplesPerSec); - stream_seek_uint32(s); /* nAvgBytesPerSec */ + stream_read_UINT32(s, rdpsnd->context.client_formats[i].nSamplesPerSec); + stream_seek_UINT32(s); /* nAvgBytesPerSec */ stream_read_UINT16(s, rdpsnd->context.client_formats[i].nBlockAlign); stream_read_UINT16(s, rdpsnd->context.client_formats[i].wBitsPerSample); stream_read_UINT16(s, rdpsnd->context.client_formats[i].cbSize); @@ -163,7 +163,7 @@ static void* rdpsnd_server_thread_func(void* arg) void* buffer; BYTE msgType; UINT16 BodySize; - uint32 bytes_returned = 0; + UINT32 bytes_returned = 0; rdpsnd_server* rdpsnd = (rdpsnd_server*) arg; freerdp_thread* thread = rdpsnd->rdpsnd_channel_thread; @@ -368,7 +368,7 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd) /* Wave PDU */ stream_check_size(s, size + fill_size); - stream_write_uint32(s, 0); /* bPad */ + stream_write_UINT32(s, 0); /* bPad */ stream_write(s, src + 4, size - 4); if (fill_size > 0) diff --git a/channels/serial/client/serial_main.c b/channels/serial/client/serial_main.c index 06960d73d..edd4308a5 100644 --- a/channels/serial/client/serial_main.c +++ b/channels/serial/client/serial_main.c @@ -66,13 +66,13 @@ struct _SERIAL_DEVICE fd_set read_fds; fd_set write_fds; - uint32 nfds; + UINT32 nfds; struct timeval tv; - uint32 select_timeout; - uint32 timeout_id; + UINT32 select_timeout; + UINT32 timeout_id; }; -static void serial_abort_single_io(SERIAL_DEVICE* serial, uint32 file_id, uint32 abort_io, uint32 io_status); +static void serial_abort_single_io(SERIAL_DEVICE* serial, UINT32 file_id, UINT32 abort_io, UINT32 io_status); static void serial_check_for_events(SERIAL_DEVICE* serial); static void serial_handle_async_irp(SERIAL_DEVICE* serial, IRP* irp); static BOOL serial_check_fds(SERIAL_DEVICE* serial); @@ -81,12 +81,12 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) { char* path; SERIAL_TTY* tty; - uint32 PathLength; - uint32 FileId; + UINT32 PathLength; + UINT32 FileId; stream_seek(irp->input, 28); /* DesiredAccess(4) AllocationSize(8), FileAttributes(4) */ /* SharedAccess(4) CreateDisposition(4), CreateOptions(4) */ - stream_read_uint32(irp->input, PathLength); + stream_read_UINT32(irp->input, PathLength); freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(irp->input), &path, PathLength / 2); @@ -107,7 +107,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp) DEBUG_SVC("%s(%d) created.", serial->path, FileId); } - stream_write_uint32(irp->output, FileId); + stream_write_UINT32(irp->output, FileId); stream_write_BYTE(irp->output, 0); free(path); @@ -142,12 +142,12 @@ static void serial_process_irp_close(SERIAL_DEVICE* serial, IRP* irp) static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) { SERIAL_TTY* tty; - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; BYTE* buffer = NULL; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); DEBUG_SVC("length %u offset %llu", Length, Offset); @@ -179,7 +179,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) } } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); if (Length > 0) { @@ -195,11 +195,11 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp) static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp) { SERIAL_TTY* tty; - uint32 Length; - uint64 Offset; + UINT32 Length; + UINT64 Offset; - stream_read_uint32(irp->input, Length); - stream_read_uint64(irp->input, Offset); + stream_read_UINT32(irp->input, Length); + stream_read_UINT64(irp->input, Offset); stream_seek(irp->input, 20); /* Padding */ DEBUG_SVC("length %u offset %llu", Length, Offset); @@ -225,7 +225,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp) DEBUG_SVC("write %llu-%llu to %s(%d).", Offset, Offset + Length, serial->path, tty->id); } - stream_write_uint32(irp->output, Length); + stream_write_UINT32(irp->output, Length); stream_write_BYTE(irp->output, 0); /* Padding */ irp->Complete(irp); @@ -234,16 +234,16 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp) static void serial_process_irp_device_control(SERIAL_DEVICE* serial, IRP* irp) { SERIAL_TTY* tty; - uint32 IoControlCode; - uint32 InputBufferLength; - uint32 OutputBufferLength; - uint32 abort_io = SERIAL_ABORT_IO_NONE; + UINT32 IoControlCode; + UINT32 InputBufferLength; + UINT32 OutputBufferLength; + UINT32 abort_io = SERIAL_ABORT_IO_NONE; DEBUG_SVC("[in] pending size %d", list_size(serial->pending_irps)); - stream_read_uint32(irp->input, InputBufferLength); - stream_read_uint32(irp->input, OutputBufferLength); - stream_read_uint32(irp->input, IoControlCode); + stream_read_UINT32(irp->input, InputBufferLength); + stream_read_UINT32(irp->input, OutputBufferLength); + stream_read_UINT32(irp->input, IoControlCode); stream_seek(irp->input, 20); /* Padding */ tty = serial->tty; @@ -436,10 +436,10 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints) return 0; } -static void serial_abort_single_io(SERIAL_DEVICE* serial, uint32 file_id, uint32 abort_io, uint32 io_status) +static void serial_abort_single_io(SERIAL_DEVICE* serial, UINT32 file_id, UINT32 abort_io, UINT32 io_status) { IRP* irp = NULL; - uint32 major; + UINT32 major; SERIAL_TTY* tty; DEBUG_SVC("[in] pending size %d", list_size(serial->pending_irps)); @@ -478,7 +478,7 @@ static void serial_abort_single_io(SERIAL_DEVICE* serial, uint32 file_id, uint32 /* Process a SINGLE FileId and MajorFunction */ list_remove(serial->pending_irps, irp); irp->IoStatus = io_status; - stream_write_uint32(irp->output, 0); + stream_write_UINT32(irp->output, 0); irp->Complete(irp); wait_obj_set(serial->in_event); @@ -492,7 +492,7 @@ static void serial_check_for_events(SERIAL_DEVICE* serial) { IRP* irp = NULL; IRP* prev; - uint32 result = 0; + UINT32 result = 0; SERIAL_TTY* tty; tty = serial->tty; @@ -512,7 +512,7 @@ static void serial_check_for_events(SERIAL_DEVICE* serial) DEBUG_SVC("got event result %u", result); irp->IoStatus = STATUS_SUCCESS; - stream_write_uint32(irp->output, result); + stream_write_UINT32(irp->output, result); irp->Complete(irp); prev = irp; @@ -530,14 +530,14 @@ static void serial_check_for_events(SERIAL_DEVICE* serial) DEBUG_SVC("[out] pending size %d", list_size(serial->pending_irps)); } -void serial_get_timeouts(SERIAL_DEVICE* serial, IRP* irp, uint32* timeout, uint32* interval_timeout) +void serial_get_timeouts(SERIAL_DEVICE* serial, IRP* irp, UINT32* timeout, UINT32* interval_timeout) { SERIAL_TTY* tty; - uint32 Length; - uint32 pos; + UINT32 Length; + UINT32 pos; pos = stream_get_pos(irp->input); - stream_read_uint32(irp->input, Length); + stream_read_UINT32(irp->input, Length); stream_set_pos(irp->input, pos); DEBUG_SVC("length read %u", Length); @@ -552,8 +552,8 @@ void serial_get_timeouts(SERIAL_DEVICE* serial, IRP* irp, uint32* timeout, uint3 static void serial_handle_async_irp(SERIAL_DEVICE* serial, IRP* irp) { - uint32 timeout = 0; - uint32 itv_timeout = 0; + UINT32 timeout = 0; + UINT32 itv_timeout = 0; SERIAL_TTY* tty; tty = serial->tty; @@ -603,7 +603,7 @@ static void __serial_check_fds(SERIAL_DEVICE* serial) IRP* irp; IRP* prev; SERIAL_TTY* tty; - uint32 result = 0; + UINT32 result = 0; memset(&serial->tv, 0, sizeof(struct timeval)); tty = serial->tty; @@ -639,7 +639,7 @@ static void __serial_check_fds(SERIAL_DEVICE* serial) DEBUG_SVC("got event result %u", result); irp->IoStatus = STATUS_SUCCESS; - stream_write_uint32(irp->output, result); + stream_write_UINT32(irp->output, result); irp->Complete(irp); } break; diff --git a/channels/serial/client/serial_tty.c b/channels/serial/client/serial_tty.c index d567b8312..c5761f26b 100644 --- a/channels/serial/client/serial_tty.c +++ b/channels/serial/client/serial_tty.c @@ -73,42 +73,42 @@ #define TIOCOUTQ FIONWRITE #endif -static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len); +static UINT32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len); static void tty_set_termios(SERIAL_TTY* tty); static BOOL tty_get_termios(SERIAL_TTY* tty); static int tty_get_error_status(); -uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io) +UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, STREAM* input, STREAM* output, UINT32* abort_io) { int purge_mask; - uint32 result; - uint32 modemstate; + UINT32 result; + UINT32 modemstate; BYTE immediate; - uint32 ret = STATUS_SUCCESS; - uint32 length = 0; - uint32 pos; + UINT32 ret = STATUS_SUCCESS; + UINT32 length = 0; + UINT32 pos; DEBUG_SVC("in"); - stream_seek(output, sizeof(uint32)); + stream_seek(output, sizeof(UINT32)); switch (IoControlCode) { case IOCTL_SERIAL_SET_BAUD_RATE: - stream_read_uint32(input, tty->baud_rate); + stream_read_UINT32(input, tty->baud_rate); tty_set_termios(tty); DEBUG_SVC("SERIAL_SET_BAUD_RATE %d", tty->baud_rate); break; case IOCTL_SERIAL_GET_BAUD_RATE: length = 4; - stream_write_uint32(output, tty->baud_rate); + stream_write_UINT32(output, tty->baud_rate); DEBUG_SVC("SERIAL_GET_BAUD_RATE %d", tty->baud_rate); break; case IOCTL_SERIAL_SET_QUEUE_SIZE: - stream_read_uint32(input, tty->queue_in_size); - stream_read_uint32(input, tty->queue_out_size); + stream_read_UINT32(input, tty->queue_in_size); + stream_read_UINT32(input, tty->queue_out_size); DEBUG_SVC("SERIAL_SET_QUEUE_SIZE in %d out %d", tty->queue_in_size, tty->queue_out_size); break; @@ -138,7 +138,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, case IOCTL_SERIAL_CONFIG_SIZE: DEBUG_SVC("SERIAL_CONFIG_SIZE"); length = 4; - stream_write_uint32(output, 0); + stream_write_UINT32(output, 0); break; case IOCTL_SERIAL_GET_CHARS: @@ -156,30 +156,30 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, case IOCTL_SERIAL_GET_HANDFLOW: length = 16; tty_get_termios(tty); - stream_write_uint32(output, tty->control); - stream_write_uint32(output, tty->xonoff); - stream_write_uint32(output, tty->onlimit); - stream_write_uint32(output, tty->offlimit); + stream_write_UINT32(output, tty->control); + stream_write_UINT32(output, tty->xonoff); + stream_write_UINT32(output, tty->onlimit); + stream_write_UINT32(output, tty->offlimit); DEBUG_SVC("IOCTL_SERIAL_GET_HANDFLOW %X %X %X %X", tty->control, tty->xonoff, tty->onlimit, tty->offlimit); break; case IOCTL_SERIAL_SET_HANDFLOW: - stream_read_uint32(input, tty->control); - stream_read_uint32(input, tty->xonoff); - stream_read_uint32(input, tty->onlimit); - stream_read_uint32(input, tty->offlimit); + stream_read_UINT32(input, tty->control); + stream_read_UINT32(input, tty->xonoff); + stream_read_UINT32(input, tty->onlimit); + stream_read_UINT32(input, tty->offlimit); DEBUG_SVC("IOCTL_SERIAL_SET_HANDFLOW %X %X %X %X", tty->control, tty->xonoff, tty->onlimit, tty->offlimit); tty_set_termios(tty); break; case IOCTL_SERIAL_SET_TIMEOUTS: - stream_read_uint32(input, tty->read_interval_timeout); - stream_read_uint32(input, tty->read_total_timeout_multiplier); - stream_read_uint32(input, tty->read_total_timeout_constant); - stream_read_uint32(input, tty->write_total_timeout_multiplier); - stream_read_uint32(input, tty->write_total_timeout_constant); + stream_read_UINT32(input, tty->read_interval_timeout); + stream_read_UINT32(input, tty->read_total_timeout_multiplier); + stream_read_UINT32(input, tty->read_total_timeout_constant); + stream_read_UINT32(input, tty->write_total_timeout_multiplier); + stream_read_UINT32(input, tty->write_total_timeout_constant); /* http://www.codeproject.com/KB/system/chaiyasit_t.aspx, see 'ReadIntervalTimeout' section http://msdn.microsoft.com/en-us/library/ms885171.aspx */ @@ -201,21 +201,21 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, tty->read_total_timeout_multiplier, tty->read_total_timeout_constant); length = 20; - stream_write_uint32(output, tty->read_interval_timeout); - stream_write_uint32(output, tty->read_total_timeout_multiplier); - stream_write_uint32(output, tty->read_total_timeout_constant); - stream_write_uint32(output, tty->write_total_timeout_multiplier); - stream_write_uint32(output, tty->write_total_timeout_constant); + stream_write_UINT32(output, tty->read_interval_timeout); + stream_write_UINT32(output, tty->read_total_timeout_multiplier); + stream_write_UINT32(output, tty->read_total_timeout_constant); + stream_write_UINT32(output, tty->write_total_timeout_multiplier); + stream_write_UINT32(output, tty->write_total_timeout_constant); break; case IOCTL_SERIAL_GET_WAIT_MASK: DEBUG_SVC("SERIAL_GET_WAIT_MASK %X", tty->wait_mask); length = 4; - stream_write_uint32(output, tty->wait_mask); + stream_write_UINT32(output, tty->wait_mask); break; case IOCTL_SERIAL_SET_WAIT_MASK: - stream_read_uint32(input, tty->wait_mask); + stream_read_UINT32(input, tty->wait_mask); DEBUG_SVC("SERIAL_SET_WAIT_MASK %X", tty->wait_mask); break; @@ -270,19 +270,19 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, #endif DEBUG_SVC("SERIAL_GET_MODEMSTATUS %X", modemstate); length = 4; - stream_write_uint32(output, modemstate); + stream_write_UINT32(output, modemstate); break; case IOCTL_SERIAL_GET_COMMSTATUS: length = 18; - stream_write_uint32(output, 0); /* Errors */ - stream_write_uint32(output, 0); /* Hold reasons */ + stream_write_UINT32(output, 0); /* Errors */ + stream_write_UINT32(output, 0); /* Hold reasons */ result = 0; #ifdef TIOCINQ ioctl(tty->fd, TIOCINQ, &result); #endif - stream_write_uint32(output, result); /* Amount in in queue */ + stream_write_UINT32(output, result); /* Amount in in queue */ if (result) DEBUG_SVC("SERIAL_GET_COMMSTATUS in queue %d", result); @@ -290,7 +290,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, #ifdef TIOCOUTQ ioctl(tty->fd, TIOCOUTQ, &result); #endif - stream_write_uint32(output, result); /* Amount in out queue */ + stream_write_UINT32(output, result); /* Amount in out queue */ DEBUG_SVC("SERIAL_GET_COMMSTATUS out queue %d", result); stream_write_BYTE(output, 0); /* EofReceived */ @@ -298,7 +298,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, break; case IOCTL_SERIAL_PURGE: - stream_read_uint32(input, purge_mask); + stream_read_UINT32(input, purge_mask); DEBUG_SVC("SERIAL_PURGE purge_mask %X", purge_mask); /* See http://msdn.microsoft.com/en-us/library/ms901431.aspx @@ -327,7 +327,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, if (serial_tty_get_event(tty, &result)) { DEBUG_SVC("WAIT end event = %X", result); - stream_write_uint32(output, result); + stream_write_UINT32(output, result); break; } ret = STATUS_PENDING; @@ -363,13 +363,13 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, /* Write OutputBufferLength */ pos = stream_get_pos(output); stream_set_pos(output, 16); - stream_write_uint32(output, length); + stream_write_UINT32(output, length); stream_set_pos(output, pos); return ret; } -BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length) +BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, UINT32* Length) { long timeout = 90; struct termios *ptermios; @@ -418,10 +418,10 @@ BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length) return TRUE; } -BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length) +BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, UINT32 Length) { ssize_t r; - uint32 event_txempty = Length; + UINT32 event_txempty = Length; DEBUG_SVC("in"); @@ -463,7 +463,7 @@ void serial_tty_free(SERIAL_TTY* tty) } -SERIAL_TTY* serial_tty_new(const char* path, uint32 id) +SERIAL_TTY* serial_tty_new(const char* path, UINT32 id) { SERIAL_TTY* tty; @@ -531,7 +531,7 @@ SERIAL_TTY* serial_tty_new(const char* path, uint32 id) return tty; } -BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result) +BOOL serial_tty_get_event(SERIAL_TTY* tty, UINT32* result) { int bytes; BOOL ret = FALSE; @@ -969,7 +969,7 @@ static void tty_set_termios(SERIAL_TTY* tty) tcsetattr(tty->fd, TCSANOW, ptermios); } -static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len) +static UINT32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len) { ssize_t r; diff --git a/channels/serial/client/serial_tty.h b/channels/serial/client/serial_tty.h index c5b959626..bace6e709 100644 --- a/channels/serial/client/serial_tty.h +++ b/channels/serial/client/serial_tty.h @@ -35,24 +35,24 @@ typedef struct _SERIAL_TTY SERIAL_TTY; struct _SERIAL_TTY { - uint32 id; + UINT32 id; int fd; int dtr; int rts; - uint32 control; - uint32 xonoff; - uint32 onlimit; - uint32 offlimit; - uint32 baud_rate; - uint32 queue_in_size; - uint32 queue_out_size; - uint32 wait_mask; - uint32 read_interval_timeout; - uint32 read_total_timeout_multiplier; - uint32 read_total_timeout_constant; - uint32 write_total_timeout_multiplier; - uint32 write_total_timeout_constant; + UINT32 control; + UINT32 xonoff; + UINT32 onlimit; + UINT32 offlimit; + UINT32 baud_rate; + UINT32 queue_in_size; + UINT32 queue_out_size; + UINT32 wait_mask; + UINT32 read_interval_timeout; + UINT32 read_total_timeout_multiplier; + UINT32 read_total_timeout_constant; + UINT32 write_total_timeout_multiplier; + UINT32 write_total_timeout_constant; BYTE stop_bits; BYTE parity; BYTE word_length; @@ -66,13 +66,13 @@ struct _SERIAL_TTY int event_pending; }; -SERIAL_TTY* serial_tty_new(const char* path, uint32 id); +SERIAL_TTY* serial_tty_new(const char* path, UINT32 id); void serial_tty_free(SERIAL_TTY* tty); -BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length); -BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length); -uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io); +BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, UINT32* Length); +BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, UINT32 Length); +UINT32 serial_tty_control(SERIAL_TTY* tty, UINT32 IoControlCode, STREAM* input, STREAM* output, UINT32* abort_io); -BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result); +BOOL serial_tty_get_event(SERIAL_TTY* tty, UINT32* result); #endif /* __SERIAL_TTY_H */ diff --git a/channels/smartcard/client/scard_main.c b/channels/smartcard/client/scard_main.c index 17ffa0b1f..38e0b8976 100644 --- a/channels/smartcard/client/scard_main.c +++ b/channels/smartcard/client/scard_main.c @@ -130,7 +130,7 @@ static void* scard_thread_func(void* arg) } /* Begin TS Client defect workaround. */ -static COMPLETIONIDINFO* scard_mark_duplicate_id(SCARD_DEVICE* scard, uint32 CompletionId) +static COMPLETIONIDINFO* scard_mark_duplicate_id(SCARD_DEVICE* scard, UINT32 CompletionId) { /* * Search from the beginning of the LIST for one outstanding "CompletionID" @@ -157,7 +157,7 @@ static COMPLETIONIDINFO* scard_mark_duplicate_id(SCARD_DEVICE* scard, uint32 Com return NULL; /* Either no items in the list or no match. */ } -static BOOL scard_check_for_duplicate_id(SCARD_DEVICE* scard, uint32 CompletionId) +static BOOL scard_check_for_duplicate_id(SCARD_DEVICE* scard, UINT32 CompletionId) { /* * Search from the end of the LIST for one outstanding "CompletionID" @@ -208,7 +208,7 @@ static void scard_irp_complete(IRP* irp) pos = stream_get_pos(irp->output); stream_set_pos(irp->output, 12); - stream_write_uint32(irp->output, irp->IoStatus); + stream_write_UINT32(irp->output, irp->IoStatus); stream_set_pos(irp->output, pos); /* Begin TS Client defect workaround. */ diff --git a/channels/smartcard/client/scard_main.h b/channels/smartcard/client/scard_main.h index 4844eeecf..103a03f2a 100644 --- a/channels/smartcard/client/scard_main.h +++ b/channels/smartcard/client/scard_main.h @@ -83,7 +83,7 @@ */ struct _COMPLETIONIDINFO { - uint32 ID; /* CompletionID */ + UINT32 ID; /* CompletionID */ BOOL duplicate; /* Indicates whether or not this * CompletionID is a duplicate of an * earlier, outstanding, CompletionID. diff --git a/channels/smartcard/client/scard_operations.c b/channels/smartcard/client/scard_operations.c index 9c235715b..c0c07e990 100644 --- a/channels/smartcard/client/scard_operations.c +++ b/channels/smartcard/client/scard_operations.c @@ -84,10 +84,10 @@ #define WIN_FILE_DEVICE_SMARTCARD 0x00000031 -static uint32 sc_output_string(IRP* irp, char *src, BOOL wide) +static UINT32 sc_output_string(IRP* irp, char *src, BOOL wide) { BYTE* p; - uint32 len; + UINT32 len; p = stream_get_tail(irp->output); len = strlen(src) + 1; @@ -113,29 +113,29 @@ static uint32 sc_output_string(IRP* irp, char *src, BOOL wide) return len; } -static void sc_output_alignment(IRP *irp, uint32 seed) +static void sc_output_alignment(IRP *irp, UINT32 seed) { - const uint32 field_lengths = 20;/* Remove the lengths of the fields + const UINT32 field_lengths = 20;/* Remove the lengths of the fields * RDPDR_HEADER, DeviceID, * CompletionID, and IoStatus * of Section 2.2.1.5.5 of MS-RDPEFS. */ - uint32 size = stream_get_length(irp->output) - field_lengths; - uint32 add = (seed - (size % seed)) % seed; + UINT32 size = stream_get_length(irp->output) - field_lengths; + UINT32 add = (seed - (size % seed)) % seed; if (add > 0) stream_write_zero(irp->output, add); } -static void sc_output_repos(IRP* irp, uint32 written) +static void sc_output_repos(IRP* irp, UINT32 written) { - uint32 add = (4 - (written % 4)) % 4; + UINT32 add = (4 - (written % 4)) % 4; if (add > 0) stream_write_zero(irp->output, add); } -static uint32 sc_output_return(IRP* irp, uint32 rv) +static UINT32 sc_output_return(IRP* irp, UINT32 rv) { stream_write_zero(irp->output, 256); return rv; @@ -145,11 +145,11 @@ static void sc_output_buffer_limit(IRP* irp, char *buffer, unsigned int length, { int header = (length < 0) ? (0) : ((length > highLimit) ? (highLimit) : (length)); - stream_write_uint32(irp->output, header); + stream_write_UINT32(irp->output, header); if (length <= 0) { - stream_write_uint32(irp->output, 0); + stream_write_UINT32(irp->output, 0); } else { @@ -170,8 +170,8 @@ static void sc_output_buffer_start_limit(IRP *irp, int length, int highLimit) { int header = (length < 0) ? (0) : ((length > highLimit) ? (highLimit) : (length)); - stream_write_uint32(irp->output, header); - stream_write_uint32(irp->output, 0x00000001); /* Magic DWORD - any non zero */ + stream_write_UINT32(irp->output, header); + stream_write_UINT32(irp->output, 0x00000001); /* Magic DWORD - any non zero */ } static void sc_output_buffer_start(IRP *irp, int length) @@ -179,7 +179,7 @@ static void sc_output_buffer_start(IRP *irp, int length) sc_output_buffer_start_limit(irp, length, 0x7FFFFFFF); } -static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, BOOL wide) +static UINT32 sc_input_string(IRP* irp, char **dest, UINT32 dataLength, BOOL wide) { char* buffer; int bufferSize; @@ -207,9 +207,9 @@ static uint32 sc_input_string(IRP* irp, char **dest, uint32 dataLength, BOOL wid return bufferSize; } -static void sc_input_repos(IRP* irp, uint32 read) +static void sc_input_repos(IRP* irp, UINT32 read) { - uint32 add = 4 - (read % 4); + UINT32 add = 4 - (read % 4); if (add < 4 && add > 0) stream_seek(irp->input, add); @@ -217,10 +217,10 @@ static void sc_input_repos(IRP* irp, uint32 read) static void sc_input_reader_name(IRP* irp, char **dest, BOOL wide) { - uint32 dataLength; + UINT32 dataLength; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, dataLength); + stream_read_UINT32(irp->input, dataLength); DEBUG_SCARD("datalength %d", dataLength); sc_input_repos(irp, sc_input_string(irp, dest, dataLength, wide)); @@ -228,8 +228,8 @@ static void sc_input_reader_name(IRP* irp, char **dest, BOOL wide) static void sc_input_skip_linked(IRP* irp) { - uint32 len; - stream_read_uint32(irp->input, len); + UINT32 len; + stream_read_UINT32(irp->input, len); if (len > 0) { @@ -238,7 +238,7 @@ static void sc_input_skip_linked(IRP* irp) } } -static uint32 sc_map_state(uint32 state) +static UINT32 sc_map_state(UINT32 state) { /* is this mapping still needed? */ @@ -260,28 +260,28 @@ static uint32 sc_map_state(uint32 state) return state; } -static uint32 handle_EstablishContext(IRP* irp) +static UINT32 handle_EstablishContext(IRP* irp) { - uint32 len, rv; - uint32 scope; + UINT32 len, rv; + UINT32 scope; SCARDCONTEXT hContext = -1; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, len); + stream_read_UINT32(irp->input, len); if (len != 8) return SCARD_F_INTERNAL_ERROR; - stream_seek_uint32(irp->input); - stream_read_uint32(irp->input, scope); + stream_seek_UINT32(irp->input); + stream_read_UINT32(irp->input, scope); rv = SCardEstablishContext(scope, NULL, NULL, &hContext); - stream_write_uint32(irp->output, 4); // cbContext - stream_write_uint32(irp->output, -1); // ReferentID + stream_write_UINT32(irp->output, 4); // cbContext + stream_write_UINT32(irp->output, -1); // ReferentID - stream_write_uint32(irp->output, 4); - stream_write_uint32(irp->output, hContext); + stream_write_UINT32(irp->output, 4); + stream_write_UINT32(irp->output, hContext); /* TODO: store hContext in allowed context list */ @@ -289,16 +289,16 @@ static uint32 handle_EstablishContext(IRP* irp) return SCARD_S_SUCCESS; } -static uint32 handle_ReleaseContext(IRP* irp) +static UINT32 handle_ReleaseContext(IRP* irp) { - uint32 len, rv; + UINT32 len, rv; SCARDCONTEXT hContext = -1; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, len); + stream_read_UINT32(irp->input, len); stream_seek(irp->input, 0x10); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); rv = SCardReleaseContext(hContext); if (rv) @@ -310,13 +310,13 @@ static uint32 handle_ReleaseContext(IRP* irp) return rv; } -static uint32 handle_IsValidContext(IRP* irp) +static UINT32 handle_IsValidContext(IRP* irp) { - uint32 rv; + UINT32 rv; SCARDCONTEXT hContext; stream_seek(irp->input, 0x1C); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); rv = SCardIsValidContext(hContext); @@ -330,9 +330,9 @@ static uint32 handle_IsValidContext(IRP* irp) return rv; } -static uint32 handle_ListReaders(IRP* irp, BOOL wide) +static UINT32 handle_ListReaders(IRP* irp, BOOL wide) { - uint32 len, rv; + UINT32 len, rv; SCARDCONTEXT hContext; DWORD dwReaders; char *readerList = NULL, *walker; @@ -340,15 +340,15 @@ static uint32 handle_ListReaders(IRP* irp, BOOL wide) int pos, poslen1, poslen2; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, len); + stream_read_UINT32(irp->input, len); stream_seek(irp->input, 0x1c); - stream_read_uint32(irp->input, len); + stream_read_UINT32(irp->input, len); if (len != 4) return SCARD_F_INTERNAL_ERROR; - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); /* ignore rest of [MS-RDPESC] 2.2.2.4 ListReaders_Call */ @@ -371,12 +371,12 @@ static uint32 handle_ListReaders(IRP* irp, BOOL wide) /* DEBUG_SCARD("Success 0x%08x %d %d", (unsigned) hContext, (unsigned) cchReaders, (int) strlen(readerList));*/ poslen1 = stream_get_pos(irp->output); - stream_seek_uint32(irp->output); + stream_seek_UINT32(irp->output); - stream_write_uint32(irp->output, 0x01760650); + stream_write_UINT32(irp->output, 0x01760650); poslen2 = stream_get_pos(irp->output); - stream_seek_uint32(irp->output); + stream_seek_UINT32(irp->output); walker = readerList; dataLength = 0; @@ -397,9 +397,9 @@ static uint32 handle_ListReaders(IRP* irp, BOOL wide) pos = stream_get_pos(irp->output); stream_set_pos(irp->output, poslen1); - stream_write_uint32(irp->output, dataLength); + stream_write_UINT32(irp->output, dataLength); stream_set_pos(irp->output, poslen2); - stream_write_uint32(irp->output, dataLength); + stream_write_UINT32(irp->output, dataLength); stream_set_pos(irp->output, pos); @@ -415,7 +415,7 @@ static uint32 handle_ListReaders(IRP* irp, BOOL wide) return rv; } -static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) +static UINT32 handle_GetStatusChange(IRP* irp, BOOL wide) { LONG rv; SCARDCONTEXT hContext; @@ -425,12 +425,12 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) int i; stream_seek(irp->input, 0x18); - stream_read_uint32(irp->input, dwTimeout); - stream_read_uint32(irp->input, readerCount); + stream_read_UINT32(irp->input, dwTimeout); + stream_read_UINT32(irp->input, readerCount); stream_seek(irp->input, 8); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); stream_seek(irp->input, 4); @@ -454,9 +454,9 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) * convert to host endian or fix the headers to * request the order we want */ - stream_read_uint32(irp->input, cur->dwCurrentState); - stream_read_uint32(irp->input, cur->dwEventState); - stream_read_uint32(irp->input, cur->cbAtr); + stream_read_UINT32(irp->input, cur->dwCurrentState); + stream_read_UINT32(irp->input, cur->dwEventState); + stream_read_UINT32(irp->input, cur->cbAtr); stream_read(irp->input, cur->rgbAtr, 32); stream_seek(irp->input, 4); @@ -469,10 +469,10 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) for (i = 0; i < readerCount; i++) { cur = &readerStates[i]; - uint32 dataLength; + UINT32 dataLength; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, dataLength); + stream_read_UINT32(irp->input, dataLength); sc_input_repos(irp, sc_input_string(irp, (char **) &cur->szReader, dataLength, wide)); DEBUG_SCARD(" \"%s\"", cur->szReader ? cur->szReader : "NULL"); @@ -496,9 +496,9 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) else DEBUG_SCARD("Success"); - stream_write_uint32(irp->output, readerCount); - stream_write_uint32(irp->output, 0x00084dd8); - stream_write_uint32(irp->output, readerCount); + stream_write_UINT32(irp->output, readerCount); + stream_write_UINT32(irp->output, 0x00084dd8); + stream_write_UINT32(irp->output, readerCount); for (i = 0; i < readerCount; i++) { @@ -510,9 +510,9 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) (unsigned) cur->dwEventState); /* TODO: do byte conversions if necessary */ - stream_write_uint32(irp->output, cur->dwCurrentState); - stream_write_uint32(irp->output, cur->dwEventState); - stream_write_uint32(irp->output, cur->cbAtr); + stream_write_UINT32(irp->output, cur->dwCurrentState); + stream_write_UINT32(irp->output, cur->dwEventState); + stream_write_UINT32(irp->output, cur->cbAtr); stream_write(irp->output, cur->rgbAtr, 32); stream_write_zero(irp->output, 4); @@ -526,13 +526,13 @@ static uint32 handle_GetStatusChange(IRP* irp, BOOL wide) return rv; } -static uint32 handle_Cancel(IRP *irp) +static UINT32 handle_Cancel(IRP *irp) { LONG rv; SCARDCONTEXT hContext; stream_seek(irp->input, 0x1C); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); rv = SCardCancel(hContext); @@ -546,7 +546,7 @@ static uint32 handle_Cancel(IRP *irp) return rv; } -static uint32 handle_Connect(IRP* irp, BOOL wide) +static UINT32 handle_Connect(IRP* irp, BOOL wide) { LONG rv; SCARDCONTEXT hContext; @@ -557,13 +557,13 @@ static uint32 handle_Connect(IRP* irp, BOOL wide) SCARDHANDLE hCard; stream_seek(irp->input, 0x1c); - stream_read_uint32(irp->input, dwShareMode); - stream_read_uint32(irp->input, dwPreferredProtocol); + stream_read_UINT32(irp->input, dwShareMode); + stream_read_UINT32(irp->input, dwPreferredProtocol); sc_input_reader_name(irp, &readerName, wide); stream_seek(irp->input, 4); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); DEBUG_SCARD("(context: 0x%08x, share: 0x%08x, proto: 0x%08x, reader: \"%s\")", (unsigned) hContext, (unsigned) dwShareMode, @@ -577,13 +577,13 @@ static uint32 handle_Connect(IRP* irp, BOOL wide) else DEBUG_SCARD("Success 0x%08x", (unsigned) hCard); - stream_write_uint32(irp->output, 0x00000000); - stream_write_uint32(irp->output, 0x00000000); - stream_write_uint32(irp->output, 0x00000004); - stream_write_uint32(irp->output, 0x016Cff34); - stream_write_uint32(irp->output, dwActiveProtocol); - stream_write_uint32(irp->output, 0x00000004); - stream_write_uint32(irp->output, hCard); + stream_write_UINT32(irp->output, 0x00000000); + stream_write_UINT32(irp->output, 0x00000000); + stream_write_UINT32(irp->output, 0x00000004); + stream_write_UINT32(irp->output, 0x016Cff34); + stream_write_UINT32(irp->output, dwActiveProtocol); + stream_write_UINT32(irp->output, 0x00000004); + stream_write_UINT32(irp->output, hCard); sc_output_alignment(irp, 8); @@ -591,7 +591,7 @@ static uint32 handle_Connect(IRP* irp, BOOL wide) return rv; } -static uint32 handle_Reconnect(IRP* irp) +static UINT32 handle_Reconnect(IRP* irp) { LONG rv; SCARDCONTEXT hContext; @@ -602,14 +602,14 @@ static uint32 handle_Reconnect(IRP* irp) DWORD dwActiveProtocol = 0; stream_seek(irp->input, 0x20); - stream_read_uint32(irp->input, dwShareMode); - stream_read_uint32(irp->input, dwPreferredProtocol); - stream_read_uint32(irp->input, dwInitialization); + stream_read_UINT32(irp->input, dwShareMode); + stream_read_UINT32(irp->input, dwPreferredProtocol); + stream_read_UINT32(irp->input, dwInitialization); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); DEBUG_SCARD("(context: 0x%08x, hcard: 0x%08x, share: 0x%08x, proto: 0x%08x, init: 0x%08x)", (unsigned) hContext, (unsigned) hCard, @@ -623,13 +623,13 @@ static uint32 handle_Reconnect(IRP* irp) else DEBUG_SCARD("Success (proto: 0x%08x)", (unsigned) dwActiveProtocol); - stream_write_uint32(irp->output, dwActiveProtocol); + stream_write_UINT32(irp->output, dwActiveProtocol); sc_output_alignment(irp, 8); return rv; } -static uint32 handle_Disconnect(IRP* irp) +static UINT32 handle_Disconnect(IRP* irp) { LONG rv; SCARDCONTEXT hContext; @@ -637,11 +637,11 @@ static uint32 handle_Disconnect(IRP* irp) DWORD dwDisposition = 0; stream_seek(irp->input, 0x20); - stream_read_uint32(irp->input, dwDisposition); + stream_read_UINT32(irp->input, dwDisposition); stream_seek(irp->input, 4); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); stream_seek(irp->input, 4); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); DEBUG_SCARD("(context: 0x%08x, hcard: 0x%08x, disposition: 0x%08x)", (unsigned) hContext, (unsigned) hCard, (unsigned) dwDisposition); @@ -658,13 +658,13 @@ static uint32 handle_Disconnect(IRP* irp) return rv; } -static uint32 handle_BeginTransaction(IRP* irp) +static UINT32 handle_BeginTransaction(IRP* irp) { LONG rv; SCARDCONTEXT hCard; stream_seek(irp->input, 0x30); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); rv = SCardBeginTransaction(hCard); @@ -678,17 +678,17 @@ static uint32 handle_BeginTransaction(IRP* irp) return rv; } -static uint32 handle_EndTransaction(IRP* irp) +static UINT32 handle_EndTransaction(IRP* irp) { LONG rv; SCARDCONTEXT hCard; DWORD dwDisposition = 0; stream_seek(irp->input, 0x20); - stream_read_uint32(irp->input, dwDisposition); + stream_read_UINT32(irp->input, dwDisposition); stream_seek(irp->input, 0x0C); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); rv = SCardEndTransaction(hCard, dwDisposition); @@ -702,7 +702,7 @@ static uint32 handle_EndTransaction(IRP* irp) return rv; } -static uint32 handle_State(IRP* irp) +static UINT32 handle_State(IRP* irp) { LONG rv; SCARDHANDLE hCard; @@ -717,10 +717,10 @@ static uint32 handle_State(IRP* irp) #endif stream_seek(irp->input, 0x24); - stream_seek_uint32(irp->input); /* atrLen */ + stream_seek_UINT32(irp->input); /* atrLen */ stream_seek(irp->input, 0x0c); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); stream_seek(irp->input, 0x04); #ifdef SCARD_AUTOALLOCATE @@ -752,11 +752,11 @@ static uint32 handle_State(IRP* irp) state = sc_map_state(state); - stream_write_uint32(irp->output, state); - stream_write_uint32(irp->output, protocol); - stream_write_uint32(irp->output, atrLen); - stream_write_uint32(irp->output, 0x00000001); - stream_write_uint32(irp->output, atrLen); + stream_write_UINT32(irp->output, state); + stream_write_UINT32(irp->output, protocol); + stream_write_UINT32(irp->output, atrLen); + stream_write_UINT32(irp->output, 0x00000001); + stream_write_UINT32(irp->output, atrLen); stream_write(irp->output, pbAtr, atrLen); sc_output_repos(irp, atrLen); @@ -780,7 +780,7 @@ static DWORD handle_Status(IRP *irp, BOOL wide) DWORD atrLen = 0; char * readerName; BYTE pbAtr[MAX_ATR_SIZE]; - uint32 dataLength; + UINT32 dataLength; int pos, poslen1, poslen2; #ifdef WITH_DEBUG_SCARD @@ -788,10 +788,10 @@ static DWORD handle_Status(IRP *irp, BOOL wide) #endif stream_seek(irp->input, 0x24); - stream_read_uint32(irp->input, readerLen); - stream_read_uint32(irp->input, atrLen); + stream_read_UINT32(irp->input, readerLen); + stream_read_UINT32(irp->input, atrLen); stream_seek(irp->input, 0x0c); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); stream_seek(irp->input, 0x4); atrLen = MAX_ATR_SIZE; @@ -826,18 +826,18 @@ static DWORD handle_Status(IRP *irp, BOOL wide) state = sc_map_state(state); poslen1 = stream_get_pos(irp->output); - stream_write_uint32(irp->output, readerLen); - stream_write_uint32(irp->output, 0x00020000); - stream_write_uint32(irp->output, state); - stream_write_uint32(irp->output, protocol); + stream_write_UINT32(irp->output, readerLen); + stream_write_UINT32(irp->output, 0x00020000); + stream_write_UINT32(irp->output, state); + stream_write_UINT32(irp->output, protocol); stream_write(irp->output, pbAtr, atrLen); if (atrLen < 32) stream_write_zero(irp->output, 32 - atrLen); - stream_write_uint32(irp->output, atrLen); + stream_write_UINT32(irp->output, atrLen); poslen2 = stream_get_pos(irp->output); - stream_write_uint32(irp->output, readerLen); + stream_write_UINT32(irp->output, readerLen); dataLength = sc_output_string(irp, readerName, wide); dataLength += sc_output_string(irp, "\0", wide); @@ -845,9 +845,9 @@ static DWORD handle_Status(IRP *irp, BOOL wide) pos = stream_get_pos(irp->output); stream_set_pos(irp->output, poslen1); - stream_write_uint32(irp->output,dataLength); + stream_write_UINT32(irp->output,dataLength); stream_set_pos(irp->output, poslen2); - stream_write_uint32(irp->output,dataLength); + stream_write_UINT32(irp->output,dataLength); stream_set_pos(irp->output, pos); sc_output_alignment(irp, 8); @@ -862,42 +862,42 @@ static DWORD handle_Status(IRP *irp, BOOL wide) return rv; } -static uint32 handle_Transmit(IRP* irp) +static UINT32 handle_Transmit(IRP* irp) { LONG rv; SCARDCONTEXT hCard; - uint32 map[7], linkedLen; + UINT32 map[7], linkedLen; SCARD_IO_REQUEST pioSendPci, pioRecvPci, *pPioRecvPci; DWORD cbSendLength = 0, cbRecvLength = 0; BYTE *sendBuf = NULL, *recvBuf = NULL; stream_seek(irp->input, 0x14); - stream_read_uint32(irp->input, map[0]); + stream_read_UINT32(irp->input, map[0]); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, map[1]); + stream_read_UINT32(irp->input, map[1]); - stream_read_uint32(irp->input, pioSendPci.dwProtocol); - stream_read_uint32(irp->input, pioSendPci.cbPciLength); + stream_read_UINT32(irp->input, pioSendPci.dwProtocol); + stream_read_UINT32(irp->input, pioSendPci.cbPciLength); - stream_read_uint32(irp->input, map[2]); - stream_read_uint32(irp->input, cbSendLength); - stream_read_uint32(irp->input, map[3]); - stream_read_uint32(irp->input, map[4]); - stream_read_uint32(irp->input, map[5]); - stream_read_uint32(irp->input, cbRecvLength); + stream_read_UINT32(irp->input, map[2]); + stream_read_UINT32(irp->input, cbSendLength); + stream_read_UINT32(irp->input, map[3]); + stream_read_UINT32(irp->input, map[4]); + stream_read_UINT32(irp->input, map[5]); + stream_read_UINT32(irp->input, cbRecvLength); if (map[0] & SCARD_INPUT_LINKED) sc_input_skip_linked(irp); stream_seek(irp->input, 4); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); if (map[2] & SCARD_INPUT_LINKED) { /* sendPci */ - stream_read_uint32(irp->input, linkedLen); + stream_read_UINT32(irp->input, linkedLen); - stream_read_uint32(irp->input, pioSendPci.dwProtocol); + stream_read_UINT32(irp->input, pioSendPci.dwProtocol); stream_seek(irp->input, linkedLen - 4); sc_input_repos(irp, linkedLen); @@ -907,7 +907,7 @@ static uint32 handle_Transmit(IRP* irp) if (map[3] & SCARD_INPUT_LINKED) { /* send buffer */ - stream_read_uint32(irp->input, linkedLen); + stream_read_UINT32(irp->input, linkedLen); sendBuf = malloc(linkedLen); stream_read(irp->input, sendBuf, linkedLen); @@ -920,18 +920,18 @@ static uint32 handle_Transmit(IRP* irp) if (map[4] & SCARD_INPUT_LINKED) { /* recvPci */ - stream_read_uint32(irp->input, linkedLen); + stream_read_UINT32(irp->input, linkedLen); - stream_read_uint32(irp->input, pioRecvPci.dwProtocol); + stream_read_UINT32(irp->input, pioRecvPci.dwProtocol); stream_seek(irp->input, linkedLen - 4); sc_input_repos(irp, linkedLen); - stream_read_uint32(irp->input, map[6]); + stream_read_UINT32(irp->input, map[6]); if (map[6] & SCARD_INPUT_LINKED) { /* not sure what this is */ - stream_read_uint32(irp->input, linkedLen); + stream_read_UINT32(irp->input, linkedLen); stream_seek(irp->input, linkedLen); sc_input_repos(irp, linkedLen); @@ -959,7 +959,7 @@ static uint32 handle_Transmit(IRP* irp) { DEBUG_SCARD("Success (%d bytes)", (int) cbRecvLength); - stream_write_uint32(irp->output, 0); /* pioRecvPci 0x00; */ + stream_write_UINT32(irp->output, 0); /* pioRecvPci 0x00; */ sc_output_buffer_start(irp, cbRecvLength); /* start of recvBuf output */ @@ -974,32 +974,32 @@ static uint32 handle_Transmit(IRP* irp) return rv; } -static uint32 handle_Control(IRP* irp) +static UINT32 handle_Control(IRP* irp) { LONG rv; SCARDCONTEXT hContext; SCARDHANDLE hCard; - uint32 map[3]; - uint32 controlCode; - uint32 controlFunction; + UINT32 map[3]; + UINT32 controlCode; + UINT32 controlFunction; BYTE *recvBuffer = NULL, *sendBuffer = NULL; - uint32 recvLength; + UINT32 recvLength; DWORD nBytesReturned; DWORD outBufferSize; stream_seek(irp->input, 0x14); - stream_read_uint32(irp->input, map[0]); + stream_read_UINT32(irp->input, map[0]); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, map[1]); - stream_read_uint32(irp->input, controlCode); - stream_read_uint32(irp->input, recvLength); - stream_read_uint32(irp->input, map[2]); + stream_read_UINT32(irp->input, map[1]); + stream_read_UINT32(irp->input, controlCode); + stream_read_UINT32(irp->input, recvLength); + stream_read_UINT32(irp->input, map[2]); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, outBufferSize); + stream_read_UINT32(irp->input, outBufferSize); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, hContext); + stream_read_UINT32(irp->input, hContext); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); /* Translate Windows SCARD_CTL_CODE's to corresponding local code */ if (WIN_CTL_DEVICE_TYPE(controlCode) == WIN_FILE_DEVICE_SMARTCARD) @@ -1012,7 +1012,7 @@ static uint32 handle_Control(IRP* irp) if (map[2] & SCARD_INPUT_LINKED) { /* read real input size */ - stream_read_uint32(irp->input, recvLength); + stream_read_UINT32(irp->input, recvLength); recvBuffer = malloc(recvLength); @@ -1036,9 +1036,9 @@ static uint32 handle_Control(IRP* irp) else DEBUG_SCARD("Success (out: %u bytes)", (unsigned) nBytesReturned); - stream_write_uint32(irp->output, (uint32) nBytesReturned); - stream_write_uint32(irp->output, 0x00000004); - stream_write_uint32(irp->output, nBytesReturned); + stream_write_UINT32(irp->output, (UINT32) nBytesReturned); + stream_write_UINT32(irp->output, 0x00000004); + stream_write_UINT32(irp->output, nBytesReturned); if (nBytesReturned > 0) { @@ -1054,7 +1054,7 @@ static uint32 handle_Control(IRP* irp) return rv; } -static uint32 handle_GetAttrib(IRP* irp) +static UINT32 handle_GetAttrib(IRP* irp) { LONG rv; SCARDHANDLE hCard; @@ -1063,11 +1063,11 @@ static uint32 handle_GetAttrib(IRP* irp) BYTE* pbAttr = NULL; stream_seek(irp->input, 0x20); - stream_read_uint32(irp->input, dwAttrId); + stream_read_UINT32(irp->input, dwAttrId); stream_seek(irp->input, 0x4); - stream_read_uint32(irp->input, dwAttrLen); + stream_read_UINT32(irp->input, dwAttrLen); stream_seek(irp->input, 0xC); - stream_read_uint32(irp->input, hCard); + stream_read_UINT32(irp->input, hCard); DEBUG_SCARD("hcard: 0x%08x, attrib: 0x%08x (%d bytes)", (unsigned) hCard, (unsigned) dwAttrId, (int) dwAttrLen); @@ -1147,9 +1147,9 @@ static uint32 handle_GetAttrib(IRP* irp) { DEBUG_SCARD("Success (%d bytes)", (int) dwAttrLen); - stream_write_uint32(irp->output, dwAttrLen); - stream_write_uint32(irp->output, 0x00000200); - stream_write_uint32(irp->output, dwAttrLen); + stream_write_UINT32(irp->output, dwAttrLen); + stream_write_UINT32(irp->output, 0x00000200); + stream_write_UINT32(irp->output, dwAttrLen); if (!pbAttr) { @@ -1161,7 +1161,7 @@ static uint32 handle_GetAttrib(IRP* irp) } sc_output_repos(irp, dwAttrLen); /* align to multiple of 4 */ - stream_write_uint32(irp->output, 0); + stream_write_UINT32(irp->output, 0); } sc_output_alignment(irp, 8); @@ -1170,13 +1170,13 @@ static uint32 handle_GetAttrib(IRP* irp) return rv; } -static uint32 handle_AccessStartedEvent(IRP* irp) +static UINT32 handle_AccessStartedEvent(IRP* irp) { sc_output_alignment(irp, 8); return SCARD_S_SUCCESS; } -void scard_error(SCARD_DEVICE* scard, IRP* irp, uint32 ntstatus) +void scard_error(SCARD_DEVICE* scard, IRP* irp, UINT32 ntstatus) { /* [MS-RDPESC] 3.1.4.4 */ printf("scard processing error %x\n", ntstatus); @@ -1189,19 +1189,19 @@ void scard_error(SCARD_DEVICE* scard, IRP* irp, uint32 ntstatus) /* http://msdn.microsoft.com/en-gb/library/ms938473.aspx */ typedef struct _SERVER_SCARD_ATRMASK { - uint32 cbAtr; + UINT32 cbAtr; BYTE rgbAtr[36]; BYTE rgbMask[36]; } SERVER_SCARD_ATRMASK; -static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) +static UINT32 handle_LocateCardsByATR(IRP* irp, BOOL wide) { LONG rv; int i, j, k; SCARDCONTEXT hContext; - uint32 atrMaskCount = 0; - uint32 readerCount = 0; + UINT32 atrMaskCount = 0; + UINT32 readerCount = 0; SCARD_READERSTATE* cur = NULL; SCARD_READERSTATE* rsCur = NULL; SCARD_READERSTATE* readerStates = NULL; @@ -1209,8 +1209,8 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) SERVER_SCARD_ATRMASK* pAtrMasks = NULL; stream_seek(irp->input, 0x2C); - stream_read_uint32(irp->input, hContext); - stream_read_uint32(irp->input, atrMaskCount); + stream_read_UINT32(irp->input, hContext); + stream_read_UINT32(irp->input, atrMaskCount); pAtrMasks = malloc(atrMaskCount * sizeof(SERVER_SCARD_ATRMASK)); @@ -1219,12 +1219,12 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) for (i = 0; i < atrMaskCount; i++) { - stream_read_uint32(irp->input, pAtrMasks[i].cbAtr); + stream_read_UINT32(irp->input, pAtrMasks[i].cbAtr); stream_read(irp->input, pAtrMasks[i].rgbAtr, 36); stream_read(irp->input, pAtrMasks[i].rgbMask, 36); } - stream_read_uint32(irp->input, readerCount); + stream_read_UINT32(irp->input, readerCount); readerStates = xzalloc(readerCount * sizeof(SCARD_READERSTATE)); @@ -1242,9 +1242,9 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) * convert to host endian or fix the headers to * request the order we want */ - stream_read_uint32(irp->input, cur->dwCurrentState); - stream_read_uint32(irp->input, cur->dwEventState); - stream_read_uint32(irp->input, cur->cbAtr); + stream_read_UINT32(irp->input, cur->dwCurrentState); + stream_read_UINT32(irp->input, cur->dwEventState); + stream_read_UINT32(irp->input, cur->cbAtr); stream_read(irp->input, cur->rgbAtr, 32); stream_seek(irp->input, 4); @@ -1258,10 +1258,10 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) for (i = 0; i < readerCount; i++) { cur = &readerStates[i]; - uint32 dataLength; + UINT32 dataLength; stream_seek(irp->input, 8); - stream_read_uint32(irp->input, dataLength); + stream_read_UINT32(irp->input, dataLength); sc_input_repos(irp, sc_input_string(irp, (char **) &cur->szReader, dataLength, wide)); DEBUG_SCARD(" \"%s\"", cur->szReader ? cur->szReader : "NULL"); @@ -1304,15 +1304,15 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) } } - stream_write_uint32(irp->output, readerCount); - stream_write_uint32(irp->output, 0x00084dd8); - stream_write_uint32(irp->output, readerCount); + stream_write_UINT32(irp->output, readerCount); + stream_write_UINT32(irp->output, 0x00084dd8); + stream_write_UINT32(irp->output, readerCount); for (i = 0, rsCur = readerStates; i < readerCount; i++, rsCur++) { - stream_write_uint32(irp->output, cur->dwCurrentState); - stream_write_uint32(irp->output, cur->dwEventState); - stream_write_uint32(irp->output, cur->cbAtr); + stream_write_UINT32(irp->output, cur->dwCurrentState); + stream_write_UINT32(irp->output, cur->dwEventState); + stream_write_UINT32(irp->output, cur->cbAtr); stream_write(irp->output, cur->rgbAtr, 32); stream_write_zero(irp->output, 4); @@ -1329,11 +1329,11 @@ static uint32 handle_LocateCardsByATR(IRP* irp, BOOL wide) BOOL scard_async_op(IRP* irp) { - uint32 ioctl_code; + UINT32 ioctl_code; /* peek ahead */ stream_seek(irp->input, 8); - stream_read_uint32(irp->input, ioctl_code); + stream_read_UINT32(irp->input, ioctl_code); stream_rewind(irp->input, 12); switch (ioctl_code) @@ -1369,22 +1369,22 @@ BOOL scard_async_op(IRP* irp) void scard_device_control(SCARD_DEVICE* scard, IRP* irp) { - uint32 pos; - uint32 result; - uint32 result_pos; - uint32 output_len; - uint32 input_len; - uint32 ioctl_code; - uint32 stream_len; - uint32 irp_result_pos; - uint32 output_len_pos; - const uint32 header_lengths = 16; /* MS-RPCE, Sections 2.2.6.1 + UINT32 pos; + UINT32 result; + UINT32 result_pos; + UINT32 output_len; + UINT32 input_len; + UINT32 ioctl_code; + UINT32 stream_len; + UINT32 irp_result_pos; + UINT32 output_len_pos; + const UINT32 header_lengths = 16; /* MS-RPCE, Sections 2.2.6.1 * and 2.2.6.2. */ - stream_read_uint32(irp->input, output_len); - stream_read_uint32(irp->input, input_len); - stream_read_uint32(irp->input, ioctl_code); + stream_read_UINT32(irp->input, output_len); + stream_read_UINT32(irp->input, input_len); + stream_read_UINT32(irp->input, ioctl_code); stream_seek(irp->input, 20); /* padding */ @@ -1397,20 +1397,20 @@ void scard_device_control(SCARD_DEVICE* scard, IRP* irp) irp_result_pos = stream_get_pos(irp->output); - stream_write_uint32(irp->output, 0x00000000); /* MS-RDPEFS + stream_write_UINT32(irp->output, 0x00000000); /* MS-RDPEFS * OutputBufferLength * will be updated * later in this * function. */ /* [MS-RPCE] 2.2.6.1 */ - stream_write_uint32(irp->output, 0x00081001); /* len 8, LE, v1 */ - stream_write_uint32(irp->output, 0xcccccccc); /* filler */ + stream_write_UINT32(irp->output, 0x00081001); /* len 8, LE, v1 */ + stream_write_UINT32(irp->output, 0xcccccccc); /* filler */ output_len_pos = stream_get_pos(irp->output); stream_seek(irp->output, 4); /* size */ - stream_write_uint32(irp->output, 0x0); /* filler */ + stream_write_UINT32(irp->output, 0x0); /* filler */ result_pos = stream_get_pos(irp->output); stream_seek(irp->output, 4); /* result */ @@ -1530,16 +1530,16 @@ void scard_device_control(SCARD_DEVICE* scard, IRP* irp) pos = stream_get_pos(irp->output); stream_len = pos - irp_result_pos - 4; /* Value of OutputBufferLength */ stream_set_pos(irp->output, irp_result_pos); - stream_write_uint32(irp->output, stream_len); + stream_write_UINT32(irp->output, stream_len); stream_set_pos(irp->output, output_len_pos); /* Remove the effect of the MS-RPCE Common Type Header and Private * Header (Sections 2.2.6.1 and 2.2.6.2). */ - stream_write_uint32(irp->output, stream_len - header_lengths); + stream_write_UINT32(irp->output, stream_len - header_lengths); stream_set_pos(irp->output, result_pos); - stream_write_uint32(irp->output, result); + stream_write_UINT32(irp->output, result); stream_set_pos(irp->output, pos); diff --git a/channels/tsmf/client/alsa/tsmf_alsa.c b/channels/tsmf/client/alsa/tsmf_alsa.c index af72e4a2b..176e89dce 100644 --- a/channels/tsmf/client/alsa/tsmf_alsa.c +++ b/channels/tsmf/client/alsa/tsmf_alsa.c @@ -39,11 +39,11 @@ typedef struct _TSMFALSAAudioDevice char device[32]; snd_pcm_t* out_handle; - uint32 source_rate; - uint32 actual_rate; - uint32 source_channels; - uint32 actual_channels; - uint32 bytes_per_sample; + UINT32 source_rate; + UINT32 actual_rate; + UINT32 source_channels; + UINT32 actual_channels; + UINT32 bytes_per_sample; FREERDP_DSP_CONTEXT* dsp_context; } TSMFALSAAudioDevice; @@ -81,7 +81,7 @@ static BOOL tsmf_alsa_open(ITSMFAudioDevice* audio, const char* device) } static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio, - uint32 sample_rate, uint32 channels, uint32 bits_per_sample) + UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample) { int error; snd_pcm_uframes_t frames; @@ -147,7 +147,7 @@ static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio, return TRUE; } -static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size) +static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, UINT32 data_size) { int len; int error; @@ -214,9 +214,9 @@ static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size return TRUE; } -static uint64 tsmf_alsa_get_latency(ITSMFAudioDevice* audio) +static UINT64 tsmf_alsa_get_latency(ITSMFAudioDevice* audio) { - uint64 latency = 0; + UINT64 latency = 0; snd_pcm_sframes_t frames = 0; TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio; @@ -224,7 +224,7 @@ static uint64 tsmf_alsa_get_latency(ITSMFAudioDevice* audio) snd_pcm_delay(alsa->out_handle, &frames) == 0 && frames > 0) { - latency = ((uint64)frames) * 10000000LL / (uint64)alsa->actual_rate; + latency = ((UINT64)frames) * 10000000LL / (UINT64)alsa->actual_rate; } return latency; } diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index a6d348baf..d085a32e7 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -51,8 +51,8 @@ typedef struct _TSMFFFmpegDecoder int prepared; BYTE* decoded_data; - uint32 decoded_size; - uint32 decoded_size_max; + UINT32 decoded_size; + UINT32 decoded_size_max; } TSMFFFmpegDecoder; static BOOL tsmf_ffmpeg_init_context(ITSMFDecoder* decoder) @@ -109,7 +109,7 @@ static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MED static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; - uint32 size; + UINT32 size; const BYTE* s; BYTE* p; @@ -151,12 +151,12 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP *p++ = 0xff; /* Flag? */ *p++ = 0xe0 | 0x01; /* Reserved | #sps */ s = media_type->ExtraData + 20; - size = ((uint32)(*s)) * 256 + ((uint32)(*(s + 1))); + size = ((UINT32)(*s)) * 256 + ((UINT32)(*(s + 1))); memcpy(p, s, size + 2); s += size + 2; p += size + 2; *p++ = 1; /* #pps */ - size = ((uint32)(*s)) * 256 + ((uint32)(*(s + 1))); + size = ((UINT32)(*s)) * 256 + ((UINT32)(*(s + 1))); memcpy(p, s, size + 2); } else @@ -260,7 +260,7 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi return TRUE; } -static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, UINT32 data_size, UINT32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int decoded; @@ -319,12 +319,12 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, ui return ret; } -static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, UINT32 data_size, UINT32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; int len; int frame_size; - uint32 src_size; + UINT32 src_size; const BYTE* src; BYTE* dst; int dst_offset; @@ -419,7 +419,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, ui return TRUE; } -static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions) +static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, UINT32 data_size, UINT32 extensions) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -442,7 +442,7 @@ static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, uint32 d } } -static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size) +static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, UINT32* size) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; BYTE* buf; @@ -454,7 +454,7 @@ static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size) return buf; } -static uint32 tsmf_ffmpeg_get_decoded_format(ITSMFDecoder* decoder) +static UINT32 tsmf_ffmpeg_get_decoded_format(ITSMFDecoder* decoder) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; @@ -466,11 +466,11 @@ static uint32 tsmf_ffmpeg_get_decoded_format(ITSMFDecoder* decoder) default: DEBUG_WARN("unsupported pixel format %u", mdecoder->codec_context->pix_fmt); - return (uint32) -1; + return (UINT32) -1; } } -static BOOL tsmf_ffmpeg_get_decoded_dimension(ITSMFDecoder* decoder, uint32* width, uint32* height) +static BOOL tsmf_ffmpeg_get_decoded_dimension(ITSMFDecoder* decoder, UINT32* width, UINT32* height) { TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder; diff --git a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c index 058933579..89b52e6d4 100644 --- a/channels/tsmf/client/gstreamer/tsmf_gstreamer.c +++ b/channels/tsmf/client/gstreamer/tsmf_gstreamer.c @@ -70,7 +70,7 @@ typedef struct _TSMFGstreamerDecoder GstElement *aVolume; BOOL paused; - uint64 last_sample_end_time; + UINT64 last_sample_end_time; Display *disp; int *xfwin; @@ -95,7 +95,7 @@ const char *NAME_GST_STATE_NULL = "GST_STATE_NULL"; const char *NAME_GST_STATE_VOID_PENDING = "GST_STATE_VOID_PENDING"; const char *NAME_GST_STATE_OTHER = "GST_STATE_?"; -static inline const GstClockTime tsmf_gstreamer_timestamp_ms_to_gst(uint64 ms_timestamp) +static inline const GstClockTime tsmf_gstreamer_timestamp_ms_to_gst(UINT64 ms_timestamp) { /* * Convert Microsoft 100ns timestamps to Gstreamer 1ns units. @@ -1094,8 +1094,8 @@ static BOOL tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder) return TRUE; } -static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions, - uint64 start_time, uint64 end_time, uint64 duration) +static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, UINT32 data_size, UINT32 extensions, + UINT64 start_time, UINT64 end_time, UINT64 duration) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) @@ -1215,12 +1215,12 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, u FILE *fin = fopen("/tmp/tsmf_aseek.info", "rt"); if (fin) { - uint64 AStartTime = 0; + UINT64 AStartTime = 0; fscanf(fin, "%"PRIu64, &AStartTime); fclose(fin); if (start_time > AStartTime) { - uint64 streamDelay = (start_time - AStartTime) / 10; + UINT64 streamDelay = (start_time - AStartTime) / 10; usleep(streamDelay); } unlink("/tmp/tsmf_aseek.info"); @@ -1249,12 +1249,12 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, u fin = fopen("/tmp/tsmf_vseek.info", "rt"); if (fin) { - uint64 VStartTime = 0; + UINT64 VStartTime = 0; fscanf(fin, "%"PRIu64, &VStartTime); fclose(fin); if (start_time > VStartTime) { - uint64 streamDelay = (start_time - VStartTime) / 10; + UINT64 streamDelay = (start_time - VStartTime) / 10; usleep(streamDelay); } unlink("/tmp/tsmf_vseek.info"); @@ -1301,7 +1301,7 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, u return TRUE; } -static void tsmf_gstreamer_change_volume(ITSMFDecoder * decoder, uint32 newVolume, uint32 muted) +static void tsmf_gstreamer_change_volume(ITSMFDecoder * decoder, UINT32 newVolume, UINT32 muted) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) @@ -1327,7 +1327,7 @@ static void tsmf_gstreamer_change_volume(ITSMFDecoder * decoder, uint32 newVolum g_object_set(mdecoder->aVolume, "volume", mdecoder->gstVolume, NULL); } -static void tsmf_gstreamer_control(ITSMFDecoder * decoder, ITSMFControlMsg control_msg, uint32 *arg) +static void tsmf_gstreamer_control(ITSMFDecoder * decoder, ITSMFControlMsg control_msg, UINT32 *arg) { TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) @@ -1453,7 +1453,7 @@ static void tsmf_gstreamer_free(ITSMFDecoder * decoder) } } -static uint64 tsmf_gstreamer_get_running_time(ITSMFDecoder * decoder) +static UINT64 tsmf_gstreamer_get_running_time(ITSMFDecoder * decoder) { TSMFGstreamerDecoder *mdecoder = (TSMFGstreamerDecoder *) decoder; if (!mdecoder) diff --git a/channels/tsmf/client/pulse/tsmf_pulse.c b/channels/tsmf/client/pulse/tsmf_pulse.c index 0a867af84..08d776179 100644 --- a/channels/tsmf/client/pulse/tsmf_pulse.c +++ b/channels/tsmf/client/pulse/tsmf_pulse.c @@ -243,9 +243,9 @@ static BOOL tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) tsmf_pulse_stream_request_callback, pulse); buffer_attr.maxlength = pa_usec_to_bytes(500000, &pulse->sample_spec); buffer_attr.tlength = pa_usec_to_bytes(250000, &pulse->sample_spec); - buffer_attr.prebuf = (uint32_t) -1; - buffer_attr.minreq = (uint32_t) -1; - buffer_attr.fragsize = (uint32_t) -1; + buffer_attr.prebuf = (UINT32_t) -1; + buffer_attr.minreq = (UINT32_t) -1; + buffer_attr.fragsize = (UINT32_t) -1; if (pa_stream_connect_playback(pulse->stream, pulse->device[0] ? pulse->device : NULL, &buffer_attr, PA_STREAM_ADJUST_LATENCY | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE, @@ -284,7 +284,7 @@ static BOOL tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse) } static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio, - uint32 sample_rate, uint32 channels, uint32 bits_per_sample) + UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; @@ -298,7 +298,7 @@ static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio, return tsmf_pulse_open_stream(pulse); } -static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size) +static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, UINT32 data_size) { TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; BYTE* src; @@ -341,15 +341,15 @@ static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_siz return TRUE; } -static uint64 tsmf_pulse_get_latency(ITSMFAudioDevice* audio) +static UINT64 tsmf_pulse_get_latency(ITSMFAudioDevice* audio) { pa_usec_t usec; - uint64 latency = 0; + UINT64 latency = 0; TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio; if (pulse->stream && pa_stream_get_latency(pulse->stream, &usec, NULL) == 0) { - latency = ((uint64)usec) * 10LL; + latency = ((UINT64)usec) * 10LL; } return latency; } diff --git a/channels/tsmf/client/tsmf_audio.h b/channels/tsmf/client/tsmf_audio.h index cdad9dd40..98af8013d 100644 --- a/channels/tsmf/client/tsmf_audio.h +++ b/channels/tsmf/client/tsmf_audio.h @@ -29,13 +29,13 @@ struct _ITSMFAudioDevice /* Open the audio device. */ BOOL (*Open) (ITSMFAudioDevice* audio, const char* device); /* Set the audio data format. */ - BOOL (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample); + BOOL (*SetFormat) (ITSMFAudioDevice* audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample); /* Play audio data. */ - BOOL (*Play) (ITSMFAudioDevice* audio, BYTE* data, uint32 data_size); + BOOL (*Play) (ITSMFAudioDevice* audio, BYTE* data, UINT32 data_size); /* Get the latency of the last written sample, in 100ns */ - uint64 (*GetLatency) (ITSMFAudioDevice* audio); + UINT64 (*GetLatency) (ITSMFAudioDevice* audio); /* Change the playback volume level */ - void (*ChangeVolume) (ITSMFAudioDevice* audio, uint32 newVolume, uint32 muted); + void (*ChangeVolume) (ITSMFAudioDevice* audio, UINT32 newVolume, UINT32 muted); /* Flush queued audio data */ void (*Flush) (ITSMFAudioDevice* audio); /* Free the audio device */ diff --git a/channels/tsmf/client/tsmf_codec.c b/channels/tsmf/client/tsmf_codec.c index 136030340..e0d1c8efc 100644 --- a/channels/tsmf/client/tsmf_codec.c +++ b/channels/tsmf/client/tsmf_codec.c @@ -284,15 +284,15 @@ static void tsmf_print_guid(const BYTE* guid) } /* http://msdn.microsoft.com/en-us/library/dd318229.aspx */ -static uint32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s, BOOL bypass) +static UINT32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s, BOOL bypass) { - uint32 biSize; - uint32 biWidth; - uint32 biHeight; + UINT32 biSize; + UINT32 biWidth; + UINT32 biHeight; - stream_read_uint32(s, biSize); - stream_read_uint32(s, biWidth); - stream_read_uint32(s, biHeight); + stream_read_UINT32(s, biSize); + stream_read_UINT32(s, biWidth); + stream_read_UINT32(s, biHeight); stream_seek(s, 28); if (mediatype->Width == 0) @@ -308,23 +308,23 @@ static uint32 tsmf_codec_parse_BITMAPINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STR } /* http://msdn.microsoft.com/en-us/library/dd407326.aspx */ -static uint32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) +static UINT32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) { - uint64 AvgTimePerFrame; + UINT64 AvgTimePerFrame; /* VIDEOINFOHEADER2.rcSource, RECT(LONG left, LONG top, LONG right, LONG bottom) */ - stream_seek_uint32(s); - stream_seek_uint32(s); - stream_read_uint32(s, mediatype->Width); - stream_read_uint32(s, mediatype->Height); + stream_seek_UINT32(s); + stream_seek_UINT32(s); + stream_read_UINT32(s, mediatype->Width); + stream_read_UINT32(s, mediatype->Height); /* VIDEOINFOHEADER2.rcTarget */ stream_seek(s, 16); /* VIDEOINFOHEADER2.dwBitRate */ - stream_read_uint32(s, mediatype->BitRate); + stream_read_UINT32(s, mediatype->BitRate); /* VIDEOINFOHEADER2.dwBitErrorRate */ - stream_seek_uint32(s); + stream_seek_UINT32(s); /* VIDEOINFOHEADER2.AvgTimePerFrame */ - stream_read_uint64(s, AvgTimePerFrame); + stream_read_UINT64(s, AvgTimePerFrame); mediatype->SamplesPerSecond.Numerator = 1000000; mediatype->SamplesPerSecond.Denominator = (int)(AvgTimePerFrame / 10LL); /* Remaining fields before bmiHeader */ @@ -334,7 +334,7 @@ static uint32 tsmf_codec_parse_VIDEOINFOHEADER2(TS_AM_MEDIA_TYPE* mediatype, STR } /* http://msdn.microsoft.com/en-us/library/dd390700.aspx */ -static uint32 tsmf_codec_parse_VIDEOINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) +static UINT32 tsmf_codec_parse_VIDEOINFOHEADER(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) { /* typedef struct tagVIDEOINFOHEADER { @@ -346,21 +346,21 @@ typedef struct tagVIDEOINFOHEADER { BITMAPINFOHEADER bmiHeader; } VIDEOINFOHEADER; */ - uint64 AvgTimePerFrame; + UINT64 AvgTimePerFrame; /* VIDEOINFOHEADER.rcSource, RECT(LONG left, LONG top, LONG right, LONG bottom) */ - stream_seek_uint32(s); - stream_seek_uint32(s); - stream_read_uint32(s, mediatype->Width); - stream_read_uint32(s, mediatype->Height); + stream_seek_UINT32(s); + stream_seek_UINT32(s); + stream_read_UINT32(s, mediatype->Width); + stream_read_UINT32(s, mediatype->Height); /* VIDEOINFOHEADER.rcTarget */ stream_seek(s, 16); /* VIDEOINFOHEADER.dwBitRate */ - stream_read_uint32(s, mediatype->BitRate); + stream_read_UINT32(s, mediatype->BitRate); /* VIDEOINFOHEADER.dwBitErrorRate */ - stream_seek_uint32(s); + stream_seek_UINT32(s); /* VIDEOINFOHEADER.AvgTimePerFrame */ - stream_read_uint64(s, AvgTimePerFrame); + stream_read_UINT64(s, AvgTimePerFrame); mediatype->SamplesPerSecond.Numerator = 1000000; mediatype->SamplesPerSecond.Denominator = (int)(AvgTimePerFrame / 10LL); @@ -370,7 +370,7 @@ typedef struct tagVIDEOINFOHEADER { BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) { int i; - uint32 cbFormat; + UINT32 cbFormat; BOOL ret = TRUE; memset(mediatype, 0, sizeof(TS_AM_MEDIA_TYPE)); @@ -421,7 +421,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) stream_seek(s, 16); /* cbFormat */ - stream_read_uint32(s, cbFormat); + stream_read_UINT32(s, cbFormat); DEBUG_DVC("cbFormat %d", cbFormat); #ifdef WITH_DEBUG_DVC @@ -434,14 +434,14 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) /* http://msdn.microsoft.com/en-us/library/aa473808.aspx */ stream_seek(s, 8); /* dwSize and ? */ - stream_read_uint32(s, mediatype->Width); /* videoInfo.dwWidth */ - stream_read_uint32(s, mediatype->Height); /* videoInfo.dwHeight */ + stream_read_UINT32(s, mediatype->Width); /* videoInfo.dwWidth */ + stream_read_UINT32(s, mediatype->Height); /* videoInfo.dwHeight */ stream_seek(s, 32); /* videoInfo.FramesPerSecond */ - stream_read_uint32(s, mediatype->SamplesPerSecond.Numerator); - stream_read_uint32(s, mediatype->SamplesPerSecond.Denominator); + stream_read_UINT32(s, mediatype->SamplesPerSecond.Numerator); + stream_read_UINT32(s, mediatype->SamplesPerSecond.Denominator); stream_seek(s, 80); - stream_read_uint32(s, mediatype->BitRate); /* compressedInfo.AvgBitrate */ + stream_read_UINT32(s, mediatype->BitRate); /* compressedInfo.AvgBitrate */ stream_seek(s, 36); if (cbFormat > 176) @@ -456,9 +456,9 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s) stream_seek_UINT16(s); stream_read_UINT16(s, mediatype->Channels); - stream_read_uint32(s, mediatype->SamplesPerSecond.Numerator); + stream_read_UINT32(s, mediatype->SamplesPerSecond.Numerator); mediatype->SamplesPerSecond.Denominator = 1; - stream_read_uint32(s, mediatype->BitRate); + stream_read_UINT32(s, mediatype->BitRate); mediatype->BitRate *= 8; stream_read_UINT16(s, mediatype->BlockAlign); stream_read_UINT16(s, mediatype->BitsPerSample); diff --git a/channels/tsmf/client/tsmf_decoder.h b/channels/tsmf/client/tsmf_decoder.h index 9f222d1c7..792bc6e62 100644 --- a/channels/tsmf/client/tsmf_decoder.h +++ b/channels/tsmf/client/tsmf_decoder.h @@ -38,28 +38,28 @@ struct _ITSMFDecoder /* Set the decoder format. Return true if supported. */ BOOL (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type); /* Decode a sample. */ - BOOL (*Decode) (ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions); + BOOL (*Decode) (ITSMFDecoder* decoder, const BYTE* data, UINT32 data_size, UINT32 extensions); /* Get the decoded data */ - BYTE* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size); + BYTE* (*GetDecodedData) (ITSMFDecoder* decoder, UINT32* size); /* Get the pixel format of decoded video frame */ - uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder); + UINT32 (*GetDecodedFormat) (ITSMFDecoder* decoder); /* Get the width and height of decoded video frame */ - BOOL (*GetDecodedDimension) (ITSMFDecoder* decoder, uint32* width, uint32* height); + BOOL (*GetDecodedDimension) (ITSMFDecoder* decoder, UINT32* width, UINT32* height); /* Free the decoder */ void (*Free) (ITSMFDecoder * decoder); /* Optional Contol function */ - void (*Control) (ITSMFDecoder * decoder, ITSMFControlMsg control_msg, uint32 *arg); + void (*Control) (ITSMFDecoder * decoder, ITSMFControlMsg control_msg, UINT32 *arg); /* Decode a sample with extended interface. */ - int (*DecodeEx) (ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions, - uint64 start_time, uint64 end_time, uint64 duration); + int (*DecodeEx) (ITSMFDecoder * decoder, const BYTE * data, UINT32 data_size, UINT32 extensions, + UINT64 start_time, UINT64 end_time, UINT64 duration); /* Get current play time */ - uint64 (*GetRunningTime) (ITSMFDecoder * decoder); + UINT64 (*GetRunningTime) (ITSMFDecoder * decoder); /* Update Gstreamer Rendering Area */ void (*UpdateRenderingArea) (ITSMFDecoder * decoder, int newX, int newY, int newWidth, int newHeight, int numRectangles, RDP_RECT *rectangles); /* Change Gstreamer Audio Volume */ - void (*ChangeVolume) (ITSMFDecoder * decoder, uint32 newVolume, uint32 muted); + void (*ChangeVolume) (ITSMFDecoder * decoder, UINT32 newVolume, UINT32 muted); /* Check buffer level */ - uint32 (*BufferLevel) (ITSMFDecoder * decoder); + UINT32 (*BufferLevel) (ITSMFDecoder * decoder); }; #define TSMF_DECODER_EXPORT_FUNC_NAME "TSMFDecoderEntry" diff --git a/channels/tsmf/client/tsmf_ifman.c b/channels/tsmf/client/tsmf_ifman.c index a55fed3f5..f33b26f3e 100644 --- a/channels/tsmf/client/tsmf_ifman.c +++ b/channels/tsmf/client/tsmf_ifman.c @@ -38,49 +38,49 @@ int tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman) { - uint32 CapabilityValue; + UINT32 CapabilityValue; - stream_read_uint32(ifman->input, CapabilityValue); + stream_read_UINT32(ifman->input, CapabilityValue); DEBUG_DVC("server CapabilityValue %d", CapabilityValue); stream_check_size(ifman->output, 8); - stream_write_uint32(ifman->output, 1); /* CapabilityValue */ - stream_write_uint32(ifman->output, 0); /* Result */ + stream_write_UINT32(ifman->output, 1); /* CapabilityValue */ + stream_write_UINT32(ifman->output, 0); /* Result */ return 0; } int tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman) { - uint32 i; - uint32 v; - uint32 pos; - uint32 CapabilityType; - uint32 cbCapabilityLength; - uint32 numHostCapabilities; + UINT32 i; + UINT32 v; + UINT32 pos; + UINT32 CapabilityType; + UINT32 cbCapabilityLength; + UINT32 numHostCapabilities; pos = stream_get_pos(ifman->output); stream_check_size(ifman->output, ifman->input_size + 4); stream_copy(ifman->output, ifman->input, ifman->input_size); stream_set_pos(ifman->output, pos); - stream_read_uint32(ifman->output, numHostCapabilities); + stream_read_UINT32(ifman->output, numHostCapabilities); for (i = 0; i < numHostCapabilities; i++) { - stream_read_uint32(ifman->output, CapabilityType); - stream_read_uint32(ifman->output, cbCapabilityLength); + stream_read_UINT32(ifman->output, CapabilityType); + stream_read_UINT32(ifman->output, cbCapabilityLength); pos = stream_get_pos(ifman->output); switch (CapabilityType) { case 1: /* Protocol version request */ - stream_read_uint32(ifman->output, v); + stream_read_UINT32(ifman->output, v); DEBUG_DVC("server protocol version %d", v); break; case 2: /* Supported platform */ - stream_peek_uint32(ifman->output, v); + stream_peek_UINT32(ifman->output, v); DEBUG_DVC("server supported platform %d", v); /* Claim that we support both MF and DShow platforms. */ - stream_write_uint32(ifman->output, + stream_write_UINT32(ifman->output, MMREDIR_CAPABILITY_PLATFORM_MF | MMREDIR_CAPABILITY_PLATFORM_DSHOW); break; default: @@ -89,7 +89,7 @@ int tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman) } stream_set_pos(ifman->output, pos + cbCapabilityLength); } - stream_write_uint32(ifman->output, 0); /* Result */ + stream_write_UINT32(ifman->output, 0); /* Result */ ifman->output_interface_id = TSMF_INTERFACE_DEFAULT | STREAM_ID_STUB; @@ -98,13 +98,13 @@ int tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman) int tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman) { - uint32 numMediaType; - uint32 PlatformCookie; - uint32 FormatSupported = 1; + UINT32 numMediaType; + UINT32 PlatformCookie; + UINT32 FormatSupported = 1; - stream_read_uint32(ifman->input, PlatformCookie); - stream_seek_uint32(ifman->input); /* NoRolloverFlags (4 bytes) */ - stream_read_uint32(ifman->input, numMediaType); + stream_read_UINT32(ifman->input, PlatformCookie); + stream_seek_UINT32(ifman->input); /* NoRolloverFlags (4 bytes) */ + stream_read_UINT32(ifman->input, numMediaType); DEBUG_DVC("PlatformCookie %d numMediaType %d", PlatformCookie, numMediaType); @@ -115,9 +115,9 @@ int tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman) DEBUG_DVC("format ok."); stream_check_size(ifman->output, 12); - stream_write_uint32(ifman->output, FormatSupported); - stream_write_uint32(ifman->output, PlatformCookie); - stream_write_uint32(ifman->output, 0); /* Result */ + stream_write_UINT32(ifman->output, FormatSupported); + stream_write_UINT32(ifman->output, PlatformCookie); + stream_write_UINT32(ifman->output, 0); /* Result */ ifman->output_interface_id = TSMF_INTERFACE_DEFAULT | STREAM_ID_STUB; @@ -151,7 +151,7 @@ int tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman) int tsmf_ifman_add_stream(TSMF_IFMAN* ifman) { - uint32 StreamId; + UINT32 StreamId; int error = 0; TSMF_STREAM* stream; TSMF_PRESENTATION* presentation; @@ -165,8 +165,8 @@ int tsmf_ifman_add_stream(TSMF_IFMAN* ifman) error = 1; else { - stream_read_uint32(ifman->input, StreamId); - stream_seek_uint32(ifman->input); /* numMediaType */ + stream_read_UINT32(ifman->input, StreamId); + stream_seek_UINT32(ifman->input); /* numMediaType */ stream = tsmf_stream_new(presentation, StreamId); if (stream) tsmf_stream_set_format(stream, ifman->decoder_name, ifman->input); @@ -180,8 +180,8 @@ int tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman) DEBUG_DVC(""); stream_check_size(ifman->output, 8); - stream_write_uint32(ifman->output, 1); /* TopologyReady */ - stream_write_uint32(ifman->output, 0); /* Result */ + stream_write_UINT32(ifman->output, 1); /* TopologyReady */ + stream_write_UINT32(ifman->output, 0); /* Result */ ifman->output_interface_id = TSMF_INTERFACE_DEFAULT | STREAM_ID_STUB; return 0; } @@ -189,7 +189,7 @@ int tsmf_ifman_set_topology_request(TSMF_IFMAN* ifman) int tsmf_ifman_remove_stream(TSMF_IFMAN* ifman) { int error = 0; - uint32 StreamId; + UINT32 StreamId; TSMF_STREAM* stream; TSMF_PRESENTATION* presentation; @@ -202,7 +202,7 @@ int tsmf_ifman_remove_stream(TSMF_IFMAN* ifman) error = 1; else { - stream_read_uint32(ifman->input, StreamId); + stream_read_UINT32(ifman->input, StreamId); stream = tsmf_stream_find_by_id(presentation, StreamId); if (stream) tsmf_stream_free(stream); @@ -226,7 +226,7 @@ int tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman) pexisted = 0; stream_check_size(ifman->output, 4); - stream_write_uint32(ifman->output, 0); /* Result */ + stream_write_UINT32(ifman->output, 0); /* Result */ ifman->output_interface_id = TSMF_INTERFACE_DEFAULT | STREAM_ID_STUB; return 0; } @@ -241,13 +241,13 @@ int tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman) if (presentation) { - uint32 newVolume; - uint32 muted; + UINT32 newVolume; + UINT32 muted; stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, newVolume); + stream_read_UINT32(ifman->input, newVolume); DEBUG_DVC("on stream volume: new volume=[%d]", newVolume); - stream_read_uint32(ifman->input, muted); + stream_read_UINT32(ifman->input, muted); DEBUG_DVC("on stream volume: muted=[%d]", muted); tsmf_presentation_volume_changed(presentation, newVolume, muted); } @@ -271,13 +271,13 @@ int tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman) if (presentation) { - uint32 channelVolume; - uint32 changedChannel; + UINT32 channelVolume; + UINT32 changedChannel; stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, channelVolume); + stream_read_UINT32(ifman->input, channelVolume); DEBUG_DVC("on channel volume: channel volume=[%d]", channelVolume); - stream_read_uint32(ifman->input, changedChannel); + stream_read_UINT32(ifman->input, changedChannel); DEBUG_DVC("on stream volume: changed channel=[%d]", changedChannel); } @@ -296,12 +296,12 @@ int tsmf_ifman_set_video_window(TSMF_IFMAN* ifman) int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman) { TSMF_PRESENTATION* presentation; - uint32 numGeometryInfo; - uint32 Left; - uint32 Top; - uint32 Width; - uint32 Height; - uint32 cbVisibleRect; + UINT32 numGeometryInfo; + UINT32 Left; + UINT32 Top; + UINT32 Width; + UINT32 Height; + UINT32 cbVisibleRect; RDP_RECT* rects = NULL; int num_rects = 0; int error = 0; @@ -311,17 +311,17 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman) presentation = tsmf_presentation_find_by_id(stream_get_tail(ifman->input)); stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, numGeometryInfo); + stream_read_UINT32(ifman->input, numGeometryInfo); pos = stream_get_pos(ifman->input); stream_seek(ifman->input, 12); /* VideoWindowId (8 bytes), VideoWindowState (4 bytes) */ - stream_read_uint32(ifman->input, Width); - stream_read_uint32(ifman->input, Height); - stream_read_uint32(ifman->input, Left); - stream_read_uint32(ifman->input, Top); + stream_read_UINT32(ifman->input, Width); + stream_read_UINT32(ifman->input, Height); + stream_read_UINT32(ifman->input, Left); + stream_read_UINT32(ifman->input, Top); stream_set_pos(ifman->input, pos + numGeometryInfo); - stream_read_uint32(ifman->input, cbVisibleRect); + stream_read_UINT32(ifman->input, cbVisibleRect); num_rects = cbVisibleRect / 16; DEBUG_DVC("numGeometryInfo %d Width %d Height %d Left %d Top %d cbVisibleRect %d num_rects %d", @@ -379,22 +379,22 @@ int tsmf_ifman_on_sample(TSMF_IFMAN* ifman) { TSMF_PRESENTATION* presentation; TSMF_STREAM* stream; - uint32 StreamId; - uint64 SampleStartTime; - uint64 SampleEndTime; - uint64 ThrottleDuration; - uint32 SampleExtensions; - uint32 cbData; + UINT32 StreamId; + UINT64 SampleStartTime; + UINT64 SampleEndTime; + UINT64 ThrottleDuration; + UINT32 SampleExtensions; + UINT32 cbData; stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, StreamId); - stream_seek_uint32(ifman->input); /* numSample */ - stream_read_uint64(ifman->input, SampleStartTime); - stream_read_uint64(ifman->input, SampleEndTime); - stream_read_uint64(ifman->input, ThrottleDuration); - stream_seek_uint32(ifman->input); /* SampleFlags */ - stream_read_uint32(ifman->input, SampleExtensions); - stream_read_uint32(ifman->input, cbData); + stream_read_UINT32(ifman->input, StreamId); + stream_seek_UINT32(ifman->input); /* numSample */ + stream_read_UINT64(ifman->input, SampleStartTime); + stream_read_UINT64(ifman->input, SampleEndTime); + stream_read_UINT64(ifman->input, ThrottleDuration); + stream_seek_UINT32(ifman->input); /* SampleFlags */ + stream_read_UINT32(ifman->input, SampleExtensions); + stream_read_UINT32(ifman->input, cbData); DEBUG_DVC("MessageId %d StreamId %d SampleStartTime %d SampleEndTime %d " "ThrottleDuration %d SampleExtensions %d cbData %d", @@ -424,10 +424,10 @@ int tsmf_ifman_on_sample(TSMF_IFMAN* ifman) int tsmf_ifman_on_flush(TSMF_IFMAN* ifman) { TSMF_PRESENTATION* presentation; - uint32 StreamId; + UINT32 StreamId; stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, StreamId); + stream_read_UINT32(ifman->input, StreamId); DEBUG_DVC("StreamId %d", StreamId); presentation = tsmf_presentation_find_by_id(ifman->presentation_id); @@ -447,11 +447,11 @@ int tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman) { TSMF_PRESENTATION* presentation; TSMF_STREAM* stream; - uint32 StreamId; + UINT32 StreamId; presentation = tsmf_presentation_find_by_id(stream_get_tail(ifman->input)); stream_seek(ifman->input, 16); - stream_read_uint32(ifman->input, StreamId); + stream_read_UINT32(ifman->input, StreamId); if (presentation) { stream = tsmf_stream_find_by_id(presentation, StreamId); @@ -461,10 +461,10 @@ int tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman) DEBUG_DVC("StreamId %d", StreamId); stream_check_size(ifman->output, 16); - stream_write_uint32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ - stream_write_uint32(ifman->output, StreamId); /* StreamId */ - stream_write_uint32(ifman->output, TSMM_CLIENT_EVENT_ENDOFSTREAM); /* EventId */ - stream_write_uint32(ifman->output, 0); /* cbData */ + stream_write_UINT32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ + stream_write_UINT32(ifman->output, StreamId); /* StreamId */ + stream_write_UINT32(ifman->output, TSMM_CLIENT_EVENT_ENDOFSTREAM); /* EventId */ + stream_write_UINT32(ifman->output, 0); /* cbData */ ifman->output_interface_id = TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY; return 0; @@ -483,10 +483,10 @@ int tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman) DEBUG_WARN("unknown presentation id"); stream_check_size(ifman->output, 16); - stream_write_uint32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ - stream_write_uint32(ifman->output, 0); /* StreamId */ - stream_write_uint32(ifman->output, TSMM_CLIENT_EVENT_START_COMPLETED); /* EventId */ - stream_write_uint32(ifman->output, 0); /* cbData */ + stream_write_UINT32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ + stream_write_UINT32(ifman->output, 0); /* StreamId */ + stream_write_UINT32(ifman->output, TSMM_CLIENT_EVENT_START_COMPLETED); /* EventId */ + stream_write_UINT32(ifman->output, 0); /* cbData */ ifman->output_interface_id = TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY; return 0; @@ -542,10 +542,10 @@ int tsmf_ifman_on_playback_stopped(TSMF_IFMAN* ifman) DEBUG_WARN("unknown presentation id"); stream_check_size(ifman->output, 16); - stream_write_uint32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ - stream_write_uint32(ifman->output, 0); /* StreamId */ - stream_write_uint32(ifman->output, TSMM_CLIENT_EVENT_STOP_COMPLETED); /* EventId */ - stream_write_uint32(ifman->output, 0); /* cbData */ + stream_write_UINT32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ + stream_write_UINT32(ifman->output, 0); /* StreamId */ + stream_write_UINT32(ifman->output, TSMM_CLIENT_EVENT_STOP_COMPLETED); /* EventId */ + stream_write_UINT32(ifman->output, 0); /* cbData */ ifman->output_interface_id = TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY; return 0; @@ -556,10 +556,10 @@ int tsmf_ifman_on_playback_rate_changed(TSMF_IFMAN * ifman) DEBUG_DVC(""); stream_check_size(ifman->output, 16); - stream_write_uint32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ - stream_write_uint32(ifman->output, 0); /* StreamId */ - stream_write_uint32(ifman->output, TSMM_CLIENT_EVENT_MONITORCHANGED); /* EventId */ - stream_write_uint32(ifman->output, 0); /* cbData */ + stream_write_UINT32(ifman->output, CLIENT_EVENT_NOTIFICATION); /* FunctionId */ + stream_write_UINT32(ifman->output, 0); /* StreamId */ + stream_write_UINT32(ifman->output, TSMM_CLIENT_EVENT_MONITORCHANGED); /* EventId */ + stream_write_UINT32(ifman->output, 0); /* cbData */ ifman->output_interface_id = TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY; return 0; diff --git a/channels/tsmf/client/tsmf_ifman.h b/channels/tsmf/client/tsmf_ifman.h index 0827ddec6..90719f85f 100644 --- a/channels/tsmf/client/tsmf_ifman.h +++ b/channels/tsmf/client/tsmf_ifman.h @@ -28,14 +28,14 @@ struct _TSMF_IFMAN const char* audio_name; const char* audio_device; BYTE presentation_id[16]; - uint32 stream_id; - uint32 message_id; + UINT32 stream_id; + UINT32 message_id; STREAM* input; - uint32 input_size; + UINT32 input_size; STREAM* output; BOOL output_pending; - uint32 output_interface_id; + UINT32 output_interface_id; }; int tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman); diff --git a/channels/tsmf/client/tsmf_main.c b/channels/tsmf/client/tsmf_main.c index 922e064ad..fd0472cfc 100644 --- a/channels/tsmf/client/tsmf_main.c +++ b/channels/tsmf/client/tsmf_main.c @@ -58,7 +58,7 @@ struct _TSMF_CHANNEL_CALLBACK IWTSVirtualChannel* channel; BYTE presentation_id[16]; - uint32 stream_id; + UINT32 stream_id; }; struct _TSMF_PLUGIN @@ -73,19 +73,19 @@ struct _TSMF_PLUGIN }; void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback, - uint32 message_id, uint64 duration, uint32 data_size) + UINT32 message_id, UINT64 duration, UINT32 data_size) { STREAM* s; int error; TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*) pChannelCallback; s = stream_new(32); - stream_write_uint32(s, TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY); - stream_write_uint32(s, message_id); - stream_write_uint32(s, PLAYBACK_ACK); /* FunctionId */ - stream_write_uint32(s, callback->stream_id); /* StreamId */ - stream_write_uint64(s, duration); /* DataDuration */ - stream_write_uint64(s, data_size); /* cbData */ + stream_write_UINT32(s, TSMF_INTERFACE_CLIENT_NOTIFICATIONS | STREAM_ID_PROXY); + stream_write_UINT32(s, message_id); + stream_write_UINT32(s, PLAYBACK_ACK); /* FunctionId */ + stream_write_UINT32(s, callback->stream_id); /* StreamId */ + stream_write_UINT64(s, duration); /* DataDuration */ + stream_write_UINT64(s, data_size); /* cbData */ DEBUG_DVC("response size %d", (int) stream_get_length(s)); error = callback->channel->Write(callback->channel, stream_get_length(s), stream_get_head(s), NULL); @@ -112,7 +112,7 @@ BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, } static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, - uint32 cbSize, + UINT32 cbSize, BYTE* pBuffer) { int length; @@ -120,9 +120,9 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, STREAM* output; int error = -1; TSMF_IFMAN ifman; - uint32 MessageId; - uint32 FunctionId; - uint32 InterfaceId; + UINT32 MessageId; + UINT32 FunctionId; + UINT32 InterfaceId; TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*) pChannelCallback; /* 2.2.1 Shared Message Header (SHARED_MSG_HEADER) */ @@ -136,9 +136,9 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, output = stream_new(256); stream_seek(output, 8); - stream_read_uint32(input, InterfaceId); - stream_read_uint32(input, MessageId); - stream_read_uint32(input, FunctionId); + stream_read_UINT32(input, InterfaceId); + stream_read_UINT32(input, MessageId); + stream_read_UINT32(input, FunctionId); DEBUG_DVC("cbSize=%d InterfaceId=0x%X MessageId=0x%X FunctionId=0x%X", cbSize, InterfaceId, MessageId, FunctionId); @@ -178,7 +178,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, case SET_CHANNEL_PARAMS: memcpy(callback->presentation_id, stream_get_tail(input), 16); stream_seek(input, 16); - stream_read_uint32(input, callback->stream_id); + stream_read_UINT32(input, callback->stream_id); DEBUG_DVC("SET_CHANNEL_PARAMS StreamId=%d", callback->stream_id); ifman.output_pending = TRUE; error = 0; @@ -314,8 +314,8 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, /* Response packet does not have FunctionId */ length = stream_get_length(output); stream_set_pos(output, 0); - stream_write_uint32(output, ifman.output_interface_id); - stream_write_uint32(output, MessageId); + stream_write_UINT32(output, ifman.output_interface_id); + stream_write_UINT32(output, MessageId); DEBUG_DVC("response size %d", length); error = callback->channel->Write(callback->channel, length, stream_get_head(output), NULL); diff --git a/channels/tsmf/client/tsmf_main.h b/channels/tsmf/client/tsmf_main.h index 892992cbc..b7b9589a8 100644 --- a/channels/tsmf/client/tsmf_main.h +++ b/channels/tsmf/client/tsmf_main.h @@ -21,7 +21,7 @@ #define __TSMF_MAIN_H void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback, - uint32 message_id, uint64 duration, uint32 data_size); + UINT32 message_id, UINT64 duration, UINT32 data_size); BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, RDP_EVENT* event); diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 31db61f40..ab091de2c 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -63,24 +63,24 @@ struct _TSMF_PRESENTATION const char* audio_device; int eos; - uint32 last_x; - uint32 last_y; - uint32 last_width; - uint32 last_height; + UINT32 last_x; + UINT32 last_y; + UINT32 last_width; + UINT32 last_height; UINT16 last_num_rects; RDP_RECT* last_rects; - uint32 output_x; - uint32 output_y; - uint32 output_width; - uint32 output_height; + UINT32 output_x; + UINT32 output_y; + UINT32 output_width; + UINT32 output_height; UINT16 output_num_rects; RDP_RECT* output_rects; IWTSVirtualChannelCallback* channel_callback; - uint64 audio_start_time; - uint64 audio_end_time; + UINT64 audio_start_time; + UINT64 audio_end_time; /* The stream list could be accessed by different threads and need to be protected. */ HANDLE mutex; @@ -90,7 +90,7 @@ struct _TSMF_PRESENTATION struct _TSMF_STREAM { - uint32 stream_id; + UINT32 stream_id; TSMF_PRESENTATION* presentation; @@ -98,18 +98,18 @@ struct _TSMF_STREAM int major_type; int eos; - uint32 width; - uint32 height; + UINT32 width; + UINT32 height; ITSMFAudioDevice* audio; - uint32 sample_rate; - uint32 channels; - uint32 bits_per_sample; + UINT32 sample_rate; + UINT32 channels; + UINT32 bits_per_sample; /* The end_time of last played sample */ - uint64 last_end_time; + UINT64 last_end_time; /* Next sample should not start before this system time. */ - uint64 next_start_time; + UINT64 next_start_time; freerdp_thread* thread; @@ -121,32 +121,32 @@ struct _TSMF_STREAM struct _TSMF_SAMPLE { - uint32 sample_id; - uint64 start_time; - uint64 end_time; - uint64 duration; - uint32 extensions; - uint32 data_size; + UINT32 sample_id; + UINT64 start_time; + UINT64 end_time; + UINT64 duration; + UINT32 extensions; + UINT32 data_size; BYTE* data; - uint32 decoded_size; - uint32 pixfmt; + UINT32 decoded_size; + UINT32 pixfmt; TSMF_STREAM* stream; IWTSVirtualChannelCallback* channel_callback; - uint64 ack_time; + UINT64 ack_time; }; static LIST* presentation_list = NULL; -static uint64 last_played_audio_time = 0; +static UINT64 last_played_audio_time = 0; static HANDLE tsmf_mutex = NULL; static int TERMINATING = 0; -static uint64 get_current_time(void) +static UINT64 get_current_time(void) { struct timeval tp; gettimeofday(&tp, 0); - return ((uint64)tp.tv_sec) * 10000000LL + ((uint64)tp.tv_usec) * 10LL; + return ((UINT64)tp.tv_sec) * 10000000LL + ((UINT64)tp.tv_usec) * 10LL; } static TSMF_SAMPLE* tsmf_stream_pop_sample(TSMF_STREAM* stream, int sync) @@ -235,7 +235,7 @@ static void tsmf_sample_queue_ack(TSMF_SAMPLE* sample) static void tsmf_stream_process_ack(TSMF_STREAM* stream) { TSMF_SAMPLE* sample; - uint64 ack_time; + UINT64 ack_time; ack_time = get_current_time(); while (list_size(stream->sample_ack_list) > 0 && !freerdp_thread_is_stopped(stream->thread)) @@ -323,7 +323,7 @@ static void tsmf_presentation_restore_last_video_frame(TSMF_PRESENTATION* presen static void tsmf_sample_playback_video(TSMF_SAMPLE* sample) { - uint64 t; + UINT64 t; RDP_VIDEO_FRAME_EVENT* vevent; TSMF_STREAM* stream = sample->stream; TSMF_PRESENTATION* presentation = stream->presentation; @@ -426,7 +426,7 @@ static void tsmf_sample_playback_video(TSMF_SAMPLE* sample) static void tsmf_sample_playback_audio(TSMF_SAMPLE* sample) { - uint64 latency = 0; + UINT64 latency = 0; TSMF_STREAM* stream = sample->stream; DEBUG_DVC("MessageId %d EndTime %d consumed.", @@ -456,9 +456,9 @@ static void tsmf_sample_playback_audio(TSMF_SAMPLE* sample) static void tsmf_sample_playback(TSMF_SAMPLE* sample) { BOOL ret = FALSE; - uint32 width; - uint32 height; - uint32 pixfmt = 0; + UINT32 width; + UINT32 height; + UINT32 pixfmt = 0; TSMF_STREAM* stream = sample->stream; if (stream->decoder) @@ -485,7 +485,7 @@ static void tsmf_sample_playback(TSMF_SAMPLE* sample) if (stream->decoder->GetDecodedFormat) { pixfmt = stream->decoder->GetDecodedFormat(stream->decoder); - if (pixfmt == ((uint32) -1)) + if (pixfmt == ((UINT32) -1)) { tsmf_sample_ack(sample); tsmf_sample_free(sample); @@ -526,9 +526,9 @@ static void tsmf_sample_playback(TSMF_SAMPLE* sample) else { TSMF_STREAM * stream = sample->stream; - uint64 ack_anticipation_time = get_current_time(); - uint64 currentRunningTime = sample->start_time; - uint32 bufferLevel = 0; + UINT64 ack_anticipation_time = get_current_time(); + UINT64 currentRunningTime = sample->start_time; + UINT32 bufferLevel = 0; if (stream->decoder->GetRunningTime) { currentRunningTime = stream->decoder->GetRunningTime(stream->decoder); @@ -738,7 +738,7 @@ static void tsmf_stream_restart(TSMF_STREAM* stream) } } -static void tsmf_stream_change_volume(TSMF_STREAM* stream, uint32 newVolume, uint32 muted) +static void tsmf_stream_change_volume(TSMF_STREAM* stream, UINT32 newVolume, UINT32 muted) { if (!stream) return; @@ -753,7 +753,7 @@ static void tsmf_stream_change_volume(TSMF_STREAM* stream, uint32 newVolume, uin } } -void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, uint32 newVolume, uint32 muted) +void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, UINT32 newVolume, UINT32 muted) { LIST_ITEM* item; TSMF_STREAM* stream; @@ -831,7 +831,7 @@ void tsmf_presentation_stop(TSMF_PRESENTATION* presentation) } void tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation, - uint32 x, uint32 y, uint32 width, uint32 height, + UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT* rects) { presentation->output_x = x; @@ -910,7 +910,7 @@ void tsmf_presentation_free(TSMF_PRESENTATION* presentation) free(presentation); } -TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, uint32 stream_id) +TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id) { TSMF_STREAM* stream; @@ -936,7 +936,7 @@ TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, uint32 stream_id) return stream; } -TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, uint32 stream_id) +TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, UINT32 stream_id) { LIST_ITEM* item; TSMF_STREAM* stream; @@ -1020,8 +1020,8 @@ void tsmf_stream_free(TSMF_STREAM* stream) } void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback, - uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions, - uint32 data_size, BYTE* data) + UINT32 sample_id, UINT64 start_time, UINT64 end_time, UINT64 duration, UINT32 extensions, + UINT32 data_size, BYTE* data) { TSMF_SAMPLE* sample; diff --git a/channels/tsmf/client/tsmf_media.h b/channels/tsmf/client/tsmf_media.h index e1d21c87c..9ba358820 100644 --- a/channels/tsmf/client/tsmf_media.h +++ b/channels/tsmf/client/tsmf_media.h @@ -38,24 +38,24 @@ void tsmf_presentation_start(TSMF_PRESENTATION* presentation); void tsmf_presentation_stop(TSMF_PRESENTATION* presentation); void tsmf_presentation_paused(TSMF_PRESENTATION* presentation); void tsmf_presentation_restarted(TSMF_PRESENTATION* presentation); -void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, uint32 newVolume, uint32 muted); +void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, UINT32 newVolume, UINT32 muted); void tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation, - uint32 x, uint32 y, uint32 width, uint32 height, + UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT* rects); void tsmf_presentation_set_audio_device(TSMF_PRESENTATION* presentation, const char* name, const char* device); void tsmf_presentation_flush(TSMF_PRESENTATION* presentation); void tsmf_presentation_free(TSMF_PRESENTATION* presentation); -TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, uint32 stream_id); -TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, uint32 stream_id); +TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id); +TSMF_STREAM* tsmf_stream_find_by_id(TSMF_PRESENTATION* presentation, UINT32 stream_id); void tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, STREAM* s); void tsmf_stream_end(TSMF_STREAM* stream); void tsmf_stream_free(TSMF_STREAM* stream); void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback, - uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions, - uint32 data_size, BYTE* data); + UINT32 sample_id, UINT64 start_time, UINT64 end_time, UINT64 duration, UINT32 extensions, + UINT32 data_size, BYTE* data); void tsmf_media_init(void); diff --git a/channels/tsmf/client/tsmf_types.h b/channels/tsmf/client/tsmf_types.h index b42e32961..0ccdafae8 100644 --- a/channels/tsmf/client/tsmf_types.h +++ b/channels/tsmf/client/tsmf_types.h @@ -40,19 +40,19 @@ typedef struct _TS_AM_MEDIA_TYPE int SubType; int FormatType; - uint32 Width; - uint32 Height; - uint32 BitRate; + UINT32 Width; + UINT32 Height; + UINT32 BitRate; struct { - uint32 Numerator; - uint32 Denominator; + UINT32 Numerator; + UINT32 Denominator; } SamplesPerSecond; - uint32 Channels; - uint32 BitsPerSample; - uint32 BlockAlign; + UINT32 Channels; + UINT32 BitsPerSample; + UINT32 BlockAlign; const BYTE* ExtraData; - uint32 ExtraDataSize; + UINT32 ExtraDataSize; } TS_AM_MEDIA_TYPE; #endif diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c index 746720ea3..45fc217ee 100644 --- a/channels/urbdrc/client/data_transfer.c +++ b/channels/urbdrc/client/data_transfer.c @@ -37,19 +37,19 @@ static void usb_process_get_port_status(IUDEVICE* pdev, BYTE* OutputBuffer) switch (bcdUSB) { case USB_v1_0: - data_write_uint32(OutputBuffer, 0x303); + data_write_UINT32(OutputBuffer, 0x303); break; case USB_v1_1: - data_write_uint32(OutputBuffer, 0x103); + data_write_UINT32(OutputBuffer, 0x103); break; case USB_v2_0: - data_write_uint32(OutputBuffer, 0x503); + data_write_UINT32(OutputBuffer, 0x503); break; default: - data_write_uint32(OutputBuffer, 0x503); + data_write_UINT32(OutputBuffer, 0x503); break; } } @@ -60,7 +60,7 @@ static int func_check_isochronous_fds(IUDEVICE* pdev) { int ret = 0; BYTE* data_temp; - uint32 size_temp, process_times = 2; + UINT32 size_temp, process_times = 2; ISOCH_CALLBACK_QUEUE* isoch_queue = NULL; ISOCH_CALLBACK_DATA* isoch = NULL; URBDRC_CHANNEL_CALLBACK* callback; @@ -118,11 +118,11 @@ static int func_check_isochronous_fds(IUDEVICE* pdev) #endif static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* callback, - BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) + BYTE* data, UINT32 data_sizem, IUDEVMAN* udevman, UINT32 UsbDevice) { IUDEVICE* pdev; - uint32 NumRequestCompletion = 0; - uint32 RequestCompletion = 0; + UINT32 NumRequestCompletion = 0; + UINT32 RequestCompletion = 0; LLOGLN(urbdrc_debug, ("urbdrc_process_register_request_callback")); @@ -133,15 +133,15 @@ static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* cal if (data_sizem >= 8) { - data_read_uint32(data + 0, NumRequestCompletion); /** must be 1 */ + data_read_UINT32(data + 0, NumRequestCompletion); /** must be 1 */ /** RequestCompletion: * unique Request Completion interface for the client to use */ - data_read_uint32(data + 4, RequestCompletion); + data_read_UINT32(data + 4, RequestCompletion); pdev->set_ReqCompletion(pdev, RequestCompletion); } else /** Unregister the device */ { - data_read_uint32(data + 0, RequestCompletion); + data_read_UINT32(data + 0, RequestCompletion); if (1)//(pdev->get_ReqCompletion(pdev) == RequestCompletion) { @@ -157,13 +157,13 @@ static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* cal return 0; } -static int urbdrc_process_cancel_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) +static int urbdrc_process_cancel_request(BYTE* data, UINT32 data_sizem, IUDEVMAN* udevman, UINT32 UsbDevice) { IUDEVICE* pdev; - uint32 CancelId; + UINT32 CancelId; int error = 0; - data_read_uint32(data + 0, CancelId); /** RequestId */ + data_read_UINT32(data + 0, CancelId); /** RequestId */ LLOGLN(urbdrc_debug, ("urbdrc_process_cancel_request: id 0x%x", CancelId)); @@ -177,12 +177,12 @@ static int urbdrc_process_cancel_request(BYTE* data, uint32 data_sizem, IUDEVMAN return error; } -static int urbdrc_process_retract_device_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice) +static int urbdrc_process_retract_device_request(BYTE* data, UINT32 data_sizem, IUDEVMAN* udevman, UINT32 UsbDevice) { - uint32 Reason; + UINT32 Reason; LLOGLN(urbdrc_debug, ("urbdrc_process_retract_device_request")); - data_read_uint32(data + 0, Reason); /** Reason */ + data_read_UINT32(data + 0, Reason); /** Reason */ switch (Reason) { @@ -201,26 +201,26 @@ static int urbdrc_process_retract_device_request(BYTE* data, uint32 data_sizem, } static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, - uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice) + UINT32 data_sizem, UINT32 MessageId, IUDEVMAN * udevman, UINT32 UsbDevice) { IUDEVICE* pdev; - uint32 out_size; - uint32 InterfaceId; - uint32 IoControlCode; - uint32 InputBufferSize; - uint32 OutputBufferSize; - uint32 RequestId; - uint32 usbd_status = USBD_STATUS_SUCCESS; + UINT32 out_size; + UINT32 InterfaceId; + UINT32 IoControlCode; + UINT32 InputBufferSize; + UINT32 OutputBufferSize; + UINT32 RequestId; + UINT32 usbd_status = USBD_STATUS_SUCCESS; BYTE* OutputBuffer; BYTE* out_data; int i, offset, success = 0; LLOGLN(urbdrc_debug, ("urbdrc_process__io_control")); - data_read_uint32(data + 0, IoControlCode); - data_read_uint32(data + 4, InputBufferSize); - data_read_uint32(data + 8 + InputBufferSize, OutputBufferSize); - data_read_uint32(data + 12 + InputBufferSize, RequestId); + data_read_UINT32(data + 0, IoControlCode); + data_read_UINT32(data + 4, InputBufferSize); + data_read_UINT32(data + 8 + InputBufferSize, OutputBufferSize); + data_read_UINT32(data + 12 + InputBufferSize, RequestId); pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -253,7 +253,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* da { if (pdev->isExist(pdev) == 0) { - data_write_uint32(OutputBuffer, 0); + data_write_UINT32(OutputBuffer, 0); } else { @@ -287,13 +287,13 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* da out_size = offset + OutputBufferSize; out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, IOCONTROL_COMPLETION); /** function id */ - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, USBD_STATUS_SUCCESS); /** HResult */ - data_write_uint32(out_data + 20, OutputBufferSize); /** Information */ - data_write_uint32(out_data + 24, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 8, IOCONTROL_COMPLETION); /** function id */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, USBD_STATUS_SUCCESS); /** HResult */ + data_write_UINT32(out_data + 20, OutputBufferSize); /** Information */ + data_write_UINT32(out_data + 24, OutputBufferSize); /** OutputBufferSize */ for (i=0;iget_udevice_by_UsbDevice(udevman, UsbDevice); @@ -339,14 +339,14 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, out_size = 32; out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, IOCONTROL_COMPLETION); /** function id */ - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0); /** HResult */ - data_write_uint32(out_data + 20, 4); /** Information */ - data_write_uint32(out_data + 24, 4); /** OutputBufferSize */ - data_write_uint32(out_data + 28, frames); /** OutputBuffer */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 8, IOCONTROL_COMPLETION); /** function id */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0); /** HResult */ + data_write_UINT32(out_data + 20, 4); /** Information */ + data_write_UINT32(out_data + 24, 4); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, frames); /** OutputBuffer */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -357,22 +357,22 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, } static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, - uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice) + UINT32 data_sizem, UINT32 MessageId, IUDEVMAN* udevman, UINT32 UsbDevice) { IUDEVICE* pdev; - uint32 out_size; - uint32 InterfaceId; - uint32 TextType; - uint32 LocaleId; - uint32 bufferSize = 1024; + UINT32 out_size; + UINT32 InterfaceId; + UINT32 TextType; + UINT32 LocaleId; + UINT32 bufferSize = 1024; BYTE* out_data; BYTE DeviceDescription[bufferSize]; int out_offset; LLOGLN(urbdrc_debug, ("urbdrc_process_query_device_text")); - data_read_uint32(data + 0, TextType); - data_read_uint32(data + 4, LocaleId); + data_read_UINT32(data + 0, TextType); + data_read_UINT32(data + 4, LocaleId); pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -392,12 +392,12 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, B out_data = (BYTE*) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if (bufferSize != 0) { - data_write_uint32(out_data + 8, (bufferSize/2)+1); /** cchDeviceDescription */ + data_write_UINT32(out_data + 8, (bufferSize/2)+1); /** cchDeviceDescription */ out_offset = 12; memcpy(out_data + out_offset, DeviceDescription, bufferSize); out_offset += bufferSize; @@ -406,11 +406,11 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, B } else { - data_write_uint32(out_data + 8, 0); /** cchDeviceDescription */ + data_write_UINT32(out_data + 8, 0); /** cchDeviceDescription */ out_offset = 12; } - data_write_uint32(out_data + out_offset, 0); /** HResult */ + data_write_UINT32(out_data + out_offset, 0); /** HResult */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -425,7 +425,7 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_ int inum; MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces = MsConfig->MsInterfaces; BYTE InterfaceNumber, AlternateSetting; - uint32 NumInterfaces = MsConfig->NumInterfaces; + UINT32 NumInterfaces = MsConfig->NumInterfaces; for (inum = 0; inum < NumInterfaces; inum++) { @@ -436,11 +436,11 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_ } static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, - uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) + UINT32 data_sizem, UINT32 MessageId, IUDEVMAN* udevman, UINT32 UsbDevice, int transferDir) { MSUSB_CONFIG_DESCRIPTOR * MsConfig = NULL; IUDEVICE* pdev = NULL; - uint32 out_size, InterfaceId, RequestId, NumInterfaces, usbd_status = 0; + UINT32 out_size, InterfaceId, RequestId, NumInterfaces, usbd_status = 0; BYTE ConfigurationDescriptorIsValid; BYTE* out_data; int MsOutSize = 0, offset = 0; @@ -457,9 +457,9 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* dat return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_BYTE(data + 4, ConfigurationDescriptorIsValid); - data_read_uint32(data + 8, NumInterfaces); + data_read_UINT32(data + 8, NumInterfaces); offset = 12; /** if ConfigurationDescriptorIsValid is zero, then just do nothing.*/ @@ -484,26 +484,26 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* dat out_size = 44; out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); /** function id */ - data_write_uint32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); /** function id */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ if (MsOutSize > 0) { /** CbTsUrbResult */ - data_write_uint32(out_data + 16, 8 + MsOutSize); + data_write_UINT32(out_data + 16, 8 + MsOutSize); /** TS_URB_RESULT_HEADER Size*/ data_write_UINT16(out_data + 20, 8 + MsOutSize); } else { - data_write_uint32(out_data + 16, 16); + data_write_UINT32(out_data + 16, 16); data_write_UINT16(out_data + 20, 16); } /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ offset = 28; /** TS_URB_SELECT_CONFIGURATION_RESULT */ if (MsOutSize > 0) @@ -512,12 +512,12 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* dat } else { - data_write_uint32(out_data + offset, 0); /** ConfigurationHandle */ - data_write_uint32(out_data + offset + 4, NumInterfaces); /** NumInterfaces */ + data_write_UINT32(out_data + offset, 0); /** ConfigurationHandle */ + data_write_UINT32(out_data + offset + 4, NumInterfaces); /** NumInterfaces */ offset += 8; } - data_write_uint32(out_data + offset, 0); /** HResult */ - data_write_uint32(out_data + offset + 4, 0); /** OutputBufferSize */ + data_write_UINT32(out_data + offset, 0); /** HResult */ + data_write_UINT32(out_data + offset + 4, 0); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -525,14 +525,14 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* dat return 0; } -static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem, - uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) +static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN* udevman, UINT32 UsbDevice, int transferDir) { MSUSB_CONFIG_DESCRIPTOR* MsConfig; MSUSB_INTERFACE_DESCRIPTOR* MsInterface; IUDEVICE* pdev; - uint32 out_size, InterfaceId, RequestId, ConfigurationHandle; - uint32 OutputBufferSize; + UINT32 out_size, InterfaceId, RequestId, ConfigurationHandle; + UINT32 OutputBufferSize; BYTE InterfaceNumber; BYTE* out_data; int out_offset, interface_size; @@ -550,13 +550,13 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, u InterfaceId = ((STREAM_ID_PROXY << 30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, ConfigurationHandle); + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, ConfigurationHandle); out_offset = 8; MsInterface = msusb_msinterface_read(data + out_offset, data_sizem - out_offset, &out_offset); - data_read_uint32(data + out_offset, OutputBufferSize); + data_read_UINT32(data + out_offset, OutputBufferSize); pdev->select_interface(pdev, MsInterface->InterfaceNumber, MsInterface->AlternateSetting); @@ -574,23 +574,23 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, u out_data = (BYTE*) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); /** function id */ - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 8 + interface_size); /** CbTsUrbResult */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); /** function id */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 8 + interface_size); /** CbTsUrbResult */ /** TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 8 + interface_size); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE); - data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ + data_write_UINT32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ out_offset = 28; /** TS_URB_SELECT_INTERFACE_RESULT */ msusb_msinterface_write(MsInterface, out_data + out_offset, &out_offset); - data_write_uint32(out_data + out_offset, 0); /** HResult */ - data_write_uint32(out_data + out_offset + 4, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + out_offset, 0); /** HResult */ + data_write_UINT32(out_data + out_offset + 4, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -601,11 +601,11 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, u } static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, - uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir, int External) + UINT32 data_sizem, UINT32 MessageId, IUDEVMAN* udevman, UINT32 UsbDevice, int transferDir, int External) { IUDEVICE* pdev; - uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; - uint32 TransferFlags, OutputBufferSize, usbd_status, Timeout; + UINT32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; + UINT32 TransferFlags, OutputBufferSize, usbd_status, Timeout; BYTE bmRequestType, Request; UINT16 Value, Index, length; BYTE* buffer; @@ -618,9 +618,9 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, return 0; InterfaceId = ((STREAM_ID_PROXY << 30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, PipeHandle); - data_read_uint32(data + 8, TransferFlags); /** TransferFlags */ + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, PipeHandle); + data_read_UINT32(data + 8, TransferFlags); /** TransferFlags */ EndpointAddress = (PipeHandle & 0x000000ff); offset = 12; @@ -629,7 +629,7 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, switch (External) { case URB_CONTROL_TRANSFER_EXTERNAL: - data_read_uint32(data + offset, Timeout); /** TransferFlags */ + data_read_UINT32(data + offset, Timeout); /** TransferFlags */ offset += 4; break; case URB_CONTROL_TRANSFER_NONEXTERNAL: @@ -642,7 +642,7 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, data_read_UINT16(data + offset + 2, Value); data_read_UINT16(data + offset + 4, Index); data_read_UINT16(data + offset + 6, length); - data_read_uint32(data + offset + 8, OutputBufferSize); + data_read_UINT32(data + offset + 8, OutputBufferSize); offset += 12; if (length != OutputBufferSize) @@ -685,24 +685,24 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, else out_size = offset; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(transferDir == USBD_TRANSFER_DIRECTION_IN && OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -713,11 +713,11 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, } static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, - uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir) + UINT32 data_sizem, UINT32 MessageId, IUDEVMAN* udevman, UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; - uint32 TransferFlags, OutputBufferSize, usbd_status = 0; + UINT32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle; + UINT32 TransferFlags, OutputBufferSize, usbd_status = 0; BYTE * Buffer; BYTE * out_data; int offset; @@ -728,10 +728,10 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYT InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, PipeHandle); - data_read_uint32(data + 8, TransferFlags); /** TransferFlags */ - data_read_uint32(data + 12, OutputBufferSize); + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, PipeHandle); + data_read_UINT32(data + 8, TransferFlags); /** TransferFlags */ + data_read_UINT32(data + 12, OutputBufferSize); offset = 16; EndpointAddress = (PipeHandle & 0x000000ff); @@ -767,23 +767,23 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYT else out_size = offset; /** send data */ - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(transferDir == USBD_TRANSFER_DIRECTION_IN && OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (pdev && !pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -796,18 +796,18 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYT static int urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 RequestId, InterfaceId, EndpointAddress; - uint32 PipeHandle, TransferFlags, StartFrame, NumberOfPackets; - uint32 ErrorCount, OutputBufferSize, usbd_status = 0; - uint32 RequestField, noAck = 0; - uint32 out_size = 0; + UINT32 RequestId, InterfaceId, EndpointAddress; + UINT32 PipeHandle, TransferFlags, StartFrame, NumberOfPackets; + UINT32 ErrorCount, OutputBufferSize, usbd_status = 0; + UINT32 RequestField, noAck = 0; + UINT32 out_size = 0; BYTE * iso_buffer = NULL; BYTE * iso_packets = NULL; BYTE * out_data = NULL; @@ -820,17 +820,17 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestField); + data_read_UINT32(data + 0, RequestField); RequestId = RequestField & 0x7fffffff; noAck = (RequestField & 0x80000000)>>31; - data_read_uint32(data + 4, PipeHandle); + data_read_UINT32(data + 4, PipeHandle); EndpointAddress = (PipeHandle & 0x000000ff); - data_read_uint32(data + 8, TransferFlags); /** TransferFlags */ - data_read_uint32(data + 12, StartFrame); /** StartFrame */ - data_read_uint32(data + 16, NumberOfPackets); /** NumberOfPackets */ - data_read_uint32(data + 20, ErrorCount); /** ErrorCount */ + data_read_UINT32(data + 8, TransferFlags); /** TransferFlags */ + data_read_UINT32(data + 12, StartFrame); /** StartFrame */ + data_read_UINT32(data + 16, NumberOfPackets); /** NumberOfPackets */ + data_read_UINT32(data + 20, ErrorCount); /** ErrorCount */ offset = 24 + (NumberOfPackets * 12); - data_read_uint32(data + offset, OutputBufferSize); + data_read_UINT32(data + offset, OutputBufferSize); offset += 4; /** send data memory alloc */ @@ -908,37 +908,37 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, else out_size += OutputBufferSize + (NumberOfPackets * 12); /* fill the send data */ - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(OutputBufferSize != 0 && !nullBuffer) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 20 + (NumberOfPackets * 12)); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 20 + (NumberOfPackets * 12)); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 20 + (NumberOfPackets * 12)); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, StartFrame); /** StartFrame */ + data_write_UINT32(out_data + 28, StartFrame); /** StartFrame */ if (!nullBuffer) { /** NumberOfPackets */ - data_write_uint32(out_data + 32, NumberOfPackets); - data_write_uint32(out_data + 36, ErrorCount); /** ErrorCount */ + data_write_UINT32(out_data + 32, NumberOfPackets); + data_write_UINT32(out_data + 36, ErrorCount); /** ErrorCount */ offset = 40 + (NumberOfPackets * 12); } else { - data_write_uint32(out_data + 32, 0); /** NumberOfPackets */ - data_write_uint32(out_data + 36, NumberOfPackets); /** ErrorCount */ + data_write_UINT32(out_data + 32, 0); /** NumberOfPackets */ + data_write_UINT32(out_data + 36, NumberOfPackets); /** ErrorCount */ offset = 40; } - data_write_uint32(out_data + offset, 0); /** HResult */ - data_write_uint32(out_data + offset + 4, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + offset, 0); /** HResult */ + data_write_UINT32(out_data + offset + 4, OutputBufferSize); /** OutputBufferSize */ #if ISOCH_FIFO if(!noAck){ @@ -962,15 +962,15 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, static int urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, BYTE func_recipient, int transferDir) { IUDEVICE * pdev; - uint32 out_size, InterfaceId, RequestId, OutputBufferSize, usbd_status; + UINT32 out_size, InterfaceId, RequestId, OutputBufferSize, usbd_status; BYTE bmRequestType, desc_index, desc_type; UINT16 langId; BYTE * buffer; @@ -981,11 +981,11 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, if (pdev == NULL) return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_BYTE(data + 4, desc_index); data_read_BYTE(data + 5, desc_type); data_read_UINT16(data + 6, langId); - data_read_uint32(data + 8, OutputBufferSize); + data_read_UINT32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; out_data = (BYTE *) malloc(out_size); @@ -1031,18 +1031,18 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, offset = 36; out_size = offset + OutputBufferSize; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1056,15 +1056,15 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, BYTE func_recipient, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; UINT16 Index; BYTE bmRequestType; BYTE * buffer; @@ -1081,9 +1081,9 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_UINT16(data + 4, Index); /** Index */ - data_read_uint32(data + 8, OutputBufferSize); + data_read_UINT32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; out_data = (BYTE *) malloc(out_size); @@ -1119,24 +1119,24 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, else out_size = offset; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(transferDir == USBD_TRANSFER_DIRECTION_IN && OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId, include NoAck*/ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1149,17 +1149,17 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, static int urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, BYTE func_type, BYTE func_recipient, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, TransferFlags, usbd_status; - uint32 OutputBufferSize; + UINT32 out_size, RequestId, InterfaceId, TransferFlags, usbd_status; + UINT32 OutputBufferSize; BYTE ReqTypeReservedBits, Request, bmRequestType; UINT16 Value, Index, Padding; BYTE * buffer; @@ -1172,14 +1172,14 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, TransferFlags); /** TransferFlags */ + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, TransferFlags); /** TransferFlags */ data_read_BYTE(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */ data_read_BYTE(data + 9, Request); /** Request */ data_read_UINT16(data + 10, Value); /** value */ data_read_UINT16(data + 12, Index); /** index */ data_read_UINT16(data + 14, Padding); /** Padding */ - data_read_uint32(data + 16, OutputBufferSize); + data_read_UINT32(data + 16, OutputBufferSize); offset = 20; out_size = 36 + OutputBufferSize; @@ -1229,23 +1229,23 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, else out_size = offset; /** send data */ - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(transferDir == USBD_TRANSFER_DIRECTION_IN && OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId, include NoAck*/ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 12, RequestId); /** RequestId, include NoAck*/ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE); /** Padding, MUST be ignored upon receipt */ - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1259,14 +1259,14 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; BYTE Recipient, InterfaceNumber, Ms_PageIndex; UINT16 Ms_featureDescIndex; BYTE * out_data; @@ -1278,13 +1278,13 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_BYTE(data + 4, Recipient); /** Recipient */ Recipient = Recipient && 0x1f; data_read_BYTE(data + 5, InterfaceNumber); /** InterfaceNumber */ data_read_BYTE(data + 6, Ms_PageIndex); /** Ms_PageIndex */ data_read_UINT16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */ - data_read_uint32(data + 12, OutputBufferSize); + data_read_UINT32(data + 12, OutputBufferSize); offset = 16; out_size = 36 + OutputBufferSize; @@ -1325,23 +1325,23 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, offset = 36; out_size = offset + OutputBufferSize; /** send data */ - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if(OutputBufferSize!=0) - data_write_uint32(out_data + 8, URB_COMPLETION); /** function id */ + data_write_UINT32(out_data + 8, URB_COMPLETION); /** function id */ else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1355,16 +1355,16 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir, int action) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, PipeHandle, EndpointAddress; - uint32 OutputBufferSize, usbd_status = 0; + UINT32 out_size, RequestId, InterfaceId, PipeHandle, EndpointAddress; + UINT32 OutputBufferSize, usbd_status = 0; BYTE * out_data; int out_offset, ret; @@ -1378,9 +1378,9 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, PipeHandle); /** PipeHandle */ - data_read_uint32(data + 8, OutputBufferSize); + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, PipeHandle); /** PipeHandle */ + data_read_UINT32(data + 8, OutputBufferSize); EndpointAddress = (PipeHandle & 0x000000ff); @@ -1422,21 +1422,21 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, out_size = out_offset + OutputBufferSize; out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 0x00000008); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 0x00000008); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 0x0008); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, 0); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, 0); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1450,15 +1450,15 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, static int urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize; - uint32 dummy_frames; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize; + UINT32 dummy_frames; BYTE * out_data; if (transferDir == 0){ @@ -1472,8 +1472,8 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, OutputBufferSize); + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, OutputBufferSize); /** Fixme: Need to fill actual frame number!!*/ urbdrc_get_mstime(dummy_frames); @@ -1481,22 +1481,22 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, out_size = 40; out_data = (BYTE *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 12); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 12); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 12); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER); - data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ - data_write_uint32(out_data + 28, dummy_frames); /** FrameNumber */ + data_write_UINT32(out_data + 24, USBD_STATUS_SUCCESS); /** UsbdStatus */ + data_write_UINT32(out_data + 28, dummy_frames); /** FrameNumber */ - data_write_uint32(out_data + 32, 0); /** HResult */ - data_write_uint32(out_data + 36, 0); /** OutputBufferSize */ + data_write_UINT32(out_data + 32, 0); /** HResult */ + data_write_UINT32(out_data + 36, 0); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1509,14 +1509,14 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback, static int urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; BYTE * buffer; BYTE * out_data; int ret, offset; @@ -1532,8 +1532,8 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); - data_read_uint32(data + 4, OutputBufferSize); + data_read_UINT32(data + 0, RequestId); + data_read_UINT32(data + 4, OutputBufferSize); out_size = 36 + OutputBufferSize; out_data = (BYTE *) malloc(out_size); @@ -1559,24 +1559,24 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, offset = 36; out_size = offset + OutputBufferSize; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if (OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); + data_write_UINT32(out_data + 8, URB_COMPLETION); else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1588,14 +1588,14 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; UINT16 interface; BYTE * buffer; BYTE * out_data; @@ -1611,9 +1611,9 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_UINT16(data + 4, interface); - data_read_uint32(data + 8, OutputBufferSize); + data_read_UINT32(data + 8, OutputBufferSize); out_size = 36 + OutputBufferSize; out_data = (BYTE *) malloc(out_size); @@ -1637,24 +1637,24 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, offset = 36; out_size = offset + OutputBufferSize; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if (OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); + data_write_UINT32(out_data + 8, URB_COMPLETION); else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) callback->channel->Write(callback->channel, out_size, out_data, NULL); @@ -1664,16 +1664,16 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback, static int urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, BYTE func_recipient, BYTE command, int transferDir) { IUDEVICE * pdev; - uint32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; + UINT32 out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status; UINT16 FeatureSelector, Index; BYTE bmRequestType, bmRequest; BYTE * buffer; @@ -1685,10 +1685,10 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, return 0; InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev)); - data_read_uint32(data + 0, RequestId); + data_read_UINT32(data + 0, RequestId); data_read_UINT16(data + 4, FeatureSelector); data_read_UINT16(data + 6, Index); - data_read_uint32(data + 8, OutputBufferSize); + data_read_UINT32(data + 8, OutputBufferSize); offset = 12; out_size = 36 + OutputBufferSize; @@ -1739,24 +1739,24 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, offset = 36; out_size = offset + OutputBufferSize; - data_write_uint32(out_data + 0, InterfaceId); /** interface */ - data_write_uint32(out_data + 4, MessageId); /** message id */ + data_write_UINT32(out_data + 0, InterfaceId); /** interface */ + data_write_UINT32(out_data + 4, MessageId); /** message id */ if (OutputBufferSize != 0) - data_write_uint32(out_data + 8, URB_COMPLETION); + data_write_UINT32(out_data + 8, URB_COMPLETION); else - data_write_uint32(out_data + 8, URB_COMPLETION_NO_DATA); - data_write_uint32(out_data + 12, RequestId); /** RequestId */ - data_write_uint32(out_data + 16, 8); /** CbTsUrbResult */ + data_write_UINT32(out_data + 8, URB_COMPLETION_NO_DATA); + data_write_UINT32(out_data + 12, RequestId); /** RequestId */ + data_write_UINT32(out_data + 16, 8); /** CbTsUrbResult */ /** TsUrbResult TS_URB_RESULT_HEADER */ data_write_UINT16(out_data + 20, 8); /** Size */ /** Padding, MUST be ignored upon receipt */ data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE); - data_write_uint32(out_data + 24, usbd_status); /** UsbdStatus */ + data_write_UINT32(out_data + 24, usbd_status); /** UsbdStatus */ - data_write_uint32(out_data + 28, 0); /** HResult */ - data_write_uint32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ + data_write_UINT32(out_data + 28, 0); /** HResult */ + data_write_UINT32(out_data + 32, OutputBufferSize); /** OutputBufferSize */ if (!pdev->isSigToEnd(pdev)) @@ -1767,26 +1767,26 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, static int urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data, - uint32 data_sizem, - uint32 MessageId, + UINT32 data_sizem, + UINT32 MessageId, IUDEVMAN * udevman, - uint32 UsbDevice, + UINT32 UsbDevice, int transferDir) { IUDEVICE * pdev; - uint32 CbTsUrb; + UINT32 CbTsUrb; UINT16 Size; UINT16 URB_Function; - uint32 OutputBufferSize; + UINT32 OutputBufferSize; int error = 0; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); if (pdev == NULL) return 0; - data_read_uint32(data + 0, CbTsUrb); /** CbTsUrb */ + data_read_UINT32(data + 0, CbTsUrb); /** CbTsUrb */ data_read_UINT16(data + 4, Size); /** size */ data_read_UINT16(data + 6, URB_Function); - data_read_uint32(data + 4 + CbTsUrb, OutputBufferSize); + data_read_UINT32(data + 4 + CbTsUrb, OutputBufferSize); switch (URB_Function) { @@ -2303,11 +2303,11 @@ urbdrc_process_udev_data_transfer(void* arg) TRANSFER_DATA* transfer_data = (TRANSFER_DATA*) arg; URBDRC_CHANNEL_CALLBACK * callback = transfer_data->callback; BYTE * pBuffer = transfer_data->pBuffer; - uint32 cbSize = transfer_data->cbSize; - uint32 UsbDevice = transfer_data->UsbDevice; + UINT32 cbSize = transfer_data->cbSize; + UINT32 UsbDevice = transfer_data->UsbDevice; IUDEVMAN * udevman = transfer_data->udevman; - uint32 MessageId; - uint32 FunctionId; + UINT32 MessageId; + UINT32 FunctionId; IUDEVICE* pdev; int error = 0; pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice); @@ -2327,8 +2327,8 @@ urbdrc_process_udev_data_transfer(void* arg) /* USB kernel driver detach!! */ pdev->detach_kernel_driver(pdev); - data_read_uint32(pBuffer + 0, MessageId); - data_read_uint32(pBuffer + 4, FunctionId); + data_read_UINT32(pBuffer + 0, MessageId); + data_read_UINT32(pBuffer + 4, FunctionId); switch (FunctionId) { case CANCEL_REQUEST: diff --git a/channels/urbdrc/client/isoch_queue.h b/channels/urbdrc/client/isoch_queue.h index 0aacb1c2a..14e3b5cf3 100644 --- a/channels/urbdrc/client/isoch_queue.h +++ b/channels/urbdrc/client/isoch_queue.h @@ -35,7 +35,7 @@ struct _ISOCH_CALLBACK_DATA void * next; void * device; BYTE * out_data; - uint32 out_size; + UINT32 out_size; void * callback; }; diff --git a/channels/urbdrc/client/searchman.c b/channels/urbdrc/client/searchman.c index 12ee8b1cb..1d760c5da 100644 --- a/channels/urbdrc/client/searchman.c +++ b/channels/urbdrc/client/searchman.c @@ -180,7 +180,7 @@ void searchman_free(USB_SEARCHMAN* self) free(self); } -USB_SEARCHMAN* searchman_new(void * urbdrc, uint32 UsbDevice) +USB_SEARCHMAN* searchman_new(void * urbdrc, UINT32 UsbDevice) { int ret; USB_SEARCHMAN* searchman; diff --git a/channels/urbdrc/client/searchman.h b/channels/urbdrc/client/searchman.h index d83d17aa5..c6d20c511 100644 --- a/channels/urbdrc/client/searchman.h +++ b/channels/urbdrc/client/searchman.h @@ -38,7 +38,7 @@ typedef struct _USB_SEARCHMAN USB_SEARCHMAN; struct _USB_SEARCHMAN { int usb_numbers; - uint32 UsbDevice; + UINT32 UsbDevice; USB_SEARCHDEV * idev; /* iterator device */ USB_SEARCHDEV * head; /* head device in linked list */ USB_SEARCHDEV * tail; /* tail device in linked list */ @@ -71,7 +71,7 @@ struct _USB_SEARCHMAN void (*free) (USB_SEARCHMAN* searchman); }; -USB_SEARCHMAN * searchman_new(void * urbdrc, uint32 UsbDevice); +USB_SEARCHMAN * searchman_new(void * urbdrc, UINT32 UsbDevice); #endif diff --git a/channels/urbdrc/client/urbdrc_main.c b/channels/urbdrc/client/urbdrc_main.c index f5ce42e12..270b7ca1d 100644 --- a/channels/urbdrc/client/urbdrc_main.c +++ b/channels/urbdrc/client/urbdrc_main.c @@ -185,14 +185,14 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data) { int noAck = 0; IUDEVICE* pdev; - uint32 FunctionId; - uint32 RequestField; + UINT32 FunctionId; + UINT32 RequestField; UINT16 URB_Function; IUDEVMAN* udevman = transfer_data->udevman; if (transfer_data->cbSize >= 8) { - data_read_uint32(transfer_data->pBuffer + 4, FunctionId); + data_read_UINT32(transfer_data->pBuffer + 4, FunctionId); if ((FunctionId == TRANSFER_IN_REQUEST || FunctionId == TRANSFER_OUT_REQUEST) && @@ -203,7 +203,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data) if (URB_Function == URB_FUNCTION_ISOCH_TRANSFER && transfer_data->cbSize >= 20) { - data_read_uint32(transfer_data->pBuffer + 16, RequestField); + data_read_UINT32(transfer_data->pBuffer + 16, RequestField); noAck = (RequestField & 0x80000000)>>31; if (!noAck) @@ -218,66 +218,66 @@ static void func_lock_isoch_mutex(TRANSFER_DATA* transfer_data) #endif -static int urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback, char* data, uint32 data_sizem, uint32 MessageId) +static int urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId) { - uint32 InterfaceId; - uint32 Version; - uint32 out_size; + UINT32 InterfaceId; + UINT32 Version; + UINT32 out_size; char * out_data; LLOGLN(10, ("urbdrc_process_capability_request")); - data_read_uint32(data + 0, Version); + data_read_UINT32(data + 0, Version); InterfaceId = ((STREAM_ID_NONE<<30) | CAPABILITIES_NEGOTIATOR); out_size = 16; out_data = (char *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /* interface id */ - data_write_uint32(out_data + 4, MessageId); /* message id */ - data_write_uint32(out_data + 8, Version); /* usb protocol version */ - data_write_uint32(out_data + 12, 0x00000000); /* HRESULT */ + data_write_UINT32(out_data + 0, InterfaceId); /* interface id */ + data_write_UINT32(out_data + 4, MessageId); /* message id */ + data_write_UINT32(out_data + 8, Version); /* usb protocol version */ + data_write_UINT32(out_data + 12, 0x00000000); /* HRESULT */ callback->channel->Write(callback->channel, out_size, (BYTE*) out_data, NULL); zfree(out_data); return 0; } -static int urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char* data, uint32 data_sizem, uint32 MessageId) +static int urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char* data, UINT32 data_sizem, UINT32 MessageId) { - uint32 InterfaceId; - uint32 out_size; - uint32 MajorVersion; - uint32 MinorVersion; - uint32 Capabilities; + UINT32 InterfaceId; + UINT32 out_size; + UINT32 MajorVersion; + UINT32 MinorVersion; + UINT32 Capabilities; char* out_data; LLOGLN(10, ("urbdrc_process_channel_create")); - data_read_uint32(data + 0, MajorVersion); - data_read_uint32(data + 4, MinorVersion); - data_read_uint32(data + 8, Capabilities); + data_read_UINT32(data + 0, MajorVersion); + data_read_UINT32(data + 4, MinorVersion); + data_read_UINT32(data + 8, Capabilities); InterfaceId = ((STREAM_ID_PROXY<<30) | CLIENT_CHANNEL_NOTIFICATION); out_size = 24; out_data = (char *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /* interface id */ - data_write_uint32(out_data + 4, MessageId); /* message id */ - data_write_uint32(out_data + 8, CHANNEL_CREATED); /* function id */ - data_write_uint32(out_data + 12, MajorVersion); - data_write_uint32(out_data + 16, MinorVersion); - data_write_uint32(out_data + 20, Capabilities); /* capabilities version */ + data_write_UINT32(out_data + 0, InterfaceId); /* interface id */ + data_write_UINT32(out_data + 4, MessageId); /* message id */ + data_write_UINT32(out_data + 8, CHANNEL_CREATED); /* function id */ + data_write_UINT32(out_data + 12, MajorVersion); + data_write_UINT32(out_data + 16, MinorVersion); + data_write_UINT32(out_data + 20, Capabilities); /* capabilities version */ callback->channel->Write(callback->channel, out_size, (BYTE *)out_data, NULL); zfree(out_data); return 0; } -static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 MessageId) +static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, UINT32 MessageId) { - uint32 out_size; - uint32 InterfaceId; + UINT32 out_size; + UINT32 InterfaceId; char* out_data; LLOGLN(10, ("urdbrc_send_virtual_channel_add")); @@ -287,9 +287,9 @@ static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 M out_size = 12; out_data = (char *) malloc(out_size); memset(out_data, 0, out_size); - data_write_uint32(out_data + 0, InterfaceId); /* interface */ - data_write_uint32(out_data + 4, MessageId); /* message id */ - data_write_uint32(out_data + 8, ADD_VIRTUAL_CHANNEL); /* function id */ + data_write_UINT32(out_data + 0, InterfaceId); /* interface */ + data_write_UINT32(out_data + 4, MessageId); /* message id */ + data_write_UINT32(out_data + 8, ADD_VIRTUAL_CHANNEL); /* function id */ channel->Write(channel, out_size, (BYTE*) out_data, NULL); zfree(out_data); @@ -300,7 +300,7 @@ static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 M static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVICE* pdev) { char* out_data; - uint32 InterfaceId; + UINT32 InterfaceId; char HardwareIds[2][DEVICE_HARDWARE_ID_SIZE]; char CompatibilityIds[3][DEVICE_COMPATIBILITY_ID_SIZE]; char strContainerId[DEVICE_CONTAINER_STR_SIZE]; @@ -343,16 +343,16 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC out_data = (char*) malloc(size); memset(out_data, 0, size); - data_write_uint32(out_data + 0, InterfaceId); /* interface */ - data_write_uint32(out_data + 4, 0); /* message id */ - data_write_uint32(out_data + 8, ADD_DEVICE); /* function id */ - data_write_uint32(out_data + 12, 0x00000001); /* NumUsbDevice */ - data_write_uint32(out_data + 16, pdev->get_UsbDevice(pdev)); /* UsbDevice */ - data_write_uint32(out_data + 20, 0x00000025); /* cchDeviceInstanceId */ + data_write_UINT32(out_data + 0, InterfaceId); /* interface */ + data_write_UINT32(out_data + 4, 0); /* message id */ + data_write_UINT32(out_data + 8, ADD_DEVICE); /* function id */ + data_write_UINT32(out_data + 12, 0x00000001); /* NumUsbDevice */ + data_write_UINT32(out_data + 16, pdev->get_UsbDevice(pdev)); /* UsbDevice */ + data_write_UINT32(out_data + 20, 0x00000025); /* cchDeviceInstanceId */ out_offset = fun_device_string_send_set(out_data, out_offset, strInstanceId); - data_write_uint32(out_data + out_offset, 0x00000036); /* cchHwIds */ + data_write_UINT32(out_data + out_offset, 0x00000036); /* cchHwIds */ out_offset += 4; /* HardwareIds 1 */ out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[0]); @@ -361,7 +361,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */ out_offset += 2; - data_write_uint32(out_data + out_offset, cchCompatIds); /* cchCompatIds */ + data_write_UINT32(out_data + out_offset, cchCompatIds); /* cchCompatIds */ out_offset += 4; /* CompatibilityIds 1 */ out_offset = fun_device_string_send_set(out_data, out_offset, CompatibilityIds[0]); @@ -376,27 +376,27 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */ out_offset += 2; - data_write_uint32(out_data + out_offset, 0x00000027); /* cchContainerId */ + data_write_UINT32(out_data + out_offset, 0x00000027); /* cchContainerId */ out_offset += 4; /* ContainerId */ out_offset = fun_device_string_send_set(out_data, out_offset, strContainerId); /* USB_DEVICE_CAPABILITIES 28 bytes */ - data_write_uint32(out_data + out_offset, 0x0000001c); /* CbSize */ - data_write_uint32(out_data + out_offset + 4, 2); /* UsbBusInterfaceVersion, 0 ,1 or 2 */ - data_write_uint32(out_data + out_offset + 8, 0x600); /* USBDI_Version, 0x500 or 0x600 */ + data_write_UINT32(out_data + out_offset, 0x0000001c); /* CbSize */ + data_write_UINT32(out_data + out_offset + 4, 2); /* UsbBusInterfaceVersion, 0 ,1 or 2 */ + data_write_UINT32(out_data + out_offset + 8, 0x600); /* USBDI_Version, 0x500 or 0x600 */ /* Supported_USB_Version, 0x110,0x110 or 0x200(usb2.0) */ bcdUSB = pdev->query_device_descriptor(pdev, BCD_USB); - data_write_uint32(out_data + out_offset + 12, bcdUSB); - data_write_uint32(out_data + out_offset + 16, 0x00000000); /* HcdCapabilities, MUST always be zero */ + data_write_UINT32(out_data + out_offset + 12, bcdUSB); + data_write_UINT32(out_data + out_offset + 16, 0x00000000); /* HcdCapabilities, MUST always be zero */ if (bcdUSB < 0x200) - data_write_uint32(out_data + out_offset + 20, 0x00000000); /* DeviceIsHighSpeed */ + data_write_UINT32(out_data + out_offset + 20, 0x00000000); /* DeviceIsHighSpeed */ else - data_write_uint32(out_data + out_offset + 20, 0x00000001); /* DeviceIsHighSpeed */ + data_write_UINT32(out_data + out_offset + 20, 0x00000001); /* DeviceIsHighSpeed */ - data_write_uint32(out_data + out_offset + 24, 0x50); /* NoAckIsochWriteJitterBufferSizeInMs, >=10 or <=512 */ + data_write_UINT32(out_data + out_offset + 24, 0x50); /* NoAckIsochWriteJitterBufferSizeInMs, >=10 or <=512 */ out_offset += 28; callback->channel->Write(callback->channel, out_offset, (BYTE *)out_data, NULL); @@ -405,15 +405,15 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC return 0; } -static int urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, uint32 cbSize) +static int urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize) { - uint32 MessageId; - uint32 FunctionId; + UINT32 MessageId; + UINT32 FunctionId; int error = 0; - data_read_uint32(pBuffer + 0, MessageId); - data_read_uint32(pBuffer + 4, FunctionId); + data_read_UINT32(pBuffer + 0, MessageId); + data_read_UINT32(pBuffer + 4, FunctionId); switch (FunctionId) { @@ -661,16 +661,16 @@ void* urbdrc_new_device_create(void * arg) BYTE* pBuffer = transfer_data->pBuffer; IUDEVMAN* udevman = transfer_data->udevman; IUDEVICE* pdev = NULL; - uint32 ChannelId = 0; - uint32 MessageId; - uint32 FunctionId; + UINT32 ChannelId = 0; + UINT32 MessageId; + UINT32 FunctionId; int i = 0, found = 0; channel_mgr = urbdrc->listener_callback->channel_mgr; ChannelId = channel_mgr->GetChannelId(callback->channel); - data_read_uint32(pBuffer + 0, MessageId); - data_read_uint32(pBuffer + 4, FunctionId); + data_read_UINT32(pBuffer + 0, MessageId); + data_read_UINT32(pBuffer + 4, FunctionId); int error = 0; @@ -728,15 +728,15 @@ void* urbdrc_new_device_create(void * arg) return 0; } -static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, uint32 cbSize) +static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback, char* pBuffer, UINT32 cbSize) { int i, error = 0; - uint32 MessageId; - uint32 FunctionId; + UINT32 MessageId; + UINT32 FunctionId; URBDRC_PLUGIN* urbdrc = (URBDRC_PLUGIN*) callback->plugin; - data_read_uint32(pBuffer + 0, MessageId); - data_read_uint32(pBuffer + 4, FunctionId); + data_read_UINT32(pBuffer + 0, MessageId); + data_read_UINT32(pBuffer + 4, FunctionId); switch (FunctionId) { @@ -775,14 +775,14 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback return error; } -static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* Buffer) +static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, UINT32 cbSize, BYTE* Buffer) { URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback; URBDRC_PLUGIN* urbdrc; IUDEVMAN* udevman; - uint32 InterfaceTemp; - uint32 InterfaceId; - uint32 Mask; + UINT32 InterfaceTemp; + UINT32 InterfaceId; + UINT32 Mask; int error = 0; char* pBuffer = (char*) Buffer; @@ -799,7 +799,7 @@ static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, udevman = (IUDEVMAN*) urbdrc->udevman; - data_read_uint32(pBuffer + 0, InterfaceTemp); + data_read_UINT32(pBuffer + 0, InterfaceTemp); InterfaceId = (InterfaceTemp & 0x0fffffff); Mask = ((InterfaceTemp & 0xf0000000)>>30); LLOGLN(10, ("urbdrc_on_data_received: Size=%d InterfaceId=0x%X Mask=0x%X", cbSize, InterfaceId, Mask)); @@ -861,7 +861,7 @@ static int urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback) IUDEVMAN* udevman = (IUDEVMAN*) urbdrc->udevman; USB_SEARCHMAN* searchman = (USB_SEARCHMAN*) urbdrc->searchman; IUDEVICE* pdev = NULL; - uint32 ChannelId = 0; + UINT32 ChannelId = 0; int found = 0; ChannelId = callback->channel_mgr->GetChannelId(callback->channel); diff --git a/channels/urbdrc/client/urbdrc_main.h b/channels/urbdrc/client/urbdrc_main.h index 2a339714f..5e85306e6 100644 --- a/channels/urbdrc/client/urbdrc_main.h +++ b/channels/urbdrc/client/urbdrc_main.h @@ -72,8 +72,8 @@ struct _URBDRC_PLUGIN IUDEVMAN* udevman; USB_SEARCHMAN* searchman; - uint32 first_channel_id; - uint32 vchannel_status; + UINT32 first_channel_id; + UINT32 vchannel_status; }; #define URBDRC_UDEVMAN_EXPORT_FUNC_NAME "FreeRDPUDEVMANEntry" @@ -99,75 +99,75 @@ struct _TRANSFER_DATA URBDRC_PLUGIN* urbdrc; IUDEVMAN* udevman; BYTE* pBuffer; - uint32 cbSize; - uint32 UsbDevice; + UINT32 cbSize; + UINT32 UsbDevice; }; struct _IUDEVICE { /* Transfer */ - int (*isoch_transfer) (IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 TransferFlags, + int (*isoch_transfer) (IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 TransferFlags, int NoAck, - uint32 *ErrorCount, - uint32 *UrbdStatus, - uint32 *StartFrame, - uint32 NumberOfPackets, + UINT32 *ErrorCount, + UINT32 *UrbdStatus, + UINT32 *StartFrame, + UINT32 NumberOfPackets, BYTE *IsoPacket, - uint32 *BufferSize, + UINT32 *BufferSize, BYTE *Buffer, int Timeout); - int (*control_transfer) (IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 TransferFlags, + int (*control_transfer) (IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 TransferFlags, BYTE bmRequestType, BYTE Request, UINT16 Value, UINT16 Index, - uint32 *UrbdStatus, - uint32 *BufferSize, + UINT32 *UrbdStatus, + UINT32 *BufferSize, BYTE *Buffer, - uint32 Timeout); + UINT32 Timeout); - int (*bulk_or_interrupt_transfer) (IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 TransferFlags, - uint32 *UsbdStatus, - uint32 *BufferSize, + int (*bulk_or_interrupt_transfer) (IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 TransferFlags, + UINT32 *UsbdStatus, + UINT32 *BufferSize, BYTE *Buffer, - uint32 Timeout); + UINT32 Timeout); - int (*select_configuration) (IUDEVICE * idev, uint32 bConfigurationValue); + int (*select_configuration) (IUDEVICE * idev, UINT32 bConfigurationValue); int (*select_interface) (IUDEVICE * idev, BYTE InterfaceNumber, BYTE AlternateSetting); - int (*control_pipe_request) (IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 *UsbdStatus, + int (*control_pipe_request) (IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 *UsbdStatus, int command); - int (*control_query_device_text) (IUDEVICE * idev, uint32 TextType, - uint32 LocaleId, - uint32 *BufferSize, + int (*control_query_device_text) (IUDEVICE * idev, UINT32 TextType, + UINT32 LocaleId, + UINT32 *BufferSize, BYTE * Buffer); - int (*os_feature_descriptor_request) (IUDEVICE * idev, uint32 RequestId, + int (*os_feature_descriptor_request) (IUDEVICE * idev, UINT32 RequestId, BYTE Recipient, BYTE InterfaceNumber, BYTE Ms_PageIndex, UINT16 Ms_featureDescIndex, - uint32 * UsbdStatus, - uint32 * BufferSize, + UINT32 * UsbdStatus, + UINT32 * BufferSize, BYTE* Buffer, int Timeout); void (*cancel_all_transfer_request) (IUDEVICE * idev); - int (*cancel_transfer_request) (IUDEVICE * idev, uint32 RequestId); + int (*cancel_transfer_request) (IUDEVICE * idev, UINT32 RequestId); int (*query_device_descriptor) (IUDEVICE * idev, int offset); @@ -189,8 +189,8 @@ struct _IUDEVICE void (*lock_fifo_isoch) (IUDEVICE * idev); void (*unlock_fifo_isoch) (IUDEVICE * idev); - int (*query_device_port_status) (IUDEVICE * idev, uint32 *UsbdStatus, - uint32 * BufferSize, + int (*query_device_port_status) (IUDEVICE * idev, UINT32 *UsbdStatus, + UINT32 * BufferSize, BYTE * Buffer); int (*request_queue_is_none) (IUDEVICE * idev); @@ -208,9 +208,9 @@ struct _IUDEVICE void (*setChannelClosed) (IUDEVICE * idev); char *(*getPath) (IUDEVICE * idev); - BASIC_DEV_STATE_DEFINED(channel_id, uint32); - BASIC_DEV_STATE_DEFINED(UsbDevice, uint32); - BASIC_DEV_STATE_DEFINED(ReqCompletion, uint32); + BASIC_DEV_STATE_DEFINED(channel_id, UINT32); + BASIC_DEV_STATE_DEFINED(UsbDevice, UINT32); + BASIC_DEV_STATE_DEFINED(ReqCompletion, UINT32); BASIC_DEV_STATE_DEFINED(bus_number, UINT16); BASIC_DEV_STATE_DEFINED(dev_number, UINT16); BASIC_DEV_STATE_DEFINED(port_number, int); @@ -242,15 +242,15 @@ struct _IUDEVMAN int flag); IUDEVICE *(*get_next) (IUDEVMAN *idevman); IUDEVICE *(*get_udevice_by_UsbDevice) (IUDEVMAN * idevman, - uint32 UsbDevice); + UINT32 UsbDevice); IUDEVICE *(*get_udevice_by_UsbDevice_try_again) (IUDEVMAN * idevman, - uint32 UsbDevice); + UINT32 UsbDevice); /* Extension */ int (*check_device_exist_by_id) (IUDEVMAN * idevman, UINT16 idVendor, UINT16 idProduct); int (*isAutoAdd) (IUDEVMAN * idevman); /* Basic state */ - BASIC_DEVMAN_STATE_DEFINED(defUsbDevice, uint32); + BASIC_DEVMAN_STATE_DEFINED(defUsbDevice, UINT32); BASIC_DEVMAN_STATE_DEFINED(device_num, int); BASIC_DEVMAN_STATE_DEFINED(sem_timeout, int); /* control semaphore or mutex lock */ diff --git a/channels/urbdrc/libusb/libusb_udevice.c b/channels/urbdrc/libusb/libusb_udevice.c index e0a2da03c..894cd5a2a 100644 --- a/channels/urbdrc/libusb/libusb_udevice.c +++ b/channels/urbdrc/libusb/libusb_udevice.c @@ -62,9 +62,9 @@ struct _ISO_USER_DATA BYTE * output_data; int iso_status; int completed; - uint32 error_count; + UINT32 error_count; int noack; - uint32 start_frame; + UINT32 start_frame; }; static int @@ -155,9 +155,9 @@ func_iso_callback(struct libusb_transfer *transfer) ISO_USER_DATA * iso_user_data = (ISO_USER_DATA *) transfer->user_data; BYTE * data = iso_user_data->IsoPacket; int * completed = &iso_user_data->completed; - uint32 offset = 0; - uint32 index = 0; - uint32 i, act_len; + UINT32 offset = 0; + UINT32 index = 0; + UINT32 i, act_len; BYTE *b; *completed = 1; @@ -170,9 +170,9 @@ func_iso_callback(struct libusb_transfer *transfer) for (i = 0; i < transfer->num_iso_packets; i++) { act_len = transfer->iso_packet_desc[i].actual_length; - data_write_uint32(data + offset, index); - data_write_uint32(data + offset + 4, act_len); - data_write_uint32(data + offset + 8, + data_write_UINT32(data + offset, index); + data_write_UINT32(data + offset + 4, act_len); + data_write_UINT32(data + offset + 8, transfer->iso_packet_desc[i].status); offset += 12; if (transfer->iso_packet_desc[i].status == USBD_STATUS_SUCCESS) @@ -215,7 +215,7 @@ func_iso_callback(struct libusb_transfer *transfer) static const LIBUSB_ENDPOINT_DESCEIPTOR* func_get_ep_desc(LIBUSB_CONFIG_DESCRIPTOR * LibusbConfig, MSUSB_CONFIG_DESCRIPTOR * MsConfig, - uint32 EndpointAddress) + UINT32 EndpointAddress) { MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; const LIBUSB_INTERFACE * interface; @@ -255,7 +255,7 @@ func_bulk_transfer_cb(struct libusb_transfer *transfer) static int -func_set_usbd_status(UDEVICE* pdev, uint32* status, int err_result) +func_set_usbd_status(UDEVICE* pdev, UINT32* status, int err_result) { switch (err_result) { @@ -319,8 +319,8 @@ func_set_usbd_status(UDEVICE* pdev, uint32* status, int err_result) static void -func_iso_data_init(ISO_USER_DATA * iso_user_data, uint32 numPacket, uint32 buffsize, - uint32 noAck, BYTE * isoPacket, BYTE * buffer) +func_iso_data_init(ISO_USER_DATA * iso_user_data, UINT32 numPacket, UINT32 buffsize, + UINT32 noAck, BYTE * isoPacket, BYTE * buffer) { /* init struct iso_user_data */ iso_user_data->IsoPacket = isoPacket; @@ -334,7 +334,7 @@ func_iso_data_init(ISO_USER_DATA * iso_user_data, uint32 numPacket, uint32 buffs static int -func_config_release_all_interface(LIBUSB_DEVICE_HANDLE *libusb_handle, uint32_t NumInterfaces) +func_config_release_all_interface(LIBUSB_DEVICE_HANDLE *libusb_handle, UINT32_t NumInterfaces) { int i, ret; for (i = 0; i < NumInterfaces; i++) @@ -774,7 +774,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M static int -libusb_udev_select_configuration(IUDEVICE * idev, uint32 bConfigurationValue) +libusb_udev_select_configuration(IUDEVICE * idev, UINT32 bConfigurationValue) { UDEVICE * pdev = (UDEVICE *) idev; MSUSB_CONFIG_DESCRIPTOR * MsConfig = pdev->MsConfig; @@ -815,9 +815,9 @@ libusb_udev_select_configuration(IUDEVICE * idev, uint32 bConfigurationValue) static int -libusb_udev_control_pipe_request(IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 *UsbdStatus, +libusb_udev_control_pipe_request(IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 *UsbdStatus, int command) { UDEVICE * pdev = (UDEVICE *) idev; @@ -863,9 +863,9 @@ libusb_udev_control_pipe_request(IUDEVICE * idev, uint32 RequestId, static int -libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType, - uint32 LocaleId, - uint32 * BufferSize, +libusb_udev_control_query_device_text(IUDEVICE * idev, UINT32 TextType, + UINT32 LocaleId, + UINT32 * BufferSize, BYTE * Buffer) { UDEVICE * pdev = (UDEVICE *) idev; @@ -929,13 +929,13 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType, static int -libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId, +libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, UINT32 RequestId, BYTE Recipient, BYTE InterfaceNumber, BYTE Ms_PageIndex, UINT16 Ms_featureDescIndex, - uint32 * UsbdStatus, - uint32 * BufferSize, + UINT32 * UsbdStatus, + UINT32 * BufferSize, BYTE* Buffer, int Timeout) { @@ -1203,8 +1203,8 @@ libusb_udev_unlock_fifo_isoch(IUDEVICE * idev) static int -libusb_udev_query_device_port_status(IUDEVICE * idev, uint32 *UsbdStatus, - uint32 * BufferSize, +libusb_udev_query_device_port_status(IUDEVICE * idev, UINT32 *UsbdStatus, + UINT32 * BufferSize, BYTE * Buffer) { UDEVICE * pdev = (UDEVICE *) idev; @@ -1249,22 +1249,22 @@ libusb_udev_request_queue_is_none(IUDEVICE * idev) static int -libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, - uint32 TransferFlags, +libusb_udev_isoch_transfer(IUDEVICE * idev, UINT32 RequestId, UINT32 EndpointAddress, + UINT32 TransferFlags, int NoAck, - uint32 *ErrorCount, - uint32 *UrbdStatus, - uint32 *StartFrame, - uint32 NumberOfPackets, + UINT32 *ErrorCount, + UINT32 *UrbdStatus, + UINT32 *StartFrame, + UINT32 NumberOfPackets, BYTE *IsoPacket, - uint32 *BufferSize, + UINT32 *BufferSize, BYTE *Buffer, int Timeout) { UDEVICE * pdev = (UDEVICE *) idev; ISO_USER_DATA iso_user_data; struct libusb_transfer * iso_transfer = NULL; - uint32 iso_packet_size; + UINT32 iso_packet_size; int error = 0, ret = 0, submit = 0; @@ -1344,16 +1344,16 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd static int -libusb_udev_control_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, - uint32 TransferFlags, +libusb_udev_control_transfer(IUDEVICE * idev, UINT32 RequestId, UINT32 EndpointAddress, + UINT32 TransferFlags, BYTE bmRequestType, BYTE Request, UINT16 Value, UINT16 Index, - uint32 *UrbdStatus, - uint32 *BufferSize, + UINT32 *UrbdStatus, + UINT32 *BufferSize, BYTE *Buffer, - uint32 Timeout) + UINT32 Timeout) { UDEVICE * pdev = (UDEVICE *) idev; int error = 0; @@ -1381,19 +1381,19 @@ libusb_udev_control_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointA static int -libusb_udev_bulk_or_interrupt_transfer(IUDEVICE * idev, uint32 RequestId, - uint32 EndpointAddress, - uint32 TransferFlags, - uint32 *UsbdStatus, - uint32 *BufferSize, +libusb_udev_bulk_or_interrupt_transfer(IUDEVICE * idev, UINT32 RequestId, + UINT32 EndpointAddress, + UINT32 TransferFlags, + UINT32 *UsbdStatus, + UINT32 *BufferSize, BYTE *Buffer, - uint32 Timeout) + UINT32 Timeout) { UDEVICE * pdev = (UDEVICE *) idev; const LIBUSB_ENDPOINT_DESCEIPTOR * ep_desc; struct libusb_transfer * transfer = NULL; TRANSFER_REQUEST * request = NULL; - uint32 transfer_type; + UINT32 transfer_type; int completed = 0, ret = 0, submit = 0; int transferDir = EndpointAddress & 0x80; @@ -1601,7 +1601,7 @@ func_cancel_xact_request(TRANSFER_REQUEST *request) static int -libusb_udev_cancel_transfer_request(IUDEVICE * idev, uint32 RequestId) +libusb_udev_cancel_transfer_request(IUDEVICE * idev, UINT32 RequestId) { UDEVICE * pdev = (UDEVICE *) idev; REQUEST_QUEUE * request_queue = pdev->request_queue; @@ -1644,9 +1644,9 @@ cancel_retry: return 0; } -BASIC_STATE_FUNC_DEFINED(channel_id, uint32) -BASIC_STATE_FUNC_DEFINED(UsbDevice, uint32) -BASIC_STATE_FUNC_DEFINED(ReqCompletion, uint32) +BASIC_STATE_FUNC_DEFINED(channel_id, UINT32) +BASIC_STATE_FUNC_DEFINED(UsbDevice, UINT32) +BASIC_STATE_FUNC_DEFINED(ReqCompletion, UINT32) BASIC_STATE_FUNC_DEFINED(bus_number, UINT16) BASIC_STATE_FUNC_DEFINED(dev_number, UINT16) BASIC_STATE_FUNC_DEFINED(port_number, int) diff --git a/channels/urbdrc/libusb/libusb_udevice.h b/channels/urbdrc/libusb/libusb_udevice.h index df667b1f8..5bf8ad529 100644 --- a/channels/urbdrc/libusb/libusb_udevice.h +++ b/channels/urbdrc/libusb/libusb_udevice.h @@ -49,9 +49,9 @@ struct _UDEVICE void * prev; void * next; - uint32 UsbDevice; /* An unique interface ID */ - uint32 ReqCompletion; /* An unique interface ID */ - uint32 channel_id; + UINT32 UsbDevice; /* An unique interface ID */ + UINT32 ReqCompletion; /* An unique interface ID */ + UINT32 channel_id; UINT16 status; UINT16 bus_number; UINT16 dev_number; diff --git a/channels/urbdrc/libusb/libusb_udevman.c b/channels/urbdrc/libusb/libusb_udevman.c index c3e8b631f..eafb72f43 100644 --- a/channels/urbdrc/libusb/libusb_udevman.c +++ b/channels/urbdrc/libusb/libusb_udevman.c @@ -55,7 +55,7 @@ struct _UDEVMAN IUDEVICE* head; /* head device in linked list */ IUDEVICE* tail; /* tail device in linked list */ - uint32 defUsbDevice; + UINT32 defUsbDevice; UINT16 flags; int device_num; int sem_timeout; @@ -342,7 +342,7 @@ udevman_is_auto_add(IUDEVMAN * idevman) static IUDEVICE* -udevman_get_udevice_by_UsbDevice_try_again(IUDEVMAN * idevman, uint32 UsbDevice) +udevman_get_udevice_by_UsbDevice_try_again(IUDEVMAN * idevman, UINT32 UsbDevice) { UDEVICE * pdev; idevman->loading_lock(idevman); @@ -361,7 +361,7 @@ udevman_get_udevice_by_UsbDevice_try_again(IUDEVMAN * idevman, uint32 UsbDevice) } static IUDEVICE* -udevman_get_udevice_by_UsbDevice(IUDEVMAN * idevman, uint32 UsbDevice) +udevman_get_udevice_by_UsbDevice(IUDEVMAN * idevman, UINT32 UsbDevice) { UDEVICE * pdev; idevman->loading_lock(idevman); @@ -420,7 +420,7 @@ udevman_push_urb(IUDEVMAN * idevman) } -BASIC_STATE_FUNC_DEFINED(defUsbDevice, uint32) +BASIC_STATE_FUNC_DEFINED(defUsbDevice, UINT32) BASIC_STATE_FUNC_DEFINED(device_num, int) BASIC_STATE_FUNC_DEFINED(sem_timeout, int) @@ -474,7 +474,7 @@ int FreeRDPUDEVMANEntry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints) { UDEVMAN* udevman; RDP_PLUGIN_DATA * plugin_data = pEntryPoints->plugin_data; - uint32 UsbDevice = BASE_USBDEVICE_NUM; + UINT32 UsbDevice = BASE_USBDEVICE_NUM; char * token; char * message = "id"; char hardware_id[16]; diff --git a/channels/urbdrc/libusb/request_queue.c b/channels/urbdrc/libusb/request_queue.c index de959133e..6a560156a 100644 --- a/channels/urbdrc/libusb/request_queue.c +++ b/channels/urbdrc/libusb/request_queue.c @@ -48,7 +48,7 @@ request_queue_has_next(REQUEST_QUEUE* queue) } TRANSFER_REQUEST* -request_queue_register_request(REQUEST_QUEUE* queue, uint32 RequestId, +request_queue_register_request(REQUEST_QUEUE* queue, UINT32 RequestId, struct libusb_transfer * transfer, BYTE endpoint) { @@ -110,7 +110,7 @@ request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, BYTE ep) } int -request_queue_unregister_request(REQUEST_QUEUE *queue, uint32 RequestId) +request_queue_unregister_request(REQUEST_QUEUE *queue, UINT32 RequestId) { TRANSFER_REQUEST *request, *request_temp; pthread_mutex_lock(&queue->request_loading); diff --git a/channels/urbdrc/libusb/request_queue.h b/channels/urbdrc/libusb/request_queue.h index fc7ae4636..74fcf1169 100644 --- a/channels/urbdrc/libusb/request_queue.h +++ b/channels/urbdrc/libusb/request_queue.h @@ -32,7 +32,7 @@ struct _TRANSFER_REQUEST void* prev; void* next; - uint32 RequestId; + UINT32 RequestId; BYTE endpoint; struct libusb_transfer *transfer; int submit; @@ -51,11 +51,11 @@ struct _REQUEST_QUEUE /* request queue manager service */ void (*rewind) (REQUEST_QUEUE *queue); int (*has_next) (REQUEST_QUEUE* queue); - int (*unregister_request) (REQUEST_QUEUE *queue, uint32 RequestId); + int (*unregister_request) (REQUEST_QUEUE *queue, UINT32 RequestId); TRANSFER_REQUEST *(*get_next) (REQUEST_QUEUE* queue); TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, BYTE ep); TRANSFER_REQUEST *(*register_request) (REQUEST_QUEUE* queue, - uint32 RequestId, struct libusb_transfer * transfer, BYTE endpoint); + UINT32 RequestId, struct libusb_transfer * transfer, BYTE endpoint); }; diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index 5f43fdd56..68d8d72cd 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -154,7 +154,7 @@ void df_keyboard_init() } -void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, UINT16 x, UINT16 y) +void df_send_mouse_button_event(rdpInput* input, BOOL down, UINT32 button, UINT16 x, UINT16 y) { UINT16 flags; diff --git a/client/DirectFB/dfreerdp.h b/client/DirectFB/dfreerdp.h index 741dd52d8..6b14bf997 100644 --- a/client/DirectFB/dfreerdp.h +++ b/client/DirectFB/dfreerdp.h @@ -47,8 +47,8 @@ struct df_pointer { rdpPointer pointer; IDirectFBSurface* surface; - uint32 xhot; - uint32 yhot; + UINT32 xhot; + UINT32 yhot; }; typedef struct df_pointer dfPointer; diff --git a/client/Mac/MRDPView.h b/client/Mac/MRDPView.h index 0ef740467..8007c330e 100644 --- a/client/Mac/MRDPView.h +++ b/client/Mac/MRDPView.h @@ -116,7 +116,7 @@ int process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA int receive_channel_data(freerdp *inst, int chan_id, BYTE *data, int size, int flags, int total_size); void process_cliprdr_event(freerdp *inst, RDP_EVENT *event); void cliprdr_process_cb_format_list_event(freerdp *inst, RDP_CB_FORMAT_LIST_EVENT* event); -void cliprdr_send_data_request(freerdp *inst, uint32 format); +void cliprdr_send_data_request(freerdp *inst, UINT32 format); void cliprdr_process_cb_monitor_ready_event(freerdp* inst); void cliprdr_process_cb_data_response_event(freerdp *inst, RDP_CB_DATA_RESPONSE_EVENT *event); void cliprdr_process_text(freerdp *inst, BYTE *data, int len); diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index 4e85ace89..c555ac1d7 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -115,7 +115,7 @@ BYTE* wf_glyph_convert(wfInfo* wfi, int width, int height, BYTE* data) return cdata; } -HBRUSH wf_create_brush(wfInfo * wfi, rdpBrush* brush, uint32 color, int bpp) +HBRUSH wf_create_brush(wfInfo * wfi, rdpBrush* brush, UINT32 color, int bpp) { int i; HBRUSH br; @@ -235,8 +235,8 @@ void wf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) HBRUSH brush; HBRUSH org_brush; int org_bkmode; - uint32 fgcolor; - uint32 bgcolor; + UINT32 fgcolor; + UINT32 bgcolor; COLORREF org_bkcolor; COLORREF org_textcolor; wfInfo* wfi = ((wfContext*) context)->wfi; @@ -280,7 +280,7 @@ void wf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) { RECT rect; HBRUSH brush; - uint32 brush_color; + UINT32 brush_color; wfInfo* wfi = ((wfContext*) context)->wfi; brush_color = freerdp_color_convert_var_bgr(opaque_rect->color, wfi->srcBpp, wfi->dstBpp, wfi->clrconv); @@ -302,7 +302,7 @@ void wf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* mult int i; RECT rect; HBRUSH brush; - uint32 brush_color; + UINT32 brush_color; DELTA_RECT* rectangle; wfInfo* wfi = ((wfContext*) context)->wfi; @@ -333,7 +333,7 @@ void wf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) HPEN pen; HPEN org_pen; int x, y, w, h; - uint32 pen_color; + UINT32 pen_color; wfInfo* wfi = ((wfContext*) context)->wfi; pen_color = freerdp_color_convert_bgr(line_to->penColor, wfi->srcBpp, wfi->dstBpp, wfi->clrconv); @@ -365,7 +365,7 @@ void wf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) int org_rop2; HPEN hpen; HPEN org_hpen; - uint32 pen_color; + UINT32 pen_color; wfInfo* wfi = ((wfContext*) context)->wfi; pen_color = freerdp_color_convert_bgr(polyline->penColor, wfi->srcBpp, wfi->dstBpp, wfi->clrconv); diff --git a/client/Windows/wf_rail.c b/client/Windows/wf_rail.c index f9425a2fb..900be237c 100644 --- a/client/Windows/wf_rail.c +++ b/client/Windows/wf_rail.c @@ -29,7 +29,7 @@ #include "wf_window.h" #include "wf_rail.h" -void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom) +void wf_rail_paint(wfInfo* wfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom) { } @@ -37,7 +37,7 @@ void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail) { } -void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command) +void wf_rail_send_client_system_command(wfInfo* wfi, UINT32 windowId, UINT16 command) { } diff --git a/client/Windows/wf_rail.h b/client/Windows/wf_rail.h index 671525136..fbbdb0c08 100644 --- a/client/Windows/wf_rail.h +++ b/client/Windows/wf_rail.h @@ -21,9 +21,9 @@ #include "wfreerdp.h" -void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); +void wf_rail_paint(wfInfo* wfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom); void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail); -void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command); +void wf_rail_send_client_system_command(wfInfo* wfi, UINT32 windowId, UINT16 command); void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled); void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event); void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window); diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index e48c7b729..d9c371447 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -96,8 +96,8 @@ void wf_sw_end_paint(rdpContext* context) int i; rdpGdi* gdi; wfInfo* wfi; - sint32 x, y; - uint32 w, h; + INT32 x, y; + UINT32 w, h; int ninvalid; RECT update_rect; HGDI_RGN cinvalid; @@ -247,9 +247,9 @@ void cpuid(unsigned info, unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned #endif } -uint32 wfi_detect_cpu() +UINT32 wfi_detect_cpu() { - uint32 cpu_opt = 0; + UINT32 cpu_opt = 0; unsigned int eax, ebx, ecx, edx = 0; cpuid(1, &eax, &ebx, &ecx, &edx); diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c index 4c7bd88f5..67641fece 100644 --- a/client/X11/xf_cliprdr.c +++ b/client/X11/xf_cliprdr.c @@ -36,7 +36,7 @@ typedef struct clipboard_format_mapping clipboardFormatMapping; struct clipboard_format_mapping { Atom target_format; - uint32 format_id; + UINT32 format_id; }; typedef struct clipboard_context clipboardContext; @@ -52,13 +52,13 @@ struct clipboard_context int num_format_mappings; /* server->client data */ - uint32* formats; + UINT32* formats; int num_formats; Atom targets[20]; int num_targets; BYTE* data; - uint32 data_format; - uint32 data_alt_format; + UINT32 data_format; + UINT32 data_alt_format; int data_length; XEvent* respond; @@ -77,7 +77,7 @@ struct clipboard_context void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman) { int n; - uint32 id; + UINT32 id; clipboardContext* cb; cb = xnew(clipboardContext); @@ -233,8 +233,8 @@ static void be2le(BYTE* data, int size) static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi) { Atom type; - uint32 id = 0; - uint32* pid = NULL; + UINT32 id = 0; + UINT32* pid = NULL; int format, result = 0; unsigned long length, bytes_left; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -263,7 +263,7 @@ static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi) return (id ? TRUE : FALSE); } -static int xf_cliprdr_select_format_by_id(clipboardContext* cb, uint32 format_id) +static int xf_cliprdr_select_format_by_id(clipboardContext* cb, UINT32 format_id) { int i; @@ -355,7 +355,7 @@ static void xf_cliprdr_send_supported_format_list(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->formats = (uint32*) malloc(sizeof(uint32) * cb->num_format_mappings); + event->formats = (UINT32*) malloc(sizeof(UINT32) * cb->num_format_mappings); event->num_formats = cb->num_format_mappings; for (i = 0; i < cb->num_format_mappings; i++) @@ -384,7 +384,7 @@ static void xf_cliprdr_send_format_list(xfInfo* xfi) } } -static void xf_cliprdr_send_data_request(xfInfo* xfi, uint32 format) +static void xf_cliprdr_send_data_request(xfInfo* xfi, UINT32 format) { RDP_CB_DATA_REQUEST_EVENT* event; clipboardContext* cb = (clipboardContext*) xfi->clipboard_context; @@ -485,7 +485,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi) event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL); - event->formats = (uint32*) malloc(sizeof(uint32) * cb->num_format_mappings); + event->formats = (UINT32*) malloc(sizeof(UINT32) * cb->num_format_mappings); num = 0; for (i = 0; i < length; i++) { @@ -886,8 +886,8 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) { STREAM* s; UINT16 bpp; - uint32 offset; - uint32 ncolors; + UINT32 offset; + UINT32 ncolors; /* size should be at least sizeof(BITMAPINFOHEADER) */ if (size < 40) @@ -900,7 +900,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) stream_attach(s, data, size); stream_seek(s, 14); stream_read_UINT16(s, bpp); - stream_read_uint32(s, ncolors); + stream_read_UINT32(s, ncolors); offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0); stream_detach(s); stream_free(s); @@ -910,9 +910,9 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size) s = stream_new(14 + size); stream_write_BYTE(s, 'B'); stream_write_BYTE(s, 'M'); - stream_write_uint32(s, 14 + size); - stream_write_uint32(s, 0); - stream_write_uint32(s, offset); + stream_write_UINT32(s, 14 + size); + stream_write_UINT32(s, 0); + stream_write_UINT32(s, offset); stream_write(s, data, size); cb->data = stream_get_head(s); @@ -1068,9 +1068,9 @@ BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent) int i; int fmt; Atom type; - uint32 format; + UINT32 format; XEvent* respond; - uint32 alt_format; + UINT32 alt_format; BYTE* data = NULL; BOOL delay_respond; unsigned long length, bytes_left; diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index 8183ef283..a70d9d295 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -534,7 +534,7 @@ static BOOL xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, BOOL app) xfw->bottom = xfw->top + xfw->height - 1; DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u send_event=%d", - (uint32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom, + (UINT32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom, xfw->width, xfw->height, event->xconfigure.send_event); /* additonal checks for not in a local move and not ignoring configure to send @@ -723,7 +723,7 @@ static BOOL xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, BOOL app) else { //If the window is in the iconic state - if (((uint32) *prop == 3)) + if (((UINT32) *prop == 3)) { minimized = TRUE; } @@ -872,7 +872,7 @@ BOOL xf_event_process(freerdp* instance, XEvent* event) } if (event->type != MotionNotify) - DEBUG_X11("%s Event(%d): wnd=0x%04X", X11_EVENT_STRINGS[event->type], event->type, (uint32) event->xany.window); + DEBUG_X11("%s Event(%d): wnd=0x%04X", X11_EVENT_STRINGS[event->type], event->type, (UINT32) event->xany.window); switch (event->type) { diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 68a8ab16a..d36eb6f5c 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -331,8 +331,8 @@ void xf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { Pixmap pattern; rdpBrush* brush; - uint32 foreColor; - uint32 backColor; + UINT32 foreColor; + UINT32 backColor; xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -440,7 +440,7 @@ void xf_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt) void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) { - uint32 color; + UINT32 color; xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -470,7 +470,7 @@ void xf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) void xf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect) { int i; - uint32 color; + UINT32 color; DELTA_RECT* rectangle; xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -509,7 +509,7 @@ void xf_gdi_draw_nine_grid(rdpContext* context, DRAW_NINE_GRID_ORDER* draw_nine_ void xf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) { - uint32 color; + UINT32 color; xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -555,7 +555,7 @@ void xf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) int x1, y1; int x2, y2; int npoints; - uint32 color; + UINT32 color; XPoint* points; int width, height; xfContext* context_ = (xfContext*) context; @@ -642,8 +642,8 @@ void xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) { rdpBrush* brush; xfBitmap* bitmap; - uint32 foreColor; - uint32 backColor; + UINT32 foreColor; + UINT32 backColor; Pixmap pattern = 0; xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -717,7 +717,7 @@ void xf_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc) { int i, npoints; XPoint* points; - uint32 brush_color; + UINT32 brush_color; xfInfo* xfi = ((xfContext*) context)->xfi; xf_set_rop2(xfi, polygon_sc->bRop2); @@ -772,8 +772,8 @@ void xf_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) XPoint* points; Pixmap pattern; rdpBrush* brush; - uint32 foreColor; - uint32 backColor; + UINT32 foreColor; + UINT32 backColor; xfInfo* xfi = ((xfContext*) context)->xfi; brush = &(polygon_cb->brush); diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 1ca83456c..f39aea11e 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -320,7 +320,7 @@ void xf_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y) XSetStipple(xfi->display, xfi->gc, xfi->bitmap_mono); } -void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { xfContext* context_ = (xfContext*) context; xfInfo* xfi = context_->xfi; @@ -343,7 +343,7 @@ void xf_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height XSetFillStyle(xfi->display, xfi->gc, FillStippled); } -void xf_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void xf_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { xfInfo* xfi = ((xfContext*) context)->xfi; diff --git a/client/X11/xf_keyboard.c b/client/X11/xf_keyboard.c index 0463c57a4..ccd927b63 100644 --- a/client/X11/xf_keyboard.c +++ b/client/X11/xf_keyboard.c @@ -111,7 +111,7 @@ void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode) if ((rdp_scancode == RDP_SCANCODE_CAPSLOCK) && (down == FALSE)) { - uint32 syncFlags; + UINT32 syncFlags; syncFlags = xf_kbd_get_toggle_keys_state(xfi); input->SynchronizeEvent(input, syncFlags); } @@ -122,7 +122,7 @@ int xf_kbd_read_keyboard_state(xfInfo* xfi) { int dummy; Window wdummy; - uint32 state = 0; + UINT32 state = 0; if (xfi->remote_app != TRUE) { @@ -182,7 +182,7 @@ int xf_kbd_get_toggle_keys_state(xfInfo* xfi) void xf_kbd_focus_in(xfInfo* xfi) { rdpInput* input; - uint32 syncFlags; + UINT32 syncFlags; input = xfi->instance->input; diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index 2f64532f7..636d2f959 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -52,16 +52,16 @@ void xf_rail_disable_remoteapp_mode(xfInfo* xfi) } } -void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom) +void xf_rail_paint(xfInfo* xfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom) { xfWindow* xfw; rdpWindow* window; BOOL intersect; - uint32 iwidth, iheight; - sint32 ileft, itop; - uint32 iright, ibottom; - sint32 wleft, wtop; - uint32 wright, wbottom; + UINT32 iwidth, iheight; + INT32 ileft, itop; + UINT32 iright, ibottom; + INT32 wleft, wtop; + UINT32 wright, wbottom; window_list_rewind(rail->list); @@ -284,7 +284,7 @@ void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled) xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate); } -void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command) +void xf_rail_send_client_system_command(xfInfo* xfi, UINT32 windowId, UINT16 command) { rdpChannels* channels; RAIL_SYSCOMMAND_ORDER syscommand; @@ -325,8 +325,8 @@ void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window) //Although the rail server can give negative window coordinates when updating windowOffsetX and windowOffsetY, //we can only send unsigned integers to the rail server. Therefore, we always bring negative coordinates up to 0 when //attempting to adjust the rail window. - uint32 offsetX = 0; - uint32 offsetY = 0; + UINT32 offsetX = 0; + UINT32 offsetY = 0; if (window->windowOffsetX < 0) offsetX = offsetX - window->windowOffsetX; @@ -348,7 +348,7 @@ void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window) DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u" " RDP=0x%X rc={l=%d t=%d} w=%d h=%d", - (uint32) xfw->handle, window_move.left, window_move.top, + (UINT32) xfw->handle, window_move.left, window_move.top, window_move.right, window_move.bottom, xfw->width, xfw->height, window->windowId, window->windowOffsetX, window->windowOffsetY, @@ -375,15 +375,15 @@ void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window) channels = xfi->_context->channels; DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d", - (uint32) xfw->handle, + (UINT32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom, xfw->width, xfw->height); //Although the rail server can give negative window coordinates when updating windowOffsetX and windowOffsetY, //we can only send unsigned integers to the rail server. Therefore, we always bring negative coordinates up to 0 when //attempting to adjust the rail window. - uint32 offsetX = 0; - uint32 offsetY = 0; + UINT32 offsetX = 0; + UINT32 offsetY = 0; if (window->windowOffsetX < 0) offsetX = offsetX - window->windowOffsetX; diff --git a/client/X11/xf_rail.h b/client/X11/xf_rail.h index d4cddc0b4..67c24791c 100644 --- a/client/X11/xf_rail.h +++ b/client/X11/xf_rail.h @@ -22,9 +22,9 @@ #include "xfreerdp.h" -void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); +void xf_rail_paint(xfInfo* xfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom); void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail); -void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command); +void xf_rail_send_client_system_command(xfInfo* xfi, UINT32 windowId, UINT16 command); void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled); void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event); void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window); diff --git a/client/X11/xf_tsmf.c b/client/X11/xf_tsmf.c index d22da8552..5e59dda5b 100644 --- a/client/X11/xf_tsmf.c +++ b/client/X11/xf_tsmf.c @@ -53,7 +53,7 @@ struct xf_xv_context int xv_image_size; int xv_shmid; char* xv_shmaddr; - uint32* xv_pixfmts; + UINT32* xv_pixfmts; }; #ifdef WITH_DEBUG_XV @@ -142,7 +142,7 @@ void xf_tsmf_init(xfInfo* xfi, long xv_port) fo = XvListImageFormats(xfi->display, xv->xv_port, &ret); if (ret > 0) { - xv->xv_pixfmts = (uint32*) xzalloc((ret + 1) * sizeof(uint32)); + xv->xv_pixfmts = (UINT32*) xzalloc((ret + 1) * sizeof(UINT32)); for (i = 0; i < ret; i++) { xv->xv_pixfmts[i] = fo[i].id; @@ -181,7 +181,7 @@ void xf_tsmf_uninit(xfInfo* xfi) } static BOOL -xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt) +xf_tsmf_is_format_supported(xfXvContext* xv, UINT32 pixfmt) { int i; @@ -202,8 +202,8 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT int i; BYTE* data1; BYTE* data2; - uint32 pixfmt; - uint32 xvpixfmt; + UINT32 pixfmt; + UINT32 xvpixfmt; BOOL converti420yv12 = FALSE; XvImage * image; int colorkey = 0; diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index a2e489bbf..aa6070045 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -238,7 +238,7 @@ void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window) XA_ATOM, 32, PropModeReplace, (BYTE*) &window_state, 2); } -void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style) +void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, UINT32 style, UINT32 ex_style) { Atom window_type; @@ -463,7 +463,7 @@ void xf_FixWindowCoordinates(xfInfo* xfi, int* x, int* y, int* width, int* heigh char rail_window_class[] = "RAIL:00000000"; -xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id) +xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, UINT32 id) { XGCValues gcv; int input_mask; @@ -500,7 +500,7 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, CWBorderPixel | CWWinGravity | CWBitGravity, &xfi->attribs); DEBUG_X11_LMS("Create window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d rdp=0x%X", - (uint32) window->handle, window->left, window->top, window->right, window->bottom, + (UINT32) window->handle, window->left, window->top, window->right, window->bottom, window->width, window->height, wnd->windowId); memset(&gcv, 0, sizeof(gcv)); @@ -587,7 +587,7 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x, DEBUG_X11_LMS("direction=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d " "RDP=0x%X rc={l=%d t=%d} w=%d h=%d mouse_x=%d mouse_y=%d", - direction, (uint32) window->handle, + direction, (UINT32) window->handle, window->left, window->top, window->right, window->bottom, window->width, window->height, window->window->windowId, window->window->windowOffsetX, window->window->windowOffsetY, @@ -620,7 +620,7 @@ void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window) DEBUG_X11_LMS("state=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d " "RDP=0x%X rc={l=%d t=%d} w=%d h=%d", window->local_move.state, - (uint32) window->handle, window->left, window->top, window->right, window->bottom, + (UINT32) window->handle, window->left, window->top, window->right, window->bottom, window->width, window->height, window->window->windowId, window->window->windowOffsetX, window->window->windowOffsetY, window->window->windowWidth, window->window->windowHeight); @@ -666,7 +666,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u " "new rc={l=%d t=%d r=%d b=%d} w=%u h=%u" " RDP=0x%X rc={l=%d t=%d} w=%d h=%d", - (uint32) window->handle, window->left, window->top, + (UINT32) window->handle, window->left, window->top, window->right, window->bottom, window->width, window->height, x, y, x + width -1, y + height -1, width, height, window->window->windowId, @@ -754,7 +754,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon) int propsize; long* propdata; long* dstp; - uint32* srcp; + UINT32* srcp; if (icon->big != TRUE) return; @@ -766,7 +766,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon) propdata[0] = icon->entry->width; propdata[1] = icon->entry->height; dstp = &(propdata[2]); - srcp = (uint32*) icon->extra; + srcp = (UINT32*) icon->extra; for (y = 0; y < icon->entry->height; y++) { diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h index 4748b71c5..385c02cb7 100644 --- a/client/X11/xf_window.h +++ b/client/X11/xf_window.h @@ -93,14 +93,14 @@ void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window); xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, BOOL decorations); void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height); -xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id); +xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, UINT32 id); void xf_SetWindowText(xfInfo *xfi, xfWindow* window, char *name); void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height); void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state); void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon); void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects); void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects); -void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style); +void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, UINT32 style, UINT32 ex_style); void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height); BOOL xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y); void xf_DestroyWindow(xfInfo* xfi, xfWindow* window); diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index f3251e872..2785fe9ac 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -109,8 +109,8 @@ void xf_sw_end_paint(rdpContext* context) { rdpGdi* gdi; xfInfo* xfi; - sint32 x, y; - uint32 w, h; + INT32 x, y; + UINT32 w, h; xfi = ((xfContext*) context)->xfi; gdi = context->gdi; @@ -204,8 +204,8 @@ void xf_hw_begin_paint(rdpContext* context) void xf_hw_end_paint(rdpContext* context) { xfInfo* xfi; - sint32 x, y; - uint32 w, h; + INT32 x, y; + UINT32 w, h; xfi = ((xfContext*) context)->xfi; @@ -646,10 +646,10 @@ void cpuid(unsigned info, unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned #endif } -uint32 xf_detect_cpu() +UINT32 xf_detect_cpu() { unsigned int eax, ebx, ecx, edx = 0; - uint32 cpu_opt = 0; + UINT32 cpu_opt = 0; cpuid(1, &eax, &ebx, &ecx, &edx); @@ -670,7 +670,7 @@ uint32 xf_detect_cpu() BOOL xf_post_connect(freerdp* instance) { #ifdef WITH_SSE2 - uint32 cpu; + UINT32 cpu; #endif xfInfo* xfi; XGCValues gcv; @@ -691,7 +691,7 @@ BOOL xf_post_connect(freerdp* instance) if (xfi->sw_gdi) { rdpGdi* gdi; - uint32 flags; + UINT32 flags; flags = CLRCONV_ALPHA; @@ -1272,7 +1272,7 @@ void* thread_func(void* param) pthread_exit(NULL); } -static BYTE exit_code_from_disconnect_reason(uint32 reason) +static BYTE exit_code_from_disconnect_reason(UINT32 reason) { if (reason == 0 || (reason >= XF_EXIT_PARSE_ARGUMENTS && reason <= XF_EXIT_CONN_FAILED)) diff --git a/client/X11/xfreerdp.h b/client/X11/xfreerdp.h index 30d75e16c..19b739932 100644 --- a/client/X11/xfreerdp.h +++ b/client/X11/xfreerdp.h @@ -39,10 +39,10 @@ typedef struct xf_info xfInfo; struct xf_WorkArea { - uint32 x; - uint32 y; - uint32 width; - uint32 height; + UINT32 x; + UINT32 y; + UINT32 width; + UINT32 height; }; typedef struct xf_WorkArea xfWorkArea; @@ -130,7 +130,7 @@ struct xf_info BOOL mouse_motion; BOOL suppress_output; BOOL fullscreen_toggle; - uint32 keyboard_layout_id; + UINT32 keyboard_layout_id; BOOL pressed_keys[256]; XModifierKeymap* modifier_map; XSetWindowAttributes attribs; diff --git a/cunit/test_cliprdr.c b/cunit/test_cliprdr.c index 42b548aee..727d28681 100644 --- a/cunit/test_cliprdr.c +++ b/cunit/test_cliprdr.c @@ -143,7 +143,7 @@ void test_cliprdr(void) event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_FORMAT_LIST, event_process_callback, NULL); format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) event; format_list_event->num_formats = 2; - format_list_event->formats = (uint32*) malloc(sizeof(uint32) * 2); + format_list_event->formats = (UINT32*) malloc(sizeof(UINT32) * 2); format_list_event->formats[0] = CB_FORMAT_TEXT; format_list_event->formats[1] = CB_FORMAT_HTML; event_processed = 0; diff --git a/cunit/test_color.c b/cunit/test_color.c index 8d7a11f53..4a3a7978b 100644 --- a/cunit/test_color.c +++ b/cunit/test_color.c @@ -53,7 +53,7 @@ int add_color_suite(void) void test_color_GetRGB32(void) { int r, g, b; - uint32 rgb32 = 0x00AABBCC; + UINT32 rgb32 = 0x00AABBCC; GetRGB32(r, g, b, rgb32); CU_ASSERT(r == 0xAA); @@ -64,7 +64,7 @@ void test_color_GetRGB32(void) void test_color_GetBGR32(void) { int r, g, b; - uint32 bgr32 = 0x00CCBBAA; + UINT32 bgr32 = 0x00CCBBAA; GetBGR32(r, g, b, bgr32); CU_ASSERT(r == 0xAA); diff --git a/cunit/test_mppc.c b/cunit/test_mppc.c index 5912f951a..9c361c604 100644 --- a/cunit/test_mppc.c +++ b/cunit/test_mppc.c @@ -636,8 +636,8 @@ int add_mppc_suite(void) void test_mppc(void) { struct rdp_mppc_dec* rmppc; - uint32_t roff; - uint32_t rlen; + UINT32_t roff; + UINT32_t rlen; long int dur; struct timeval start_time; diff --git a/cunit/test_mppc_enc.c b/cunit/test_mppc_enc.c index bdafee7a1..fe49c0117 100644 --- a/cunit/test_mppc_enc.c +++ b/cunit/test_mppc_enc.c @@ -494,8 +494,8 @@ void test_mppc_enc(void) /* needed by decoder */ struct rdp_mppc_dec* rmppc; - uint32 roff; - uint32 rlen; + UINT32 roff; + UINT32 rlen; /* required for timing the test */ struct timeval start_time; diff --git a/cunit/test_pcap.c b/cunit/test_pcap.c index 51067a23d..1b2711ff5 100644 --- a/cunit/test_pcap.c +++ b/cunit/test_pcap.c @@ -58,7 +58,7 @@ BYTE test_packet_3[64] = typedef struct { void* data; - uint32 length; + UINT32 length; } test_packet; void test_pcap(void) diff --git a/cunit/test_rail.c b/cunit/test_rail.c index 8a4dab85d..f3fe4123f 100644 --- a/cunit/test_rail.c +++ b/cunit/test_rail.c @@ -411,7 +411,7 @@ typedef struct typedef struct { RAIL_ORDERS order_info; - uint32 event_type; + UINT32 event_type; } RAIL_EVENT; diff --git a/include/freerdp/altsec.h b/include/freerdp/altsec.h index f45821873..0eb67cbb5 100644 --- a/include/freerdp/altsec.h +++ b/include/freerdp/altsec.h @@ -38,129 +38,129 @@ struct _OFFSCREEN_DELETE_LIST { - uint32 sIndices; - uint32 cIndices; + UINT32 sIndices; + UINT32 cIndices; UINT16* indices; }; typedef struct _OFFSCREEN_DELETE_LIST OFFSCREEN_DELETE_LIST; struct _CREATE_OFFSCREEN_BITMAP_ORDER { - uint32 id; - uint32 cx; - uint32 cy; + UINT32 id; + UINT32 cx; + UINT32 cy; OFFSCREEN_DELETE_LIST deleteList; }; typedef struct _CREATE_OFFSCREEN_BITMAP_ORDER CREATE_OFFSCREEN_BITMAP_ORDER; struct _SWITCH_SURFACE_ORDER { - uint32 bitmapId; + UINT32 bitmapId; }; typedef struct _SWITCH_SURFACE_ORDER SWITCH_SURFACE_ORDER; struct _NINE_GRID_BITMAP_INFO { - uint32 flFlags; - uint32 ulLeftWidth; - uint32 ulRightWidth; - uint32 ulTopHeight; - uint32 ulBottomHeight; - uint32 crTransparent; + UINT32 flFlags; + UINT32 ulLeftWidth; + UINT32 ulRightWidth; + UINT32 ulTopHeight; + UINT32 ulBottomHeight; + UINT32 crTransparent; }; typedef struct _NINE_GRID_BITMAP_INFO NINE_GRID_BITMAP_INFO; struct _CREATE_NINE_GRID_BITMAP_ORDER { - uint32 bitmapBpp; - uint32 bitmapId; - uint32 cx; - uint32 cy; + UINT32 bitmapBpp; + UINT32 bitmapId; + UINT32 cx; + UINT32 cy; NINE_GRID_BITMAP_INFO nineGridInfo; }; typedef struct _CREATE_NINE_GRID_BITMAP_ORDER CREATE_NINE_GRID_BITMAP_ORDER; struct _FRAME_MARKER_ORDER { - uint32 action; + UINT32 action; }; typedef struct _FRAME_MARKER_ORDER FRAME_MARKER_ORDER; struct _STREAM_BITMAP_FIRST_ORDER { - uint32 bitmapFlags; - uint32 bitmapBpp; - uint32 bitmapType; - uint32 bitmapWidth; - uint32 bitmapHeight; - uint32 bitmapSize; - uint32 bitmapBlockSize; + UINT32 bitmapFlags; + UINT32 bitmapBpp; + UINT32 bitmapType; + UINT32 bitmapWidth; + UINT32 bitmapHeight; + UINT32 bitmapSize; + UINT32 bitmapBlockSize; BYTE* bitmapBlock; }; typedef struct _STREAM_BITMAP_FIRST_ORDER STREAM_BITMAP_FIRST_ORDER; struct _STREAM_BITMAP_NEXT_ORDER { - uint32 bitmapFlags; - uint32 bitmapType; - uint32 bitmapBlockSize; + UINT32 bitmapFlags; + UINT32 bitmapType; + UINT32 bitmapBlockSize; BYTE* bitmapBlock; }; typedef struct _STREAM_BITMAP_NEXT_ORDER STREAM_BITMAP_NEXT_ORDER; struct _DRAW_GDIPLUS_FIRST_ORDER { - uint32 cbSize; - uint32 cbTotalSize; - uint32 cbTotalEmfSize; + UINT32 cbSize; + UINT32 cbTotalSize; + UINT32 cbTotalEmfSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_FIRST_ORDER DRAW_GDIPLUS_FIRST_ORDER; struct _DRAW_GDIPLUS_NEXT_ORDER { - uint32 cbSize; + UINT32 cbSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_NEXT_ORDER DRAW_GDIPLUS_NEXT_ORDER; struct _DRAW_GDIPLUS_END_ORDER { - uint32 cbSize; - uint32 cbTotalSize; - uint32 cbTotalEmfSize; + UINT32 cbSize; + UINT32 cbTotalSize; + UINT32 cbTotalEmfSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_END_ORDER DRAW_GDIPLUS_END_ORDER; struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER { - uint32 flags; - uint32 cacheType; - uint32 cacheIndex; - uint32 cbSize; - uint32 cbTotalSize; + UINT32 flags; + UINT32 cacheType; + UINT32 cacheIndex; + UINT32 cbSize; + UINT32 cbTotalSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER DRAW_GDIPLUS_CACHE_FIRST_ORDER; struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER { - uint32 flags; - uint32 cacheType; - uint32 cacheIndex; - uint32 cbSize; + UINT32 flags; + UINT32 cacheType; + UINT32 cacheIndex; + UINT32 cbSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER DRAW_GDIPLUS_CACHE_NEXT_ORDER; struct _DRAW_GDIPLUS_CACHE_END_ORDER { - uint32 flags; - uint32 cacheType; - uint32 cacheIndex; - uint32 cbSize; - uint32 cbTotalSize; + UINT32 flags; + UINT32 cacheType; + UINT32 cacheIndex; + UINT32 cbSize; + UINT32 cbTotalSize; BYTE* emfRecords; }; typedef struct _DRAW_GDIPLUS_CACHE_END_ORDER DRAW_GDIPLUS_CACHE_END_ORDER; @@ -181,7 +181,7 @@ typedef void (*pDrawGdiPlusCacheEnd)(rdpContext* context, DRAW_GDIPLUS_CACHE_END struct rdp_altsec_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pCreateOffscreenBitmap CreateOffscreenBitmap; /* 16 */ pSwitchSurface SwitchSurface; /* 17 */ @@ -195,7 +195,7 @@ struct rdp_altsec_update pDrawGdiPlusCacheFirst DrawGdiPlusCacheFirst; /* 25 */ pDrawGdiPlusCacheNext DrawGdiPlusCacheNext; /* 26 */ pDrawGdiPlusCacheEnd DrawGdiPlusCacheEnd; /* 27 */ - uint32 paddingB[32 - 28]; /* 28 */ + UINT32 paddingB[32 - 28]; /* 28 */ /* internal */ diff --git a/include/freerdp/cache/bitmap.h b/include/freerdp/cache/bitmap.h index 5d6ebe8f2..742184ab8 100644 --- a/include/freerdp/cache/bitmap.h +++ b/include/freerdp/cache/bitmap.h @@ -33,7 +33,7 @@ typedef struct rdp_bitmap_cache rdpBitmapCache; struct _BITMAP_V2_CELL { - uint32 number; + UINT32 number; rdpBitmap** entries; }; @@ -45,11 +45,11 @@ struct rdp_bitmap_cache pCacheBitmapV2 CacheBitmapV2; /* 3 */ pCacheBitmapV3 CacheBitmapV3; /* 4 */ pBitmapUpdate BitmapUpdate; /* 5 */ - uint32 paddingA[16 - 6]; /* 6 */ + UINT32 paddingA[16 - 6]; /* 6 */ - uint32 maxCells; /* 16 */ + UINT32 maxCells; /* 16 */ BITMAP_V2_CELL* cells; /* 17 */ - uint32 paddingB[32 - 18]; /* 18 */ + UINT32 paddingB[32 - 18]; /* 18 */ /* internal */ @@ -59,8 +59,8 @@ struct rdp_bitmap_cache rdpSettings* settings; }; -FREERDP_API rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index); -FREERDP_API void bitmap_cache_put(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index, rdpBitmap* bitmap); +FREERDP_API rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index); +FREERDP_API void bitmap_cache_put(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index, rdpBitmap* bitmap); FREERDP_API void bitmap_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/brush.h b/include/freerdp/cache/brush.h index 025f54a9f..046fce0e0 100644 --- a/include/freerdp/cache/brush.h +++ b/include/freerdp/cache/brush.h @@ -33,7 +33,7 @@ typedef struct rdp_brush_cache rdpBrushCache; struct _BRUSH_ENTRY { - uint32 bpp; + UINT32 bpp; void* entry; }; @@ -43,21 +43,21 @@ struct rdp_brush_cache pCacheBrush CacheBrush; /* 1 */ pPolygonSC PolygonSC; /* 2 */ pPolygonCB PolygonCB; /* 3 */ - uint32 paddingA[16 - 4]; /* 4 */ + UINT32 paddingA[16 - 4]; /* 4 */ - uint32 maxEntries; /* 16 */ - uint32 maxMonoEntries; /* 17 */ + UINT32 maxEntries; /* 16 */ + UINT32 maxMonoEntries; /* 17 */ BRUSH_ENTRY* entries; /* 18 */ BRUSH_ENTRY* monoEntries; /* 19 */ - uint32 paddingB[32 - 20]; /* 20 */ + UINT32 paddingB[32 - 20]; /* 20 */ /* internal */ rdpSettings* settings; }; -FREERDP_API void* brush_cache_get(rdpBrushCache* brush, uint32 index, uint32* bpp); -FREERDP_API void brush_cache_put(rdpBrushCache* brush, uint32 index, void* entry, uint32 bpp); +FREERDP_API void* brush_cache_get(rdpBrushCache* brush, UINT32 index, UINT32* bpp); +FREERDP_API void brush_cache_put(rdpBrushCache* brush, UINT32 index, void* entry, UINT32 bpp); FREERDP_API void brush_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/glyph.h b/include/freerdp/cache/glyph.h index 8cfaeab63..5468ea0d7 100644 --- a/include/freerdp/cache/glyph.h +++ b/include/freerdp/cache/glyph.h @@ -34,15 +34,15 @@ typedef struct rdp_glyph_cache rdpGlyphCache; struct _GLYPH_CACHE { - uint32 number; - uint32 maxCellSize; + UINT32 number; + UINT32 maxCellSize; rdpGlyph** entries; }; struct _FRAGMENT_CACHE_ENTRY { void* fragment; - uint32 size; + UINT32 size; }; struct _FRAGMENT_CACHE @@ -59,11 +59,11 @@ struct rdp_glyph_cache rdpSettings* settings; }; -FREERDP_API rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, uint32 id, uint32 index); -FREERDP_API void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGlyph* entry); +FREERDP_API rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index); +FREERDP_API void glyph_cache_put(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index, rdpGlyph* entry); -FREERDP_API void* glyph_cache_fragment_get(rdpGlyphCache* glyph, uint32 index, uint32* count); -FREERDP_API void glyph_cache_fragment_put(rdpGlyphCache* glyph, uint32 index, uint32 count, void* entry); +FREERDP_API void* glyph_cache_fragment_get(rdpGlyphCache* glyph, UINT32 index, UINT32* count); +FREERDP_API void glyph_cache_fragment_put(rdpGlyphCache* glyph, UINT32 index, UINT32 count, void* entry); FREERDP_API void glyph_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/nine_grid.h b/include/freerdp/cache/nine_grid.h index 7786dd1cf..eab363c42 100644 --- a/include/freerdp/cache/nine_grid.h +++ b/include/freerdp/cache/nine_grid.h @@ -40,20 +40,20 @@ struct rdp_nine_grid_cache { pDrawNineGrid DrawNineGrid; /* 0 */ pMultiDrawNineGrid MultiDrawNineGrid; /* 1 */ - uint32 paddingA[16 - 2]; /* 2 */ + UINT32 paddingA[16 - 2]; /* 2 */ - uint32 maxEntries; /* 16 */ - uint32 maxSize; /* 17 */ + UINT32 maxEntries; /* 16 */ + UINT32 maxSize; /* 17 */ NINE_GRID_ENTRY* entries; /* 18 */ - uint32 paddingB[32 - 19]; /* 19 */ + UINT32 paddingB[32 - 19]; /* 19 */ /* internal */ rdpSettings* settings; }; -FREERDP_API void* nine_grid_cache_get(rdpNineGridCache* nine_grid, uint32 index); -FREERDP_API void nine_grid_cache_put(rdpNineGridCache* nine_grid, uint32 index, void* entry); +FREERDP_API void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index); +FREERDP_API void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry); FREERDP_API void nine_grid_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/offscreen.h b/include/freerdp/cache/offscreen.h index 12db818b4..046b93a5d 100644 --- a/include/freerdp/cache/offscreen.h +++ b/include/freerdp/cache/offscreen.h @@ -32,10 +32,10 @@ typedef struct rdp_offscreen_cache rdpOffscreenCache; struct rdp_offscreen_cache { - uint32 maxSize; /* 0 */ - uint32 maxEntries; /* 1 */ + UINT32 maxSize; /* 0 */ + UINT32 maxEntries; /* 1 */ rdpBitmap** entries; /* 2 */ - uint32 currentSurface; /* 3 */ + UINT32 currentSurface; /* 3 */ /* internal */ @@ -43,9 +43,9 @@ struct rdp_offscreen_cache rdpSettings* settings; }; -FREERDP_API rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, uint32 index); -FREERDP_API void offscreen_cache_put(rdpOffscreenCache* offscreen_cache, uint32 index, rdpBitmap* bitmap); -FREERDP_API void offscreen_cache_delete(rdpOffscreenCache* offscreen, uint32 index); +FREERDP_API rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index); +FREERDP_API void offscreen_cache_put(rdpOffscreenCache* offscreen_cache, UINT32 index, rdpBitmap* bitmap); +FREERDP_API void offscreen_cache_delete(rdpOffscreenCache* offscreen, UINT32 index); FREERDP_API void offscreen_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/palette.h b/include/freerdp/cache/palette.h index 8068b3c62..25779d59a 100644 --- a/include/freerdp/cache/palette.h +++ b/include/freerdp/cache/palette.h @@ -38,7 +38,7 @@ struct _PALETTE_TABLE_ENTRY struct rdp_palette_cache { - uint32 maxEntries; /* 0 */ + UINT32 maxEntries; /* 0 */ PALETTE_TABLE_ENTRY* entries; /* 1 */ /* internal */ @@ -46,8 +46,8 @@ struct rdp_palette_cache rdpSettings* settings; }; -FREERDP_API void* palette_cache_get(rdpPaletteCache* palette, uint32 index); -FREERDP_API void palette_cache_put(rdpPaletteCache* palette, uint32 index, void* entry); +FREERDP_API void* palette_cache_get(rdpPaletteCache* palette, UINT32 index); +FREERDP_API void palette_cache_put(rdpPaletteCache* palette, UINT32 index, void* entry); FREERDP_API void palette_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/cache/pointer.h b/include/freerdp/cache/pointer.h index b25650d68..2813b0f7e 100644 --- a/include/freerdp/cache/pointer.h +++ b/include/freerdp/cache/pointer.h @@ -33,7 +33,7 @@ typedef struct rdp_pointer_cache rdpPointerCache; struct rdp_pointer_cache { - uint32 cacheSize; /* 0 */ + UINT32 cacheSize; /* 0 */ rdpPointer** entries; /* 1 */ /* internal */ @@ -42,8 +42,8 @@ struct rdp_pointer_cache rdpSettings* settings; }; -FREERDP_API rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, uint32 index); -FREERDP_API void pointer_cache_put(rdpPointerCache* pointer_cache, uint32 index, rdpPointer* pointer); +FREERDP_API rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index); +FREERDP_API void pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer); FREERDP_API void pointer_cache_register_callbacks(rdpUpdate* update); diff --git a/include/freerdp/channels/rdpdr.h b/include/freerdp/channels/rdpdr.h index 956595a04..01de5f07e 100644 --- a/include/freerdp/channels/rdpdr.h +++ b/include/freerdp/channels/rdpdr.h @@ -474,9 +474,9 @@ typedef void (*pcFreeDevice)(DEVICE* device); struct _DEVICE { - uint32 id; + UINT32 id; - uint32 type; + UINT32 type; char* name; STREAM* data; @@ -492,13 +492,13 @@ struct _IRP DEVICE* device; DEVMAN* devman; - uint32 FileId; - uint32 CompletionId; - uint32 MajorFunction; - uint32 MinorFunction; + UINT32 FileId; + UINT32 CompletionId; + UINT32 MajorFunction; + UINT32 MinorFunction; STREAM* input; - uint32 IoStatus; + UINT32 IoStatus; STREAM* output; pcIRPResponse Complete; @@ -508,7 +508,7 @@ struct _IRP struct _DEVMAN { rdpSvcPlugin* plugin; - uint32 id_sequence; + UINT32 id_sequence; LIST* devices; }; diff --git a/include/freerdp/channels/rdpsnd.h b/include/freerdp/channels/rdpsnd.h index 4545077a8..da59c5e07 100644 --- a/include/freerdp/channels/rdpsnd.h +++ b/include/freerdp/channels/rdpsnd.h @@ -29,7 +29,7 @@ struct rdpsnd_format { UINT16 wFormatTag; UINT16 nChannels; - uint32 nSamplesPerSec; + UINT32 nSamplesPerSec; UINT16 nBlockAlign; UINT16 wBitsPerSample; UINT16 cbSize; diff --git a/include/freerdp/channels/wtsvc.h b/include/freerdp/channels/wtsvc.h index 8cb90135b..4af365f48 100644 --- a/include/freerdp/channels/wtsvc.h +++ b/include/freerdp/channels/wtsvc.h @@ -68,7 +68,7 @@ FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelMa FREERDP_API void* WTSVirtualChannelOpenEx( /* __in */ WTSVirtualChannelManager* vcm, /* __in */ const char* pVirtualName, - /* __in */ uint32 flags); + /* __in */ UINT32 flags); /** * Returns information about a specified virtual channel. @@ -80,7 +80,7 @@ FREERDP_API BOOL WTSVirtualChannelQuery( /* __in */ void* hChannelHandle, /* __in */ WTS_VIRTUAL_CLASS WtsVirtualClass, /* __out */ void** ppBuffer, - /* __out */ uint32* pBytesReturned); + /* __out */ UINT32* pBytesReturned); /** * Frees memory allocated by WTSVirtualChannelQuery @@ -107,10 +107,10 @@ FREERDP_API void WTSFreeMemory( */ FREERDP_API BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, - /* __in */ uint32 TimeOut, + /* __in */ UINT32 TimeOut, /* __out */ BYTE* Buffer, - /* __in */ uint32 BufferSize, - /* __out */ uint32* pBytesRead); + /* __in */ UINT32 BufferSize, + /* __out */ UINT32* pBytesRead); /** * Writes data to the server end of a virtual channel. @@ -118,8 +118,8 @@ FREERDP_API BOOL WTSVirtualChannelRead( FREERDP_API BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, /* __in */ BYTE* Buffer, - /* __in */ uint32 Length, - /* __out */ uint32* pBytesWritten); + /* __in */ UINT32 Length, + /* __out */ UINT32* pBytesWritten); /** * Closes an open virtual channel handle. diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h index 9940b00dd..5896029df 100644 --- a/include/freerdp/client/cliprdr.h +++ b/include/freerdp/client/cliprdr.h @@ -49,17 +49,17 @@ typedef RDP_EVENT RDP_CB_MONITOR_READY_EVENT; struct _RDP_CB_FORMAT_LIST_EVENT { RDP_EVENT event; - uint32* formats; + UINT32* formats; UINT16 num_formats; BYTE* raw_format_data; - uint32 raw_format_data_size; + UINT32 raw_format_data_size; }; typedef struct _RDP_CB_FORMAT_LIST_EVENT RDP_CB_FORMAT_LIST_EVENT; struct _RDP_CB_DATA_REQUEST_EVENT { RDP_EVENT event; - uint32 format; + UINT32 format; }; typedef struct _RDP_CB_DATA_REQUEST_EVENT RDP_CB_DATA_REQUEST_EVENT; @@ -67,7 +67,7 @@ struct _RDP_CB_DATA_RESPONSE_EVENT { RDP_EVENT event; BYTE* data; - uint32 size; + UINT32 size; }; typedef struct _RDP_CB_DATA_RESPONSE_EVENT RDP_CB_DATA_RESPONSE_EVENT; diff --git a/include/freerdp/client/tsmf.h b/include/freerdp/client/tsmf.h index 7f1163846..56775b483 100644 --- a/include/freerdp/client/tsmf.h +++ b/include/freerdp/client/tsmf.h @@ -33,8 +33,8 @@ struct _RDP_VIDEO_FRAME_EVENT { RDP_EVENT event; BYTE* frame_data; - uint32 frame_size; - uint32 frame_pixfmt; + UINT32 frame_size; + UINT32 frame_pixfmt; INT16 frame_width; INT16 frame_height; INT16 x; diff --git a/include/freerdp/codec/color.h b/include/freerdp/codec/color.h index 1ce222441..0a0ef90bf 100644 --- a/include/freerdp/codec/color.h +++ b/include/freerdp/codec/color.h @@ -242,19 +242,19 @@ FREERDP_API BYTE* freerdp_glyph_convert(int width, int height, BYTE* data); FREERDP_API void freerdp_bitmap_flip(BYTE * src, BYTE * dst, int scanLineSz, int height); FREERDP_API BYTE* freerdp_image_flip(BYTE* srcData, BYTE* dstData, int width, int height, int bpp); FREERDP_API BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, int height, int bpp, HCLRCONV clrconv); -FREERDP_API BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv); +FREERDP_API BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, UINT32 bgcolor, UINT32 fgcolor, HCLRCONV clrconv); FREERDP_API void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, int width, int height, int bpp, HCLRCONV clrconv); FREERDP_API void freerdp_image_swap_color_order(BYTE* data, int width, int height); -FREERDP_API uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_var_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API uint32 freerdp_color_convert_var_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_var(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_rgb_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_bgr_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_var_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); +FREERDP_API UINT32 freerdp_color_convert_var_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv); -FREERDP_API HCLRCONV freerdp_clrconv_new(uint32 flags); +FREERDP_API HCLRCONV freerdp_clrconv_new(UINT32 flags); FREERDP_API void freerdp_clrconv_free(HCLRCONV clrconv); #ifdef __cplusplus diff --git a/include/freerdp/codec/mppc_dec.h b/include/freerdp/codec/mppc_dec.h index 32e00fa32..aab792638 100644 --- a/include/freerdp/codec/mppc_dec.h +++ b/include/freerdp/codec/mppc_dec.h @@ -45,11 +45,11 @@ struct rdp_mppc_dec BYTE* history_ptr; }; -FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); -FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen); +FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen); +FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen); +FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen); +FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen); +FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen); FREERDP_API struct rdp_mppc_dec* mppc_dec_new(void); FREERDP_API void mppc_dec_free(struct rdp_mppc_dec* dec); diff --git a/include/freerdp/codec/nsc.h b/include/freerdp/codec/nsc.h index 5e55fb3e8..ef22d3649 100644 --- a/include/freerdp/codec/nsc.h +++ b/include/freerdp/codec/nsc.h @@ -33,7 +33,7 @@ extern "C" { /* NSCODEC_BITMAP_STREAM */ struct _NSC_STREAM { - uint32 PlaneByteCount[4]; + UINT32 PlaneByteCount[4]; BYTE ColorLossLevel; BYTE ChromaSubSamplingLevel; UINT16 Reserved; @@ -46,13 +46,13 @@ typedef struct _NSC_CONTEXT_PRIV NSC_CONTEXT_PRIV; typedef struct _NSC_CONTEXT NSC_CONTEXT; struct _NSC_CONTEXT { - uint32 OrgByteCount[4]; /* original byte length of luma, chroma orange, chroma green, alpha variable in order */ + UINT32 OrgByteCount[4]; /* original byte length of luma, chroma orange, chroma green, alpha variable in order */ NSC_STREAM nsc_stream; UINT16 bpp; UINT16 width; UINT16 height; BYTE* bmpdata; /* final argb values in little endian order */ - uint32 bmpdata_length; /* the maximum length of the buffer that bmpdata points to */ + UINT32 bmpdata_length; /* the maximum length of the buffer that bmpdata points to */ RDP_PIXEL_FORMAT pixel_format; /* color palette allocated by the application */ @@ -65,10 +65,10 @@ struct _NSC_CONTEXT }; FREERDP_API NSC_CONTEXT* nsc_context_new(void); -FREERDP_API void nsc_context_set_cpu_opt(NSC_CONTEXT* context, uint32 cpu_opt); +FREERDP_API void nsc_context_set_cpu_opt(NSC_CONTEXT* context, UINT32 cpu_opt); FREERDP_API void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format); FREERDP_API void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, - UINT16 width, UINT16 height, BYTE* data, uint32 length); + UINT16 width, UINT16 height, BYTE* data, UINT32 length); FREERDP_API void nsc_compose_message(NSC_CONTEXT* context, STREAM* s, BYTE* bmpdata, int width, int height, int rowstride); FREERDP_API void nsc_context_free(NSC_CONTEXT* context); diff --git a/include/freerdp/codec/rfx.h b/include/freerdp/codec/rfx.h index 8b2c7915b..1c5a4bcc0 100644 --- a/include/freerdp/codec/rfx.h +++ b/include/freerdp/codec/rfx.h @@ -82,9 +82,9 @@ struct _RFX_CONTEXT UINT16 width; UINT16 height; RLGR_MODE mode; - uint32 version; - uint32 codec_id; - uint32 codec_version; + UINT32 version; + UINT32 codec_id; + UINT32 codec_version; RDP_PIXEL_FORMAT pixel_format; BYTE bits_per_pixel; @@ -92,10 +92,10 @@ struct _RFX_CONTEXT const BYTE* palette; /* temporary data within a frame */ - uint32 frame_idx; + UINT32 frame_idx; BOOL header_processed; BYTE num_quants; - uint32* quants; + UINT32* quants; BYTE quant_idx_y; BYTE quant_idx_cb; BYTE quant_idx_cr; @@ -103,8 +103,8 @@ struct _RFX_CONTEXT /* routines */ void (*decode_ycbcr_to_rgb)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); void (*encode_rgb_to_ycbcr)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); - void (*quantization_decode)(INT16* buffer, const uint32* quantization_values); - void (*quantization_encode)(INT16* buffer, const uint32* quantization_values); + void (*quantization_decode)(INT16* buffer, const UINT32* quantization_values); + void (*quantization_encode)(INT16* buffer, const UINT32* quantization_values); void (*dwt_2d_decode)(INT16* buffer, INT16* dwt_buffer); void (*dwt_2d_encode)(INT16* buffer, INT16* dwt_buffer); @@ -115,11 +115,11 @@ typedef struct _RFX_CONTEXT RFX_CONTEXT; FREERDP_API RFX_CONTEXT* rfx_context_new(void); FREERDP_API void rfx_context_free(RFX_CONTEXT* context); -FREERDP_API void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt); +FREERDP_API void rfx_context_set_cpu_opt(RFX_CONTEXT* context, UINT32 cpu_opt); FREERDP_API void rfx_context_set_pixel_format(RFX_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format); FREERDP_API void rfx_context_reset(RFX_CONTEXT* context); -FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length); +FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, UINT32 length); FREERDP_API UINT16 rfx_message_get_tile_count(RFX_MESSAGE* message); FREERDP_API RFX_TILE* rfx_message_get_tile(RFX_MESSAGE* message, int index); FREERDP_API UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message); diff --git a/include/freerdp/crypto/ber.h b/include/freerdp/crypto/ber.h index 1835c0c25..ab028c3db 100644 --- a/include/freerdp/crypto/ber.h +++ b/include/freerdp/crypto/ber.h @@ -76,9 +76,9 @@ FREERDP_API int ber_write_octet_string_tag(STREAM* s, int length); FREERDP_API int ber_skip_octet_string(int length); FREERDP_API BOOL ber_read_BOOL(STREAM* s, BOOL* value); FREERDP_API void ber_write_BOOL(STREAM* s, BOOL value); -FREERDP_API BOOL ber_read_integer(STREAM* s, uint32* value); -FREERDP_API int ber_write_integer(STREAM* s, uint32 value); +FREERDP_API BOOL ber_read_integer(STREAM* s, UINT32* value); +FREERDP_API int ber_write_integer(STREAM* s, UINT32 value); FREERDP_API BOOL ber_read_integer_length(STREAM* s, int* length); -FREERDP_API int ber_skip_integer(uint32 value); +FREERDP_API int ber_skip_integer(UINT32 value); #endif /* FREERDP_CRYPTO_BER_H */ diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index c06fe7ed8..91e0eae33 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -80,43 +80,43 @@ struct crypto_cert_struct typedef struct crypto_sha1_struct* CryptoSha1; FREERDP_API CryptoSha1 crypto_sha1_init(void); -FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length); +FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, UINT32 length); FREERDP_API void crypto_sha1_final(CryptoSha1 sha1, BYTE* out_data); #define CRYPTO_MD5_DIGEST_LENGTH MD5_DIGEST_LENGTH typedef struct crypto_md5_struct* CryptoMd5; FREERDP_API CryptoMd5 crypto_md5_init(void); -FREERDP_API void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length); +FREERDP_API void crypto_md5_update(CryptoMd5 md5, const BYTE* data, UINT32 length); FREERDP_API void crypto_md5_final(CryptoMd5 md5, BYTE* out_data); typedef struct crypto_rc4_struct* CryptoRc4; -FREERDP_API CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length); -FREERDP_API void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data); +FREERDP_API CryptoRc4 crypto_rc4_init(const BYTE* key, UINT32 length); +FREERDP_API void crypto_rc4(CryptoRc4 rc4, UINT32 length, const BYTE* in_data, BYTE* out_data); FREERDP_API void crypto_rc4_free(CryptoRc4 rc4); typedef struct crypto_des3_struct* CryptoDes3; FREERDP_API CryptoDes3 crypto_des3_encrypt_init(const BYTE* key, const BYTE* ivec); FREERDP_API CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec); -FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE *out_data); -FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE* out_data); +FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, UINT32 length, const BYTE *in_data, BYTE *out_data); +FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, UINT32 length, const BYTE *in_data, BYTE* out_data); FREERDP_API void crypto_des3_free(CryptoDes3 des3); typedef struct crypto_hmac_struct* CryptoHmac; FREERDP_API CryptoHmac crypto_hmac_new(void); -FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE *data, uint32 length); -FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const BYTE *data, uint32 length); -FREERDP_API void crypto_hmac_final(CryptoHmac hmac, BYTE *out_data, uint32 length); +FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE *data, UINT32 length); +FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const BYTE *data, UINT32 length); +FREERDP_API void crypto_hmac_final(CryptoHmac hmac, BYTE *out_data, UINT32 length); FREERDP_API void crypto_hmac_free(CryptoHmac hmac); typedef struct crypto_cert_struct* CryptoCert; #include -FREERDP_API CryptoCert crypto_cert_read(BYTE* data, uint32 length); +FREERDP_API CryptoCert crypto_cert_read(BYTE* data, UINT32 length); FREERDP_API char* crypto_cert_fingerprint(X509* xcert); FREERDP_API char* crypto_cert_subject(X509* xcert); FREERDP_API char* crypto_cert_subject_common_name(X509* xcert, int* length); @@ -134,10 +134,10 @@ extern const BYTE tssk_modulus[]; extern const BYTE tssk_privateExponent[]; extern const BYTE tssk_exponent[]; -FREERDP_API void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); -FREERDP_API void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); -FREERDP_API void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); -FREERDP_API void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); +FREERDP_API void crypto_rsa_public_encrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); +FREERDP_API void crypto_rsa_public_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output); +FREERDP_API void crypto_rsa_private_encrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); +FREERDP_API void crypto_rsa_private_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output); FREERDP_API void crypto_reverse(BYTE* data, int length); FREERDP_API void crypto_nonce(BYTE* nonce, int size); diff --git a/include/freerdp/crypto/er.h b/include/freerdp/crypto/er.h index 4174ea985..bbbcc83b8 100644 --- a/include/freerdp/crypto/er.h +++ b/include/freerdp/crypto/er.h @@ -73,16 +73,16 @@ FREERDP_API int er_write_sequence_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_sequence(int length); FREERDP_API int er_skip_sequence_tag(int length); FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding); -FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag); +FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, UINT32 length, BYTE padding, BOOL flag); FREERDP_API BOOL er_read_octet_string(STREAM* s, int* length); FREERDP_API void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag); FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, BOOL flag); FREERDP_API int er_skip_octet_string(int length); FREERDP_API BOOL er_read_BOOL(STREAM* s, BOOL* value); FREERDP_API void er_write_BOOL(STREAM* s, BOOL value); -FREERDP_API BOOL er_read_integer(STREAM* s, uint32* value); -FREERDP_API int er_write_integer(STREAM* s, sint32 value); +FREERDP_API BOOL er_read_integer(STREAM* s, UINT32* value); +FREERDP_API int er_write_integer(STREAM* s, INT32 value); FREERDP_API BOOL er_read_integer_length(STREAM* s, int* length); -FREERDP_API int er_skip_integer(sint32 value); +FREERDP_API int er_skip_integer(INT32 value); #endif /* FREERDP_CRYPTO_ER_H */ diff --git a/include/freerdp/crypto/per.h b/include/freerdp/crypto/per.h index 54db219a4..479784c2d 100644 --- a/include/freerdp/crypto/per.h +++ b/include/freerdp/crypto/per.h @@ -33,9 +33,9 @@ FREERDP_API BOOL per_read_number_of_sets(STREAM* s, BYTE* number); FREERDP_API void per_write_number_of_sets(STREAM* s, BYTE number); FREERDP_API BOOL per_read_padding(STREAM* s, int length); FREERDP_API void per_write_padding(STREAM* s, int length); -FREERDP_API BOOL per_read_integer(STREAM* s, uint32* integer); +FREERDP_API BOOL per_read_integer(STREAM* s, UINT32* integer); FREERDP_API BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min); -FREERDP_API void per_write_integer(STREAM* s, uint32 integer); +FREERDP_API void per_write_integer(STREAM* s, UINT32 integer); FREERDP_API void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min); FREERDP_API BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count); FREERDP_API void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count); diff --git a/include/freerdp/dvc.h b/include/freerdp/dvc.h index 5c83776bc..1835e4928 100644 --- a/include/freerdp/dvc.h +++ b/include/freerdp/dvc.h @@ -72,7 +72,7 @@ struct _IWTSVirtualChannel { /* Starts a write request on the channel. */ int (*Write) (IWTSVirtualChannel* pChannel, - uint32 cbSize, + UINT32 cbSize, BYTE* pBuffer, void* pReserved); /* Closes the channel. */ @@ -85,7 +85,7 @@ struct _IWTSVirtualChannelManager endpoint, or creates a static channel. */ int (*CreateListener) (IWTSVirtualChannelManager* pChannelMgr, const char* pszChannelName, - uint32 ulFlags, + UINT32 ulFlags, IWTSListenerCallback* pListenerCallback, IWTSListener** ppListener); /* Push a virtual channel event. @@ -93,9 +93,9 @@ struct _IWTSVirtualChannelManager int (*PushEvent) (IWTSVirtualChannelManager* pChannelMgr, RDP_EVENT* pEvent); /* Find the channel or ID to send data to a specific endpoint. */ - uint32 (*GetChannelId) (IWTSVirtualChannel * channel); + UINT32 (*GetChannelId) (IWTSVirtualChannel * channel); IWTSVirtualChannel* (*FindChannelById) (IWTSVirtualChannelManager* pChannelMgr, - uint32 ChannelId); + UINT32 ChannelId); }; struct _IWTSPlugin @@ -110,7 +110,7 @@ struct _IWTSPlugin /* Notifies the plug-in that the Remote Desktop Connection (RDC) client has disconnected from the RD Session Host server. */ int (*Disconnected) (IWTSPlugin* pPlugin, - uint32 dwDisconnectCode); + UINT32 dwDisconnectCode); /* Notifies the plug-in that the Remote Desktop Connection (RDC) client has terminated. */ int (*Terminated) (IWTSPlugin* pPlugin); @@ -131,7 +131,7 @@ struct _IWTSVirtualChannelCallback { /* Notifies the user about data that is being received. */ int (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback, - uint32 cbSize, + UINT32 cbSize, BYTE* pBuffer); /* Notifies the user that the channel has been closed. */ int (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback); diff --git a/include/freerdp/extension.h b/include/freerdp/extension.h index bf740b222..382273d50 100644 --- a/include/freerdp/extension.h +++ b/include/freerdp/extension.h @@ -35,11 +35,11 @@ struct rdp_ext_plugin int (*uninit) (rdpExtPlugin* plugin, freerdp* instance); }; -typedef uint32 (FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, freerdp* instance); +typedef UINT32 (FREERDP_CC* PFREERDP_EXTENSION_HOOK)(rdpExtPlugin* plugin, freerdp* instance); -typedef uint32 (FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin); -typedef uint32 (FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook); -typedef uint32 (FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook); +typedef UINT32 (FREERDP_CC* PREGISTEREXTENSION)(rdpExtPlugin* plugin); +typedef UINT32 (FREERDP_CC* PREGISTERPRECONNECTHOOK)(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook); +typedef UINT32 (FREERDP_CC* PREGISTERPOSTCONNECTHOOK)(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook); struct _FREERDP_EXTENSION_ENTRY_POINTS { diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 62b525451..2397ecc00 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -72,7 +72,7 @@ struct rdp_context Pointer to the client peer. This is set by a call to freerdp_peer_context_new() during peer initialization. This field is used only on the server side. */ - uint32 paddingA[16 - 2]; /* 2 */ + UINT32 paddingA[16 - 2]; /* 2 */ int argc; /**< (offset 16) Number of arguments given to the program at launch time. @@ -82,7 +82,7 @@ struct rdp_context List of arguments given to the program at launch time. Used to keep this data available and used later on, typically just before connection initialization. @see freerdp_parse_args() */ - uint32 paddingB[32 - 18]; /* 18 */ + UINT32 paddingB[32 - 18]; /* 18 */ rdpRdp* rdp; /**< (offset 32) Pointer to a rdp_rdp structure used to keep the connection's parameters. @@ -96,7 +96,7 @@ struct rdp_context rdpCache* cache; /* 35 */ rdpChannels* channels; /* 36 */ rdpGraphics* graphics; /* 37 */ - uint32 paddingC[64 - 38]; /* 38 */ + UINT32 paddingC[64 - 38]; /* 38 */ }; /** Defines the options for a given instance of RDP connection. @@ -115,7 +115,7 @@ struct rdp_freerdp rdpContext field first, and any additional content following it. Can be allocated by a call to freerdp_context_new(). Must be dealocated by a call to freerdp_context_free() before deallocating the current instance. */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ rdpInput* input; /* (offset 16) Input handle for the connection. @@ -126,7 +126,7 @@ struct rdp_freerdp rdpSettings* settings; /**< (offset 18) Pointer to a rdpSettings structure. Will be used to maintain the required RDP settings. Will be initialized by a call to freerdp_context_new() */ - uint32 paddingB[32 - 19]; /* 19 */ + UINT32 paddingB[32 - 19]; /* 19 */ size_t context_size; /* (offset 32) Specifies the size of the 'context' field. freerdp_context_new() will use this size to allocate the context buffer. @@ -146,7 +146,7 @@ struct rdp_freerdp Callback for context deallocation Can be set before calling freerdp_context_free() to have it executed before deallocation. Must be set to NULL if not needed. */ - uint32 paddingC[48 - 35]; /* 35 */ + UINT32 paddingC[48 - 35]; /* 35 */ pPreConnect PreConnect; /**< (offset 48) Callback for pre-connect operations. @@ -168,7 +168,7 @@ struct rdp_freerdp Callback for changed certificate validation. Used when a certificate differs from stored fingerprint. If returns TRUE, the new fingerprint will be trusted and old thrown out. */ - uint32 paddingD[64 - 51]; /* 51 */ + UINT32 paddingD[64 - 51]; /* 51 */ pSendChannelData SendChannelData; /* (offset 64) Callback for sending data to a channel. @@ -178,7 +178,7 @@ struct rdp_freerdp Callback for receiving data from a channel. This is called by freerdp_channel_process() (if not NULL). Clients will typically use a function that calls freerdp_channels_data() to perform the needed tasks. */ - uint32 paddingE[80 - 66]; /* 66 */ + UINT32 paddingE[80 - 66]; /* 66 */ }; FREERDP_API void freerdp_context_new(freerdp* instance); @@ -191,7 +191,7 @@ FREERDP_API BOOL freerdp_disconnect(freerdp* instance); FREERDP_API BOOL freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount); FREERDP_API BOOL freerdp_check_fds(freerdp* instance); -FREERDP_API uint32 freerdp_error_info(freerdp* instance); +FREERDP_API UINT32 freerdp_error_info(freerdp* instance); FREERDP_API void freerdp_get_version(int* major, int* minor, int* revision); diff --git a/include/freerdp/gdi/32bpp.h b/include/freerdp/gdi/32bpp.h index 4b9eb2c8d..cacc05346 100644 --- a/include/freerdp/gdi/32bpp.h +++ b/include/freerdp/gdi/32bpp.h @@ -23,7 +23,7 @@ typedef int (*pLineTo_32bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); -FREERDP_API uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color); +FREERDP_API UINT32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color); FREERDP_API int FillRect_32bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); FREERDP_API int BitBlt_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); diff --git a/include/freerdp/gdi/bitmap.h b/include/freerdp/gdi/bitmap.h index df79e6ea1..4422e820c 100644 --- a/include/freerdp/gdi/bitmap.h +++ b/include/freerdp/gdi/bitmap.h @@ -27,13 +27,13 @@ FREERDP_API GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos); FREERDP_API GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor); FREERDP_API BYTE gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API UINT32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y); -FREERDP_API uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y); +FREERDP_API UINT32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y); FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, BYTE pixel); FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel); -FREERDP_API void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel); +FREERDP_API void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, UINT32 pixel); FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, BYTE* data); FREERDP_API HGDI_BITMAP gdi_CreateCompatibleBitmap(HGDI_DC hdc, int nWidth, int nHeight); FREERDP_API int gdi_BitBlt(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index c419eddb3..84f2da0cd 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -281,13 +281,13 @@ struct rdp_gdi gdiBitmap* image; }; -FREERDP_API uint32 gdi_rop3_code(BYTE code); +FREERDP_API UINT32 gdi_rop3_code(BYTE code); FREERDP_API BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y); FREERDP_API BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y); FREERDP_API int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width); FREERDP_API void gdi_resize(rdpGdi* gdi, int width, int height); -FREERDP_API int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer); +FREERDP_API int gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer); FREERDP_API void gdi_free(freerdp* instance); #ifdef WITH_DEBUG_GDI diff --git a/include/freerdp/gdi/pen.h b/include/freerdp/gdi/pen.h index 1872c71a4..20e7030ca 100644 --- a/include/freerdp/gdi/pen.h +++ b/include/freerdp/gdi/pen.h @@ -26,6 +26,6 @@ FREERDP_API HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor); FREERDP_API BYTE gdi_GetPenColor_8bpp(HGDI_PEN pen); FREERDP_API UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen); -FREERDP_API uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen); +FREERDP_API UINT32 gdi_GetPenColor_32bpp(HGDI_PEN pen); #endif /* __GDI_PEN_H */ diff --git a/include/freerdp/graphics.h b/include/freerdp/graphics.h index ef689aaf0..cba782343 100644 --- a/include/freerdp/graphics.h +++ b/include/freerdp/graphics.h @@ -47,23 +47,23 @@ struct rdp_bitmap pBitmap_Paint Paint; /* 3 */ pBitmap_Decompress Decompress; /* 4 */ pBitmap_SetSurface SetSurface; /* 5 */ - uint32 paddingA[16 - 6]; /* 6 */ + UINT32 paddingA[16 - 6]; /* 6 */ - uint32 left; /* 16 */ - uint32 top; /* 17 */ - uint32 right; /* 18 */ - uint32 bottom; /* 19 */ - uint32 width; /* 20 */ - uint32 height; /* 21 */ - uint32 bpp; /* 22 */ - uint32 flags; /* 23 */ - uint32 length; /* 24 */ + UINT32 left; /* 16 */ + UINT32 top; /* 17 */ + UINT32 right; /* 18 */ + UINT32 bottom; /* 19 */ + UINT32 width; /* 20 */ + UINT32 height; /* 21 */ + UINT32 bpp; /* 22 */ + UINT32 flags; /* 23 */ + UINT32 length; /* 24 */ BYTE* data; /* 25 */ - uint32 paddingB[32 - 26]; /* 26 */ + UINT32 paddingB[32 - 26]; /* 26 */ BOOL compressed; /* 32 */ BOOL ephemeral; /* 33 */ - uint32 paddingC[64 - 34]; /* 34 */ + UINT32 paddingC[64 - 34]; /* 34 */ }; FREERDP_API rdpBitmap* Bitmap_Alloc(rdpContext* context); @@ -93,18 +93,18 @@ struct rdp_pointer pPointer_Set Set; /* 3 */ pPointer_SetNull SetNull; /* 4*/ pPointer_SetDefault SetDefault; /* 5 */ - uint32 paddingA[16 - 6]; /* 6 */ + UINT32 paddingA[16 - 6]; /* 6 */ - uint32 xPos; /* 16 */ - uint32 yPos; /* 17 */ - uint32 width; /* 18 */ - uint32 height; /* 19 */ - uint32 xorBpp; /* 20 */ - uint32 lengthAndMask; /* 21 */ - uint32 lengthXorMask; /* 22 */ + UINT32 xPos; /* 16 */ + UINT32 yPos; /* 17 */ + UINT32 width; /* 18 */ + UINT32 height; /* 19 */ + UINT32 xorBpp; /* 20 */ + UINT32 lengthAndMask; /* 21 */ + UINT32 lengthXorMask; /* 22 */ BYTE* xorMaskData; /* 23 */ BYTE* andMaskData; /* 24 */ - uint32 paddingB[32 - 25]; /* 25 */ + UINT32 paddingB[32 - 25]; /* 25 */ }; FREERDP_API rdpPointer* Pointer_Alloc(rdpContext* context); @@ -119,8 +119,8 @@ FREERDP_API void Pointer_SetDefault(rdpContext* context); typedef void (*pGlyph_New)(rdpContext* context, rdpGlyph* glyph); typedef void (*pGlyph_Free)(rdpContext* context, rdpGlyph* glyph); typedef void (*pGlyph_Draw)(rdpContext* context, rdpGlyph* glyph, int x, int y); -typedef void (*pGlyph_BeginDraw)(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor); -typedef void (*pGlyph_EndDraw)(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor); +typedef void (*pGlyph_BeginDraw)(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor); +typedef void (*pGlyph_EndDraw)(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor); struct rdp_glyph { @@ -130,23 +130,23 @@ struct rdp_glyph pGlyph_Draw Draw; /* 3 */ pGlyph_BeginDraw BeginDraw; /* 4 */ pGlyph_EndDraw EndDraw; /* 5 */ - uint32 paddingA[16 - 6]; /* 6 */ + UINT32 paddingA[16 - 6]; /* 6 */ - sint32 x; /* 16 */ - sint32 y; /* 17 */ - uint32 cx; /* 18 */ - uint32 cy; /* 19 */ - uint32 cb; /* 20 */ + INT32 x; /* 16 */ + INT32 y; /* 17 */ + UINT32 cx; /* 18 */ + UINT32 cy; /* 19 */ + UINT32 cb; /* 20 */ BYTE* aj; /* 21 */ - uint32 paddingB[32 - 22]; /* 22 */ + UINT32 paddingB[32 - 22]; /* 22 */ }; FREERDP_API rdpGlyph* Glyph_Alloc(rdpContext* context); FREERDP_API void Glyph_New(rdpContext* context, rdpGlyph* glyph); FREERDP_API void Glyph_Free(rdpContext* context, rdpGlyph* glyph); FREERDP_API void Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y); -FREERDP_API void Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor); -FREERDP_API void Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor); +FREERDP_API void Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor); +FREERDP_API void Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor); /* Graphics Module */ @@ -156,7 +156,7 @@ struct rdp_graphics rdpBitmap* Bitmap_Prototype; /* 1 */ rdpPointer* Pointer_Prototype; /* 2 */ rdpGlyph* Glyph_Prototype; /* 3 */ - uint32 paddingA[16 - 4]; /* 4 */ + UINT32 paddingA[16 - 4]; /* 4 */ }; FREERDP_API void graphics_register_bitmap(rdpGraphics* graphics, rdpBitmap* bitmap); diff --git a/include/freerdp/input.h b/include/freerdp/input.h index ec3f0126d..09f75da72 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -54,7 +54,7 @@ typedef struct rdp_input rdpInput; #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4 -typedef void (*pSynchronizeEvent)(rdpInput* input, uint32 flags); +typedef void (*pSynchronizeEvent)(rdpInput* input, UINT32 flags); typedef void (*pKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code); typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code); typedef void (*pMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); @@ -64,19 +64,19 @@ struct rdp_input { rdpContext* context; /* 0 */ void* param1; /* 1 */ - uint32 paddingA[16 - 2]; /* 2 */ + UINT32 paddingA[16 - 2]; /* 2 */ pSynchronizeEvent SynchronizeEvent; /* 16 */ pKeyboardEvent KeyboardEvent; /* 17 */ pUnicodeKeyboardEvent UnicodeKeyboardEvent; /* 18 */ pMouseEvent MouseEvent; /* 19 */ pExtendedMouseEvent ExtendedMouseEvent; /* 20 */ - uint32 paddingB[32 - 21]; /* 21 */ + UINT32 paddingB[32 - 21]; /* 21 */ }; -FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags); +FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, UINT32 flags); FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); -FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode); +FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, UINT32 rdp_scancode); FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); diff --git a/include/freerdp/locale/keyboard.h b/include/freerdp/locale/keyboard.h index 7a83e2155..5cbc12070 100644 --- a/include/freerdp/locale/keyboard.h +++ b/include/freerdp/locale/keyboard.h @@ -31,7 +31,7 @@ struct _RDP_KEYBOARD_LAYOUT { - uint32 code; /* Keyboard layout code */ + UINT32 code; /* Keyboard layout code */ char* name; /* Keyboard layout name */ }; typedef struct _RDP_KEYBOARD_LAYOUT RDP_KEYBOARD_LAYOUT; @@ -198,11 +198,11 @@ typedef struct _RDP_KEYBOARD_LAYOUT RDP_KEYBOARD_LAYOUT; #define KBD_TYPE_NOKIA_9140 0x00000006 /* Nokia 9140 and similar keyboards */ #define KBD_TYPE_JAPANESE 0x00000007 /* Japanese keyboard */ -FREERDP_API uint32 freerdp_keyboard_init(uint32 keyboardLayoutId); -FREERDP_API RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types); -FREERDP_API const char* freerdp_keyboard_get_layout_name_from_id(uint32 keyboardLayoutId); -FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(uint32 keycode); -FREERDP_API uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, BOOL extended); -FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(uint32 vkcode); +FREERDP_API UINT32 freerdp_keyboard_init(UINT32 keyboardLayoutId); +FREERDP_API RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(UINT32 types); +FREERDP_API const char* freerdp_keyboard_get_layout_name_from_id(UINT32 keyboardLayoutId); +FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(UINT32 keycode); +FREERDP_API UINT32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(UINT32 scancode, BOOL extended); +FREERDP_API RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(UINT32 vkcode); #endif /* __FREERDP_LOCALE_KEYBOARD_H */ diff --git a/include/freerdp/locale/locale.h b/include/freerdp/locale/locale.h index 7853d2806..ed27d3b05 100644 --- a/include/freerdp/locale/locale.h +++ b/include/freerdp/locale/locale.h @@ -230,8 +230,8 @@ #define YORUBA 0x046A #define ZULU 0x0435 -FREERDP_API uint32 freerdp_get_system_locale_id(); -FREERDP_API uint32 freerdp_detect_keyboard_layout_from_system_locale(); -FREERDP_API const char* freerdp_get_system_locale_name_from_id(uint32 localeId); +FREERDP_API UINT32 freerdp_get_system_locale_id(); +FREERDP_API UINT32 freerdp_detect_keyboard_layout_from_system_locale(); +FREERDP_API const char* freerdp_get_system_locale_name_from_id(UINT32 localeId); #endif /* __FREERDP_LOCALE_H */ diff --git a/include/freerdp/locale/vkcodes.h b/include/freerdp/locale/vkcodes.h index 7e30cdfbb..9e1ae6679 100644 --- a/include/freerdp/locale/vkcodes.h +++ b/include/freerdp/locale/vkcodes.h @@ -303,7 +303,7 @@ #define VK_PA1 0xFD /* PA1 key */ #define VK_OEM_CLEAR 0xFE /* Clear key */ -FREERDP_API const char* freerdp_keyboard_get_virtual_key_code_name(uint32 vkcode); -FREERDP_API uint32 freerdp_keyboard_get_virtual_key_code_from_name(const char* vkcode_name); +FREERDP_API const char* freerdp_keyboard_get_virtual_key_code_name(UINT32 vkcode); +FREERDP_API UINT32 freerdp_keyboard_get_virtual_key_code_from_name(const char* vkcode_name); #endif /* __FREERDP_VIRTUAL_KEY_CODES_H */ diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index 3139ab2fb..470df19d7 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -72,7 +72,7 @@ struct rdp_freerdp_peer psPeerSendChannelData SendChannelData; psPeerReceiveChannelData ReceiveChannelData; - uint32 ack_frame_id; + UINT32 ack_frame_id; BOOL local; BOOL connected; BOOL activated; diff --git a/include/freerdp/pointer.h b/include/freerdp/pointer.h index 50c23fc46..d1688bd96 100644 --- a/include/freerdp/pointer.h +++ b/include/freerdp/pointer.h @@ -33,26 +33,26 @@ struct _POINTER_POSITION_UPDATE { - uint32 xPos; - uint32 yPos; + UINT32 xPos; + UINT32 yPos; }; typedef struct _POINTER_POSITION_UPDATE POINTER_POSITION_UPDATE; struct _POINTER_SYSTEM_UPDATE { - uint32 type; + UINT32 type; }; typedef struct _POINTER_SYSTEM_UPDATE POINTER_SYSTEM_UPDATE; struct _POINTER_COLOR_UPDATE { - uint32 cacheIndex; - uint32 xPos; - uint32 yPos; - uint32 width; - uint32 height; - uint32 lengthAndMask; - uint32 lengthXorMask; + UINT32 cacheIndex; + UINT32 xPos; + UINT32 yPos; + UINT32 width; + UINT32 height; + UINT32 lengthAndMask; + UINT32 lengthXorMask; BYTE* xorMaskData; BYTE* andMaskData; }; @@ -60,14 +60,14 @@ typedef struct _POINTER_COLOR_UPDATE POINTER_COLOR_UPDATE; struct _POINTER_NEW_UPDATE { - uint32 xorBpp; + UINT32 xorBpp; POINTER_COLOR_UPDATE colorPtrAttr; }; typedef struct _POINTER_NEW_UPDATE POINTER_NEW_UPDATE; struct _POINTER_CACHED_UPDATE { - uint32 cacheIndex; + UINT32 cacheIndex; }; typedef struct _POINTER_CACHED_UPDATE POINTER_CACHED_UPDATE; @@ -80,14 +80,14 @@ typedef void (*pPointerCached)(rdpContext* context, POINTER_CACHED_UPDATE* point struct rdp_pointer_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pPointerPosition PointerPosition; /* 16 */ pPointerSystem PointerSystem; /* 17 */ pPointerColor PointerColor; /* 18 */ pPointerNew PointerNew; /* 19 */ pPointerCached PointerCached; /* 20 */ - uint32 paddingB[32 - 21]; /* 21 */ + UINT32 paddingB[32 - 21]; /* 21 */ /* internal */ diff --git a/include/freerdp/primary.h b/include/freerdp/primary.h index 346138cfe..ee3f71ab8 100644 --- a/include/freerdp/primary.h +++ b/include/freerdp/primary.h @@ -27,21 +27,21 @@ struct rdp_bounds { - sint32 left; - sint32 top; - sint32 right; - sint32 bottom; + INT32 left; + INT32 top; + INT32 right; + INT32 bottom; }; typedef struct rdp_bounds rdpBounds; struct rdp_brush { - uint32 x; - uint32 y; - uint32 bpp; - uint32 style; - uint32 hatch; - uint32 index; + UINT32 x; + UINT32 y; + UINT32 bpp; + UINT32 style; + UINT32 hatch; + UINT32 index; BYTE* data; BYTE p8x8[8]; }; @@ -49,313 +49,313 @@ typedef struct rdp_brush rdpBrush; struct _ORDER_INFO { - uint32 orderType; - uint32 fieldFlags; + UINT32 orderType; + UINT32 fieldFlags; rdpBounds bounds; - sint32 deltaBoundLeft; - sint32 deltaBoundTop; - sint32 deltaBoundRight; - sint32 deltaBoundBottom; + INT32 deltaBoundLeft; + INT32 deltaBoundTop; + INT32 deltaBoundRight; + INT32 deltaBoundBottom; BOOL deltaCoordinates; }; typedef struct _ORDER_INFO ORDER_INFO; struct _DSTBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; }; typedef struct _DSTBLT_ORDER DSTBLT_ORDER; struct _PATBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - uint32 backColor; - uint32 foreColor; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + UINT32 backColor; + UINT32 foreColor; rdpBrush brush; }; typedef struct _PATBLT_ORDER PATBLT_ORDER; struct _SCRBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - sint32 nXSrc; - sint32 nYSrc; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + INT32 nXSrc; + INT32 nYSrc; }; typedef struct _SCRBLT_ORDER SCRBLT_ORDER; struct _OPAQUE_RECT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 color; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 color; }; typedef struct _OPAQUE_RECT_ORDER OPAQUE_RECT_ORDER; struct _DRAW_NINE_GRID_ORDER { - sint32 srcLeft; - sint32 srcTop; - sint32 srcRight; - sint32 srcBottom; - uint32 bitmapId; + INT32 srcLeft; + INT32 srcTop; + INT32 srcRight; + INT32 srcBottom; + UINT32 bitmapId; }; typedef struct _DRAW_NINE_GRID_ORDER DRAW_NINE_GRID_ORDER; struct _DELTA_RECT { - sint32 left; - sint32 top; - sint32 width; - sint32 height; + INT32 left; + INT32 top; + INT32 width; + INT32 height; }; typedef struct _DELTA_RECT DELTA_RECT; struct _MULTI_DSTBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - uint32 numRectangles; - uint32 cbData; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + UINT32 numRectangles; + UINT32 cbData; DELTA_RECT rectangles[45]; }; typedef struct _MULTI_DSTBLT_ORDER MULTI_DSTBLT_ORDER; struct _MULTI_PATBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - uint32 backColor; - uint32 foreColor; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + UINT32 backColor; + UINT32 foreColor; rdpBrush brush; - uint32 numRectangles; - uint32 cbData; + UINT32 numRectangles; + UINT32 cbData; DELTA_RECT rectangles[45]; }; typedef struct _MULTI_PATBLT_ORDER MULTI_PATBLT_ORDER; struct _MULTI_SCRBLT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - sint32 nXSrc; - sint32 nYSrc; - uint32 numRectangles; - uint32 cbData; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + INT32 nXSrc; + INT32 nYSrc; + UINT32 numRectangles; + UINT32 cbData; DELTA_RECT rectangles[45]; }; typedef struct _MULTI_SCRBLT_ORDER MULTI_SCRBLT_ORDER; struct _MULTI_OPAQUE_RECT_ORDER { - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 color; - uint32 numRectangles; - uint32 cbData; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 color; + UINT32 numRectangles; + UINT32 cbData; DELTA_RECT rectangles[45]; }; typedef struct _MULTI_OPAQUE_RECT_ORDER MULTI_OPAQUE_RECT_ORDER; struct _MULTI_DRAW_NINE_GRID_ORDER { - sint32 srcLeft; - sint32 srcTop; - sint32 srcRight; - sint32 srcBottom; - uint32 bitmapId; - uint32 nDeltaEntries; - uint32 cbData; + INT32 srcLeft; + INT32 srcTop; + INT32 srcRight; + INT32 srcBottom; + UINT32 bitmapId; + UINT32 nDeltaEntries; + UINT32 cbData; BYTE* codeDeltaList; }; typedef struct _MULTI_DRAW_NINE_GRID_ORDER MULTI_DRAW_NINE_GRID_ORDER; struct _LINE_TO_ORDER { - uint32 backMode; - sint32 nXStart; - sint32 nYStart; - sint32 nXEnd; - sint32 nYEnd; - uint32 backColor; - uint32 bRop2; - uint32 penStyle; - uint32 penWidth; - uint32 penColor; + UINT32 backMode; + INT32 nXStart; + INT32 nYStart; + INT32 nXEnd; + INT32 nYEnd; + UINT32 backColor; + UINT32 bRop2; + UINT32 penStyle; + UINT32 penWidth; + UINT32 penColor; }; typedef struct _LINE_TO_ORDER LINE_TO_ORDER; struct _DELTA_POINT { - sint32 x; - sint32 y; + INT32 x; + INT32 y; }; typedef struct _DELTA_POINT DELTA_POINT; struct _POLYLINE_ORDER { - sint32 xStart; - sint32 yStart; - uint32 bRop2; - uint32 penColor; - uint32 numPoints; - uint32 cbData; + INT32 xStart; + INT32 yStart; + UINT32 bRop2; + UINT32 penColor; + UINT32 numPoints; + UINT32 cbData; DELTA_POINT* points; }; typedef struct _POLYLINE_ORDER POLYLINE_ORDER; struct _MEMBLT_ORDER { - uint32 cacheId; - uint32 colorIndex; - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - sint32 nXSrc; - sint32 nYSrc; - uint32 cacheIndex; + UINT32 cacheId; + UINT32 colorIndex; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + INT32 nXSrc; + INT32 nYSrc; + UINT32 cacheIndex; rdpBitmap* bitmap; }; typedef struct _MEMBLT_ORDER MEMBLT_ORDER; struct _MEM3BLT_ORDER { - uint32 cacheId; - uint32 colorIndex; - sint32 nLeftRect; - sint32 nTopRect; - sint32 nWidth; - sint32 nHeight; - uint32 bRop; - sint32 nXSrc; - sint32 nYSrc; - uint32 backColor; - uint32 foreColor; + UINT32 cacheId; + UINT32 colorIndex; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nWidth; + INT32 nHeight; + UINT32 bRop; + INT32 nXSrc; + INT32 nYSrc; + UINT32 backColor; + UINT32 foreColor; rdpBrush brush; - uint32 cacheIndex; + UINT32 cacheIndex; rdpBitmap* bitmap; }; typedef struct _MEM3BLT_ORDER MEM3BLT_ORDER; struct _SAVE_BITMAP_ORDER { - uint32 savedBitmapPosition; - sint32 nLeftRect; - sint32 nTopRect; - sint32 nRightRect; - sint32 nBottomRect; - uint32 operation; + UINT32 savedBitmapPosition; + INT32 nLeftRect; + INT32 nTopRect; + INT32 nRightRect; + INT32 nBottomRect; + UINT32 operation; }; typedef struct _SAVE_BITMAP_ORDER SAVE_BITMAP_ORDER; struct _GLYPH_FRAGMENT_INDEX { - uint32 index; - uint32 delta; + UINT32 index; + UINT32 delta; }; typedef struct _GLYPH_FRAGMENT_INDEX GLYPH_FRAGMENT_INDEX; struct _GLYPH_FRAGMENT { - uint32 operation; - uint32 index; - uint32 size; - uint32 nindices; + UINT32 operation; + UINT32 index; + UINT32 size; + UINT32 nindices; GLYPH_FRAGMENT_INDEX* indices; }; typedef struct _GLYPH_FRAGMENT GLYPH_FRAGMENT; struct _GLYPH_INDEX_ORDER { - uint32 cacheId; - uint32 flAccel; - uint32 ulCharInc; - uint32 fOpRedundant; - uint32 backColor; - uint32 foreColor; - sint32 bkLeft; - sint32 bkTop; - sint32 bkRight; - sint32 bkBottom; - sint32 opLeft; - sint32 opTop; - sint32 opRight; - sint32 opBottom; + UINT32 cacheId; + UINT32 flAccel; + UINT32 ulCharInc; + UINT32 fOpRedundant; + UINT32 backColor; + UINT32 foreColor; + INT32 bkLeft; + INT32 bkTop; + INT32 bkRight; + INT32 bkBottom; + INT32 opLeft; + INT32 opTop; + INT32 opRight; + INT32 opBottom; rdpBrush brush; - sint32 x; - sint32 y; - uint32 cbData; + INT32 x; + INT32 y; + UINT32 cbData; BYTE data[256]; }; typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER; struct _FAST_INDEX_ORDER { - uint32 cacheId; - uint32 flAccel; - uint32 ulCharInc; - uint32 backColor; - uint32 foreColor; - sint32 bkLeft; - sint32 bkTop; - sint32 bkRight; - sint32 bkBottom; - sint32 opLeft; - sint32 opTop; - sint32 opRight; - sint32 opBottom; + UINT32 cacheId; + UINT32 flAccel; + UINT32 ulCharInc; + UINT32 backColor; + UINT32 foreColor; + INT32 bkLeft; + INT32 bkTop; + INT32 bkRight; + INT32 bkBottom; + INT32 opLeft; + INT32 opTop; + INT32 opRight; + INT32 opBottom; BOOL opaqueRect; - sint32 x; - sint32 y; - uint32 cbData; + INT32 x; + INT32 y; + UINT32 cbData; BYTE data[256]; }; typedef struct _FAST_INDEX_ORDER FAST_INDEX_ORDER; struct _FAST_GLYPH_ORDER { - uint32 cacheId; - uint32 flAccel; - uint32 ulCharInc; - uint32 backColor; - uint32 foreColor; - sint32 bkLeft; - sint32 bkTop; - sint32 bkRight; - sint32 bkBottom; - sint32 opLeft; - sint32 opTop; - sint32 opRight; - sint32 opBottom; - sint32 x; - sint32 y; - uint32 cbData; + UINT32 cacheId; + UINT32 flAccel; + UINT32 ulCharInc; + UINT32 backColor; + UINT32 foreColor; + INT32 bkLeft; + INT32 bkTop; + INT32 bkRight; + INT32 bkBottom; + INT32 opLeft; + INT32 opTop; + INT32 opRight; + INT32 opBottom; + INT32 x; + INT32 y; + UINT32 cbData; BYTE data[256]; void* glyph_data; }; @@ -363,55 +363,55 @@ typedef struct _FAST_GLYPH_ORDER FAST_GLYPH_ORDER; struct _POLYGON_SC_ORDER { - sint32 xStart; - sint32 yStart; - uint32 bRop2; - uint32 fillMode; - uint32 brushColor; - uint32 numPoints; - uint32 cbData; + INT32 xStart; + INT32 yStart; + UINT32 bRop2; + UINT32 fillMode; + UINT32 brushColor; + UINT32 numPoints; + UINT32 cbData; DELTA_POINT* points; }; typedef struct _POLYGON_SC_ORDER POLYGON_SC_ORDER; struct _POLYGON_CB_ORDER { - sint32 xStart; - sint32 yStart; - uint32 bRop2; - uint32 backMode; - uint32 fillMode; - uint32 backColor; - uint32 foreColor; + INT32 xStart; + INT32 yStart; + UINT32 bRop2; + UINT32 backMode; + UINT32 fillMode; + UINT32 backColor; + UINT32 foreColor; rdpBrush brush; - uint32 numPoints; - uint32 cbData; + UINT32 numPoints; + UINT32 cbData; DELTA_POINT* points; }; typedef struct _POLYGON_CB_ORDER POLYGON_CB_ORDER; struct _ELLIPSE_SC_ORDER { - sint32 leftRect; - sint32 topRect; - sint32 rightRect; - sint32 bottomRect; - uint32 bRop2; - uint32 fillMode; - uint32 color; + INT32 leftRect; + INT32 topRect; + INT32 rightRect; + INT32 bottomRect; + UINT32 bRop2; + UINT32 fillMode; + UINT32 color; }; typedef struct _ELLIPSE_SC_ORDER ELLIPSE_SC_ORDER; struct _ELLIPSE_CB_ORDER { - sint32 leftRect; - sint32 topRect; - sint32 rightRect; - sint32 bottomRect; - uint32 bRop2; - uint32 fillMode; - uint32 backColor; - uint32 foreColor; + INT32 leftRect; + INT32 topRect; + INT32 rightRect; + INT32 bottomRect; + UINT32 bRop2; + UINT32 fillMode; + UINT32 backColor; + UINT32 foreColor; rdpBrush brush; }; typedef struct _ELLIPSE_CB_ORDER ELLIPSE_CB_ORDER; @@ -442,7 +442,7 @@ typedef void (*pEllipseCB)(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb); struct rdp_primary_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pDstBlt DstBlt; /* 16 */ pPatBlt PatBlt; /* 17 */ @@ -466,7 +466,7 @@ struct rdp_primary_update pPolygonCB PolygonCB; /* 35 */ pEllipseSC EllipseSC; /* 36 */ pEllipseCB EllipseCB; /* 37 */ - uint32 paddingB[48 - 38]; /* 38 */ + UINT32 paddingB[48 - 38]; /* 38 */ /* internal */ diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 40b4ea783..19876a828 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -159,8 +159,8 @@ typedef struct _RAIL_UNICODE_STRING RAIL_UNICODE_STRING; struct _HIGH_CONTRAST { - uint32 flags; - uint32 colorSchemeLength; + UINT32 flags; + UINT32 colorSchemeLength; RAIL_UNICODE_STRING colorScheme; }; typedef struct _HIGH_CONTRAST HIGH_CONTRAST; @@ -169,13 +169,13 @@ typedef struct _HIGH_CONTRAST HIGH_CONTRAST; struct _RAIL_HANDSHAKE_ORDER { - uint32 buildNumber; + UINT32 buildNumber; }; typedef struct _RAIL_HANDSHAKE_ORDER RAIL_HANDSHAKE_ORDER; struct _RAIL_CLIENT_STATUS_ORDER { - uint32 flags; + UINT32 flags; }; typedef struct _RAIL_CLIENT_STATUS_ORDER RAIL_CLIENT_STATUS_ORDER; @@ -192,15 +192,15 @@ struct _RAIL_EXEC_RESULT_ORDER { UINT16 flags; UINT16 execResult; - uint32 rawResult; + UINT32 rawResult; RAIL_UNICODE_STRING exeOrFile; }; typedef struct _RAIL_EXEC_RESULT_ORDER RAIL_EXEC_RESULT_ORDER; struct _RAIL_SYSPARAM_ORDER { - uint32 param; - uint32 params; + UINT32 param; + UINT32 params; BOOL dragFullWindows; BOOL keyboardCues; BOOL keyboardPref; @@ -216,14 +216,14 @@ typedef struct _RAIL_SYSPARAM_ORDER RAIL_SYSPARAM_ORDER; struct _RAIL_ACTIVATE_ORDER { - uint32 windowId; + UINT32 windowId; BOOL enabled; }; typedef struct _RAIL_ACTIVATE_ORDER RAIL_ACTIVATE_ORDER; struct _RAIL_SYSMENU_ORDER { - uint32 windowId; + UINT32 windowId; UINT16 left; UINT16 top; }; @@ -231,22 +231,22 @@ typedef struct _RAIL_SYSMENU_ORDER RAIL_SYSMENU_ORDER; struct _RAIL_SYSCOMMAND_ORDER { - uint32 windowId; + UINT32 windowId; UINT16 command; }; typedef struct _RAIL_SYSCOMMAND_ORDER RAIL_SYSCOMMAND_ORDER; struct _RAIL_NOTIFY_EVENT_ORDER { - uint32 windowId; - uint32 notifyIconId; - uint32 message; + UINT32 windowId; + UINT32 notifyIconId; + UINT32 message; }; typedef struct _RAIL_NOTIFY_EVENT_ORDER RAIL_NOTIFY_EVENT_ORDER; struct _RAIL_MINMAXINFO_ORDER { - uint32 windowId; + UINT32 windowId; UINT16 maxWidth; UINT16 maxHeight; UINT16 maxPosX; @@ -260,7 +260,7 @@ typedef struct _RAIL_MINMAXINFO_ORDER RAIL_MINMAXINFO_ORDER; struct _RAIL_LOCALMOVESIZE_ORDER { - uint32 windowId; + UINT32 windowId; BOOL isMoveSizeStart; UINT16 moveSizeType; UINT16 posX; @@ -270,7 +270,7 @@ typedef struct _RAIL_LOCALMOVESIZE_ORDER RAIL_LOCALMOVESIZE_ORDER; struct _RAIL_WINDOWMOVE_ORDER { - uint32 windowId; + UINT32 windowId; UINT16 left; UINT16 top; UINT16 right; @@ -280,13 +280,13 @@ typedef struct _RAIL_WINDOWMOVE_ORDER RAIL_WINDOW_MOVE_ORDER; struct _RAIL_GET_APPID_REQ_ORDER { - uint32 windowId; + UINT32 windowId; }; typedef struct _RAIL_GET_APPID_REQ_ORDER RAIL_GET_APPID_REQ_ORDER; struct _RAIL_GET_APPID_RESP_ORDER { - uint32 windowId; + UINT32 windowId; RAIL_UNICODE_STRING applicationId; BYTE applicationIdBuffer[512]; }; @@ -294,7 +294,7 @@ typedef struct _RAIL_GET_APPID_RESP_ORDER RAIL_GET_APPID_RESP_ORDER; struct _RAIL_LANGBARINFO_ORDER { - uint32 languageBarStatus; + UINT32 languageBarStatus; }; typedef struct _RAIL_LANGBARINFO_ORDER RAIL_LANGBAR_INFO_ORDER; diff --git a/include/freerdp/rail/window.h b/include/freerdp/rail/window.h index 78d681699..21a3befb5 100644 --- a/include/freerdp/rail/window.h +++ b/include/freerdp/rail/window.h @@ -38,31 +38,31 @@ struct rdp_window char* title; rdpIcon* bigIcon; rdpIcon* smallIcon; - uint32 fieldFlags; + UINT32 fieldFlags; rdpWindow* prev; rdpWindow* next; - uint32 windowId; - uint32 ownerWindowId; - uint32 style; - uint32 extendedStyle; + UINT32 windowId; + UINT32 ownerWindowId; + UINT32 style; + UINT32 extendedStyle; BYTE showState; RAIL_UNICODE_STRING titleInfo; - uint32 clientOffsetX; - uint32 clientOffsetY; - uint32 clientAreaWidth; - uint32 clientAreaHeight; + UINT32 clientOffsetX; + UINT32 clientOffsetY; + UINT32 clientAreaWidth; + UINT32 clientAreaHeight; BYTE RPContent; - uint32 rootParentHandle; - sint32 windowOffsetX; - sint32 windowOffsetY; - uint32 windowClientDeltaX; - uint32 windowClientDeltaY; - uint32 windowWidth; - uint32 windowHeight; + UINT32 rootParentHandle; + INT32 windowOffsetX; + INT32 windowOffsetY; + UINT32 windowClientDeltaX; + UINT32 windowClientDeltaY; + UINT32 windowWidth; + UINT32 windowHeight; UINT16 numWindowRects; RECTANGLE_16* windowRects; - uint32 visibleOffsetX; - uint32 visibleOffsetY; + UINT32 visibleOffsetX; + UINT32 visibleOffsetY; UINT16 numVisibilityRects; RECTANGLE_16* visibilityRects; }; diff --git a/include/freerdp/rail/window_list.h b/include/freerdp/rail/window_list.h index a9e6ba13b..89b89016c 100644 --- a/include/freerdp/rail/window_list.h +++ b/include/freerdp/rail/window_list.h @@ -42,7 +42,7 @@ FREERDP_API void window_list_rewind(rdpWindowList* list); FREERDP_API BOOL window_list_has_next(rdpWindowList* list); FREERDP_API rdpWindow* window_list_get_next(rdpWindowList* list); -FREERDP_API rdpWindow* window_list_get_by_id(rdpWindowList* list, uint32 windowId); +FREERDP_API rdpWindow* window_list_get_by_id(rdpWindowList* list, UINT32 windowId); FREERDP_API rdpWindow* window_list_get_by_extra_id(rdpWindowList* list, void* extraId); FREERDP_API void window_list_create(rdpWindowList* list, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* window_state); diff --git a/include/freerdp/scancode.h b/include/freerdp/scancode.h index 98e2623fe..2cad570ed 100644 --- a/include/freerdp/scancode.h +++ b/include/freerdp/scancode.h @@ -27,7 +27,7 @@ * The extended flag is for all practical an important 9th bit with a strange encoding - not just a modifier. */ -typedef uint32 RDP_SCANCODE; /* Our own representation of a RDP protocol scancode */ +typedef UINT32 RDP_SCANCODE; /* Our own representation of a RDP protocol scancode */ #define RDP_SCANCODE_CODE(_rdp_scancode) ((BYTE)(_rdp_scancode & 0xFF)) #define RDP_SCANCODE_EXTENDED(_rdp_scancode) (((_rdp_scancode) & 0x100) ? TRUE : FALSE) #define MAKE_RDP_SCANCODE(_code, _extended) (((_code) & 0xFF) | ((_extended) ? 0x100 : 0)) diff --git a/include/freerdp/secondary.h b/include/freerdp/secondary.h index 0213743eb..5f64bbb30 100644 --- a/include/freerdp/secondary.h +++ b/include/freerdp/secondary.h @@ -68,12 +68,12 @@ struct _CACHE_BITMAP_ORDER { - uint32 cacheId; - uint32 bitmapBpp; - uint32 bitmapWidth; - uint32 bitmapHeight; - uint32 bitmapLength; - uint32 cacheIndex; + UINT32 cacheId; + UINT32 bitmapBpp; + UINT32 bitmapWidth; + UINT32 bitmapHeight; + UINT32 bitmapLength; + UINT32 cacheIndex; BOOL compressed; BYTE bitmapComprHdr[8]; BYTE* bitmapDataStream; @@ -82,71 +82,71 @@ typedef struct _CACHE_BITMAP_ORDER CACHE_BITMAP_ORDER; struct _CACHE_BITMAP_V2_ORDER { - uint32 cacheId; - uint32 flags; - uint32 key1; - uint32 key2; - uint32 bitmapBpp; - uint32 bitmapWidth; - uint32 bitmapHeight; - uint32 bitmapLength; - uint32 cacheIndex; + UINT32 cacheId; + UINT32 flags; + UINT32 key1; + UINT32 key2; + UINT32 bitmapBpp; + UINT32 bitmapWidth; + UINT32 bitmapHeight; + UINT32 bitmapLength; + UINT32 cacheIndex; BOOL compressed; - uint32 cbCompFirstRowSize; - uint32 cbCompMainBodySize; - uint32 cbScanWidth; - uint32 cbUncompressedSize; + UINT32 cbCompFirstRowSize; + UINT32 cbCompMainBodySize; + UINT32 cbScanWidth; + UINT32 cbUncompressedSize; BYTE* bitmapDataStream; }; typedef struct _CACHE_BITMAP_V2_ORDER CACHE_BITMAP_V2_ORDER; struct _BITMAP_DATA_EX { - uint32 bpp; - uint32 codecID; - uint32 width; - uint32 height; - uint32 length; + UINT32 bpp; + UINT32 codecID; + UINT32 width; + UINT32 height; + UINT32 length; BYTE* data; }; typedef struct _BITMAP_DATA_EX BITMAP_DATA_EX; struct _CACHE_BITMAP_V3_ORDER { - uint32 cacheId; - uint32 bpp; - uint32 flags; - uint32 cacheIndex; - uint32 key1; - uint32 key2; + UINT32 cacheId; + UINT32 bpp; + UINT32 flags; + UINT32 cacheIndex; + UINT32 key1; + UINT32 key2; BITMAP_DATA_EX bitmapData; }; typedef struct _CACHE_BITMAP_V3_ORDER CACHE_BITMAP_V3_ORDER; struct _CACHE_COLOR_TABLE_ORDER { - uint32 cacheIndex; - uint32 numberColors; - uint32* colorTable; + UINT32 cacheIndex; + UINT32 numberColors; + UINT32* colorTable; }; typedef struct _CACHE_COLOR_TABLE_ORDER CACHE_COLOR_TABLE_ORDER; struct _GLYPH_DATA { - uint32 cacheIndex; - sint32 x; - sint32 y; - uint32 cx; - uint32 cy; - uint32 cb; + UINT32 cacheIndex; + INT32 x; + INT32 y; + UINT32 cx; + UINT32 cy; + UINT32 cb; BYTE* aj; }; typedef struct _GLYPH_DATA GLYPH_DATA; struct _CACHE_GLYPH_ORDER { - uint32 cacheId; - uint32 cGlyphs; + UINT32 cacheId; + UINT32 cGlyphs; GLYPH_DATA* glyphData[255]; BYTE* unicodeCharacters; }; @@ -154,21 +154,21 @@ typedef struct _CACHE_GLYPH_ORDER CACHE_GLYPH_ORDER; struct _GLYPH_DATA_V2 { - uint32 cacheIndex; - sint32 x; - sint32 y; - uint32 cx; - uint32 cy; - uint32 cb; + UINT32 cacheIndex; + INT32 x; + INT32 y; + UINT32 cx; + UINT32 cy; + UINT32 cb; BYTE* aj; }; typedef struct _GLYPH_DATA_V2 GLYPH_DATA_V2; struct _CACHE_GLYPH_V2_ORDER { - uint32 cacheId; - uint32 flags; - uint32 cGlyphs; + UINT32 cacheId; + UINT32 flags; + UINT32 cGlyphs; GLYPH_DATA_V2* glyphData[255]; BYTE* unicodeCharacters; }; @@ -176,12 +176,12 @@ typedef struct _CACHE_GLYPH_V2_ORDER CACHE_GLYPH_V2_ORDER; struct _CACHE_BRUSH_ORDER { - uint32 index; - uint32 bpp; - uint32 cx; - uint32 cy; - uint32 style; - uint32 length; + UINT32 index; + UINT32 bpp; + UINT32 cx; + UINT32 cy; + UINT32 style; + UINT32 length; BYTE* data; }; typedef struct _CACHE_BRUSH_ORDER CACHE_BRUSH_ORDER; @@ -197,7 +197,7 @@ typedef void (*pCacheBrush)(rdpContext* context, CACHE_BRUSH_ORDER* cache_brush_ struct rdp_secondary_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pCacheBitmap CacheBitmap; /* 16 */ pCacheBitmapV2 CacheBitmapV2; /* 17 */ @@ -206,7 +206,7 @@ struct rdp_secondary_update pCacheGlyph CacheGlyph; /* 20 */ pCacheGlyphV2 CacheGlyphV2; /* 21 */ pCacheBrush CacheBrush; /* 22 */ - uint32 paddingE[32 - 23]; /* 23 */ + UINT32 paddingE[32 - 23]; /* 23 */ /* internal */ diff --git a/include/freerdp/server/audin.h b/include/freerdp/server/audin.h index 2d32b3f56..758e9ca05 100644 --- a/include/freerdp/server/audin.h +++ b/include/freerdp/server/audin.h @@ -30,7 +30,7 @@ typedef BOOL (*psAudinServerOpen)(audin_server_context* context); typedef BOOL (*psAudinServerClose)(audin_server_context* context); typedef void (*psAudinServerOpening)(audin_server_context* context); -typedef void (*psAudinServerOpenResult)(audin_server_context* context, uint32 result); +typedef void (*psAudinServerOpenResult)(audin_server_context* context, UINT32 result); typedef void (*psAudinServerReceiveSamples)(audin_server_context* context, const void* buf, int nframes); struct _audin_server_context diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index f44aadec8..710522398 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -112,31 +112,31 @@ typedef struct /* TIME_ZONE_INFORMATION */ struct _TIME_ZONE_INFO { - uint32 bias; + UINT32 bias; char standardName[32]; SYSTEM_TIME standardDate; - uint32 standardBias; + UINT32 standardBias; char daylightName[32]; SYSTEM_TIME daylightDate; - uint32 daylightBias; + UINT32 daylightBias; }; typedef struct _TIME_ZONE_INFO TIME_ZONE_INFO; /* ARC_CS_PRIVATE_PACKET */ typedef struct { - uint32 cbLen; - uint32 version; - uint32 logonId; + UINT32 cbLen; + UINT32 version; + UINT32 logonId; BYTE securityVerifier[16]; } ARC_CS_PRIVATE_PACKET; /* ARC_SC_PRIVATE_PACKET */ typedef struct { - uint32 cbLen; - uint32 version; - uint32 logonId; + UINT32 cbLen; + UINT32 version; + UINT32 logonId; BYTE arcRandomBits[16]; } ARC_SC_PRIVATE_PACKET; @@ -144,14 +144,14 @@ typedef struct struct rdp_CertBlob { - uint32 length; + UINT32 length; BYTE* data; }; typedef struct rdp_CertBlob rdpCertBlob; struct rdp_X509CertChain { - uint32 count; + UINT32 count; rdpCertBlob* array; }; typedef struct rdp_X509CertChain rdpX509CertChain; @@ -212,7 +212,7 @@ typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO; struct _BITMAP_CACHE_V2_CELL_INFO { - uint32 numEntries; + UINT32 numEntries; BOOL persistent; }; typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO; @@ -252,29 +252,29 @@ struct rdp_monitor struct rdp_settings { ALIGN64 void* instance; /* 0 */ - uint64 paddingA[16 - 1]; /* 1 */ + UINT64 paddingA[16 - 1]; /* 1 */ /* Core Protocol Parameters */ - ALIGN64 uint32 width; /* 16 */ - ALIGN64 uint32 height; /* 17 */ - ALIGN64 uint32 rdp_version; /* 18 */ - ALIGN64 uint32 color_depth; /* 19 */ - ALIGN64 uint32 kbd_layout; /* 20 */ - ALIGN64 uint32 kbd_type; /* 21 */ - ALIGN64 uint32 kbd_subtype; /* 22 */ - ALIGN64 uint32 kbd_fn_keys; /* 23 */ - ALIGN64 uint32 client_build; /* 24 */ - ALIGN64 uint32 requested_protocols; /* 25 */ - ALIGN64 uint32 selected_protocol; /* 26 */ - ALIGN64 uint32 encryption_method; /* 27 */ - ALIGN64 uint32 encryption_level; /* 28 */ + ALIGN64 UINT32 width; /* 16 */ + ALIGN64 UINT32 height; /* 17 */ + ALIGN64 UINT32 rdp_version; /* 18 */ + ALIGN64 UINT32 color_depth; /* 19 */ + ALIGN64 UINT32 kbd_layout; /* 20 */ + ALIGN64 UINT32 kbd_type; /* 21 */ + ALIGN64 UINT32 kbd_subtype; /* 22 */ + ALIGN64 UINT32 kbd_fn_keys; /* 23 */ + ALIGN64 UINT32 client_build; /* 24 */ + ALIGN64 UINT32 requested_protocols; /* 25 */ + ALIGN64 UINT32 selected_protocol; /* 26 */ + ALIGN64 UINT32 encryption_method; /* 27 */ + ALIGN64 UINT32 encryption_level; /* 28 */ ALIGN64 BOOL authentication; /* 29 */ - ALIGN64 uint32 negotiationFlags; /* 30 */ + ALIGN64 UINT32 negotiationFlags; /* 30 */ ALIGN64 BOOL security_layer_negotiation; /* 31 */ - uint64 paddingB[48 - 32]; /* 32 */ + UINT64 paddingB[48 - 32]; /* 32 */ /* Connection Settings */ - ALIGN64 uint32 port; /* 48 */ + ALIGN64 UINT32 port; /* 48 */ ALIGN64 BOOL ipv6; /* 49 */ ALIGN64 char* hostname; /* 50 */ ALIGN64 char* username; /* 51 */ @@ -286,7 +286,7 @@ struct rdp_settings ALIGN64 char* client_dir; /* 57 */ ALIGN64 BOOL autologon; /* 58 */ ALIGN64 BOOL compression; /* 59 */ - ALIGN64 uint32 performance_flags; /* 60 */ + ALIGN64 UINT32 performance_flags; /* 60 */ ALIGN64 BYTE* password_cookie; /* 61 */ ALIGN64 DWORD password_cookie_length; /* 62 */ ALIGN64 char* kerberos_kdc; /* 63 */ @@ -299,9 +299,9 @@ struct rdp_settings ALIGN64 BOOL authentication_only; /* 70 */ ALIGN64 BOOL from_stdin; /* 71 */ ALIGN64 BOOL send_preconnection_pdu; /* 72 */ - ALIGN64 uint32 preconnection_id; /* 73 */ + ALIGN64 UINT32 preconnection_id; /* 73 */ ALIGN64 char* preconnection_blob; /* 74 */ - uint64 paddingC[80 - 75]; /* 75 */ + UINT64 paddingC[80 - 75]; /* 75 */ /* User Interface Parameters */ ALIGN64 BOOL sw_gdi; /* 80 */ @@ -309,61 +309,61 @@ struct rdp_settings ALIGN64 BOOL fullscreen; /* 82 */ ALIGN64 BOOL grab_keyboard; /* 83 */ ALIGN64 BOOL decorations; /* 84 */ - ALIGN64 uint32 percent_screen; /* 85 */ + ALIGN64 UINT32 percent_screen; /* 85 */ ALIGN64 BOOL mouse_motion; /* 86 */ ALIGN64 char* window_title; /* 87 */ - ALIGN64 uint64 parent_window_xid; /* 88 */ - uint64 paddingD[112 - 89]; /* 89 */ + ALIGN64 UINT64 parent_window_xid; /* 88 */ + UINT64 paddingD[112 - 89]; /* 89 */ /* Internal Parameters */ ALIGN64 char* home_path; /* 112 */ - ALIGN64 uint32 share_id; /* 113 */ - ALIGN64 uint32 pdu_source; /* 114 */ + ALIGN64 UINT32 share_id; /* 113 */ + ALIGN64 UINT32 pdu_source; /* 114 */ ALIGN64 void* unused115; /* 115 */ ALIGN64 BOOL server_mode; /* 116 */ ALIGN64 char* config_path; /* 117 */ ALIGN64 char* current_path; /* 118 */ ALIGN64 char* development_path; /* 119 */ ALIGN64 BOOL development_mode; /* 120 */ - uint64 paddingE[144 - 121]; /* 121 */ + UINT64 paddingE[144 - 121]; /* 121 */ /* Security */ ALIGN64 BOOL encryption; /* 144 */ ALIGN64 BOOL tls_security; /* 145 */ ALIGN64 BOOL nla_security; /* 146 */ ALIGN64 BOOL rdp_security; /* 147 */ - ALIGN64 uint32 ntlm_version; /* 148 */ + ALIGN64 UINT32 ntlm_version; /* 148 */ ALIGN64 BOOL salted_checksum; /* 149 */ - uint64 paddingF[160 - 150]; /* 150 */ + UINT64 paddingF[160 - 150]; /* 150 */ /* Session */ ALIGN64 BOOL console_audio; /* 160 */ ALIGN64 BOOL console_session; /* 161 */ - ALIGN64 uint32 redirected_session_id; /* 162 */ + ALIGN64 UINT32 redirected_session_id; /* 162 */ ALIGN64 BOOL audio_playback; /* 163 */ ALIGN64 BOOL audio_capture; /* 164 */ - uint64 paddingG[176 - 165]; /* 165 */ + UINT64 paddingG[176 - 165]; /* 165 */ /* Output Control */ ALIGN64 BOOL refresh_rect; /* 176 */ ALIGN64 BOOL suppress_output; /* 177 */ ALIGN64 BOOL desktop_resize; /* 178 */ - uint64 paddingH[192 - 179]; /* 179 */ + UINT64 paddingH[192 - 179]; /* 179 */ /* Reconnection */ ALIGN64 BOOL auto_reconnection; /* 192 */ ALIGN64 ARC_CS_PRIVATE_PACKET* client_auto_reconnect_cookie; /* 193 */ ALIGN64 ARC_SC_PRIVATE_PACKET* server_auto_reconnect_cookie; /* 194 */ - uint64 paddingI[208 - 195]; /* 195 */ + UINT64 paddingI[208 - 195]; /* 195 */ /* Time Zone */ ALIGN64 TIME_ZONE_INFO* client_time_zone; /* 208 */ - uint64 paddingJ[216 - 209]; /* 209 */ + UINT64 paddingJ[216 - 209]; /* 209 */ /* Capabilities */ - ALIGN64 uint32 os_major_type; /* 216 */ - ALIGN64 uint32 os_minor_type; /* 217 */ - ALIGN64 uint32 vc_chunk_size; /* 218 */ + ALIGN64 UINT32 os_major_type; /* 216 */ + ALIGN64 UINT32 os_minor_type; /* 217 */ + ALIGN64 UINT32 vc_chunk_size; /* 218 */ ALIGN64 BOOL sound_beeps; /* 219 */ ALIGN64 BOOL smooth_fonts; /* 220 */ ALIGN64 BOOL frame_marker; /* 221 */ @@ -376,9 +376,9 @@ struct rdp_settings ALIGN64 BOOL disable_full_window_drag; /* 228 */ ALIGN64 BOOL disable_menu_animations; /* 229 */ ALIGN64 BOOL disable_theming; /* 230 */ - ALIGN64 uint32 connection_type; /* 231 */ - ALIGN64 uint32 multifrag_max_request_size; /* 232 */ - uint64 paddingK[248 - 233]; /* 233 */ + ALIGN64 UINT32 connection_type; /* 231 */ + ALIGN64 UINT32 multifrag_max_request_size; /* 232 */ + UINT64 paddingK[248 - 233]; /* 233 */ /* Certificate */ ALIGN64 char* cert_file; /* 248 */ @@ -394,77 +394,77 @@ struct rdp_settings ALIGN64 char* rdp_key_file; /* 258 */ ALIGN64 rdpKey* server_key; /* 259 */ ALIGN64 char* certificate_name; /* 260 */ - uint64 paddingL[280 - 261]; /* 261 */ + UINT64 paddingL[280 - 261]; /* 261 */ /* Codecs */ ALIGN64 BOOL rfx_codec; /* 280 */ ALIGN64 BOOL ns_codec; /* 281 */ - ALIGN64 uint32 rfx_codec_id; /* 282 */ - ALIGN64 uint32 ns_codec_id; /* 283 */ - ALIGN64 uint32 rfx_codec_mode; /* 284 */ + ALIGN64 UINT32 rfx_codec_id; /* 282 */ + ALIGN64 UINT32 ns_codec_id; /* 283 */ + ALIGN64 UINT32 rfx_codec_mode; /* 284 */ ALIGN64 BOOL frame_acknowledge; /* 285 */ ALIGN64 BOOL jpeg_codec; /* 286 */ - ALIGN64 uint32 jpeg_codec_id; /* 287 */ - ALIGN64 uint32 jpeg_quality; /* 288 */ - ALIGN64 uint32 v3_codec_id; /* 289 */ + ALIGN64 UINT32 jpeg_codec_id; /* 287 */ + ALIGN64 UINT32 jpeg_quality; /* 288 */ + ALIGN64 UINT32 v3_codec_id; /* 289 */ ALIGN64 BOOL rfx_codec_only; /* 290 */ - uint64 paddingM[296 - 291]; /* 291 */ + UINT64 paddingM[296 - 291]; /* 291 */ /* Recording */ ALIGN64 BOOL dump_rfx; /* 296 */ ALIGN64 BOOL play_rfx; /* 297 */ ALIGN64 char* dump_rfx_file; /* 298 */ ALIGN64 char* play_rfx_file; /* 299 */ - uint64 paddingN[312 - 300]; /* 300 */ + UINT64 paddingN[312 - 300]; /* 300 */ /* RemoteApp */ ALIGN64 BOOL remote_app; /* 312 */ - ALIGN64 uint32 num_icon_caches; /* 313 */ - ALIGN64 uint32 num_icon_cache_entries; /* 314 */ + ALIGN64 UINT32 num_icon_caches; /* 313 */ + ALIGN64 UINT32 num_icon_cache_entries; /* 314 */ ALIGN64 BOOL rail_langbar_supported; /* 315 */ - uint64 paddingO[320 - 316]; /* 316 */ + UINT64 paddingO[320 - 316]; /* 316 */ /* Pointer */ ALIGN64 BOOL large_pointer; /* 320 */ ALIGN64 BOOL color_pointer; /* 321 */ - ALIGN64 uint32 pointer_cache_size; /* 322 */ - uint64 paddingP[328 - 323]; /* 323 */ + ALIGN64 UINT32 pointer_cache_size; /* 322 */ + UINT64 paddingP[328 - 323]; /* 323 */ /* Bitmap Cache */ ALIGN64 BOOL bitmap_cache; /* 328 */ ALIGN64 BOOL bitmap_cache_v3; /* 329 */ ALIGN64 BOOL persistent_bitmap_cache; /* 330 */ - ALIGN64 uint32 bitmapCacheV2NumCells; /* 331 */ + ALIGN64 UINT32 bitmapCacheV2NumCells; /* 331 */ ALIGN64 BITMAP_CACHE_V2_CELL_INFO* bitmapCacheV2CellInfo; /* 332 */ - uint64 paddingQ[344 - 333]; /* 333 */ + UINT64 paddingQ[344 - 333]; /* 333 */ /* Offscreen Bitmap Cache */ ALIGN64 BOOL offscreen_bitmap_cache; /* 344 */ - ALIGN64 uint32 offscreen_bitmap_cache_size; /* 345 */ - ALIGN64 uint32 offscreen_bitmap_cache_entries; /* 346 */ - uint64 paddingR[352 - 347]; /* 347 */ + ALIGN64 UINT32 offscreen_bitmap_cache_size; /* 345 */ + ALIGN64 UINT32 offscreen_bitmap_cache_entries; /* 346 */ + UINT64 paddingR[352 - 347]; /* 347 */ /* Glyph Cache */ ALIGN64 BOOL glyph_cache; /* 352 */ - ALIGN64 uint32 glyphSupportLevel; /* 353 */ + ALIGN64 UINT32 glyphSupportLevel; /* 353 */ ALIGN64 GLYPH_CACHE_DEFINITION* glyphCache; /* 354 */ ALIGN64 GLYPH_CACHE_DEFINITION* fragCache; /* 355 */ - uint64 paddingS[360 - 356]; /* 356 */ + UINT64 paddingS[360 - 356]; /* 356 */ /* Draw Nine Grid */ ALIGN64 BOOL draw_nine_grid; /* 360 */ - ALIGN64 uint32 draw_nine_grid_cache_size; /* 361 */ - ALIGN64 uint32 draw_nine_grid_cache_entries; /* 362 */ - uint64 paddingT[368 - 363]; /* 363 */ + ALIGN64 UINT32 draw_nine_grid_cache_size; /* 361 */ + ALIGN64 UINT32 draw_nine_grid_cache_entries; /* 362 */ + UINT64 paddingT[368 - 363]; /* 363 */ /* Draw GDI+ */ ALIGN64 BOOL draw_gdi_plus; /* 368 */ ALIGN64 BOOL draw_gdi_plus_cache; /* 369 */ - uint64 paddingU[376 - 370]; /* 370 */ + UINT64 paddingU[376 - 370]; /* 370 */ /* Desktop Composition */ ALIGN64 BOOL desktop_composition; /* 376 */ - uint64 paddingV[384 - 377]; /* 377 */ + UINT64 paddingV[384 - 377]; /* 377 */ /* Channels */ ALIGN64 int num_channels; diff --git a/include/freerdp/svc.h b/include/freerdp/svc.h index c0b10458b..3f16412a4 100644 --- a/include/freerdp/svc.h +++ b/include/freerdp/svc.h @@ -36,19 +36,19 @@ struct _CHANNEL_DEF { char name[CHANNEL_NAME_LEN + 1]; - uint32 options; + UINT32 options; }; typedef struct _CHANNEL_DEF CHANNEL_DEF; typedef CHANNEL_DEF* PCHANNEL_DEF; typedef CHANNEL_DEF** PPCHANNEL_DEF; typedef void (FREERDP_CC * PCHANNEL_INIT_EVENT_FN)(void* pInitHandle, - uint32 event, void* pData, uint32 dataLength); + UINT32 event, void* pData, UINT32 dataLength); -typedef void (FREERDP_CC * PCHANNEL_OPEN_EVENT_FN)(uint32 openHandle, - uint32 event, void* pData, uint32 dataLength, - uint32 totalLength, uint32 dataFlags); +typedef void (FREERDP_CC * PCHANNEL_OPEN_EVENT_FN)(UINT32 openHandle, + UINT32 event, void* pData, UINT32 dataLength, + UINT32 totalLength, UINT32 dataFlags); #define CHANNEL_RC_OK 0 #define CHANNEL_RC_ALREADY_INITIALIZED 1 @@ -71,24 +71,24 @@ typedef void (FREERDP_CC * PCHANNEL_OPEN_EVENT_FN)(uint32 openHandle, #define VIRTUAL_CHANNEL_VERSION_WIN2000 1 -typedef uint32 (FREERDP_CC * PVIRTUALCHANNELINIT)(void** ppInitHandle, - PCHANNEL_DEF pChannel, int channelCount, uint32 versionRequested, +typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELINIT)(void** ppInitHandle, + PCHANNEL_DEF pChannel, int channelCount, UINT32 versionRequested, PCHANNEL_INIT_EVENT_FN pChannelInitEventProc); -typedef uint32 (FREERDP_CC * PVIRTUALCHANNELOPEN)(void* pInitHandle, - uint32* pOpenHandle, char* pChannelName, +typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELOPEN)(void* pInitHandle, + UINT32* pOpenHandle, char* pChannelName, PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc); -typedef uint32 (FREERDP_CC * PVIRTUALCHANNELCLOSE)(uint32 openHandle); +typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELCLOSE)(UINT32 openHandle); -typedef uint32 (FREERDP_CC * PVIRTUALCHANNELWRITE)(uint32 openHandle, - void* pData, uint32 dataLength, void* pUserData); +typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELWRITE)(UINT32 openHandle, + void* pData, UINT32 dataLength, void* pUserData); -typedef uint32 (FREERDP_CC * PVIRTUALCHANNELEVENTPUSH)(uint32 openHandle, +typedef UINT32 (FREERDP_CC * PVIRTUALCHANNELEVENTPUSH)(UINT32 openHandle, RDP_EVENT* event); struct _CHANNEL_ENTRY_POINTS { - uint32 cbSize; - uint32 protocolVersion; + UINT32 cbSize; + UINT32 protocolVersion; PVIRTUALCHANNELINIT pVirtualChannelInit; PVIRTUALCHANNELOPEN pVirtualChannelOpen; PVIRTUALCHANNELCLOSE pVirtualChannelClose; @@ -101,8 +101,8 @@ typedef int (FREERDP_CC * PVIRTUALCHANNELENTRY)(PCHANNEL_ENTRY_POINTS pEntryPoin struct _CHANNEL_ENTRY_POINTS_EX { - uint32 cbSize; - uint32 protocolVersion; + UINT32 cbSize; + UINT32 protocolVersion; PVIRTUALCHANNELINIT pVirtualChannelInit; PVIRTUALCHANNELOPEN pVirtualChannelOpen; PVIRTUALCHANNELCLOSE pVirtualChannelClose; diff --git a/include/freerdp/types.h b/include/freerdp/types.h index b17278135..a685993be 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -25,40 +25,6 @@ #include -#ifdef _WIN32 -#include -#endif - -#ifdef FREERDP_HAVE_LIMITS_H -#include -#endif - -#ifdef FREERDP_HAVE_STDINT_H -#include -#endif - -#ifdef FREERDP_HAVE_INTTYPES_H - -#include -typedef uint32_t uint32; -typedef int32_t sint32; -typedef uint64_t uint64; -typedef int64_t sint64; - -#else - -typedef unsigned int uint32; -typedef signed int sint32; -#ifdef _WIN32 -typedef unsigned __int64 uint64; -typedef signed __int64 sint64; -#else -typedef unsigned long long uint64; -typedef signed long long sint64; -#endif - -#endif /* HAVE_INTTYPES_H */ - #ifndef MIN #define MIN(x,y) (((x) < (y)) ? (x) : (y)) #endif @@ -71,7 +37,7 @@ typedef signed long long sint64; typedef struct { - uint32 time_low; + UINT32 time_low; UINT16 time_mid; UINT16 time_hi_and_version; BYTE clock_seq_hi_and_reserved; diff --git a/include/freerdp/update.h b/include/freerdp/update.h index 24c17a964..f4a0eaed6 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -39,19 +39,19 @@ typedef struct rdp_update rdpUpdate; struct _BITMAP_DATA { - uint32 destLeft; - uint32 destTop; - uint32 destRight; - uint32 destBottom; - uint32 width; - uint32 height; - uint32 bitsPerPixel; - uint32 flags; - uint32 bitmapLength; - uint32 cbCompFirstRowSize; - uint32 cbCompMainBodySize; - uint32 cbScanWidth; - uint32 cbUncompressedSize; + UINT32 destLeft; + UINT32 destTop; + UINT32 destRight; + UINT32 destBottom; + UINT32 width; + UINT32 height; + UINT32 bitsPerPixel; + UINT32 flags; + UINT32 bitmapLength; + UINT32 cbCompFirstRowSize; + UINT32 cbCompMainBodySize; + UINT32 cbScanWidth; + UINT32 cbUncompressedSize; BYTE* bitmapDataStream; BOOL compressed; }; @@ -59,8 +59,8 @@ typedef struct _BITMAP_DATA BITMAP_DATA; struct _BITMAP_UPDATE { - uint32 count; - uint32 number; + UINT32 count; + UINT32 number; BITMAP_DATA* rectangles; }; typedef struct _BITMAP_UPDATE BITMAP_UPDATE; @@ -77,14 +77,14 @@ typedef struct _PALETTE_ENTRY PALETTE_ENTRY; struct _PALETTE_UPDATE { - uint32 number; + UINT32 number; PALETTE_ENTRY entries[256]; }; typedef struct _PALETTE_UPDATE PALETTE_UPDATE; struct rdp_palette { - uint32 count; + UINT32 count; PALETTE_ENTRY* entries; }; typedef struct rdp_palette rdpPalette; @@ -93,8 +93,8 @@ typedef struct rdp_palette rdpPalette; struct _PLAY_SOUND_UPDATE { - uint32 duration; - uint32 frequency; + UINT32 duration; + UINT32 frequency; }; typedef struct _PLAY_SOUND_UPDATE PLAY_SOUND_UPDATE; @@ -102,24 +102,24 @@ typedef struct _PLAY_SOUND_UPDATE PLAY_SOUND_UPDATE; struct _SURFACE_BITS_COMMAND { - uint32 cmdType; - uint32 destLeft; - uint32 destTop; - uint32 destRight; - uint32 destBottom; - uint32 bpp; - uint32 codecID; - uint32 width; - uint32 height; - uint32 bitmapDataLength; + UINT32 cmdType; + UINT32 destLeft; + UINT32 destTop; + UINT32 destRight; + UINT32 destBottom; + UINT32 bpp; + UINT32 codecID; + UINT32 width; + UINT32 height; + UINT32 bitmapDataLength; BYTE* bitmapData; }; typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND; struct _SURFACE_FRAME_MARKER { - uint32 frameAction; - uint32 frameId; + UINT32 frameAction; + UINT32 frameId; }; typedef struct _SURFACE_FRAME_MARKER SURFACE_FRAME_MARKER; @@ -151,7 +151,7 @@ typedef void (*pSurfaceFrameMarker)(rdpContext* context, SURFACE_FRAME_MARKER* s struct rdp_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pBeginPaint BeginPaint; /* 16 */ pEndPaint EndPaint; /* 17 */ @@ -161,23 +161,23 @@ struct rdp_update pBitmapUpdate BitmapUpdate; /* 21 */ pPalette Palette; /* 22 */ pPlaySound PlaySound; /* 23 */ - uint32 paddingB[32 - 24]; /* 24 */ + UINT32 paddingB[32 - 24]; /* 24 */ rdpPointerUpdate* pointer; /* 32 */ rdpPrimaryUpdate* primary; /* 33 */ rdpSecondaryUpdate* secondary; /* 34 */ rdpAltSecUpdate* altsec; /* 35 */ rdpWindowUpdate* window; /* 36 */ - uint32 paddingC[48 - 37]; /* 37 */ + UINT32 paddingC[48 - 37]; /* 37 */ pRefreshRect RefreshRect; /* 48 */ pSuppressOutput SuppressOutput; /* 49 */ - uint32 paddingD[64 - 50]; /* 50 */ + UINT32 paddingD[64 - 50]; /* 50 */ pSurfaceCommand SurfaceCommand; /* 64 */ pSurfaceBits SurfaceBits; /* 65 */ pSurfaceFrameMarker SurfaceFrameMarker; /* 66 */ - uint32 paddingE[80 - 67]; /* 67 */ + UINT32 paddingE[80 - 67]; /* 67 */ /* internal */ diff --git a/include/freerdp/utils/dsp.h b/include/freerdp/utils/dsp.h index a87babe1a..dc7eca162 100644 --- a/include/freerdp/utils/dsp.h +++ b/include/freerdp/utils/dsp.h @@ -32,9 +32,9 @@ union _ADPCM struct { BYTE predictor[2]; - sint32 delta[2]; - sint32 sample1[2]; - sint32 sample2[2]; + INT32 delta[2]; + INT32 sample1[2]; + INT32 sample2[2]; } ms; }; typedef union _ADPCM ADPCM; @@ -43,20 +43,20 @@ typedef struct _FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT; struct _FREERDP_DSP_CONTEXT { BYTE* resampled_buffer; - uint32 resampled_size; - uint32 resampled_frames; - uint32 resampled_maxlength; + UINT32 resampled_size; + UINT32 resampled_frames; + UINT32 resampled_maxlength; BYTE* adpcm_buffer; - uint32 adpcm_size; - uint32 adpcm_maxlength; + UINT32 adpcm_size; + UINT32 adpcm_maxlength; ADPCM adpcm; void (*resample)(FREERDP_DSP_CONTEXT* context, const BYTE* src, int bytes_per_sample, - uint32 schan, uint32 srate, int sframes, - uint32 rchan, uint32 rrate); + UINT32 schan, UINT32 srate, int sframes, + UINT32 rchan, UINT32 rrate); void (*decode_ima_adpcm)(FREERDP_DSP_CONTEXT* context, const BYTE* src, int size, int channels, int block_size); diff --git a/include/freerdp/utils/msusb.h b/include/freerdp/utils/msusb.h index 36ac8becf..7df24bd95 100644 --- a/include/freerdp/utils/msusb.h +++ b/include/freerdp/utils/msusb.h @@ -36,21 +36,21 @@ ((UINT16) (*((BYTE *) (_p)))) + \ ((UINT16) (*(((BYTE *) (_p)) + 1)) << 8); \ } while (0) -#define data_read_uint32(_p, _v) do { _v = \ - (uint32) (*((BYTE *) (_p))) + \ - ((uint32) (*(((BYTE *) (_p)) + 1)) << 8) + \ - ((uint32) (*(((BYTE *) (_p)) + 2)) << 16) + \ - ((uint32) (*(((BYTE *) (_p)) + 3)) << 24); \ +#define data_read_UINT32(_p, _v) do { _v = \ + (UINT32) (*((BYTE *) (_p))) + \ + ((UINT32) (*(((BYTE *) (_p)) + 1)) << 8) + \ + ((UINT32) (*(((BYTE *) (_p)) + 2)) << 16) + \ + ((UINT32) (*(((BYTE *) (_p)) + 3)) << 24); \ } while (0) -#define data_read_uint64(_p, _v) do { _v = \ - (uint64) (*((BYTE *) (_p))) + \ - ((uint64) (*(((BYTE *) (_p)) + 1)) << 8) + \ - ((uint64) (*(((BYTE *) (_p)) + 2)) << 16) + \ - ((uint64) (*(((BYTE *) (_p)) + 3)) << 24) + \ - ((uint64) (*(((BYTE *) (_p)) + 4)) << 32) + \ - ((uint64) (*(((BYTE *) (_p)) + 5)) << 40) + \ - ((uint64) (*(((BYTE *) (_p)) + 6)) << 48) + \ - ((uint64) (*(((BYTE *) (_p)) + 7)) << 56); \ +#define data_read_UINT64(_p, _v) do { _v = \ + (UINT64) (*((BYTE *) (_p))) + \ + ((UINT64) (*(((BYTE *) (_p)) + 1)) << 8) + \ + ((UINT64) (*(((BYTE *) (_p)) + 2)) << 16) + \ + ((UINT64) (*(((BYTE *) (_p)) + 3)) << 24) + \ + ((UINT64) (*(((BYTE *) (_p)) + 4)) << 32) + \ + ((UINT64) (*(((BYTE *) (_p)) + 5)) << 40) + \ + ((UINT64) (*(((BYTE *) (_p)) + 6)) << 48) + \ + ((UINT64) (*(((BYTE *) (_p)) + 7)) << 56); \ } while (0) #define data_write_BYTE(_p, _v) do { \ @@ -60,21 +60,21 @@ *((BYTE *) _p) = (BYTE) (((UINT16) (_v)) & 0xff); \ *(((BYTE *) _p) + 1) = (BYTE) ((((UINT16) (_v)) >> 8) & 0xff); \ } while (0) -#define data_write_uint32(_p, _v) do { \ - *((BYTE *) _p) = (BYTE) (((uint32) (_v)) & 0xff); \ - *(((BYTE *) _p) + 1) = (BYTE) ((((uint32) (_v)) >> 8) & 0xff); \ - *(((BYTE *) _p) + 2) = (BYTE) ((((uint32) (_v)) >> 16) & 0xff); \ - *(((BYTE *) _p) + 3) = (BYTE) ((((uint32) (_v)) >> 24) & 0xff); \ +#define data_write_UINT32(_p, _v) do { \ + *((BYTE *) _p) = (BYTE) (((UINT32) (_v)) & 0xff); \ + *(((BYTE *) _p) + 1) = (BYTE) ((((UINT32) (_v)) >> 8) & 0xff); \ + *(((BYTE *) _p) + 2) = (BYTE) ((((UINT32) (_v)) >> 16) & 0xff); \ + *(((BYTE *) _p) + 3) = (BYTE) ((((UINT32) (_v)) >> 24) & 0xff); \ } while (0) -#define data_write_uint64(_p, _v) do { \ - *((BYTE *) _p) = (BYTE) (((uint64) (_v)) & 0xff); \ - *(((BYTE *) _p) + 1) = (BYTE) ((((uint64) (_v)) >> 8) & 0xff); \ - *(((BYTE *) _p) + 2) = (BYTE) ((((uint64) (_v)) >> 16) & 0xff); \ - *(((BYTE *) _p) + 3) = (BYTE) ((((uint64) (_v)) >> 24) & 0xff); \ - *(((BYTE *) _p) + 4) = (BYTE) ((((uint64) (_v)) >> 32) & 0xff); \ - *(((BYTE *) _p) + 5) = (BYTE) ((((uint64) (_v)) >> 40) & 0xff); \ - *(((BYTE *) _p) + 6) = (BYTE) ((((uint64) (_v)) >> 48) & 0xff); \ - *(((BYTE *) _p) + 7) = (BYTE) ((((uint64) (_v)) >> 56) & 0xff); \ +#define data_write_UINT64(_p, _v) do { \ + *((BYTE *) _p) = (BYTE) (((UINT64) (_v)) & 0xff); \ + *(((BYTE *) _p) + 1) = (BYTE) ((((UINT64) (_v)) >> 8) & 0xff); \ + *(((BYTE *) _p) + 2) = (BYTE) ((((UINT64) (_v)) >> 16) & 0xff); \ + *(((BYTE *) _p) + 3) = (BYTE) ((((UINT64) (_v)) >> 24) & 0xff); \ + *(((BYTE *) _p) + 4) = (BYTE) ((((UINT64) (_v)) >> 32) & 0xff); \ + *(((BYTE *) _p) + 5) = (BYTE) ((((UINT64) (_v)) >> 40) & 0xff); \ + *(((BYTE *) _p) + 6) = (BYTE) ((((UINT64) (_v)) >> 48) & 0xff); \ + *(((BYTE *) _p) + 7) = (BYTE) ((((UINT64) (_v)) >> 56) & 0xff); \ } while (0) typedef struct _MSUSB_INTERFACE_DESCRIPTOR MSUSB_INTERFACE_DESCRIPTOR; @@ -84,9 +84,9 @@ typedef struct _MSUSB_CONFIG_DESCRIPTOR MSUSB_CONFIG_DESCRIPTOR; struct _MSUSB_PIPE_DESCRIPTOR { UINT16 MaximumPacketSize; - uint32 MaximumTransferSize; - uint32 PipeFlags; - uint32 PipeHandle; + UINT32 MaximumTransferSize; + UINT32 PipeFlags; + UINT32 PipeHandle; BYTE bEndpointAddress; BYTE bInterval; BYTE PipeType; @@ -99,8 +99,8 @@ struct _MSUSB_INTERFACE_DESCRIPTOR UINT16 NumberOfPipesExpected; BYTE InterfaceNumber; BYTE AlternateSetting; - uint32 NumberOfPipes; - uint32 InterfaceHandle; + UINT32 NumberOfPipes; + UINT32 InterfaceHandle; BYTE bInterfaceClass; BYTE bInterfaceSubClass; BYTE bInterfaceProtocol; @@ -112,25 +112,25 @@ struct _MSUSB_CONFIG_DESCRIPTOR { UINT16 wTotalLength; BYTE bConfigurationValue; - uint32 ConfigurationHandle; - uint32 NumInterfaces; + UINT32 ConfigurationHandle; + UINT32 NumInterfaces; MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; int InitCompleted; int MsOutSize; } __attribute__((packed)); /* MSUSB_PIPE exported functions */ -void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, uint32 NewNumberOfPipes); +void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, UINT32 NewNumberOfPipes); /* MSUSB_INTERFACE exported functions */ void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface); -MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, uint32 data_size, int* offset); +MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, UINT32 data_size, int* offset); int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, BYTE* data, int* offset); /* MSUSB_CONFIG exported functions */ MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_new(); void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig); -MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, uint32 data_size, uint32 NumInterfaces); +MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, UINT32 data_size, UINT32 NumInterfaces); int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset); void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg); diff --git a/include/freerdp/utils/pcap.h b/include/freerdp/utils/pcap.h index 75115c70c..ccc8c8cb9 100644 --- a/include/freerdp/utils/pcap.h +++ b/include/freerdp/utils/pcap.h @@ -25,22 +25,22 @@ struct _pcap_header { - uint32 magic_number; /* magic number */ + UINT32 magic_number; /* magic number */ UINT16 version_major; /* major version number */ UINT16 version_minor; /* minor version number */ - sint32 thiszone; /* GMT to local correction */ - uint32 sigfigs; /* accuracy of timestamps */ - uint32 snaplen; /* max length of captured packets, in octets */ - uint32 network; /* data link type */ + INT32 thiszone; /* GMT to local correction */ + UINT32 sigfigs; /* accuracy of timestamps */ + UINT32 snaplen; /* max length of captured packets, in octets */ + UINT32 network; /* data link type */ }; typedef struct _pcap_header pcap_header; struct _pcap_record_header { - uint32 ts_sec; /* timestamp seconds */ - uint32 ts_usec; /* timestamp microseconds */ - uint32 incl_len; /* number of octets of packet saved in file */ - uint32 orig_len; /* actual length of packet */ + UINT32 ts_sec; /* timestamp seconds */ + UINT32 ts_usec; /* timestamp microseconds */ + UINT32 incl_len; /* number of octets of packet saved in file */ + UINT32 orig_len; /* actual length of packet */ }; typedef struct _pcap_record_header pcap_record_header; @@ -50,7 +50,7 @@ struct _pcap_record { pcap_record_header header; void* data; - uint32 length; + UINT32 length; pcap_record* next; }; @@ -71,7 +71,7 @@ typedef struct rdp_pcap rdpPcap; FREERDP_API rdpPcap* pcap_open(char* name, BOOL write); FREERDP_API void pcap_close(rdpPcap* pcap); -FREERDP_API void pcap_add_record(rdpPcap* pcap, void* data, uint32 length); +FREERDP_API void pcap_add_record(rdpPcap* pcap, void* data, UINT32 length); FREERDP_API BOOL pcap_has_next_record(rdpPcap* pcap); FREERDP_API BOOL pcap_get_next_record(rdpPcap* pcap, pcap_record* record); FREERDP_API BOOL pcap_get_next_record_header(rdpPcap* pcap, pcap_record* record); diff --git a/include/freerdp/utils/rail.h b/include/freerdp/utils/rail.h index f50221b24..d37e3de35 100644 --- a/include/freerdp/utils/rail.h +++ b/include/freerdp/utils/rail.h @@ -29,7 +29,7 @@ FREERDP_API void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string); FREERDP_API void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string); FREERDP_API void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string); FREERDP_API void rail_write_unicode_string_value(STREAM* s, RAIL_UNICODE_STRING* unicode_string); -FREERDP_API void* rail_clone_order(uint32 event_type, void* order); -FREERDP_API void rail_free_cloned_order(uint32 event_type, void* order); +FREERDP_API void* rail_clone_order(UINT32 event_type, void* order); +FREERDP_API void rail_free_cloned_order(UINT32 event_type, void* order); #endif /* __RAIL_UTILS_H */ diff --git a/include/freerdp/utils/sleep.h b/include/freerdp/utils/sleep.h index bb7a1fae3..807a9a2f2 100644 --- a/include/freerdp/utils/sleep.h +++ b/include/freerdp/utils/sleep.h @@ -23,7 +23,7 @@ #include #include -FREERDP_API void freerdp_sleep(uint32 seconds); -FREERDP_API void freerdp_usleep(uint32 useconds); +FREERDP_API void freerdp_sleep(UINT32 seconds); +FREERDP_API void freerdp_usleep(UINT32 useconds); #endif /* __SLEEP_UTILS_H */ diff --git a/include/freerdp/utils/stopwatch.h b/include/freerdp/utils/stopwatch.h index f3affedd1..1ee50471b 100644 --- a/include/freerdp/utils/stopwatch.h +++ b/include/freerdp/utils/stopwatch.h @@ -42,6 +42,6 @@ FREERDP_API void stopwatch_stop(STOPWATCH* stopwatch); FREERDP_API void stopwatch_reset(STOPWATCH* stopwatch); FREERDP_API double stopwatch_get_elapsed_time_in_seconds(STOPWATCH* stopwatch); -FREERDP_API void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, uint32* sec, uint32* usec); +FREERDP_API void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, UINT32* sec, UINT32* usec); #endif /* __UTILS_STOPWATCH_H */ diff --git a/include/freerdp/utils/stream.h b/include/freerdp/utils/stream.h index c9048377a..626ce3120 100644 --- a/include/freerdp/utils/stream.h +++ b/include/freerdp/utils/stream.h @@ -67,21 +67,21 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); (UINT16)(*_s->p) + \ (UINT16)(((UINT16)(*(_s->p + 1))) << 8); \ _s->p += 2; } while (0) -#define stream_read_uint32(_s, _v) do { _v = \ - (uint32)(*_s->p) + \ - (((uint32)(*(_s->p + 1))) << 8) + \ - (((uint32)(*(_s->p + 2))) << 16) + \ - (((uint32)(*(_s->p + 3))) << 24); \ +#define stream_read_UINT32(_s, _v) do { _v = \ + (UINT32)(*_s->p) + \ + (((UINT32)(*(_s->p + 1))) << 8) + \ + (((UINT32)(*(_s->p + 2))) << 16) + \ + (((UINT32)(*(_s->p + 3))) << 24); \ _s->p += 4; } while (0) -#define stream_read_uint64(_s, _v) do { _v = \ - (uint64)(*_s->p) + \ - (((uint64)(*(_s->p + 1))) << 8) + \ - (((uint64)(*(_s->p + 2))) << 16) + \ - (((uint64)(*(_s->p + 3))) << 24) + \ - (((uint64)(*(_s->p + 4))) << 32) + \ - (((uint64)(*(_s->p + 5))) << 40) + \ - (((uint64)(*(_s->p + 6))) << 48) + \ - (((uint64)(*(_s->p + 7))) << 56); \ +#define stream_read_UINT64(_s, _v) do { _v = \ + (UINT64)(*_s->p) + \ + (((UINT64)(*(_s->p + 1))) << 8) + \ + (((UINT64)(*(_s->p + 2))) << 16) + \ + (((UINT64)(*(_s->p + 3))) << 24) + \ + (((UINT64)(*(_s->p + 4))) << 32) + \ + (((UINT64)(*(_s->p + 5))) << 40) + \ + (((UINT64)(*(_s->p + 6))) << 48) + \ + (((UINT64)(*(_s->p + 7))) << 56); \ _s->p += 8; } while (0) #define stream_read(_s, _b, _n) do { \ memcpy(_b, (_s->p), (_n)); \ @@ -93,20 +93,20 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); #define stream_write_UINT16(_s, _v) do { \ *_s->p++ = (_v) & 0xFF; \ *_s->p++ = ((_v) >> 8) & 0xFF; } while (0) -#define stream_write_uint32(_s, _v) do { \ +#define stream_write_UINT32(_s, _v) do { \ *_s->p++ = (_v) & 0xFF; \ *_s->p++ = ((_v) >> 8) & 0xFF; \ *_s->p++ = ((_v) >> 16) & 0xFF; \ *_s->p++ = ((_v) >> 24) & 0xFF; } while (0) -#define stream_write_uint64(_s, _v) do { \ - *_s->p++ = (uint64)(_v) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 8) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 16) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 24) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 32) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 40) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 48) & 0xFF; \ - *_s->p++ = ((uint64)(_v) >> 56) & 0xFF; } while (0) +#define stream_write_UINT64(_s, _v) do { \ + *_s->p++ = (UINT64)(_v) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 8) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 16) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 24) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 32) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 40) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 48) & 0xFF; \ + *_s->p++ = ((UINT64)(_v) >> 56) & 0xFF; } while (0) #define stream_write(_s, _b, _n) do { \ memcpy(_s->p, (_b), (_n)); \ _s->p += (_n); \ @@ -125,43 +125,43 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size); (UINT16)(*_s->p) + \ (((UINT16)(*(_s->p + 1))) << 8); \ } while (0) -#define stream_peek_uint32(_s, _v) do { _v = \ - (uint32)(*_s->p) + \ - (((uint32)(*(_s->p + 1))) << 8) + \ - (((uint32)(*(_s->p + 2))) << 16) + \ - (((uint32)(*(_s->p + 3))) << 24); \ +#define stream_peek_UINT32(_s, _v) do { _v = \ + (UINT32)(*_s->p) + \ + (((UINT32)(*(_s->p + 1))) << 8) + \ + (((UINT32)(*(_s->p + 2))) << 16) + \ + (((UINT32)(*(_s->p + 3))) << 24); \ } while (0) -#define stream_peek_uint64(_s, _v) do { _v = \ - (uint64)(*_s->p) + \ - (((uint64)(*(_s->p + 1))) << 8) + \ - (((uint64)(*(_s->p + 2))) << 16) + \ - (((uint64)(*(_s->p + 3))) << 24) + \ - (((uint64)(*(_s->p + 4))) << 32) + \ - (((uint64)(*(_s->p + 5))) << 40) + \ - (((uint64)(*(_s->p + 6))) << 48) + \ - (((uint64)(*(_s->p + 7))) << 56); \ +#define stream_peek_UINT64(_s, _v) do { _v = \ + (UINT64)(*_s->p) + \ + (((UINT64)(*(_s->p + 1))) << 8) + \ + (((UINT64)(*(_s->p + 2))) << 16) + \ + (((UINT64)(*(_s->p + 3))) << 24) + \ + (((UINT64)(*(_s->p + 4))) << 32) + \ + (((UINT64)(*(_s->p + 5))) << 40) + \ + (((UINT64)(*(_s->p + 6))) << 48) + \ + (((UINT64)(*(_s->p + 7))) << 56); \ } while (0) #define stream_seek_BYTE(_s) stream_seek(_s, 1) #define stream_seek_UINT16(_s) stream_seek(_s, 2) -#define stream_seek_uint32(_s) stream_seek(_s, 4) -#define stream_seek_uint64(_s) stream_seek(_s, 8) +#define stream_seek_UINT32(_s) stream_seek(_s, 4) +#define stream_seek_UINT64(_s) stream_seek(_s, 8) #define stream_read_UINT16_be(_s, _v) do { _v = \ (((UINT16)(*_s->p)) << 8) + \ (UINT16)(*(_s->p + 1)); \ _s->p += 2; } while (0) -#define stream_read_uint32_be(_s, _v) do { _v = \ - (((uint32)(*(_s->p))) << 24) + \ - (((uint32)(*(_s->p + 1))) << 16) + \ - (((uint32)(*(_s->p + 2))) << 8) + \ - (((uint32)(*(_s->p + 3)))); \ +#define stream_read_UINT32_be(_s, _v) do { _v = \ + (((UINT32)(*(_s->p))) << 24) + \ + (((UINT32)(*(_s->p + 1))) << 16) + \ + (((UINT32)(*(_s->p + 2))) << 8) + \ + (((UINT32)(*(_s->p + 3)))); \ _s->p += 4; } while (0) #define stream_write_UINT16_be(_s, _v) do { \ *_s->p++ = ((_v) >> 8) & 0xFF; \ *_s->p++ = (_v) & 0xFF; } while (0) -#define stream_write_uint32_be(_s, _v) do { \ +#define stream_write_UINT32_be(_s, _v) do { \ stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \ stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \ } while (0) diff --git a/include/freerdp/utils/string.h b/include/freerdp/utils/string.h index 2228cc3a5..48b65d70a 100644 --- a/include/freerdp/utils/string.h +++ b/include/freerdp/utils/string.h @@ -28,7 +28,7 @@ struct rdp_string { char* ascii; char* unicode; - uint32 length; + UINT32 length; }; typedef struct rdp_string rdpString; diff --git a/include/freerdp/utils/time.h b/include/freerdp/utils/time.h index 32f49a113..99230ca1a 100644 --- a/include/freerdp/utils/time.h +++ b/include/freerdp/utils/time.h @@ -30,9 +30,9 @@ #include #include -FREERDP_API uint64 freerdp_windows_gmtime(); -FREERDP_API uint64 freerdp_get_windows_time_from_unix_time(time_t unix_time); -FREERDP_API time_t freerdp_get_unix_time_from_windows_time(uint64 windows_time); +FREERDP_API UINT64 freerdp_windows_gmtime(); +FREERDP_API UINT64 freerdp_get_windows_time_from_unix_time(time_t unix_time); +FREERDP_API time_t freerdp_get_unix_time_from_windows_time(UINT64 windows_time); FREERDP_API time_t freerdp_get_unix_time_from_generalized_time(const char* generalized_time); #endif /* FREERDP_TIME_UTILS_H */ diff --git a/include/freerdp/window.h b/include/freerdp/window.h index baa49efc4..c02d2febf 100644 --- a/include/freerdp/window.h +++ b/include/freerdp/window.h @@ -122,22 +122,22 @@ struct _WINDOW_ORDER_INFO { - uint32 windowId; - uint32 fieldFlags; - uint32 notifyIconId; + UINT32 windowId; + UINT32 fieldFlags; + UINT32 notifyIconId; }; typedef struct _WINDOW_ORDER_INFO WINDOW_ORDER_INFO; struct _ICON_INFO { - uint32 cacheEntry; - uint32 cacheId; - uint32 bpp; - uint32 width; - uint32 height; - uint32 cbColorTable; - uint32 cbBitsMask; - uint32 cbBitsColor; + UINT32 cacheEntry; + UINT32 cacheId; + UINT32 bpp; + UINT32 width; + UINT32 height; + UINT32 cbColorTable; + UINT32 cbBitsMask; + UINT32 cbBitsColor; BYTE* bitsMask; BYTE* colorTable; BYTE* bitsColor; @@ -146,15 +146,15 @@ typedef struct _ICON_INFO ICON_INFO; struct _CACHED_ICON_INFO { - uint32 cacheEntry; - uint32 cacheId; + UINT32 cacheEntry; + UINT32 cacheId; }; typedef struct _CACHED_ICON_INFO CACHED_ICON_INFO; struct _NOTIFY_ICON_INFOTIP { - uint32 timeout; - uint32 flags; + UINT32 timeout; + UINT32 flags; RAIL_UNICODE_STRING text; RAIL_UNICODE_STRING title; }; @@ -162,28 +162,28 @@ typedef struct _NOTIFY_ICON_INFOTIP NOTIFY_ICON_INFOTIP; struct _WINDOW_STATE_ORDER { - uint32 ownerWindowId; - uint32 style; - uint32 extendedStyle; - uint32 showState; + UINT32 ownerWindowId; + UINT32 style; + UINT32 extendedStyle; + UINT32 showState; RAIL_UNICODE_STRING titleInfo; - uint32 clientOffsetX; - uint32 clientOffsetY; - uint32 clientAreaWidth; - uint32 clientAreaHeight; - uint32 RPContent; - uint32 rootParentHandle; - uint32 windowOffsetX; - uint32 windowOffsetY; - uint32 windowClientDeltaX; - uint32 windowClientDeltaY; - uint32 windowWidth; - uint32 windowHeight; - uint32 numWindowRects; + UINT32 clientOffsetX; + UINT32 clientOffsetY; + UINT32 clientAreaWidth; + UINT32 clientAreaHeight; + UINT32 RPContent; + UINT32 rootParentHandle; + UINT32 windowOffsetX; + UINT32 windowOffsetY; + UINT32 windowClientDeltaX; + UINT32 windowClientDeltaY; + UINT32 windowWidth; + UINT32 windowHeight; + UINT32 numWindowRects; RECTANGLE_16* windowRects; - uint32 visibleOffsetX; - uint32 visibleOffsetY; - uint32 numVisibilityRects; + UINT32 visibleOffsetX; + UINT32 visibleOffsetY; + UINT32 numVisibilityRects; RECTANGLE_16* visibilityRects; }; typedef struct _WINDOW_STATE_ORDER WINDOW_STATE_ORDER; @@ -202,10 +202,10 @@ typedef struct _WINDOW_CACHED_ICON_ORDER WINDOW_CACHED_ICON_ORDER; struct _NOTIFY_ICON_STATE_ORDER { - uint32 version; + UINT32 version; RAIL_UNICODE_STRING toolTip; NOTIFY_ICON_INFOTIP infoTip; - uint32 state; + UINT32 state; ICON_INFO icon; CACHED_ICON_INFO cachedIcon; }; @@ -213,9 +213,9 @@ typedef struct _NOTIFY_ICON_STATE_ORDER NOTIFY_ICON_STATE_ORDER; struct _MONITORED_DESKTOP_ORDER { - uint32 activeWindowId; - uint32 numWindowIds; - uint32* windowIds; + UINT32 activeWindowId; + UINT32 numWindowIds; + UINT32* windowIds; }; typedef struct _MONITORED_DESKTOP_ORDER MONITORED_DESKTOP_ORDER; @@ -233,7 +233,7 @@ typedef void (*pNonMonitoredDesktop)(rdpContext* context, WINDOW_ORDER_INFO* ord struct rdp_window_update { rdpContext* context; /* 0 */ - uint32 paddingA[16 - 1]; /* 1 */ + UINT32 paddingA[16 - 1]; /* 1 */ pWindowCreate WindowCreate; /* 16 */ pWindowUpdate WindowUpdate; /* 17 */ @@ -245,7 +245,7 @@ struct rdp_window_update pNotifyIconDelete NotifyIconDelete; /* 23 */ pMonitoredDesktop MonitoredDesktop; /* 24 */ pNonMonitoredDesktop NonMonitoredDesktop; /* 25 */ - uint32 paddingB[32 - 26]; /* 26 */ + UINT32 paddingB[32 - 26]; /* 26 */ /* internal */ diff --git a/libfreerdp/cache/bitmap.c b/libfreerdp/cache/bitmap.c index 23d1655cc..708a316aa 100644 --- a/libfreerdp/cache/bitmap.c +++ b/libfreerdp/cache/bitmap.c @@ -204,7 +204,7 @@ void update_gdi_bitmap_update(rdpContext* context, BITMAP_UPDATE* bitmap_update) } } -rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index) +rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index) { rdpBitmap* bitmap; @@ -229,7 +229,7 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, uint32 id, uint32 inde return bitmap; } -void bitmap_cache_put(rdpBitmapCache* bitmap_cache, uint32 id, uint32 index, rdpBitmap* bitmap) +void bitmap_cache_put(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index, rdpBitmap* bitmap) { if (id > bitmap_cache->maxCells) { diff --git a/libfreerdp/cache/brush.c b/libfreerdp/cache/brush.c index e3da15353..f3fd4fbb2 100644 --- a/libfreerdp/cache/brush.c +++ b/libfreerdp/cache/brush.c @@ -78,7 +78,7 @@ void update_gdi_cache_brush(rdpContext* context, CACHE_BRUSH_ORDER* cache_brush) brush_cache_put(cache->brush, cache_brush->index, cache_brush->data, cache_brush->bpp); } -void* brush_cache_get(rdpBrushCache* brush, uint32 index, uint32* bpp) +void* brush_cache_get(rdpBrushCache* brush, UINT32 index, UINT32* bpp) { void* entry; @@ -114,7 +114,7 @@ void* brush_cache_get(rdpBrushCache* brush, uint32 index, uint32* bpp) return entry; } -void brush_cache_put(rdpBrushCache* brush, uint32 index, void* entry, uint32 bpp) +void brush_cache_put(rdpBrushCache* brush, UINT32 index, void* entry, UINT32 bpp) { void* prevEntry; diff --git a/libfreerdp/cache/glyph.c b/libfreerdp/cache/glyph.c index ea809c3bd..eff5573c8 100644 --- a/libfreerdp/cache/glyph.c +++ b/libfreerdp/cache/glyph.c @@ -30,11 +30,11 @@ #include void update_process_glyph(rdpContext* context, BYTE* data, int* index, - int* x, int* y, uint32 cacheId, uint32 ulCharInc, uint32 flAccel) + int* x, int* y, UINT32 cacheId, UINT32 ulCharInc, UINT32 flAccel) { int offset; rdpGlyph* glyph; - uint32 cacheIndex; + UINT32 cacheIndex; rdpGraphics* graphics; rdpGlyphCache* glyph_cache; @@ -72,13 +72,13 @@ void update_process_glyph(rdpContext* context, BYTE* data, int* index, } } -void update_process_glyph_fragments(rdpContext* context, BYTE* data, uint32 length, - uint32 cacheId, uint32 ulCharInc, uint32 flAccel, uint32 bgcolor, uint32 fgcolor, int x, int y, +void update_process_glyph_fragments(rdpContext* context, BYTE* data, UINT32 length, + UINT32 cacheId, UINT32 ulCharInc, UINT32 flAccel, UINT32 bgcolor, UINT32 fgcolor, int x, int y, int bkX, int bkY, int bkWidth, int bkHeight, int opX, int opY, int opWidth, int opHeight) { int n; - uint32 id; - uint32 size; + UINT32 id; + UINT32 size; int index = 0; BYTE* fragments; rdpGraphics* graphics; @@ -183,8 +183,8 @@ void update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index) void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index) { - sint32 opLeft, opTop, opRight, opBottom; - sint32 x, y; + INT32 opLeft, opTop, opRight, opBottom; + INT32 x, y; rdpGlyphCache* glyph_cache; glyph_cache = context->cache->glyph; @@ -233,8 +233,8 @@ void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index) void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph) { - sint32 opLeft, opTop, opRight, opBottom; - sint32 x, y; + INT32 opLeft, opTop, opRight, opBottom; + INT32 x, y; GLYPH_DATA_V2* glyph_data; rdpGlyph* glyph; rdpCache* cache = context->cache; @@ -358,7 +358,7 @@ void update_gdi_cache_glyph_v2(rdpContext* context, CACHE_GLYPH_V2_ORDER* cache_ } } -rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, uint32 id, uint32 index) +rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index) { rdpGlyph* glyph; @@ -384,7 +384,7 @@ rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, uint32 id, uint32 index) return glyph; } -void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGlyph* glyph) +void glyph_cache_put(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index, rdpGlyph* glyph) { rdpGlyph* prevGlyph; @@ -412,7 +412,7 @@ void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGly glyph_cache->glyphCache[id].entries[index] = glyph; } -void* glyph_cache_fragment_get(rdpGlyphCache* glyph_cache, uint32 index, uint32* size) +void* glyph_cache_fragment_get(rdpGlyphCache* glyph_cache, UINT32 index, UINT32* size) { void* fragment; @@ -427,7 +427,7 @@ void* glyph_cache_fragment_get(rdpGlyphCache* glyph_cache, uint32 index, uint32* return fragment; } -void glyph_cache_fragment_put(rdpGlyphCache* glyph_cache, uint32 index, uint32 size, void* fragment) +void glyph_cache_fragment_put(rdpGlyphCache* glyph_cache, UINT32 index, UINT32 size, void* fragment) { void* prevFragment; diff --git a/libfreerdp/cache/nine_grid.c b/libfreerdp/cache/nine_grid.c index 21c569085..17b225074 100644 --- a/libfreerdp/cache/nine_grid.c +++ b/libfreerdp/cache/nine_grid.c @@ -53,7 +53,7 @@ void nine_grid_cache_register_callbacks(rdpUpdate* update) update->primary->MultiDrawNineGrid = update_gdi_multi_draw_nine_grid; } -void* nine_grid_cache_get(rdpNineGridCache* nine_grid, uint32 index) +void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index) { void* entry; @@ -74,7 +74,7 @@ void* nine_grid_cache_get(rdpNineGridCache* nine_grid, uint32 index) return entry; } -void nine_grid_cache_put(rdpNineGridCache* nine_grid, uint32 index, void* entry) +void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry) { void* prevEntry; diff --git a/libfreerdp/cache/offscreen.c b/libfreerdp/cache/offscreen.c index 281082d0c..6a6ba494c 100644 --- a/libfreerdp/cache/offscreen.c +++ b/libfreerdp/cache/offscreen.c @@ -73,7 +73,7 @@ void update_gdi_switch_surface(rdpContext* context, SWITCH_SURFACE_ORDER* switch cache->offscreen->currentSurface = switch_surface->bitmapId; } -rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, uint32 index) +rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index) { rdpBitmap* bitmap; @@ -94,7 +94,7 @@ rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, uint32 index) return bitmap; } -void offscreen_cache_put(rdpOffscreenCache* offscreen, uint32 index, rdpBitmap* bitmap) +void offscreen_cache_put(rdpOffscreenCache* offscreen, UINT32 index, rdpBitmap* bitmap) { if (index >= offscreen->maxEntries) { @@ -106,7 +106,7 @@ void offscreen_cache_put(rdpOffscreenCache* offscreen, uint32 index, rdpBitmap* offscreen->entries[index] = bitmap; } -void offscreen_cache_delete(rdpOffscreenCache* offscreen, uint32 index) +void offscreen_cache_delete(rdpOffscreenCache* offscreen, UINT32 index) { rdpBitmap* prevBitmap; diff --git a/libfreerdp/cache/palette.c b/libfreerdp/cache/palette.c index 925ed0245..9d093bf26 100644 --- a/libfreerdp/cache/palette.c +++ b/libfreerdp/cache/palette.c @@ -34,7 +34,7 @@ void update_gdi_cache_color_table(rdpContext* context, CACHE_COLOR_TABLE_ORDER* palette_cache_put(cache->palette, cache_color_table->cacheIndex, (void*) cache_color_table->colorTable); } -void* palette_cache_get(rdpPaletteCache* palette_cache, uint32 index) +void* palette_cache_get(rdpPaletteCache* palette_cache, UINT32 index) { void* entry; @@ -55,7 +55,7 @@ void* palette_cache_get(rdpPaletteCache* palette_cache, uint32 index) return entry; } -void palette_cache_put(rdpPaletteCache* palette_cache, uint32 index, void* entry) +void palette_cache_put(rdpPaletteCache* palette_cache, UINT32 index, void* entry) { if (index >= palette_cache->maxEntries) { diff --git a/libfreerdp/cache/pointer.c b/libfreerdp/cache/pointer.c index dbc317606..7dcc84436 100644 --- a/libfreerdp/cache/pointer.c +++ b/libfreerdp/cache/pointer.c @@ -111,7 +111,7 @@ void update_pointer_cached(rdpContext* context, POINTER_CACHED_UPDATE* pointer_c Pointer_Set(context, pointer); } -rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, uint32 index) +rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index) { rdpPointer* pointer; @@ -126,7 +126,7 @@ rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, uint32 index) return pointer; } -void pointer_cache_put(rdpPointerCache* pointer_cache, uint32 index, rdpPointer* pointer) +void pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer) { rdpPointer* prevPointer; diff --git a/libfreerdp/channels/libchannels.c b/libfreerdp/channels/libchannels.c index 0b62a9103..a0bf51ccc 100644 --- a/libfreerdp/channels/libchannels.c +++ b/libfreerdp/channels/libchannels.c @@ -285,8 +285,8 @@ static rdpChannel* freerdp_channels_find_channel_by_name(rdpChannels* channels, * according to MS docs * only called from main thread */ -static uint32 FREERDP_CC MyVirtualChannelInit(void** ppInitHandle, PCHANNEL_DEF pChannel, - int channelCount, uint32 versionRequested, PCHANNEL_INIT_EVENT_FN pChannelInitEventProc) +static UINT32 FREERDP_CC MyVirtualChannelInit(void** ppInitHandle, PCHANNEL_DEF pChannel, + int channelCount, UINT32 versionRequested, PCHANNEL_INIT_EVENT_FN pChannelInitEventProc) { int index; rdpChannels* channels; @@ -388,7 +388,7 @@ static uint32 FREERDP_CC MyVirtualChannelInit(void** ppInitHandle, PCHANNEL_DEF * can be called from any thread * thread safe because no 2 threads can have the same channel name registered */ -static uint32 FREERDP_CC MyVirtualChannelOpen(void* pInitHandle, uint32* pOpenHandle, +static UINT32 FREERDP_CC MyVirtualChannelOpen(void* pInitHandle, UINT32* pOpenHandle, char* pChannelName, PCHANNEL_OPEN_EVENT_FN pChannelOpenEventProc) { int index; @@ -442,7 +442,7 @@ static uint32 FREERDP_CC MyVirtualChannelOpen(void* pInitHandle, uint32* pOpenHa * can be called from any thread * thread safe because no 2 threads can have the same openHandle */ -static uint32 FREERDP_CC MyVirtualChannelClose(uint32 openHandle) +static UINT32 FREERDP_CC MyVirtualChannelClose(UINT32 openHandle) { int index; rdpChannels* channels; @@ -472,7 +472,7 @@ static uint32 FREERDP_CC MyVirtualChannelClose(uint32 openHandle) } /* can be called from any thread */ -static uint32 FREERDP_CC MyVirtualChannelWrite(uint32 openHandle, void* pData, uint32 dataLength, void* pUserData) +static UINT32 FREERDP_CC MyVirtualChannelWrite(UINT32 openHandle, void* pData, UINT32 dataLength, void* pUserData) { int index; SYNC_DATA* item; @@ -533,7 +533,7 @@ static uint32 FREERDP_CC MyVirtualChannelWrite(uint32 openHandle, void* pData, u return CHANNEL_RC_OK; } -static uint32 FREERDP_CC MyVirtualChannelEventPush(uint32 openHandle, RDP_EVENT* event) +static UINT32 FREERDP_CC MyVirtualChannelEventPush(UINT32 openHandle, RDP_EVENT* event) { int index; rdpChannels* channels; diff --git a/libfreerdp/channels/wtsvc.c b/libfreerdp/channels/wtsvc.c index b5e587726..877a7d3fb 100644 --- a/libfreerdp/channels/wtsvc.c +++ b/libfreerdp/channels/wtsvc.c @@ -42,7 +42,7 @@ typedef struct wts_data_item { UINT16 channel_id; BYTE* buffer; - uint32 length; + UINT32 length; } wts_data_item; static void wts_data_item_free(wts_data_item* item) @@ -51,7 +51,7 @@ static void wts_data_item_free(wts_data_item* item) free(item); } -static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, uint32 ChannelId) +static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, UINT32 ChannelId) { LIST_ITEM* item; rdpPeerChannel* channel = NULL; @@ -67,7 +67,7 @@ static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, return channel; } -static void wts_queue_receive_data(rdpPeerChannel* channel, const BYTE* buffer, uint32 length) +static void wts_queue_receive_data(rdpPeerChannel* channel, const BYTE* buffer, UINT32 length) { wts_data_item* item; @@ -98,7 +98,7 @@ static void wts_queue_send_item(rdpPeerChannel* channel, wts_data_item* item) wait_obj_set(vcm->send_event); } -static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val) +static int wts_read_variable_uint(STREAM* s, int cbLen, UINT32 *val) { switch (cbLen) { @@ -115,12 +115,12 @@ static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val) default: if (stream_get_left(s) < 4) return 0; - stream_read_uint32(s, *val); + stream_read_UINT32(s, *val); return 4; } } -static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, uint32 length) +static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, UINT32 length) { UINT16 Version; @@ -135,18 +135,18 @@ static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, uint channel->vcm->drdynvc_state = DRDYNVC_STATE_READY; } -static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, STREAM* s, uint32 length) +static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, STREAM* s, UINT32 length) { - uint32 CreationStatus; + UINT32 CreationStatus; if (length < 4) return; - stream_read_uint32(s, CreationStatus); + stream_read_UINT32(s, CreationStatus); - if ((sint32) CreationStatus < 0) + if ((INT32) CreationStatus < 0) { - DEBUG_DVC("ChannelId %d creation failed (%d)", channel->channel_id, (sint32)CreationStatus); + DEBUG_DVC("ChannelId %d creation failed (%d)", channel->channel_id, (INT32)CreationStatus); channel->dvc_open_state = DVC_OPEN_STATE_FAILED; } else @@ -157,7 +157,7 @@ static void wts_read_drdynvc_create_response(rdpPeerChannel* channel, STREAM* s, wait_obj_set(channel->receive_event); } -static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, STREAM* s, int cbLen, uint32 length) +static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, STREAM* s, int cbLen, UINT32 length) { int value; @@ -176,7 +176,7 @@ static void wts_read_drdynvc_data_first(rdpPeerChannel* channel, STREAM* s, int stream_write(channel->receive_data, stream_get_tail(s), length); } -static void wts_read_drdynvc_data(rdpPeerChannel* channel, STREAM* s, uint32 length) +static void wts_read_drdynvc_data(rdpPeerChannel* channel, STREAM* s, UINT32 length) { if (channel->dvc_total_length > 0) { @@ -209,12 +209,12 @@ static void wts_read_drdynvc_close_response(rdpPeerChannel* channel) static void wts_read_drdynvc_pdu(rdpPeerChannel* channel) { - uint32 length; + UINT32 length; int value; int Cmd; int Sp; int cbChId; - uint32 ChannelId; + UINT32 ChannelId; rdpPeerChannel* dvc; length = stream_get_pos(channel->receive_data); @@ -282,7 +282,7 @@ static void wts_read_drdynvc_pdu(rdpPeerChannel* channel) } } -static int wts_write_variable_uint(STREAM* stream, uint32 val) +static int wts_write_variable_uint(STREAM* stream, UINT32 val) { int cb; @@ -299,13 +299,13 @@ static int wts_write_variable_uint(STREAM* stream, uint32 val) else { cb = 3; - stream_write_uint32(stream, val); + stream_write_UINT32(stream, val); } return cb; } -static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, uint32 ChannelId) +static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, UINT32 ChannelId) { BYTE* bm; int cbChId; @@ -316,9 +316,9 @@ static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, uint32 ChannelId) *bm = ((Cmd & 0x0F) << 4) | cbChId; } -static void wts_write_drdynvc_create_request(STREAM *s, uint32 ChannelId, const char *ChannelName) +static void wts_write_drdynvc_create_request(STREAM *s, UINT32 ChannelId, const char *ChannelName) { - uint32 len; + UINT32 len; wts_write_drdynvc_header(s, CREATE_REQUEST_PDU, ChannelId); len = strlen(ChannelName) + 1; @@ -449,7 +449,7 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) BOOL result = TRUE; wts_data_item* item; rdpPeerChannel* channel; - uint32 dynvc_caps; + UINT32 dynvc_caps; if (vcm->drdynvc_state == DRDYNVC_STATE_NONE && vcm->client->activated) { @@ -491,7 +491,7 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm) void* WTSVirtualChannelOpenEx( /* __in */ WTSVirtualChannelManager* vcm, /* __in */ const char* pVirtualName, - /* __in */ uint32 flags) + /* __in */ UINT32 flags) { int i; int len; @@ -573,7 +573,7 @@ BOOL WTSVirtualChannelQuery( /* __in */ void* hChannelHandle, /* __in */ WTS_VIRTUAL_CLASS WtsVirtualClass, /* __out */ void** ppBuffer, - /* __out */ uint32* pBytesReturned) + /* __out */ UINT32* pBytesReturned) { BOOL bval; void* fds[10]; @@ -634,10 +634,10 @@ void WTSFreeMemory( BOOL WTSVirtualChannelRead( /* __in */ void* hChannelHandle, - /* __in */ uint32 TimeOut, + /* __in */ UINT32 TimeOut, /* __out */ BYTE* Buffer, - /* __in */ uint32 BufferSize, - /* __out */ uint32* pBytesRead) + /* __in */ UINT32 BufferSize, + /* __out */ UINT32* pBytesRead) { wts_data_item* item; rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle; @@ -674,8 +674,8 @@ BOOL WTSVirtualChannelRead( BOOL WTSVirtualChannelWrite( /* __in */ void* hChannelHandle, /* __in */ BYTE* Buffer, - /* __in */ uint32 Length, - /* __out */ uint32* pBytesWritten) + /* __in */ UINT32 Length, + /* __out */ UINT32* pBytesWritten) { rdpPeerChannel* channel = (rdpPeerChannel*) hChannelHandle; wts_data_item* item; @@ -683,7 +683,7 @@ BOOL WTSVirtualChannelWrite( int cbLen; int cbChId; int first; - uint32 written; + UINT32 written; if (channel == NULL) return FALSE; @@ -716,7 +716,7 @@ BOOL WTSVirtualChannelWrite( stream_seek_BYTE(s); cbChId = wts_write_variable_uint(s, channel->channel_id); - if (first && (Length > (uint32) stream_get_left(s))) + if (first && (Length > (UINT32) stream_get_left(s))) { cbLen = wts_write_variable_uint(s, Length); item->buffer[0] = (DATA_FIRST_PDU << 4) | (cbLen << 2) | cbChId; diff --git a/libfreerdp/channels/wtsvc.h b/libfreerdp/channels/wtsvc.h index e58b7e49c..b452a6ee8 100644 --- a/libfreerdp/channels/wtsvc.h +++ b/libfreerdp/channels/wtsvc.h @@ -61,7 +61,7 @@ struct rdp_peer_channel { WTSVirtualChannelManager* vcm; freerdp_peer* client; - uint32 channel_id; + UINT32 channel_id; UINT16 channel_type; UINT16 index; @@ -71,7 +71,7 @@ struct rdp_peer_channel HANDLE mutex; BYTE dvc_open_state; - uint32 dvc_total_length; + UINT32 dvc_total_length; }; struct WTSVirtualChannelManager @@ -83,7 +83,7 @@ struct WTSVirtualChannelManager rdpPeerChannel* drdynvc_channel; BYTE drdynvc_state; - uint32 dvc_channel_id_seq; + UINT32 dvc_channel_id_seq; LIST* dvc_channel_list; }; diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index c859bf527..0a7b91b20 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -58,7 +58,7 @@ #define BLACK_PIXEL 0x000000 #define WHITE_PIXEL 0xFFFFFF -typedef uint32 PIXEL; +typedef UINT32 PIXEL; static const BYTE g_MaskBit0 = 0x01; /* Least significant bit */ static const BYTE g_MaskBit1 = 0x02; @@ -79,7 +79,7 @@ static const BYTE g_MaskLiteRunLength = 0x0F; * Reads the supplied order header and extracts the compression * order code ID. */ -static uint32 ExtractCodeId(BYTE bOrderHdr) +static UINT32 ExtractCodeId(BYTE bOrderHdr) { int code; @@ -115,10 +115,10 @@ static uint32 ExtractCodeId(BYTE bOrderHdr) /** * Extract the run length of a compression order. */ -static uint32 ExtractRunLength(uint32 code, BYTE* pbOrderHdr, uint32* advance) +static UINT32 ExtractRunLength(UINT32 code, BYTE* pbOrderHdr, UINT32* advance) { - uint32 runLength; - uint32 ladvance; + UINT32 runLength; + UINT32 ladvance; ladvance = 1; runLength = 0; diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index 63637b895..42aa4e5e7 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -35,7 +35,7 @@ int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp) int start; int shift; UINT16 *src16; - uint32 *src32; + UINT32 *src32; int red, green, blue; switch (bpp) @@ -59,7 +59,7 @@ int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp) blue = data[2]; return RGB24(red, green, blue); case 32: - src32 = (uint32*) data; + src32 = (UINT32*) data; return src32[y * width + x]; default: break; @@ -91,7 +91,7 @@ void freerdp_set_pixel(BYTE* data, int x, int y, int width, int height, int bpp, } } -static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_rgb(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -142,7 +142,7 @@ static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BY } } -static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_bgr(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -193,7 +193,7 @@ static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BY } } -static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_rgb(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { switch (bpp) { @@ -234,7 +234,7 @@ static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYT } } -static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_bgr(UINT32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv) { switch (bpp) { @@ -275,13 +275,13 @@ static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYT } } -uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { BYTE red = 0; BYTE green = 0; BYTE blue = 0; BYTE alpha = 0xFF; - uint32 dstColor = 0; + UINT32 dstColor = 0; freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); freerdp_color_make_rgb(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv); @@ -289,13 +289,13 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO return dstColor; } -uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { BYTE red = 0; BYTE green = 0; BYTE blue = 0; BYTE alpha = 0xFF; - uint32 dstColor = 0; + UINT32 dstColor = 0; freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); freerdp_color_make_bgr(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv); @@ -303,13 +303,13 @@ uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO return dstColor; } -uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_rgb_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { BYTE red = 0; BYTE green = 0; BYTE blue = 0; BYTE alpha = 0xFF; - uint32 dstColor = 0; + UINT32 dstColor = 0; freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); freerdp_color_make_bgr(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv); @@ -317,13 +317,13 @@ uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC return dstColor; } -uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_bgr_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { BYTE red = 0; BYTE green = 0; BYTE blue = 0; BYTE alpha = 0xFF; - uint32 dstColor = 0; + UINT32 dstColor = 0; freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv); freerdp_color_make_rgb(&dstColor, dstBpp, &red, &green, &blue, &alpha, clrconv); @@ -331,7 +331,7 @@ uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HC return dstColor; } -uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_var(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { if (clrconv->invert) return freerdp_color_convert_var_bgr(srcColor, srcBpp, dstBpp, clrconv); @@ -339,7 +339,7 @@ uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO return freerdp_color_convert_var_rgb(srcColor, srcBpp, dstBpp, clrconv); } -uint32 freerdp_color_convert_var_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_var_rgb(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { if (srcBpp > 16) return freerdp_color_convert_bgr_rgb(srcColor, srcBpp, dstBpp, clrconv); @@ -347,7 +347,7 @@ uint32 freerdp_color_convert_var_rgb(uint32 srcColor, int srcBpp, int dstBpp, HC return freerdp_color_convert_rgb(srcColor, srcBpp, dstBpp, clrconv); } -uint32 freerdp_color_convert_var_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) +UINT32 freerdp_color_convert_var_bgr(UINT32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { if (srcBpp > 16) return freerdp_color_convert_bgr(srcColor, srcBpp, dstBpp, clrconv); @@ -361,10 +361,10 @@ BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int he BYTE red; BYTE green; BYTE blue; - uint32 pixel; + UINT32 pixel; BYTE *src8; UINT16 *dst16; - uint32 *dst32; + UINT32 *dst32; if (dstBpp == 8) { @@ -418,7 +418,7 @@ BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int he dstData = (BYTE*) malloc(width * height * 4); src8 = (BYTE*) srcData; - dst32 = (uint32*) dstData; + dst32 = (UINT32*) dstData; for (i = width * height; i > 0; i--) { pixel = *src8; @@ -442,10 +442,10 @@ BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int h BYTE red; BYTE green; BYTE blue; - uint32 pixel; + UINT32 pixel; UINT16 *src16; UINT16 *dst16; - uint32 *dst32; + UINT32 *dst32; if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555)) { @@ -462,7 +462,7 @@ BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int h dstData = (BYTE*) malloc(width * height * 4); src16 = (UINT16 *) srcData; - dst32 = (uint32 *) dstData; + dst32 = (UINT32 *) dstData; for (i = width * height; i > 0; i--) { pixel = *src16; @@ -566,16 +566,16 @@ BYTE* freerdp_image_convert_16bpp(BYTE* srcData, BYTE* dstData, int width, int h else if (dstBpp == 32) { int i; - uint32 pixel; + UINT32 pixel; UINT16* src16; - uint32* dst32; + UINT32* dst32; BYTE red, green, blue; if (dstData == NULL) dstData = (BYTE*) malloc(width * height * 4); src16 = (UINT16*) srcData; - dst32 = (uint32*) dstData; + dst32 = (UINT32*) dstData; for (i = width * height; i > 0; i--) { @@ -622,14 +622,14 @@ BYTE* freerdp_image_convert_32bpp(BYTE* srcData, BYTE* dstData, int width, int h { int index; UINT16 *dst16; - uint32 *src32; + UINT32 *src32; BYTE red, green, blue; if (dstData == NULL) dstData = (BYTE*) malloc(width * height * 2); dst16 = (UINT16*) dstData; - src32 = (uint32*) srcData; + src32 = (UINT32*) srcData; for (index = 0; index < width * height; index++) { @@ -798,7 +798,7 @@ BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, { BYTE* data; BYTE bmask; - uint32* icon; + UINT32* icon; int x, y, bit; int maskIndex; @@ -816,7 +816,7 @@ BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, if (bpp < 32) { maskIndex = 0; - icon = (uint32*) dstData; + icon = (UINT32*) dstData; for (y = 0; y < height; y++) { @@ -884,11 +884,11 @@ BYTE* freerdp_glyph_convert(int width, int height, BYTE* data) return dstData; } -BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv) +BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, UINT32 bgcolor, UINT32 fgcolor, HCLRCONV clrconv) { int index; UINT16* dst16; - uint32* dst32; + UINT32* dst32; BYTE* dstData; BYTE bitMask; int bitIndex; @@ -972,7 +972,7 @@ BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBp else if (dstBpp == 32) { dstData = (BYTE*) malloc(width * height * 4); - dst32 = (uint32*) dstData; + dst32 = (UINT32*) dstData; for (index = height; index > 0; index--) { @@ -1037,10 +1037,10 @@ void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, void freerdp_image_swap_color_order(BYTE* data, int width, int height) { int x, y; - uint32* pixel; + UINT32* pixel; BYTE a, r, g, b; - pixel = (uint32*) data; + pixel = (UINT32*) data; for (y = 0; y < height; y++) { @@ -1053,7 +1053,7 @@ void freerdp_image_swap_color_order(BYTE* data, int width, int height) } } -HCLRCONV freerdp_clrconv_new(uint32 flags) +HCLRCONV freerdp_clrconv_new(UINT32 flags) { HCLRCONV clrconv = xnew(CLRCONV); diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index 0d56483cc..8e923f151 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -22,8 +22,8 @@ /** * Write a foreground/background image to a destination buffer. */ -static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta, - BYTE bitmask, PIXEL fgPel, uint32 cBits) +static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, UINT32 rowDelta, + BYTE bitmask, PIXEL fgPel, UINT32 cBits) { PIXEL xorPixel; @@ -143,7 +143,7 @@ static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta, * for the first line of compressed data. */ static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask, - PIXEL fgPel, uint32 cBits) + PIXEL fgPel, UINT32 cBits) { if (bitmask & g_MaskBit0) { @@ -251,8 +251,8 @@ static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask, /** * Decompress an RLE compressed bitmap. */ -void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer, - uint32 rowDelta, uint32 width, uint32 height) +void RLEDECOMPRESS(BYTE* pbSrcBuffer, UINT32 cbSrcBuffer, BYTE* pbDestBuffer, + UINT32 rowDelta, UINT32 width, UINT32 height) { BYTE* pbSrc = pbSrcBuffer; BYTE* pbEnd = pbSrcBuffer + cbSrcBuffer; @@ -266,10 +266,10 @@ void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer, BYTE bitmask; PIXEL pixelA, pixelB; - uint32 runLength; - uint32 code; + UINT32 runLength; + UINT32 code; - uint32 advance; + UINT32 advance; RLEEXTRA @@ -278,7 +278,7 @@ void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer, /* Watch out for the end of the first scanline. */ if (fFirstLine) { - if ((uint32)(pbDest - pbDestBuffer) >= rowDelta) + if ((UINT32)(pbDest - pbDestBuffer) >= rowDelta) { fFirstLine = FALSE; fInsertFgPel = FALSE; diff --git a/libfreerdp/codec/mppc_dec.c b/libfreerdp/codec/mppc_dec.c index 02b75c0c7..e02862526 100644 --- a/libfreerdp/codec/mppc_dec.c +++ b/libfreerdp/codec/mppc_dec.c @@ -49,7 +49,7 @@ static BYTE LOMHTab[] = {0, 4, 10, 19}; static BYTE CopyOffsetBitsLUT[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15 }; -static uint32 CopyOffsetBaseLUT[] = { +static UINT32 CopyOffsetBaseLUT[] = { 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153, 65537 }; static BYTE LOMBitsLUT[] = { @@ -104,7 +104,7 @@ UINT16 getLOMindex(UINT16 huff) return HuffIndexLOM[LOMHTab[miniLOMhash(huff)]]; } -uint32 transposebits(uint32 x) +UINT32 transposebits(UINT32 x) { x = ((x & 0x55555555) << 1) | ((x >> 1) & 0x55555555); x = ((x & 0x33333333) << 2) | ((x >> 2) & 0x33333333); @@ -119,16 +119,16 @@ uint32 transposebits(uint32 x) } #define cache_add(_s, _x) do { \ - *((uint32*)((_s)+2)) <<= 16; \ - *((uint32*)((_s)+2)) |= (*((uint32*)(_s)) >> 16); \ - *((uint32*)(_s)) = (*((uint32*)(_s)) << 16) | (_x); } while(0) + *((UINT32*)((_s)+2)) <<= 16; \ + *((UINT32*)((_s)+2)) |= (*((UINT32*)(_s)) >> 16); \ + *((UINT32*)(_s)) = (*((UINT32*)(_s)) << 16) | (_x); } while(0) #define cache_swap(_s, _i) do { \ UINT16 t = *(_s); \ *(_s) = *((_s) + (_i)); \ *((_s) + (_i)) = t; } while(0) -int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen) { int type = ctype & 0x0f; @@ -169,11 +169,11 @@ int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uin * @return True on success, False on failure */ -int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen) { BYTE* history_buf; /* uncompressed data goes here */ BYTE* history_ptr; /* points to next free slot in history_buf */ - uint32 d32; /* we process 4 compressed bytes at a time */ + UINT32 d32; /* we process 4 compressed bytes at a time */ UINT16 copy_offset; /* location to copy data from */ UINT16 lom; /* length of match */ BYTE* src_ptr; /* used while copying compressed data */ @@ -182,7 +182,7 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u int bits_left; /* bits left in d34 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp; - uint32 i32; + UINT32 i32; printf("decompress_rdp_4:\n"); @@ -599,11 +599,11 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u * @return True on success, False on failure */ -int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen) { BYTE* history_buf; /* uncompressed data goes here */ BYTE* history_ptr; /* points to next free slot in bistory_buf */ - uint32 d32; /* we process 4 compressed bytes at a time */ + UINT32 d32; /* we process 4 compressed bytes at a time */ UINT16 copy_offset; /* location to copy data from */ UINT16 lom; /* length of match */ BYTE* src_ptr; /* used while copying compressed data */ @@ -612,7 +612,7 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u int bits_left; /* bits left in d32 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp; - uint32 i32; + UINT32 i32; if ((dec == NULL) || (dec->history_buf == NULL)) { @@ -1063,12 +1063,12 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u * @return True on success, False on failure */ -int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen) { BYTE* history_buf; /* uncompressed data goes here */ UINT16* offset_cache; /* Copy Offset cache */ BYTE* history_ptr; /* points to next free slot in bistory_buf */ - uint32 d32; /* we process 4 compressed bytes at a time */ + UINT32 d32; /* we process 4 compressed bytes at a time */ UINT16 copy_offset; /* location to copy data from */ UINT16 lom; /* length of match */ UINT16 LUTIndex; /* LookUp table Index */ @@ -1078,7 +1078,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u int bits_left; /* bits left in d32 for processing */ int cur_bits_left; /* bits left in cur_byte for processing */ int tmp, i; - uint32 i32; + UINT32 i32; if ((dec == NULL) || (dec->history_buf == NULL)) { @@ -1398,7 +1398,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, u * @return True on success, False on failure */ -int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen) +int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, UINT32* roff, UINT32* rlen) { return FALSE; } diff --git a/libfreerdp/codec/mppc_enc.c b/libfreerdp/codec/mppc_enc.c index 14f94e065..8e6238afc 100644 --- a/libfreerdp/codec/mppc_enc.c +++ b/libfreerdp/codec/mppc_enc.c @@ -551,22 +551,22 @@ BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len) char* cptr2; int opb_index; /* index into outputBuffer */ int bits_left; /* unused bits in current byte in outputBuffer */ - uint32 copy_offset; /* pattern match starts here... */ - uint32 lom; /* ...and matches this many bytes */ + UINT32 copy_offset; /* pattern match starts here... */ + UINT32 lom; /* ...and matches this many bytes */ int last_crc_index; /* don't compute CRC beyond this index */ UINT16 *hash_table; /* hash table for pattern matching */ - uint32 i; - uint32 j; - uint32 k; - uint32 x; + UINT32 i; + UINT32 j; + UINT32 k; + UINT32 x; BYTE data; UINT16 data16; - uint32 historyOffset; + UINT32 historyOffset; UINT16 crc; - uint32 ctr; - uint32 saved_ctr; - uint32 data_end; + UINT32 ctr; + UINT32 saved_ctr; + UINT32 data_end; BYTE byte_val; crc = 0; diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 1c319b266..c76e2a20a 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -100,10 +100,10 @@ static void nsc_decode(NSC_CONTEXT* context) } } -static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz) +static void nsc_rle_decode(BYTE* in, BYTE* out, UINT32 origsz) { - uint32 len; - uint32 left; + UINT32 len; + UINT32 left; BYTE value; left = origsz; @@ -121,13 +121,13 @@ static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz) in++; if (*in < 0xFF) { - len = (uint32) *in++; + len = (UINT32) *in++; len += 2; } else { in++; - len = *((uint32*) in); + len = *((UINT32*) in); in += 4; } memset(out, value, len); @@ -141,15 +141,15 @@ static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz) } } - *((uint32*)out) = *((uint32*)in); + *((UINT32*)out) = *((UINT32*)in); } static void nsc_rle_decompress_data(NSC_CONTEXT* context) { UINT16 i; BYTE* rle; - uint32 origsize; - uint32 planesize; + UINT32 origsize; + UINT32 planesize; rle = context->nsc_stream.Planes; @@ -174,7 +174,7 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s) int i; for (i = 0; i < 4; i++) - stream_read_uint32(s, context->nsc_stream.PlaneByteCount[i]); + stream_read_UINT32(s, context->nsc_stream.PlaneByteCount[i]); stream_read_BYTE(s, context->nsc_stream.ColorLossLevel); stream_read_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); @@ -186,9 +186,9 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s) static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s) { int i; - uint32 length; - uint32 tempWidth; - uint32 tempHeight; + UINT32 length; + UINT32 tempWidth; + UINT32 tempHeight; nsc_stream_initialize(context, s); length = context->width * context->height * 4; @@ -281,7 +281,7 @@ NSC_CONTEXT* nsc_context_new(void) return nsc_context; } -void nsc_context_set_cpu_opt(NSC_CONTEXT* context, uint32 cpu_opt) +void nsc_context_set_cpu_opt(NSC_CONTEXT* context, UINT32 cpu_opt) { if (cpu_opt) NSC_INIT_SIMD(context); @@ -317,7 +317,7 @@ void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f } void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, - UINT16 width, UINT16 height, BYTE* data, uint32 length) + UINT16 width, UINT16 height, BYTE* data, UINT32 length) { STREAM* s; diff --git a/libfreerdp/codec/nsc_encode.c b/libfreerdp/codec/nsc_encode.c index 5e8957f2b..68f5f4c39 100644 --- a/libfreerdp/codec/nsc_encode.c +++ b/libfreerdp/codec/nsc_encode.c @@ -37,9 +37,9 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context) { int i; - uint32 length; - uint32 tempWidth; - uint32 tempHeight; + UINT32 length; + UINT32 tempWidth; + UINT32 tempHeight; tempWidth = ROUND_UP_TO(context->width, 8); tempHeight = ROUND_UP_TO(context->height, 2); @@ -83,8 +83,8 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, BYTE* bmpdata, int r INT16 g_val; INT16 b_val; BYTE a_val; - uint32 tempWidth; - uint32 tempHeight; + UINT32 tempWidth; + UINT32 tempHeight; tempWidth = ROUND_UP_TO(context->width, 8); tempHeight = ROUND_UP_TO(context->height, 2); @@ -209,8 +209,8 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context) INT8* co_src1; INT8* cg_src0; INT8* cg_src1; - uint32 tempWidth; - uint32 tempHeight; + UINT32 tempWidth; + UINT32 tempHeight; tempWidth = ROUND_UP_TO(context->width, 8); tempHeight = ROUND_UP_TO(context->height, 2); @@ -246,11 +246,11 @@ void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride) } } -static uint32 nsc_rle_encode(BYTE* in, BYTE* out, uint32 origsz) +static UINT32 nsc_rle_encode(BYTE* in, BYTE* out, UINT32 origsz) { - uint32 left; - uint32 runlength = 1; - uint32 planesize = 0; + UINT32 left; + UINT32 runlength = 1; + UINT32 planesize = 0; left = origsz; /** @@ -304,8 +304,8 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context) { UINT16 i; BYTE* rle; - uint32 origsize; - uint32 planesize; + UINT32 origsize; + UINT32 planesize; rle = context->nsc_stream.Planes; @@ -351,10 +351,10 @@ void nsc_compose_message(NSC_CONTEXT* context, STREAM* s, /* Assemble the NSCodec message into stream */ stream_check_size(s, 20); - stream_write_uint32(s, context->nsc_stream.PlaneByteCount[0]); /* LumaPlaneByteCount (4 bytes) */ - stream_write_uint32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */ - stream_write_uint32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */ - stream_write_uint32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */ + stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[0]); /* LumaPlaneByteCount (4 bytes) */ + stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */ + stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */ + stream_write_UINT32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */ stream_write_BYTE(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */ stream_write_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */ stream_write_UINT16(s, 0); /* Reserved (2 bytes) */ diff --git a/libfreerdp/codec/nsc_sse2.c b/libfreerdp/codec/nsc_sse2.c index f84c1b2d7..f1a033fc4 100644 --- a/libfreerdp/codec/nsc_sse2.c +++ b/libfreerdp/codec/nsc_sse2.c @@ -49,8 +49,8 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, BYTE* bmpdata, __m128i y_val; __m128i co_val; __m128i cg_val; - uint32 tempWidth; - uint32 tempHeight; + UINT32 tempWidth; + UINT32 tempHeight; tempWidth = ROUND_UP_TO(context->width, 8); tempHeight = ROUND_UP_TO(context->height, 2); @@ -291,8 +291,8 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context) INT8* co_src1; INT8* cg_src0; INT8* cg_src1; - uint32 tempWidth; - uint32 tempHeight; + UINT32 tempWidth; + UINT32 tempHeight; __m128i t; __m128i val; __m128i mask = _mm_set1_epi16(0xFF); diff --git a/libfreerdp/codec/nsc_types.h b/libfreerdp/codec/nsc_types.h index 14bc1f873..060b89daa 100644 --- a/libfreerdp/codec/nsc_types.h +++ b/libfreerdp/codec/nsc_types.h @@ -34,7 +34,7 @@ struct _NSC_CONTEXT_PRIV { BYTE* plane_buf[5]; /* Decompressed Plane Buffers in the respective order */ - uint32 plane_buf_length; /* Lengths of each plane buffer */ + UINT32 plane_buf_length; /* Lengths of each plane buffer */ /* profilers */ PROFILER_DEFINE(prof_nsc_rle_decompress_data); diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 7d63a2ed6..a1d4af335 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -64,7 +64,7 @@ * The order of the values are: * LL3, LH3, HL3, HH3, LH2, HL2, HH2, LH1, HL1, HH1 */ -static const uint32 rfx_default_quantization_values[] = +static const UINT32 rfx_default_quantization_values[] = { 6, 6, 6, 6, 7, 7, 8, 8, 8, 9 }; @@ -168,7 +168,7 @@ RFX_CONTEXT* rfx_context_new(void) return context; } -void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt) +void rfx_context_set_cpu_opt(RFX_CONTEXT* context, UINT32 cpu_opt) { /* enable SIMD CPU acceleration if detected */ if (cpu_opt & CPU_SSE2) @@ -225,10 +225,10 @@ void rfx_context_reset(RFX_CONTEXT* context) static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s) { - uint32 magic; + UINT32 magic; /* RFX_SYNC */ - stream_read_uint32(s, magic); /* magic (4 bytes), 0xCACCACCA */ + stream_read_UINT32(s, magic); /* magic (4 bytes), 0xCACCACCA */ if (magic != WF_MAGIC) { @@ -334,10 +334,10 @@ static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s) static void rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s) { - uint32 frameIdx; + UINT32 frameIdx; UINT16 numRegions; - stream_read_uint32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */ + stream_read_UINT32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */ stream_read_UINT16(s, numRegions); /* numRegions (2 bytes) */ DEBUG_RFX("RFX_FRAME_BEGIN: frameIdx:%d numRegions:%d", frameIdx, numRegions); @@ -415,10 +415,10 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa { int i; UINT16 subtype; - uint32 blockLen; - uint32 blockType; - uint32 tilesDataSize; - uint32* quants; + UINT32 blockLen; + UINT32 blockType; + UINT32 tilesDataSize; + UINT32* quants; BYTE quant; int pos; @@ -450,12 +450,12 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa return; } - stream_read_uint32(s, tilesDataSize); /* tilesDataSize (4 bytes) */ + stream_read_UINT32(s, tilesDataSize); /* tilesDataSize (4 bytes) */ if (context->quants != NULL) - context->quants = (uint32*) realloc((void*) context->quants, context->num_quants * 10 * sizeof(uint32)); + context->quants = (UINT32*) realloc((void*) context->quants, context->num_quants * 10 * sizeof(UINT32)); else - context->quants = (uint32*) malloc(context->num_quants * 10 * sizeof(uint32)); + context->quants = (UINT32*) malloc(context->num_quants * 10 * sizeof(UINT32)); quants = context->quants; /* quantVals */ @@ -493,7 +493,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa { /* RFX_TILE */ stream_read_UINT16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */ - stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */ + stream_read_UINT32(s, blockLen); /* blockLen (4 bytes) */ pos = stream_get_pos(s) - 6 + blockLen; @@ -509,12 +509,12 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa } } -RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length) +RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, UINT32 length) { int pos; STREAM* s; - uint32 blockLen; - uint32 blockType; + UINT32 blockLen; + UINT32 blockType; RFX_MESSAGE* message; s = stream_new(0); @@ -525,7 +525,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length { /* RFX_BLOCKT */ stream_read_UINT16(s, blockType); /* blockType (2 bytes) */ - stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */ + stream_read_UINT32(s, blockLen); /* blockLen (4 bytes) */ DEBUG_RFX("blockType 0x%X blockLen %d", blockType, blockLen); @@ -632,15 +632,15 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message) static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s) { stream_write_UINT16(s, WBT_SYNC); /* BlockT.blockType */ - stream_write_uint32(s, 12); /* BlockT.blockLen */ - stream_write_uint32(s, WF_MAGIC); /* magic */ + stream_write_UINT32(s, 12); /* BlockT.blockLen */ + stream_write_UINT32(s, WF_MAGIC); /* magic */ stream_write_UINT16(s, WF_VERSION_1_0); /* version */ } static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s) { stream_write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */ - stream_write_uint32(s, 10); /* BlockT.blockLen */ + stream_write_UINT32(s, 10); /* BlockT.blockLen */ stream_write_BYTE(s, 1); /* numCodecs */ stream_write_BYTE(s, 1); /* codecs.codecId */ stream_write_UINT16(s, WF_VERSION_1_0); /* codecs.version */ @@ -649,7 +649,7 @@ static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s) static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s) { stream_write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType */ - stream_write_uint32(s, 12); /* BlockT.blockLen */ + stream_write_UINT32(s, 12); /* BlockT.blockLen */ stream_write_BYTE(s, 1); /* numChannels */ stream_write_BYTE(s, 0); /* Channel.channelId */ stream_write_UINT16(s, context->width); /* Channel.width */ @@ -661,7 +661,7 @@ static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s) UINT16 properties; stream_write_UINT16(s, WBT_CONTEXT); /* CodecChannelT.blockType */ - stream_write_uint32(s, 13); /* CodecChannelT.blockLen */ + stream_write_UINT32(s, 13); /* CodecChannelT.blockLen */ stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ stream_write_BYTE(s, 0); /* ctxId */ @@ -702,10 +702,10 @@ static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s) stream_check_size(s, 14); stream_write_UINT16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */ - stream_write_uint32(s, 14); /* CodecChannelT.blockLen */ + stream_write_UINT32(s, 14); /* CodecChannelT.blockLen */ stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ - stream_write_uint32(s, context->frame_idx); /* frameIdx */ + stream_write_UINT32(s, context->frame_idx); /* frameIdx */ stream_write_UINT16(s, 1); /* numRegions */ context->frame_idx++; @@ -721,7 +721,7 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s, stream_check_size(s, size); stream_write_UINT16(s, WBT_REGION); /* CodecChannelT.blockType */ - stream_write_uint32(s, size); /* set CodecChannelT.blockLen later */ + stream_write_UINT32(s, size); /* set CodecChannelT.blockLen later */ stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ stream_write_BYTE(s, 1); /* regionFlags */ @@ -741,7 +741,7 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s, static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, BYTE* tile_data, int tile_width, int tile_height, int rowstride, - const uint32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr, + const UINT32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr, int xIdx, int yIdx) { int YLen = 0; @@ -753,7 +753,7 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, start_pos = stream_get_pos(s); stream_write_UINT16(s, CBT_TILE); /* BlockT.blockType */ - stream_seek_uint32(s); /* set BlockT.blockLen later */ + stream_seek_UINT32(s); /* set BlockT.blockLen later */ stream_write_BYTE(s, quantIdxY); stream_write_BYTE(s, quantIdxCb); stream_write_BYTE(s, quantIdxCr); @@ -772,7 +772,7 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s, end_pos = stream_get_pos(s); stream_set_pos(s, start_pos + 2); - stream_write_uint32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */ + stream_write_UINT32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */ stream_set_pos(s, start_pos + 13); stream_write_UINT16(s, YLen); stream_write_UINT16(s, CbLen); @@ -788,8 +788,8 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, int start_pos, end_pos; int i; int numQuants; - const uint32* quantVals; - const uint32* quantValsPtr; + const UINT32* quantVals; + const UINT32* quantValsPtr; int quantIdxY; int quantIdxCb; int quantIdxCr; @@ -826,7 +826,7 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, start_pos = stream_get_pos(s); stream_write_UINT16(s, WBT_EXTENSION); /* CodecChannelT.blockType */ - stream_seek_uint32(s); /* set CodecChannelT.blockLen later */ + stream_seek_UINT32(s); /* set CodecChannelT.blockLen later */ stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ stream_write_UINT16(s, CBT_TILESET); /* subtype */ @@ -835,7 +835,7 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, stream_write_BYTE(s, numQuants); /* numQuants */ stream_write_BYTE(s, 0x40); /* tileSize */ stream_write_UINT16(s, numTiles); /* numTiles */ - stream_seek_uint32(s); /* set tilesDataSize later */ + stream_seek_UINT32(s); /* set tilesDataSize later */ quantValsPtr = quantVals; for (i = 0; i < numQuants * 5; i++) @@ -863,9 +863,9 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s, end_pos = stream_get_pos(s); stream_set_pos(s, start_pos + 2); - stream_write_uint32(s, size); /* CodecChannelT.blockLen */ + stream_write_UINT32(s, size); /* CodecChannelT.blockLen */ stream_set_pos(s, start_pos + 18); - stream_write_uint32(s, tilesDataSize); + stream_write_UINT32(s, tilesDataSize); stream_set_pos(s, end_pos); } @@ -875,7 +875,7 @@ static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s) stream_check_size(s, 8); stream_write_UINT16(s, WBT_FRAME_END); /* CodecChannelT.blockType */ - stream_write_uint32(s, 8); /* CodecChannelT.blockLen */ + stream_write_UINT32(s, 8); /* CodecChannelT.blockLen */ stream_write_BYTE(s, 1); /* CodecChannelT.codecId */ stream_write_BYTE(s, 0); /* CodecChannelT.channelId */ } diff --git a/libfreerdp/codec/rfx_decode.c b/libfreerdp/codec/rfx_decode.c index cc61b8bfc..2d7774590 100644 --- a/libfreerdp/codec/rfx_decode.c +++ b/libfreerdp/codec/rfx_decode.c @@ -90,9 +90,9 @@ static void rfx_decode_format_rgb(INT16* r_buf, INT16* g_buf, INT16* b_buf, void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) { - /* sint32 is used intentionally because we calculate with shifted factors! */ - sint32 y, cb, cr; - sint32 r, g, b; + /* INT32 is used intentionally because we calculate with shifted factors! */ + INT32 y, cb, cr; + INT32 r, g, b; int i; /** @@ -149,7 +149,7 @@ void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) } } -static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantization_values, +static void rfx_decode_component(RFX_CONTEXT* context, const UINT32* quantization_values, const BYTE* data, int size, INT16* buffer) { PROFILER_ENTER(context->priv->prof_rfx_decode_component); @@ -174,9 +174,9 @@ static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantizatio } void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in, - int y_size, const uint32 * y_quants, - int cb_size, const uint32 * cb_quants, - int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer) + int y_size, const UINT32 * y_quants, + int cb_size, const UINT32 * cb_quants, + int cr_size, const UINT32 * cr_quants, BYTE* rgb_buffer) { PROFILER_ENTER(context->priv->prof_rfx_decode_rgb); diff --git a/libfreerdp/codec/rfx_decode.h b/libfreerdp/codec/rfx_decode.h index f11e358d1..7a19b7bb2 100644 --- a/libfreerdp/codec/rfx_decode.h +++ b/libfreerdp/codec/rfx_decode.h @@ -25,9 +25,9 @@ void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in, - int y_size, const uint32 * y_quants, - int cb_size, const uint32 * cb_quants, - int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer); + int y_size, const UINT32 * y_quants, + int cb_size, const UINT32 * cb_quants, + int cr_size, const UINT32 * cr_quants, BYTE* rgb_buffer); #endif /* __RFX_DECODE_H */ diff --git a/libfreerdp/codec/rfx_encode.c b/libfreerdp/codec/rfx_encode.c index a95a5d93c..8e511eac0 100644 --- a/libfreerdp/codec/rfx_encode.c +++ b/libfreerdp/codec/rfx_encode.c @@ -182,10 +182,10 @@ static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, i void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) { - /* sint32 is used intentionally because we calculate with shifted factors! */ + /* INT32 is used intentionally because we calculate with shifted factors! */ int i; - sint32 r, g, b; - sint32 y, cb, cr; + INT32 r, g, b; + INT32 y, cb, cr; /** * The encoded YCbCr coefficients are represented as 11.5 fixed-point numbers: @@ -222,7 +222,7 @@ void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf) } } -static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantization_values, +static void rfx_encode_component(RFX_CONTEXT* context, const UINT32* quantization_values, INT16* data, BYTE* buffer, int buffer_size, int* size) { PROFILER_ENTER(context->priv->prof_rfx_encode_component); @@ -247,7 +247,7 @@ static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantizatio } void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride, - const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants, + const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants, STREAM* data_out, int* y_size, int* cb_size, int* cr_size) { INT16* y_r_buffer = context->priv->y_r_buffer; diff --git a/libfreerdp/codec/rfx_encode.h b/libfreerdp/codec/rfx_encode.h index 0203b4f55..56220e838 100644 --- a/libfreerdp/codec/rfx_encode.h +++ b/libfreerdp/codec/rfx_encode.h @@ -25,7 +25,7 @@ void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf); void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride, - const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants, + const UINT32* y_quants, const UINT32* cb_quants, const UINT32* cr_quants, STREAM* data_out, int* y_size, int* cb_size, int* cr_size); #endif diff --git a/libfreerdp/codec/rfx_neon.c b/libfreerdp/codec/rfx_neon.c index ab313cb3d..fc84440c4 100644 --- a/libfreerdp/codec/rfx_neon.c +++ b/libfreerdp/codec/rfx_neon.c @@ -88,7 +88,7 @@ void rfx_decode_YCbCr_to_RGB_NEON(INT16 * y_r_buffer, INT16 * cb_g_buffer, INT16 } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const uint32 factor) +rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const UINT32 factor) { if (factor <= 6) return; @@ -107,7 +107,7 @@ rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const } void -rfx_quantization_decode_NEON(INT16 * buffer, const uint32 * quantization_values) +rfx_quantization_decode_NEON(INT16 * buffer, const UINT32 * quantization_values) { rfx_quantization_decode_block_NEON(buffer, 1024, quantization_values[8]); /* HL1 */ rfx_quantization_decode_block_NEON(buffer + 1024, 1024, quantization_values[7]); /* LH1 */ @@ -314,7 +314,7 @@ int isNeonSupported() return 0; } - uint64_t features = android_getCpuFeatures(); + UINT64_t features = android_getCpuFeatures(); if ((features & ANDROID_CPU_ARM_FEATURE_ARMv7)) { if (features & ANDROID_CPU_ARM_FEATURE_NEON) diff --git a/libfreerdp/codec/rfx_quantization.c b/libfreerdp/codec/rfx_quantization.c index f2edfd2ce..a25a8dabe 100644 --- a/libfreerdp/codec/rfx_quantization.c +++ b/libfreerdp/codec/rfx_quantization.c @@ -23,7 +23,7 @@ #include "rfx_quantization.h" -static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32 factor) +static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, UINT32 factor) { INT16* dst; @@ -36,7 +36,7 @@ static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32 } } -void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values) +void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values) { /* Scale the values so that they are represented as 11.5 fixed-point number */ rfx_quantization_decode_block(buffer, 4096, 5); @@ -53,7 +53,7 @@ void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values) rfx_quantization_decode_block(buffer + 4032, 64, quantization_values[0] - 6); /* LL3 */ } -static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32 factor) +static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, UINT32 factor) { INT16* dst; INT16 half; @@ -68,7 +68,7 @@ static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32 } } -void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values) +void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values) { rfx_quantization_encode_block(buffer, 1024, quantization_values[8] - 6); /* HL1 */ rfx_quantization_encode_block(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */ diff --git a/libfreerdp/codec/rfx_quantization.h b/libfreerdp/codec/rfx_quantization.h index c6731b126..b10aa729f 100644 --- a/libfreerdp/codec/rfx_quantization.h +++ b/libfreerdp/codec/rfx_quantization.h @@ -22,7 +22,7 @@ #include -void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values); -void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values); +void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values); +void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values); #endif /* __RFX_QUANTIZATION_H */ diff --git a/libfreerdp/codec/rfx_rlgr.c b/libfreerdp/codec/rfx_rlgr.c index 84d4100c1..c2ef38765 100644 --- a/libfreerdp/codec/rfx_rlgr.c +++ b/libfreerdp/codec/rfx_rlgr.c @@ -72,7 +72,7 @@ /* Returns the least number of bits required to represent a given value */ #define GetMinBits(_val, _nbits) \ { \ - uint32 _v = _val; \ + UINT32 _v = _val; \ _nbits = 0; \ while (_v) \ { \ @@ -150,7 +150,7 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff if (k) { int mag; - uint32 sign; + UINT32 sign; /* RL MODE */ while (!rfx_bitstream_eos(bs)) @@ -179,14 +179,14 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff } else { - uint32 mag; - uint32 nIdx; - uint32 val1; - uint32 val2; + UINT32 mag; + UINT32 nIdx; + UINT32 val1; + UINT32 val2; /* GR (GOLOMB-RICE) MODE */ GetGRCode(&krp, &kr, vk, mag16) /* values coded are 2 * magnitude - sign */ - mag = (uint32) mag16; + mag = (UINT32) mag16; if (mode == RLGR1) { @@ -271,13 +271,13 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buff /* Outputs the Golomb/Rice encoding of a non-negative integer */ #define CodeGR(krp, val) rfx_rlgr_code_gr(bs, krp, val) -static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, uint32 val) +static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, UINT32 val) { int kr = *krp >> LSGR; /* unary part of GR code */ - uint32 vk = (val) >> kr; + UINT32 vk = (val) >> kr; OutputBit(vk, 1); OutputBit(1, 0); @@ -371,7 +371,7 @@ int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buff if (mode == RLGR1) { - uint32 twoMs; + UINT32 twoMs; /* RLGR1 variant */ @@ -394,10 +394,10 @@ int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buff } else /* mode == RLGR3 */ { - uint32 twoMs1; - uint32 twoMs2; - uint32 sum2Ms; - uint32 nIdx; + UINT32 twoMs1; + UINT32 twoMs2; + UINT32 sum2Ms; + UINT32 nIdx; /* RLGR3 variant */ diff --git a/libfreerdp/codec/rfx_sse2.c b/libfreerdp/codec/rfx_sse2.c index 608c5318e..ac2376d28 100644 --- a/libfreerdp/codec/rfx_sse2.c +++ b/libfreerdp/codec/rfx_sse2.c @@ -225,7 +225,7 @@ static void rfx_encode_rgb_to_ycbcr_sse2(INT16* y_r_buffer, INT16* cb_g_buffer, } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor) +rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const UINT32 factor) { __m128i a; __m128i * ptr = (__m128i*) buffer; @@ -244,7 +244,7 @@ rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const u } while(ptr < buf_end); } -static void rfx_quantization_decode_sse2(INT16* buffer, const uint32* quantization_values) +static void rfx_quantization_decode_sse2(INT16* buffer, const UINT32* quantization_values) { _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); @@ -263,7 +263,7 @@ static void rfx_quantization_decode_sse2(INT16* buffer, const uint32* quantizati } static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor) +rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const UINT32 factor) { __m128i a; __m128i* ptr = (__m128i*) buffer; @@ -285,7 +285,7 @@ rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const u } while(ptr < buf_end); } -static void rfx_quantization_encode_sse2(INT16* buffer, const uint32* quantization_values) +static void rfx_quantization_encode_sse2(INT16* buffer, const UINT32* quantization_values) { _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16)); diff --git a/libfreerdp/core/activation.c b/libfreerdp/core/activation.c index db54dc147..2213d2491 100644 --- a/libfreerdp/core/activation.c +++ b/libfreerdp/core/activation.c @@ -104,7 +104,7 @@ BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action) stream_read_UINT16(s, *action); /* action (2 bytes) */ stream_seek_UINT16(s); /* grantId (2 bytes) */ - stream_seek_uint32(s); /* controlId (4 bytes) */ + stream_seek_UINT32(s); /* controlId (4 bytes) */ return TRUE; } @@ -113,7 +113,7 @@ void rdp_write_client_control_pdu(STREAM* s, UINT16 action) { stream_write_UINT16(s, action); /* action (2 bytes) */ stream_write_UINT16(s, 0); /* grantId (2 bytes) */ - stream_write_uint32(s, 0); /* controlId (4 bytes) */ + stream_write_UINT32(s, 0); /* controlId (4 bytes) */ } BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s) @@ -144,7 +144,7 @@ BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp) stream_write_UINT16(s, CTRLACTION_COOPERATE); /* action (2 bytes) */ stream_write_UINT16(s, 0); /* grantId (2 bytes) */ - stream_write_uint32(s, 0); /* controlId (4 bytes) */ + stream_write_UINT32(s, 0); /* controlId (4 bytes) */ rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id); @@ -159,7 +159,7 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp) stream_write_UINT16(s, CTRLACTION_GRANTED_CONTROL); /* action (2 bytes) */ stream_write_UINT16(s, rdp->mcs->user_id); /* grantId (2 bytes) */ - stream_write_uint32(s, 0x03EA); /* controlId (4 bytes) */ + stream_write_UINT32(s, 0x03EA); /* controlId (4 bytes) */ rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id); @@ -176,10 +176,10 @@ BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action) return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id); } -void rdp_write_persistent_list_entry(STREAM* s, uint32 key1, uint32 key2) +void rdp_write_persistent_list_entry(STREAM* s, UINT32 key1, UINT32 key2) { - stream_write_uint32(s, key1); /* key1 (4 bytes) */ - stream_write_uint32(s, key2); /* key2 (4 bytes) */ + stream_write_UINT32(s, key1); /* key1 (4 bytes) */ + stream_write_UINT32(s, key2); /* key2 (4 bytes) */ } void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings) @@ -287,7 +287,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s) */ if (stream_get_left(s) > 0) { - stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ + stream_read_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */ stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor (should be 0x00) */ } @@ -311,7 +311,7 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp) s = rdp_pdu_init(rdp); - stream_write_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ + stream_write_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */ stream_write_UINT16(s, 1); /* lengthSourceDescriptor (2 bytes) */ stream_write_BYTE(s, 0); /* sourceDescriptor (should be 0x00) */ diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index 1bc4c900d..9da8c7de4 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -290,7 +290,7 @@ void rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settin UINT16 orderSupportExFlags; stream_seek(s, 16); /* terminalDescriptor (16 bytes) */ - stream_seek_uint32(s); /* pad4OctetsA (4 bytes) */ + stream_seek_UINT32(s); /* pad4OctetsA (4 bytes) */ stream_seek_UINT16(s); /* desktopSaveXGranularity (2 bytes) */ stream_seek_UINT16(s); /* desktopSaveYGranularity (2 bytes) */ stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */ @@ -300,8 +300,8 @@ void rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settin stream_read(s, orderSupport, 32); /* orderSupport (32 bytes) */ stream_seek_UINT16(s); /* textFlags (2 bytes) */ stream_read_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ - stream_seek_uint32(s); /* pad4OctetsB (4 bytes) */ - stream_seek_uint32(s); /* desktopSaveSize (4 bytes) */ + stream_seek_UINT32(s); /* pad4OctetsB (4 bytes) */ + stream_seek_UINT32(s); /* desktopSaveSize (4 bytes) */ stream_seek_UINT16(s); /* pad2OctetsC (2 bytes) */ stream_seek_UINT16(s); /* pad2OctetsD (2 bytes) */ stream_seek_UINT16(s); /* textANSICodePage (2 bytes) */ @@ -349,7 +349,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) } stream_write_zero(s, 16); /* terminalDescriptor (16 bytes) */ - stream_write_uint32(s, 0); /* pad4OctetsA (4 bytes) */ + stream_write_UINT32(s, 0); /* pad4OctetsA (4 bytes) */ stream_write_UINT16(s, 1); /* desktopSaveXGranularity (2 bytes) */ stream_write_UINT16(s, 20); /* desktopSaveYGranularity (2 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ @@ -359,8 +359,8 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */ stream_write_UINT16(s, 0); /* textFlags (2 bytes) */ stream_write_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */ - stream_write_uint32(s, 0); /* pad4OctetsB (4 bytes) */ - stream_write_uint32(s, 230400); /* desktopSaveSize (4 bytes) */ + stream_write_UINT32(s, 0); /* pad4OctetsB (4 bytes) */ + stream_write_UINT32(s, 230400); /* desktopSaveSize (4 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsC (2 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsD (2 bytes) */ stream_write_UINT16(s, 0); /* textANSICodePage (2 bytes) */ @@ -378,12 +378,12 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint32(s); /* pad1 (4 bytes) */ - stream_seek_uint32(s); /* pad2 (4 bytes) */ - stream_seek_uint32(s); /* pad3 (4 bytes) */ - stream_seek_uint32(s); /* pad4 (4 bytes) */ - stream_seek_uint32(s); /* pad5 (4 bytes) */ - stream_seek_uint32(s); /* pad6 (4 bytes) */ + stream_seek_UINT32(s); /* pad1 (4 bytes) */ + stream_seek_UINT32(s); /* pad2 (4 bytes) */ + stream_seek_UINT32(s); /* pad3 (4 bytes) */ + stream_seek_UINT32(s); /* pad4 (4 bytes) */ + stream_seek_UINT32(s); /* pad5 (4 bytes) */ + stream_seek_UINT32(s); /* pad6 (4 bytes) */ stream_seek_UINT16(s); /* Cache0Entries (2 bytes) */ stream_seek_UINT16(s); /* Cache0MaximumCellSize (2 bytes) */ stream_seek_UINT16(s); /* Cache1Entries (2 bytes) */ @@ -409,12 +409,12 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) bpp = (settings->color_depth + 7) / 8; - stream_write_uint32(s, 0); /* pad1 (4 bytes) */ - stream_write_uint32(s, 0); /* pad2 (4 bytes) */ - stream_write_uint32(s, 0); /* pad3 (4 bytes) */ - stream_write_uint32(s, 0); /* pad4 (4 bytes) */ - stream_write_uint32(s, 0); /* pad5 (4 bytes) */ - stream_write_uint32(s, 0); /* pad6 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad1 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad2 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad3 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad4 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad5 (4 bytes) */ + stream_write_UINT32(s, 0); /* pad6 (4 bytes) */ size = bpp * 256; stream_write_UINT16(s, 200); /* Cache0Entries (2 bytes) */ @@ -678,17 +678,17 @@ void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settin if (settings->server_mode) { - stream_read_uint32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */ - stream_read_uint32(s, settings->kbd_type); /* keyboardType (4 bytes) */ - stream_read_uint32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */ - stream_read_uint32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */ + stream_read_UINT32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */ + stream_read_UINT32(s, settings->kbd_type); /* keyboardType (4 bytes) */ + stream_read_UINT32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */ + stream_read_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */ } else { - stream_seek_uint32(s); /* keyboardLayout (4 bytes) */ - stream_seek_uint32(s); /* keyboardType (4 bytes) */ - stream_seek_uint32(s); /* keyboardSubType (4 bytes) */ - stream_seek_uint32(s); /* keyboardFunctionKeys (4 bytes) */ + stream_seek_UINT32(s); /* keyboardLayout (4 bytes) */ + stream_seek_UINT32(s); /* keyboardType (4 bytes) */ + stream_seek_UINT32(s); /* keyboardSubType (4 bytes) */ + stream_seek_UINT32(s); /* keyboardFunctionKeys (4 bytes) */ } stream_seek(s, 64); /* imeFileName (64 bytes) */ @@ -735,10 +735,10 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings) stream_write_UINT16(s, inputFlags); /* inputFlags (2 bytes) */ stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ - stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */ - stream_write_uint32(s, settings->kbd_type); /* keyboardType (4 bytes) */ - stream_write_uint32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */ - stream_write_uint32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */ + stream_write_UINT32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */ + stream_write_UINT32(s, settings->kbd_type); /* keyboardType (4 bytes) */ + stream_write_UINT32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */ + stream_write_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKeys (4 bytes) */ stream_write_zero(s, 64); /* imeFileName (64 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_INPUT); @@ -788,7 +788,7 @@ void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_brush_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint32(s); /* brushSupportLevel (4 bytes) */ + stream_seek_UINT32(s); /* brushSupportLevel (4 bytes) */ } /** @@ -804,7 +804,7 @@ void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings) header = rdp_capability_set_start(s); - stream_write_uint32(s, BRUSH_COLOR_FULL); /* brushSupportLevel (4 bytes) */ + stream_write_UINT32(s, BRUSH_COLOR_FULL); /* brushSupportLevel (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_BRUSH); } @@ -843,7 +843,7 @@ void rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* UINT16 glyphSupportLevel; stream_seek(s, 40); /* glyphCache (40 bytes) */ - stream_seek_uint32(s); /* fragCache (4 bytes) */ + stream_seek_UINT32(s); /* fragCache (4 bytes) */ stream_read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */ stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ @@ -893,9 +893,9 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint32 offscreenSupportLevel; + UINT32 offscreenSupportLevel; - stream_read_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ + stream_read_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ stream_read_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ stream_read_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ @@ -913,14 +913,14 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rd void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 offscreenSupportLevel = FALSE; + UINT32 offscreenSupportLevel = FALSE; header = rdp_capability_set_start(s); if (settings->offscreen_bitmap_cache) offscreenSupportLevel = TRUE; - stream_write_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ + stream_write_UINT32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */ stream_write_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */ stream_write_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */ @@ -968,7 +968,7 @@ void rdp_write_bitmap_cache_host_support_capability_set(STREAM* s, rdpSettings* void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cellInfo) { - uint32 info; + UINT32 info; /** * numEntries is in the first 31 bits, while the last bit (k) @@ -976,7 +976,7 @@ void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cell */ info = (cellInfo->numEntries | (cellInfo->persistent << 31)); - stream_write_uint32(s, info); + stream_write_UINT32(s, info); } /** @@ -1040,13 +1040,13 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint32 flags; - uint32 VCChunkSize; + UINT32 flags; + UINT32 VCChunkSize; - stream_read_uint32(s, flags); /* flags (4 bytes) */ + stream_read_UINT32(s, flags); /* flags (4 bytes) */ if (length > 8) - stream_read_uint32(s, VCChunkSize); /* VCChunkSize (4 bytes) */ + stream_read_UINT32(s, VCChunkSize); /* VCChunkSize (4 bytes) */ else VCChunkSize = 1600; @@ -1064,14 +1064,14 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettin void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 flags; + UINT32 flags; header = rdp_capability_set_start(s); flags = VCCAPS_NO_COMPR; - stream_write_uint32(s, flags); /* flags (4 bytes) */ - stream_write_uint32(s, settings->vc_chunk_size); /* VCChunkSize (4 bytes) */ + stream_write_UINT32(s, flags); /* flags (4 bytes) */ + stream_write_UINT32(s, settings->vc_chunk_size); /* VCChunkSize (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_VIRTUAL_CHANNEL); } @@ -1085,9 +1085,9 @@ void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint32 drawNineGridSupportLevel; + UINT32 drawNineGridSupportLevel; - stream_read_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ + stream_read_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ stream_read_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ stream_read_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ @@ -1106,13 +1106,13 @@ void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpS void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 drawNineGridSupportLevel; + UINT32 drawNineGridSupportLevel; header = rdp_capability_set_start(s); drawNineGridSupportLevel = (settings->draw_nine_grid) ? DRAW_NINEGRID_SUPPORTED_V2 : DRAW_NINEGRID_NO_SUPPORT; - stream_write_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ + stream_write_UINT32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */ stream_write_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */ stream_write_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */ @@ -1152,12 +1152,12 @@ void rdp_write_gdiplus_image_cache_properties(STREAM* s, UINT16 oiccs, UINT16 oi void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint32 drawGDIPlusSupportLevel; - uint32 drawGdiplusCacheLevel; + UINT32 drawGDIPlusSupportLevel; + UINT32 drawGdiplusCacheLevel; - stream_read_uint32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */ - stream_seek_uint32(s); /* GdipVersion (4 bytes) */ - stream_read_uint32(s, drawGdiplusCacheLevel); /* drawGdiplusCacheLevel (4 bytes) */ + stream_read_UINT32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */ + stream_seek_UINT32(s); /* GdipVersion (4 bytes) */ + stream_read_UINT32(s, drawGdiplusCacheLevel); /* drawGdiplusCacheLevel (4 bytes) */ stream_seek(s, 10); /* GdipCacheEntries (10 bytes) */ stream_seek(s, 8); /* GdipCacheChunkSize (8 bytes) */ stream_seek(s, 6); /* GdipImageCacheProperties (6 bytes) */ @@ -1179,17 +1179,17 @@ void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSet void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 drawGDIPlusSupportLevel; - uint32 drawGdiplusCacheLevel; + UINT32 drawGDIPlusSupportLevel; + UINT32 drawGdiplusCacheLevel; header = rdp_capability_set_start(s); drawGDIPlusSupportLevel = (settings->draw_gdi_plus) ? DRAW_GDIPLUS_SUPPORTED : DRAW_GDIPLUS_DEFAULT; drawGdiplusCacheLevel = (settings->draw_gdi_plus) ? DRAW_GDIPLUS_CACHE_LEVEL_ONE : DRAW_GDIPLUS_CACHE_LEVEL_DEFAULT; - stream_write_uint32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */ - stream_write_uint32(s, 0); /* GdipVersion (4 bytes) */ - stream_write_uint32(s, drawGdiplusCacheLevel); /* drawGdiplusCacheLevel (4 bytes) */ + stream_write_UINT32(s, drawGDIPlusSupportLevel); /* drawGDIPlusSupportLevel (4 bytes) */ + stream_write_UINT32(s, 0); /* GdipVersion (4 bytes) */ + stream_write_UINT32(s, drawGdiplusCacheLevel); /* drawGdiplusCacheLevel (4 bytes) */ rdp_write_gdiplus_cache_entries(s, 10, 5, 5, 10, 2); /* GdipCacheEntries (10 bytes) */ rdp_write_gdiplus_cache_chunk_size(s, 512, 2048, 1024, 64); /* GdipCacheChunkSize (8 bytes) */ rdp_write_gdiplus_image_cache_properties(s, 4096, 256, 128); /* GdipImageCacheProperties (6 bytes) */ @@ -1206,9 +1206,9 @@ void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* setting void rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - uint32 railSupportLevel; + UINT32 railSupportLevel; - stream_read_uint32(s, railSupportLevel); /* railSupportLevel (4 bytes) */ + stream_read_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */ if ((railSupportLevel & RAIL_LEVEL_SUPPORTED) == 0) { @@ -1230,7 +1230,7 @@ void rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettin void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 railSupportLevel; + UINT32 railSupportLevel; header = rdp_capability_set_start(s); @@ -1239,7 +1239,7 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings) if (settings->rail_langbar_supported) railSupportLevel |= RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED; - stream_write_uint32(s, railSupportLevel); /* railSupportLevel (4 bytes) */ + stream_write_UINT32(s, railSupportLevel); /* railSupportLevel (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_RAIL); } @@ -1253,7 +1253,7 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint32(s); /* wndSupportLevel (4 bytes) */ + stream_seek_UINT32(s); /* wndSupportLevel (4 bytes) */ stream_seek_BYTE(s); /* numIconCaches (1 byte) */ stream_seek_UINT16(s); /* numIconCacheEntries (2 bytes) */ } @@ -1268,13 +1268,13 @@ void rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings* void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 wndSupportLevel; + UINT32 wndSupportLevel; header = rdp_capability_set_start(s); wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX; - stream_write_uint32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */ + stream_write_UINT32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */ stream_write_BYTE(s, settings->num_icon_caches); /* numIconCaches (1 byte) */ stream_write_UINT16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */ @@ -1323,7 +1323,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin void rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_read_uint32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ + stream_read_UINT32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ } /** @@ -1339,7 +1339,7 @@ void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* setti header = rdp_capability_set_start(s); - stream_write_uint32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ + stream_write_UINT32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_MULTI_FRAGMENT_UPDATE); } @@ -1386,8 +1386,8 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings) void rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSettings* settings) { - stream_seek_uint32(s); /* cmdFlags (4 bytes) */ - stream_seek_uint32(s); /* reserved (4 bytes) */ + stream_seek_UINT32(s); /* cmdFlags (4 bytes) */ + stream_seek_UINT32(s); /* reserved (4 bytes) */ settings->surface_commands = TRUE; } @@ -1402,7 +1402,7 @@ void rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSetti void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 cmdFlags; + UINT32 cmdFlags; header = rdp_capability_set_start(s); @@ -1410,8 +1410,8 @@ void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings) SURFCMDS_SET_SURFACE_BITS | SURFCMDS_STREAM_SURFACE_BITS; - stream_write_uint32(s, cmdFlags); /* cmdFlags (4 bytes) */ - stream_write_uint32(s, 0); /* reserved (4 bytes) */ + stream_write_UINT32(s, cmdFlags); /* cmdFlags (4 bytes) */ + stream_write_UINT32(s, 0); /* reserved (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_SURFACE_COMMANDS); } @@ -1471,7 +1471,7 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings */ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings) { - uint32 captureFlags; + UINT32 captureFlags; BYTE codecMode; captureFlags = settings->rfx_codec_only ? CARDP_CAPS_CAPTURE_NON_CAC : 0; @@ -1480,18 +1480,18 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings) stream_write_UINT16(s, 49); /* codecPropertiesLength */ /* TS_RFX_CLNT_CAPS_CONTAINER */ - stream_write_uint32(s, 49); /* length */ - stream_write_uint32(s, captureFlags); /* captureFlags */ - stream_write_uint32(s, 37); /* capsLength */ + stream_write_UINT32(s, 49); /* length */ + stream_write_UINT32(s, captureFlags); /* captureFlags */ + stream_write_UINT32(s, 37); /* capsLength */ /* TS_RFX_CAPS */ stream_write_UINT16(s, CBY_CAPS); /* blockType */ - stream_write_uint32(s, 8); /* blockLen */ + stream_write_UINT32(s, 8); /* blockLen */ stream_write_UINT16(s, 1); /* numCapsets */ /* TS_RFX_CAPSET */ stream_write_UINT16(s, CBY_CAPSET); /* blockType */ - stream_write_uint32(s, 29); /* blockLen */ + stream_write_UINT32(s, 29); /* blockLen */ stream_write_BYTE(s, 0x01); /* codecId (MUST be set to 0x01) */ stream_write_UINT16(s, CLY_CAPSET); /* capsetType */ stream_write_UINT16(s, 2); /* numIcaps */ @@ -1543,7 +1543,7 @@ void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings void rdp_write_rfx_server_capability_container(STREAM* s, rdpSettings* settings) { stream_write_UINT16(s, 4); /* codecPropertiesLength */ - stream_write_uint32(s, 0); /* reserved */ + stream_write_UINT32(s, 0); /* reserved */ } void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings) @@ -1560,7 +1560,7 @@ void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings) { stream_write_UINT16(s, 4); /* codecPropertiesLength */ - stream_write_uint32(s, 0); /* reserved */ + stream_write_UINT32(s, 0); /* reserved */ } /** @@ -1644,11 +1644,11 @@ void rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSett { if (settings->server_mode) { - stream_read_uint32(s, settings->frame_acknowledge); /* (4 bytes) */ + stream_read_UINT32(s, settings->frame_acknowledge); /* (4 bytes) */ } else { - stream_seek_uint32(s); /* (4 bytes) */ + stream_seek_UINT32(s); /* (4 bytes) */ } } @@ -1676,12 +1676,12 @@ void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* s void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings) { BYTE* header; - uint32 frame_acknowledge; + UINT32 frame_acknowledge; header = rdp_capability_set_start(s); frame_acknowledge = settings->frame_acknowledge; - stream_write_uint32(s, frame_acknowledge); /* (4 bytes) */ + stream_write_UINT32(s, frame_acknowledge); /* (4 bytes) */ rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE); } @@ -1894,7 +1894,7 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s) return FALSE; } - stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */ + stream_read_UINT32(s, rdp->settings->share_id); /* shareId (4 bytes) */ stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */ @@ -1919,7 +1919,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings) UINT16 numberCapabilities; UINT16 lengthCombinedCapabilities; - stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */ + stream_write_UINT32(s, settings->share_id); /* shareId (4 bytes) */ stream_write_UINT16(s, 4); /* lengthSourceDescriptor (2 bytes) */ stream_get_mark(s, lm); @@ -1963,7 +1963,7 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings) stream_set_mark(s, em); - stream_write_uint32(s, 0); /* sessionId */ + stream_write_UINT32(s, 0); /* sessionId */ } BOOL rdp_send_demand_active(rdpRdp* rdp) @@ -2020,7 +2020,7 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s) if (pduType != PDU_TYPE_CONFIRM_ACTIVE) return FALSE; - stream_seek_uint32(s); /* shareId (4 bytes) */ + stream_seek_UINT32(s); /* shareId (4 bytes) */ stream_seek_UINT16(s); /* originatorId (2 bytes) */ stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */ stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */ @@ -2043,7 +2043,7 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings) lengthSourceDescriptor = sizeof(SOURCE_DESCRIPTOR); - stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */ + stream_write_UINT32(s, settings->share_id); /* shareId (4 bytes) */ stream_write_UINT16(s, 0x03EA); /* originatorId (2 bytes) */ stream_write_UINT16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */ diff --git a/libfreerdp/core/certificate.c b/libfreerdp/core/certificate.c index 5f893a9a0..5f65790f7 100644 --- a/libfreerdp/core/certificate.c +++ b/libfreerdp/core/certificate.c @@ -132,7 +132,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info) STREAM* s; int length; BYTE padding; - uint32 version; + UINT32 version; int modulus_length; int exponent_length; @@ -214,7 +214,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info) * @return new X.509 certificate chain */ -rdpX509CertChain* certificate_new_x509_certificate_chain(uint32 count) +rdpX509CertChain* certificate_new_x509_certificate_chain(UINT32 count) { rdpX509CertChain* x509_cert_chain; @@ -248,13 +248,13 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain) } } -static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, uint32 length) +static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, UINT32 length) { BYTE magic[4]; - uint32 keylen; - uint32 bitlen; - uint32 datalen; - uint32 modlen; + UINT32 keylen; + UINT32 bitlen; + UINT32 datalen; + UINT32 modlen; stream_read(s, magic, 4); @@ -264,9 +264,9 @@ static BOOL certificate_process_server_public_key(rdpCertificate* certificate, S return FALSE; } - stream_read_uint32(s, keylen); - stream_read_uint32(s, bitlen); - stream_read_uint32(s, datalen); + stream_read_UINT32(s, keylen); + stream_read_UINT32(s, bitlen); + stream_read_UINT32(s, datalen); stream_read(s, certificate->cert_info.exponent, 4); modlen = keylen - 8; @@ -279,7 +279,7 @@ static BOOL certificate_process_server_public_key(rdpCertificate* certificate, S return TRUE; } -static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, BYTE* sigdata, int sigdatalen, STREAM* s, uint32 siglen) +static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, BYTE* sigdata, int sigdatalen, STREAM* s, UINT32 siglen) { int i, sum; CryptoMd5 md5ctx; @@ -342,19 +342,19 @@ static BOOL certificate_process_server_public_signature(rdpCertificate* certific BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s) { - uint32 dwSigAlgId; - uint32 dwKeyAlgId; - uint32 wPublicKeyBlobType; - uint32 wPublicKeyBlobLen; - uint32 wSignatureBlobType; - uint32 wSignatureBlobLen; + UINT32 dwSigAlgId; + UINT32 dwKeyAlgId; + UINT32 wPublicKeyBlobType; + UINT32 wPublicKeyBlobLen; + UINT32 wSignatureBlobType; + UINT32 wSignatureBlobLen; BYTE* sigdata; int sigdatalen; /* -4, because we need to include dwVersion */ sigdata = stream_get_tail(s) - 4; - stream_read_uint32(s, dwSigAlgId); - stream_read_uint32(s, dwKeyAlgId); + stream_read_UINT32(s, dwSigAlgId); + stream_read_UINT32(s, dwKeyAlgId); if (!(dwSigAlgId == SIGNATURE_ALG_RSA && dwKeyAlgId == KEY_EXCHANGE_ALG_RSA)) { @@ -413,18 +413,18 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s) { int i; - uint32 certLength; - uint32 numCertBlobs; + UINT32 certLength; + UINT32 numCertBlobs; DEBUG_CERTIFICATE("Server X.509 Certificate Chain"); - stream_read_uint32(s, numCertBlobs); /* numCertBlobs */ + stream_read_UINT32(s, numCertBlobs); /* numCertBlobs */ certificate->x509_cert_chain = certificate_new_x509_certificate_chain(numCertBlobs); for (i = 0; i < (int) numCertBlobs; i++) { - stream_read_uint32(s, certLength); + stream_read_UINT32(s, certLength); DEBUG_CERTIFICATE("\nX.509 Certificate #%d, length:%d", i + 1, certLength); @@ -461,7 +461,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length) { STREAM* s; - uint32 dwVersion; + UINT32 dwVersion; if (length < 1) { @@ -472,7 +472,7 @@ BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* serv s = stream_new(0); stream_attach(s, server_cert, length); - stream_read_uint32(s, dwVersion); /* dwVersion (4 bytes) */ + stream_read_UINT32(s, dwVersion); /* dwVersion (4 bytes) */ switch (dwVersion & CERT_CHAIN_VERSION_MASK) { diff --git a/libfreerdp/core/certificate.h b/libfreerdp/core/certificate.h index e1349dcfe..00bbf6e0f 100644 --- a/libfreerdp/core/certificate.h +++ b/libfreerdp/core/certificate.h @@ -44,7 +44,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info); -rdpX509CertChain* certificate_new_x509_certificate_chain(uint32 count); +rdpX509CertChain* certificate_new_x509_certificate_chain(UINT32 count); void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain); BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s); diff --git a/libfreerdp/core/channel.c b/libfreerdp/core/channel.c index a93bca6af..9feb0225d 100644 --- a/libfreerdp/core/channel.c +++ b/libfreerdp/core/channel.c @@ -37,7 +37,7 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size) { STREAM* s; - uint32 flags; + UINT32 flags; int i, left; int chunk_size; rdpChannel* channel = NULL; @@ -77,8 +77,8 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size) flags |= CHANNEL_FLAG_SHOW_PROTOCOL; } - stream_write_uint32(s, size); - stream_write_uint32(s, flags); + stream_write_UINT32(s, size); + stream_write_UINT32(s, flags); stream_check_size(s, chunk_size); stream_write(s, data, chunk_size); @@ -94,12 +94,12 @@ BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size) void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id) { - uint32 length; - uint32 flags; + UINT32 length; + UINT32 flags; int chunk_length; - stream_read_uint32(s, length); - stream_read_uint32(s, flags); + stream_read_UINT32(s, length); + stream_read_UINT32(s, flags); chunk_length = stream_get_left(s); IFCALL(instance->ReceiveChannelData, instance, @@ -108,12 +108,12 @@ void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id) void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id) { - uint32 length; - uint32 flags; + UINT32 length; + UINT32 flags; int chunk_length; - stream_read_uint32(s, length); - stream_read_uint32(s, flags); + stream_read_UINT32(s, length); + stream_read_UINT32(s, flags); chunk_length = stream_get_left(s); IFCALL(client->ReceiveChannelData, client, diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index 90c623119..afe472ab3 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -206,10 +206,10 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp) { BYTE client_random[CLIENT_RANDOM_LENGTH]; BYTE crypt_client_random[256 + 8]; - uint32 key_len; + UINT32 key_len; BYTE* mod; BYTE* exp; - uint32 length; + UINT32 length; STREAM* s; if (rdp->settings->encryption == FALSE) @@ -232,7 +232,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp) rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID); rdp_write_security_header(s, SEC_EXCHANGE_PKT); length = key_len + 8; - stream_write_uint32(s, length); + stream_write_UINT32(s, length); stream_write(s, crypt_client_random, length); if (transport_write(rdp->mcs->transport, s) < 0) { @@ -269,7 +269,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) { BYTE client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */ BYTE crypt_client_random[256 + 8]; - uint32 rand_len, key_len; + UINT32 rand_len, key_len; UINT16 channel_id, length, sec_flags; BYTE* mod; BYTE* priv_exp; @@ -294,7 +294,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s) return FALSE; } - stream_read_uint32(s, rand_len); + stream_read_UINT32(s, rand_len); key_len = rdp->settings->server_key->ModulusLength; if (rand_len != key_len + 8) diff --git a/libfreerdp/core/errinfo.c b/libfreerdp/core/errinfo.c index 9464f8c68..c835f7476 100644 --- a/libfreerdp/core/errinfo.c +++ b/libfreerdp/core/errinfo.c @@ -439,7 +439,7 @@ static const ERRINFO ERRINFO_CODES[] = ERRINFO_DEFINE(NONE) }; -void rdp_print_errinfo(uint32 code) +void rdp_print_errinfo(UINT32 code) { const ERRINFO* errInfo; diff --git a/libfreerdp/core/errinfo.h b/libfreerdp/core/errinfo.h index bd8702258..755ea7c0d 100644 --- a/libfreerdp/core/errinfo.h +++ b/libfreerdp/core/errinfo.h @@ -123,7 +123,7 @@ struct _ERRINFO { - uint32 code; + UINT32 code; char* name; char* info; }; @@ -131,6 +131,6 @@ typedef struct _ERRINFO ERRINFO; #define ERRINFO_DEFINE(_code) { ERRINFO_##_code , "ERRINFO_" #_code , ERRINFO_##_code##_STRING } -void rdp_print_errinfo(uint32 code); +void rdp_print_errinfo(UINT32 code); #endif diff --git a/libfreerdp/core/extension.c b/libfreerdp/core/extension.c index 2ddae36a4..293b845d5 100644 --- a/libfreerdp/core/extension.c +++ b/libfreerdp/core/extension.c @@ -53,7 +53,7 @@ #endif -static uint32 FREERDP_CC extension_register_plugin(rdpExtPlugin* plugin) +static UINT32 FREERDP_CC extension_register_plugin(rdpExtPlugin* plugin) { rdpExtension* ext = (rdpExtension*) plugin->ext; @@ -67,7 +67,7 @@ static uint32 FREERDP_CC extension_register_plugin(rdpExtPlugin* plugin) return 0; } -static uint32 FREERDP_CC extension_register_pre_connect_hook(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook) +static UINT32 FREERDP_CC extension_register_pre_connect_hook(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook) { rdpExtension* ext = (rdpExtension*) plugin->ext; @@ -83,7 +83,7 @@ static uint32 FREERDP_CC extension_register_pre_connect_hook(rdpExtPlugin* plugi return 0; } -static uint32 FREERDP_CC extension_register_post_connect_hook(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook) +static UINT32 FREERDP_CC extension_register_post_connect_hook(rdpExtPlugin* plugin, PFREERDP_EXTENSION_HOOK hook) { rdpExtension* ext = (rdpExtension*) plugin->ext; diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c index b799e375e..930e16516 100644 --- a/libfreerdp/core/fastpath.c +++ b/libfreerdp/core/fastpath.c @@ -187,7 +187,7 @@ static void fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s) stream_seek_UINT16(s); /* size (2 bytes), must be set to zero */ } -static BOOL fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, uint32 size, STREAM* s) +static BOOL fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 size, STREAM* s) { rdpUpdate* update = fastpath->rdp->update; rdpContext* context = fastpath->rdp->update->context; @@ -261,7 +261,7 @@ static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) { UINT16 size; int next_pos; - uint32 totalSize; + UINT32 totalSize; BYTE updateCode; BYTE fragmentation; BYTE compression; @@ -269,8 +269,8 @@ static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s) STREAM* update_stream; STREAM* comp_stream; rdpRdp *rdp; - uint32 roff; - uint32 rlen; + UINT32 roff; + UINT32 rlen; rdp = fastpath->rdp; @@ -530,9 +530,9 @@ BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s) return TRUE; } -static uint32 fastpath_get_sec_bytes(rdpRdp* rdp) +static UINT32 fastpath_get_sec_bytes(rdpRdp* rdp) { - uint32 sec_bytes; + UINT32 sec_bytes; if (rdp->do_crypt) { @@ -650,7 +650,7 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s) BOOL result; UINT16 pduLength; UINT16 maxLength; - uint32 totalLength; + UINT32 totalLength; BYTE fragmentation; BYTE header; STREAM* update; diff --git a/libfreerdp/core/fastpath.h b/libfreerdp/core/fastpath.h index 4870205d6..12999398c 100644 --- a/libfreerdp/core/fastpath.h +++ b/libfreerdp/core/fastpath.h @@ -114,7 +114,7 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s); STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath); BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s); -BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, uint32 frameId); +BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, UINT32 frameId); rdpFastPath* fastpath_new(rdpRdp* rdp); void fastpath_free(rdpFastPath* fastpath); diff --git a/libfreerdp/core/freerdp.c b/libfreerdp/core/freerdp.c index b1c3d443d..53e0f926c 100644 --- a/libfreerdp/core/freerdp.c +++ b/libfreerdp/core/freerdp.c @@ -273,7 +273,7 @@ void freerdp_context_free(freerdp* instance) instance->context = NULL; } -uint32 freerdp_error_info(freerdp* instance) +UINT32 freerdp_error_info(freerdp* instance) { return instance->context->rdp->errorInfo; } diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c index 85d4d0857..561b55dfb 100644 --- a/libfreerdp/core/gcc.c +++ b/libfreerdp/core/gcc.c @@ -226,7 +226,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data) BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings) { UINT16 length; - uint32 tag; + UINT32 tag; UINT16 nodeID; BYTE result; BYTE choice; @@ -467,28 +467,28 @@ void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length) BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { char* str; - uint32 version; - uint32 color_depth; + UINT32 version; + UINT32 color_depth; UINT16 colorDepth = 0; UINT16 postBeta2ColorDepth = 0; UINT16 highColorDepth = 0; UINT16 supportedColorDepths = 0; UINT16 earlyCapabilityFlags = 0; - uint32 serverSelectedProtocol = 0; + UINT32 serverSelectedProtocol = 0; /* Length of all required fields, until imeFileName */ if (blockLength < 128) return FALSE; - stream_read_uint32(s, version); /* version */ + stream_read_UINT32(s, version); /* version */ settings->rdp_version = (version == RDP_VERSION_4 ? 4 : 7); stream_read_UINT16(s, settings->width); /* desktopWidth */ stream_read_UINT16(s, settings->height); /* desktopHeight */ stream_read_UINT16(s, colorDepth); /* colorDepth */ stream_seek_UINT16(s); /* SASSequence (Secure Access Sequence) */ - stream_read_uint32(s, settings->kbd_layout); /* keyboardLayout */ - stream_read_uint32(s, settings->client_build); /* clientBuild */ + stream_read_UINT32(s, settings->kbd_layout); /* keyboardLayout */ + stream_read_UINT32(s, settings->client_build); /* clientBuild */ /* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */ freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 32 / 2); @@ -497,9 +497,9 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen settings->client_hostname[31] = 0; free(str); - stream_read_uint32(s, settings->kbd_type); /* keyboardType */ - stream_read_uint32(s, settings->kbd_subtype); /* keyboardSubType */ - stream_read_uint32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */ + stream_read_UINT32(s, settings->kbd_type); /* keyboardType */ + stream_read_UINT32(s, settings->kbd_subtype); /* keyboardSubType */ + stream_read_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */ stream_seek(s, 64); /* imeFileName */ @@ -526,7 +526,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen if (blockLength < 4) break; - stream_seek_uint32(s); /* serialNumber */ + stream_seek_UINT32(s); /* serialNumber */ blockLength -= 4; if (blockLength < 2) @@ -565,7 +565,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen if (blockLength < 4) break; - stream_read_uint32(s, serverSelectedProtocol); /* serverSelectedProtocol */ + stream_read_UINT32(s, serverSelectedProtocol); /* serverSelectedProtocol */ blockLength -= 4; if (settings->selected_protocol != serverSelectedProtocol) @@ -631,7 +631,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) { - uint32 version; + UINT32 version; WCHAR* clientName; int clientNameLength; BYTE connectionType; @@ -648,13 +648,13 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) clientNameLength = freerdp_AsciiToUnicodeAlloc(settings->client_hostname, &clientName, 0); clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->client_product_id, &clientDigProductId, 0); - stream_write_uint32(s, version); /* version */ + stream_write_UINT32(s, version); /* version */ stream_write_UINT16(s, settings->width); /* desktopWidth */ stream_write_UINT16(s, settings->height); /* desktopHeight */ stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */ stream_write_UINT16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */ - stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout */ - stream_write_uint32(s, settings->client_build); /* clientBuild */ + stream_write_UINT32(s, settings->kbd_layout); /* keyboardLayout */ + stream_write_UINT32(s, settings->client_build); /* clientBuild */ /* clientName (32 bytes, null-terminated unicode, truncated to 15 characters) */ @@ -668,15 +668,15 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write_zero(s, 32 - ((clientNameLength + 1) * 2)); free(clientName); - stream_write_uint32(s, settings->kbd_type); /* keyboardType */ - stream_write_uint32(s, settings->kbd_subtype); /* keyboardSubType */ - stream_write_uint32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */ + stream_write_UINT32(s, settings->kbd_type); /* keyboardType */ + stream_write_UINT32(s, settings->kbd_subtype); /* keyboardSubType */ + stream_write_UINT32(s, settings->kbd_fn_keys); /* keyboardFunctionKey */ stream_write_zero(s, 64); /* imeFileName */ stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth */ stream_write_UINT16(s, 1); /* clientProductID */ - stream_write_uint32(s, 0); /* serialNumber (should be initialized to 0) */ + stream_write_UINT32(s, 0); /* serialNumber (should be initialized to 0) */ highColorDepth = MIN(settings->color_depth, 24); @@ -719,16 +719,16 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings) stream_write_BYTE(s, connectionType); /* connectionType */ stream_write_BYTE(s, 0); /* pad1octet */ - stream_write_uint32(s, settings->selected_protocol); /* serverSelectedProtocol */ + stream_write_UINT32(s, settings->selected_protocol); /* serverSelectedProtocol */ } BOOL gcc_read_server_core_data(STREAM* s, rdpSettings* settings) { - uint32 version; - uint32 clientRequestedProtocols; + UINT32 version; + UINT32 clientRequestedProtocols; - stream_read_uint32(s, version); /* version */ - stream_read_uint32(s, clientRequestedProtocols); /* clientRequestedProtocols */ + stream_read_UINT32(s, version); /* version */ + stream_read_UINT32(s, clientRequestedProtocols); /* clientRequestedProtocols */ if (version == RDP_VERSION_4 && settings->rdp_version > 4) settings->rdp_version = 4; @@ -742,8 +742,8 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings) { gcc_write_user_data_header(s, SC_CORE, 12); - stream_write_uint32(s, settings->rdp_version == 4 ? RDP_VERSION_4 : RDP_VERSION_5_PLUS); - stream_write_uint32(s, settings->requested_protocols); /* clientRequestedProtocols */ + stream_write_UINT32(s, settings->rdp_version == 4 ? RDP_VERSION_4 : RDP_VERSION_5_PLUS); + stream_write_UINT32(s, settings->requested_protocols); /* clientRequestedProtocols */ } /** @@ -760,9 +760,9 @@ BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 bloc if (settings->encryption) { - stream_read_uint32(s, settings->encryption_method); /* encryptionMethods */ + stream_read_UINT32(s, settings->encryption_method); /* encryptionMethods */ if (settings->encryption_method == 0) - stream_read_uint32(s, settings->encryption_method); /* extEncryptionMethods */ + stream_read_UINT32(s, settings->encryption_method); /* extEncryptionMethods */ } else { @@ -784,24 +784,24 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings) if (settings->encryption) { - stream_write_uint32(s, settings->encryption_method); /* encryptionMethods */ - stream_write_uint32(s, 0); /* extEncryptionMethods */ + stream_write_UINT32(s, settings->encryption_method); /* encryptionMethods */ + stream_write_UINT32(s, 0); /* extEncryptionMethods */ } else { /* French locale, disable encryption */ - stream_write_uint32(s, 0); /* encryptionMethods */ - stream_write_uint32(s, settings->encryption_method); /* extEncryptionMethods */ + stream_write_UINT32(s, 0); /* encryptionMethods */ + stream_write_UINT32(s, settings->encryption_method); /* extEncryptionMethods */ } } BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings) { BYTE* data; - uint32 length; + UINT32 length; - stream_read_uint32(s, settings->encryption_method); /* encryptionMethod */ - stream_read_uint32(s, settings->encryption_level); /* encryptionLevel */ + stream_read_UINT32(s, settings->encryption_method); /* encryptionMethod */ + stream_read_UINT32(s, settings->encryption_level); /* encryptionLevel */ if (settings->encryption_method == 0 && settings->encryption_level == 0) { @@ -812,8 +812,8 @@ BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings) return TRUE; } - stream_read_uint32(s, settings->server_random_length); /* serverRandomLen */ - stream_read_uint32(s, settings->server_certificate_length); /* serverCertLen */ + stream_read_UINT32(s, settings->server_random_length); /* serverRandomLen */ + stream_read_UINT32(s, settings->server_certificate_length); /* serverCertLen */ if (settings->server_random_length > 0) { @@ -901,7 +901,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) int expLen, keyLen, sigDataLen; BYTE encryptedSignature[TSSK_KEY_LENGTH]; BYTE signature[sizeof(initial_signature)]; - uint32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen; + UINT32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen; if (!settings->encryption) { @@ -964,8 +964,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) gcc_write_user_data_header(s, SC_SECURITY, headerLen); - stream_write_uint32(s, settings->encryption_method); /* encryptionMethod */ - stream_write_uint32(s, settings->encryption_level); /* encryptionLevel */ + stream_write_UINT32(s, settings->encryption_method); /* encryptionMethod */ + stream_write_UINT32(s, settings->encryption_level); /* encryptionLevel */ if (settings->encryption_method == ENCRYPTION_METHOD_NONE && settings->encryption_level == ENCRYPTION_LEVEL_NONE) @@ -973,8 +973,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) return; } - stream_write_uint32(s, serverRandomLen); /* serverRandomLen */ - stream_write_uint32(s, serverCertLen); /* serverCertLen */ + stream_write_UINT32(s, serverRandomLen); /* serverRandomLen */ + stream_write_UINT32(s, serverCertLen); /* serverCertLen */ settings->server_random_length = serverRandomLen; settings->server_random = (BYTE*) malloc(serverRandomLen); @@ -983,16 +983,16 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings) sigData = stream_get_tail(s); - stream_write_uint32(s, CERT_CHAIN_VERSION_1); /* dwVersion (4 bytes) */ - stream_write_uint32(s, SIGNATURE_ALG_RSA); /* dwSigAlgId */ - stream_write_uint32(s, KEY_EXCHANGE_ALG_RSA); /* dwKeyAlgId */ + stream_write_UINT32(s, CERT_CHAIN_VERSION_1); /* dwVersion (4 bytes) */ + stream_write_UINT32(s, SIGNATURE_ALG_RSA); /* dwSigAlgId */ + stream_write_UINT32(s, KEY_EXCHANGE_ALG_RSA); /* dwKeyAlgId */ stream_write_UINT16(s, BB_RSA_KEY_BLOB); /* wPublicKeyBlobType */ stream_write_UINT16(s, wPublicKeyBlobLen); /* wPublicKeyBlobLen */ stream_write(s, "RSA1", 4); /* magic */ - stream_write_uint32(s, keyLen + 8); /* keylen */ - stream_write_uint32(s, keyLen * 8); /* bitlen */ - stream_write_uint32(s, keyLen - 1); /* datalen */ + stream_write_UINT32(s, keyLen + 8); /* keylen */ + stream_write_UINT32(s, keyLen * 8); /* bitlen */ + stream_write_UINT32(s, keyLen - 1); /* datalen */ stream_write(s, settings->server_key->exponent, expLen); stream_write(s, settings->server_key->Modulus, keyLen); @@ -1030,7 +1030,7 @@ BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 block if (blockLength < 4) return FALSE; - stream_read_uint32(s, settings->num_channels); /* channelCount */ + stream_read_UINT32(s, settings->num_channels); /* channelCount */ if (blockLength < 4 + settings->num_channels * 12) return FALSE; if (settings->num_channels > 16) @@ -1041,7 +1041,7 @@ BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 block { /* CHANNEL_DEF */ stream_read(s, settings->channels[i].name, 8); /* name (8 bytes) */ - stream_read_uint32(s, settings->channels[i].options); /* options (4 bytes) */ + stream_read_UINT32(s, settings->channels[i].options); /* options (4 bytes) */ settings->channels[i].channel_id = MCS_GLOBAL_CHANNEL_ID + 1 + i; } @@ -1065,14 +1065,14 @@ void gcc_write_client_network_data(STREAM* s, rdpSettings* settings) length = settings->num_channels * 12 + 8; gcc_write_user_data_header(s, CS_NET, length); - stream_write_uint32(s, settings->num_channels); /* channelCount */ + stream_write_UINT32(s, settings->num_channels); /* channelCount */ /* channelDefArray */ for (i = 0; i < settings->num_channels; i++) { /* CHANNEL_DEF */ stream_write(s, settings->channels[i].name, 8); /* name (8 bytes) */ - stream_write_uint32(s, settings->channels[i].options); /* options (4 bytes) */ + stream_write_UINT32(s, settings->channels[i].options); /* options (4 bytes) */ } } } @@ -1132,15 +1132,15 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings) BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 blockLength) { - uint32 flags; + UINT32 flags; if (blockLength < 8) return FALSE; - stream_read_uint32(s, flags); /* flags */ + stream_read_UINT32(s, flags); /* flags */ if ((flags & REDIRECTED_SESSIONID_FIELD_VALID)) - stream_read_uint32(s, settings->redirected_session_id); /* redirectedSessionID */ + stream_read_UINT32(s, settings->redirected_session_id); /* redirectedSessionID */ return TRUE; } @@ -1154,7 +1154,7 @@ BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 block void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings) { - uint32 flags; + UINT32 flags; gcc_write_user_data_header(s, CS_CLUSTER, 12); @@ -1163,8 +1163,8 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings) if (settings->console_session || settings->redirected_session_id) flags |= REDIRECTED_SESSIONID_FIELD_VALID; - stream_write_uint32(s, flags); /* flags */ - stream_write_uint32(s, settings->redirected_session_id); /* redirectedSessionID */ + stream_write_UINT32(s, flags); /* flags */ + stream_write_UINT32(s, settings->redirected_session_id); /* redirectedSessionID */ } /** @@ -1191,15 +1191,15 @@ void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings) { int i; UINT16 length; - uint32 left, top, right, bottom, flags; + UINT32 left, top, right, bottom, flags; if (settings->num_monitors > 1) { length = (20 * settings->num_monitors) + 12; gcc_write_user_data_header(s, CS_MONITOR, length); - stream_write_uint32(s, 0); /* flags */ - stream_write_uint32(s, settings->num_monitors); /* monitorCount */ + stream_write_UINT32(s, 0); /* flags */ + stream_write_UINT32(s, settings->num_monitors); /* monitorCount */ for (i = 0; i < settings->num_monitors; i++) { @@ -1209,11 +1209,11 @@ void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings) bottom = settings->monitors[i].y + settings->monitors[i].height - 1; flags = settings->monitors[i].is_primary ? MONITOR_PRIMARY : 0; - stream_write_uint32(s, left); /* left */ - stream_write_uint32(s, top); /* top */ - stream_write_uint32(s, right); /* right */ - stream_write_uint32(s, bottom); /* bottom */ - stream_write_uint32(s, flags); /* flags */ + stream_write_UINT32(s, left); /* left */ + stream_write_UINT32(s, top); /* top */ + stream_write_UINT32(s, right); /* right */ + stream_write_UINT32(s, bottom); /* bottom */ + stream_write_UINT32(s, flags); /* flags */ } } } diff --git a/libfreerdp/core/graphics.c b/libfreerdp/core/graphics.c index 05bf2e58f..f3707e4dc 100644 --- a/libfreerdp/core/graphics.c +++ b/libfreerdp/core/graphics.c @@ -180,12 +180,12 @@ void Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y) context->graphics->Glyph_Prototype->Draw(context, glyph, x, y); } -void Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { context->graphics->Glyph_Prototype->BeginDraw(context, x, y, width, height, bgcolor, fgcolor); } -void Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { context->graphics->Glyph_Prototype->EndDraw(context, x, y, width, height, bgcolor, fgcolor); } diff --git a/libfreerdp/core/info.c b/libfreerdp/core/info.c index cf43e181e..fc9780b53 100644 --- a/libfreerdp/core/info.c +++ b/libfreerdp/core/info.c @@ -54,9 +54,9 @@ void rdp_read_server_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) ARC_SC_PRIVATE_PACKET* autoReconnectCookie; autoReconnectCookie = settings->server_auto_reconnect_cookie; - stream_read_uint32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ - stream_read_uint32(s, autoReconnectCookie->version); /* version (4 bytes) */ - stream_read_uint32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */ stream_read(s, autoReconnectCookie->arcRandomBits, 16); /* arcRandomBits (16 bytes) */ } @@ -75,9 +75,9 @@ BOOL rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) if (stream_get_left(s) < 28) return FALSE; - stream_read_uint32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ - stream_read_uint32(s, autoReconnectCookie->version); /* version (4 bytes) */ - stream_read_uint32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->version); /* version (4 bytes) */ + stream_read_UINT32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */ stream_read(s, autoReconnectCookie->securityVerifier, 16); /* SecurityVerifier */ return TRUE; @@ -95,9 +95,9 @@ void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings) ARC_CS_PRIVATE_PACKET* autoReconnectCookie; autoReconnectCookie = settings->client_auto_reconnect_cookie; - 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_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 */ } @@ -140,8 +140,8 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings) if (!rdp_read_client_time_zone(s, settings)) return FALSE; - stream_seek_uint32(s); /* clientSessionId, should be set to 0 */ - stream_read_uint32(s, settings->performance_flags); /* performanceFlags */ + stream_seek_UINT32(s); /* clientSessionId, should be set to 0 */ + stream_read_UINT32(s, settings->performance_flags); /* performanceFlags */ stream_read_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ @@ -194,8 +194,8 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) rdp_write_client_time_zone(s, settings); /* clientTimeZone */ - stream_write_uint32(s, 0); /* clientSessionId, should be set to 0 */ - stream_write_uint32(s, settings->performance_flags); /* performanceFlags */ + stream_write_UINT32(s, 0); /* clientSessionId, should be set to 0 */ + stream_write_UINT32(s, settings->performance_flags); /* performanceFlags */ stream_write_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */ @@ -218,15 +218,15 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings) BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings) { - uint32 flags; + UINT32 flags; UINT16 cbDomain; UINT16 cbUserName; UINT16 cbPassword; UINT16 cbAlternateShell; UINT16 cbWorkingDir; - stream_seek_uint32(s); /* CodePage */ - stream_read_uint32(s, flags); /* flags */ + 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); @@ -304,7 +304,7 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings) void rdp_write_info_packet(STREAM* s, rdpSettings* settings) { - uint32 flags; + UINT32 flags; WCHAR* domain; int cbDomain; WCHAR* userName; @@ -370,8 +370,8 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings) cbWorkingDir = freerdp_AsciiToUnicodeAlloc(settings->directory, &workingDir, 0) * 2; - stream_write_uint32(s, 0); /* CodePage */ - stream_write_uint32(s, flags); /* flags */ + stream_write_UINT32(s, 0); /* CodePage */ + stream_write_UINT32(s, flags); /* flags */ stream_write_UINT16(s, cbDomain); /* cbDomain */ stream_write_UINT16(s, cbUserName); /* cbUserName */ @@ -470,26 +470,26 @@ BOOL rdp_send_client_info(rdpRdp* rdp) void rdp_recv_logon_info_v1(rdpRdp* rdp, STREAM* s) { - uint32 cbDomain; - uint32 cbUserName; + UINT32 cbDomain; + UINT32 cbUserName; - stream_read_uint32(s, cbDomain); /* cbDomain (4 bytes) */ + stream_read_UINT32(s, cbDomain); /* cbDomain (4 bytes) */ stream_seek(s, 52); /* domain (52 bytes) */ - stream_read_uint32(s, cbUserName); /* cbUserName (4 bytes) */ + stream_read_UINT32(s, cbUserName); /* cbUserName (4 bytes) */ stream_seek(s, 512); /* userName (512 bytes) */ - stream_seek_uint32(s); /* sessionId (4 bytes) */ + stream_seek_UINT32(s); /* sessionId (4 bytes) */ } void rdp_recv_logon_info_v2(rdpRdp* rdp, STREAM* s) { - uint32 cbDomain; - uint32 cbUserName; + UINT32 cbDomain; + UINT32 cbUserName; stream_seek_UINT16(s); /* version (2 bytes) */ - stream_seek_uint32(s); /* size (4 bytes) */ - stream_seek_uint32(s); /* sessionId (4 bytes) */ - stream_read_uint32(s, cbDomain); /* cbDomain (4 bytes) */ - stream_read_uint32(s, cbUserName); /* cbUserName (4 bytes) */ + stream_seek_UINT32(s); /* size (4 bytes) */ + stream_seek_UINT32(s); /* sessionId (4 bytes) */ + stream_read_UINT32(s, cbDomain); /* cbDomain (4 bytes) */ + stream_read_UINT32(s, cbUserName); /* cbUserName (4 bytes) */ stream_seek(s, 558); /* pad */ stream_seek(s, cbDomain); /* domain */ stream_seek(s, cbUserName); /* userName */ @@ -502,33 +502,33 @@ void rdp_recv_logon_plain_notify(rdpRdp* rdp, STREAM* s) void rdp_recv_logon_error_info(rdpRdp* rdp, STREAM* s) { - uint32 errorNotificationType; - uint32 errorNotificationData; + UINT32 errorNotificationType; + UINT32 errorNotificationData; - stream_read_uint32(s, errorNotificationType); /* errorNotificationType (4 bytes) */ - stream_read_uint32(s, errorNotificationData); /* errorNotificationData (4 bytes) */ + stream_read_UINT32(s, errorNotificationType); /* errorNotificationType (4 bytes) */ + stream_read_UINT32(s, errorNotificationData); /* errorNotificationData (4 bytes) */ } void rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s) { - uint32 cbFieldData; - uint32 fieldsPresent; + UINT32 cbFieldData; + UINT32 fieldsPresent; UINT16 Length; stream_read_UINT16(s, Length); /* The total size in bytes of this structure */ - stream_read_uint32(s, fieldsPresent); /* fieldsPresent (4 bytes) */ + stream_read_UINT32(s, fieldsPresent); /* fieldsPresent (4 bytes) */ /* logonFields */ if (fieldsPresent & LOGON_EX_AUTORECONNECTCOOKIE) { - stream_read_uint32(s, cbFieldData); /* cbFieldData (4 bytes) */ + stream_read_UINT32(s, cbFieldData); /* cbFieldData (4 bytes) */ rdp_read_server_auto_reconnect_cookie(s, rdp->settings); } if (fieldsPresent & LOGON_EX_LOGONERRORS) { - stream_read_uint32(s, cbFieldData); /* cbFieldData (4 bytes) */ + stream_read_UINT32(s, cbFieldData); /* cbFieldData (4 bytes) */ rdp_recv_logon_error_info(rdp, s); } @@ -537,9 +537,9 @@ void rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s) BOOL rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s) { - uint32 infoType; + UINT32 infoType; - stream_read_uint32(s, infoType); /* infoType (4 bytes) */ + stream_read_UINT32(s, infoType); /* infoType (4 bytes) */ //printf("%s\n", INFO_TYPE_LOGON_STRINGS[infoType]); diff --git a/libfreerdp/core/input.c b/libfreerdp/core/input.c index 61f77662b..99e92b37f 100644 --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -31,9 +31,9 @@ void rdp_write_client_input_pdu_header(STREAM* s, UINT16 number) stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ } -void rdp_write_input_event_header(STREAM* s, uint32 time, UINT16 type) +void rdp_write_input_event_header(STREAM* s, UINT32 time, UINT16 type) { - stream_write_uint32(s, time); /* eventTime (4 bytes) */ + stream_write_UINT32(s, time); /* eventTime (4 bytes) */ stream_write_UINT16(s, type); /* messageType (2 bytes) */ } @@ -51,13 +51,13 @@ void rdp_send_client_input_pdu(rdpRdp* rdp, STREAM* s) rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_INPUT, rdp->mcs->user_id); } -void input_write_synchronize_event(STREAM* s, uint32 flags) +void input_write_synchronize_event(STREAM* s, UINT32 flags) { stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */ - stream_write_uint32(s, flags); /* toggleFlags (4 bytes) */ + stream_write_UINT32(s, flags); /* toggleFlags (4 bytes) */ } -void input_send_synchronize_event(rdpInput* input, uint32 flags) +void input_send_synchronize_event(rdpInput* input, UINT32 flags) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -147,7 +147,7 @@ void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UI rdp_send_client_input_pdu(rdp, s); } -void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags) +void input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags) { STREAM* s; rdpRdp* rdp = input->context->rdp; @@ -204,13 +204,13 @@ void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UIN static BOOL input_recv_sync_event(rdpInput* input, STREAM* s) { - uint32 toggleFlags; + UINT32 toggleFlags; if (stream_get_left(s) < 6) return FALSE; stream_seek(s, 2); /* pad2Octets (2 bytes) */ - stream_read_uint32(s, toggleFlags); /* toggleFlags (4 bytes) */ + stream_read_UINT32(s, toggleFlags); /* toggleFlags (4 bytes) */ IFCALL(input->SynchronizeEvent, input, toggleFlags); @@ -386,7 +386,7 @@ void input_register_client_callbacks(rdpInput* input) } } -void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags) +void freerdp_input_send_synchronize_event(rdpInput* input, UINT32 flags) { IFCALL(input->SynchronizeEvent, input, flags); } @@ -396,7 +396,7 @@ void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 cod IFCALL(input->KeyboardEvent, input, flags, code); } -void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode) +void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, UINT32 rdp_scancode) { freerdp_input_send_keyboard_event(input, (RDP_SCANCODE_EXTENDED(rdp_scancode) ? KBD_FLAGS_EXTENDED : 0) | diff --git a/libfreerdp/core/input.h b/libfreerdp/core/input.h index 804eb3f16..291763e42 100644 --- a/libfreerdp/core/input.h +++ b/libfreerdp/core/input.h @@ -37,13 +37,13 @@ #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4 -void input_send_synchronize_event(rdpInput* input, uint32 flags); +void input_send_synchronize_event(rdpInput* input, UINT32 flags); void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); -void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags); +void input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags); void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); diff --git a/libfreerdp/core/license.c b/libfreerdp/core/license.c index 3b0d3fbbe..97aea5464 100644 --- a/libfreerdp/core/license.c +++ b/libfreerdp/core/license.c @@ -386,14 +386,14 @@ void license_decrypt_platform_challenge(rdpLicense* license) void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo) { - stream_read_uint32(s, productInfo->dwVersion); /* dwVersion (4 bytes) */ + stream_read_UINT32(s, productInfo->dwVersion); /* dwVersion (4 bytes) */ - stream_read_uint32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */ + stream_read_UINT32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */ productInfo->pbCompanyName = (BYTE*) malloc(productInfo->cbCompanyName); stream_read(s, productInfo->pbCompanyName, productInfo->cbCompanyName); - stream_read_uint32(s, productInfo->cbProductId); /* cbProductId (4 bytes) */ + stream_read_UINT32(s, productInfo->cbProductId); /* cbProductId (4 bytes) */ productInfo->pbProductId = (BYTE*) malloc(productInfo->cbProductId); stream_read(s, productInfo->pbProductId, productInfo->cbProductId); @@ -540,10 +540,10 @@ void license_free_binary_blob(LICENSE_BLOB* blob) void license_read_scope_list(STREAM* s, SCOPE_LIST* scopeList) { - uint32 i; - uint32 scopeCount; + UINT32 i; + UINT32 scopeCount; - stream_read_uint32(s, scopeCount); /* ScopeCount (4 bytes) */ + stream_read_UINT32(s, scopeCount); /* ScopeCount (4 bytes) */ scopeList->count = scopeCount; scopeList->array = (LICENSE_BLOB*) malloc(sizeof(LICENSE_BLOB) * scopeCount); @@ -581,7 +581,7 @@ SCOPE_LIST* license_new_scope_list() void license_free_scope_list(SCOPE_LIST* scopeList) { - uint32 i; + UINT32 i; /* * We must NOT call license_free_binary_blob() on each scopelist->array[i] element, @@ -691,11 +691,11 @@ void license_read_upgrade_license_packet(rdpLicense* license, STREAM* s) void license_read_error_alert_packet(rdpLicense* license, STREAM* s) { - uint32 dwErrorCode; - uint32 dwStateTransition; + UINT32 dwErrorCode; + UINT32 dwStateTransition; - stream_read_uint32(s, dwErrorCode); /* dwErrorCode (4 bytes) */ - stream_read_uint32(s, dwStateTransition); /* dwStateTransition (4 bytes) */ + stream_read_UINT32(s, dwErrorCode); /* dwErrorCode (4 bytes) */ + stream_read_UINT32(s, dwStateTransition); /* dwStateTransition (4 bytes) */ license_read_binary_blob(s, license->error_info); /* bbErrorInfo */ #ifdef WITH_DEBUG_LICENSE @@ -754,7 +754,7 @@ void license_write_platform_id(rdpLicense* license, STREAM* s) void license_write_new_license_request_packet(rdpLicense* license, STREAM* s) { - stream_write_uint32(s, KEY_EXCHANGE_ALG_RSA); /* PreferredKeyExchangeAlg (4 bytes) */ + stream_write_UINT32(s, KEY_EXCHANGE_ALG_RSA); /* PreferredKeyExchangeAlg (4 bytes) */ license_write_platform_id(license, s); /* PlatformId (4 bytes) */ stream_write(s, license->client_random, 32); /* ClientRandom (32 bytes) */ license_write_padded_binary_blob(s, license->encrypted_premaster_secret); /* EncryptedPremasterSecret */ @@ -879,8 +879,8 @@ BOOL license_send_valid_client_error_packet(rdpLicense* license) s = license_send_stream_init(license); - stream_write_uint32(s, STATUS_VALID_CLIENT); /* dwErrorCode */ - stream_write_uint32(s, ST_NO_TRANSITION); /* dwStateTransition */ + stream_write_UINT32(s, STATUS_VALID_CLIENT); /* dwErrorCode */ + stream_write_UINT32(s, ST_NO_TRANSITION); /* dwStateTransition */ license_write_binary_blob(s, license->error_info); diff --git a/libfreerdp/core/license.h b/libfreerdp/core/license.h index 4eb1bf863..2ce31a93a 100644 --- a/libfreerdp/core/license.h +++ b/libfreerdp/core/license.h @@ -100,10 +100,10 @@ typedef struct rdp_license rdpLicense; typedef struct { - uint32 dwVersion; - uint32 cbCompanyName; + UINT32 dwVersion; + UINT32 cbCompanyName; BYTE* pbCompanyName; - uint32 cbProductId; + UINT32 cbProductId; BYTE* pbProductId; } PRODUCT_INFO; @@ -116,7 +116,7 @@ typedef struct typedef struct { - uint32 count; + UINT32 count; LICENSE_BLOB* array; } SCOPE_LIST; diff --git a/libfreerdp/core/mcs.c b/libfreerdp/core/mcs.c index bdeb6f4df..6f9d549c1 100644 --- a/libfreerdp/core/mcs.c +++ b/libfreerdp/core/mcs.c @@ -233,7 +233,7 @@ void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, U */ static void mcs_init_domain_parameters(DomainParameters* domainParameters, - uint32 maxChannelIds, uint32 maxUserIds, uint32 maxTokenIds, uint32 maxMCSPDUsize) + UINT32 maxChannelIds, UINT32 maxUserIds, UINT32 maxTokenIds, UINT32 maxMCSPDUsize) { domainParameters->maxChannelIds = maxChannelIds; domainParameters->maxUserIds = maxUserIds; @@ -489,7 +489,7 @@ BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s) { int length; BYTE result; - uint32 calledConnectId; + UINT32 calledConnectId; tpkt_read_header(s); diff --git a/libfreerdp/core/mcs.h b/libfreerdp/core/mcs.h index 7276eda8c..93a34aceb 100644 --- a/libfreerdp/core/mcs.h +++ b/libfreerdp/core/mcs.h @@ -100,14 +100,14 @@ enum DomainMCSPDU typedef struct { - uint32 maxChannelIds; - uint32 maxUserIds; - uint32 maxTokenIds; - uint32 numPriorities; - uint32 minThroughput; - uint32 maxHeight; - uint32 maxMCSPDUsize; - uint32 protocolVersion; + UINT32 maxChannelIds; + UINT32 maxUserIds; + UINT32 maxTokenIds; + UINT32 numPriorities; + UINT32 minThroughput; + UINT32 maxHeight; + UINT32 maxMCSPDUsize; + UINT32 protocolVersion; } DomainParameters; struct rdp_mcs diff --git a/libfreerdp/core/nego.c b/libfreerdp/core/nego.c index 86cb44409..d5ef12106 100644 --- a/libfreerdp/core/nego.c +++ b/libfreerdp/core/nego.c @@ -234,7 +234,7 @@ int nego_transport_disconnect(rdpNego* nego) BOOL nego_send_preconnection_pdu(rdpNego* nego) { STREAM* s; - uint32 cbSize; + UINT32 cbSize; UINT16 cchPCB = 0; WCHAR* wszPCB = NULL; @@ -257,10 +257,10 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego) } s = transport_send_stream_init(nego->transport, cbSize); - stream_write_uint32(s, cbSize); /* cbSize */ - stream_write_uint32(s, 0); /* Flags */ - stream_write_uint32(s, PRECONNECTION_PDU_V2); /* Version */ - stream_write_uint32(s, nego->preconnection_id); /* Id */ + stream_write_UINT32(s, cbSize); /* cbSize */ + stream_write_UINT32(s, 0); /* Flags */ + stream_write_UINT32(s, PRECONNECTION_PDU_V2); /* Version */ + stream_write_UINT32(s, nego->preconnection_id); /* Id */ stream_write_UINT16(s, cchPCB); /* cchPCB */ if (wszPCB) @@ -591,7 +591,7 @@ BOOL nego_send_negotiation_request(rdpNego* nego) stream_write_BYTE(s, TYPE_RDP_NEG_REQ); stream_write_BYTE(s, 0); /* flags, must be set to zero */ stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */ - stream_write_uint32(s, nego->requested_protocols); /* requestedProtocols */ + stream_write_UINT32(s, nego->requested_protocols); /* requestedProtocols */ length += 8; } @@ -622,7 +622,7 @@ void nego_process_negotiation_request(rdpNego* nego, STREAM* s) stream_read_BYTE(s, flags); stream_read_UINT16(s, length); - stream_read_uint32(s, nego->requested_protocols); + stream_read_UINT32(s, nego->requested_protocols); DEBUG_NEGO("requested_protocols: %d", nego->requested_protocols); @@ -643,7 +643,7 @@ void nego_process_negotiation_response(rdpNego* nego, STREAM* s) stream_read_BYTE(s, nego->flags); stream_read_UINT16(s, length); - stream_read_uint32(s, nego->selected_protocol); + stream_read_UINT32(s, nego->selected_protocol); nego->state = NEGO_STATE_FINAL; } @@ -658,13 +658,13 @@ void nego_process_negotiation_failure(rdpNego* nego, STREAM* s) { BYTE flags; UINT16 length; - uint32 failureCode; + UINT32 failureCode; DEBUG_NEGO("RDP_NEG_FAILURE"); stream_read_BYTE(s, flags); stream_read_UINT16(s, length); - stream_read_uint32(s, failureCode); + stream_read_UINT32(s, failureCode); switch (failureCode) { @@ -719,7 +719,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego) stream_write_BYTE(s, TYPE_RDP_NEG_RSP); stream_write_BYTE(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */ stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */ - stream_write_uint32(s, nego->selected_protocol); /* selectedProtocol */ + stream_write_UINT32(s, nego->selected_protocol); /* selectedProtocol */ length += 8; } else if (!settings->rdp_security) @@ -732,7 +732,7 @@ BOOL nego_send_negotiation_response(rdpNego* nego) * like SSL_NOT_ALLOWED_BY_SERVER. */ printf("nego_send_negotiation_response: client supports only Standard RDP Security\n"); - stream_write_uint32(s, SSL_REQUIRED_BY_SERVER); + stream_write_UINT32(s, SSL_REQUIRED_BY_SERVER); length += 8; status = FALSE; } @@ -936,7 +936,7 @@ void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL send_pcpdu) * @param id */ -void nego_set_preconnection_id(rdpNego* nego, uint32 id) +void nego_set_preconnection_id(rdpNego* nego, UINT32 id) { nego->preconnection_id = id; } diff --git a/libfreerdp/core/nego.h b/libfreerdp/core/nego.h index 1416af018..a0b046270 100644 --- a/libfreerdp/core/nego.h +++ b/libfreerdp/core/nego.h @@ -76,21 +76,21 @@ enum RDP_NEG_MSG struct rdp_nego { int port; - uint32 flags; + UINT32 flags; char* hostname; char* cookie; BYTE* RoutingToken; DWORD RoutingTokenLength; BOOL send_preconnection_pdu; - uint32 preconnection_id; + UINT32 preconnection_id; char* preconnection_blob; NEGO_STATE state; BOOL tcp_connected; BOOL security_connected; - uint32 selected_protocol; - uint32 requested_protocols; + UINT32 selected_protocol; + UINT32 requested_protocols; BOOL security_layer_negotiation_enabled; BYTE enabled_protocols[3]; @@ -129,7 +129,7 @@ void nego_enable_tls(rdpNego* nego, BOOL enable_tls); void nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken, DWORD RoutingTokenLength); void nego_set_cookie(rdpNego* nego, char* cookie); void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL send_pcpdu); -void nego_set_preconnection_id(rdpNego* nego, uint32 id); +void nego_set_preconnection_id(rdpNego* nego, UINT32 id); void nego_set_preconnection_blob(rdpNego* nego, char* blob); #ifdef WITH_DEBUG_NEGO diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c index f28ca1ea9..aa6ab9ceb 100644 --- a/libfreerdp/core/orders.c +++ b/libfreerdp/core/orders.c @@ -142,7 +142,7 @@ static const BYTE BMF_BPP[] = 0, 1, 0, 8, 16, 24, 32 }; -static INLINE void update_read_coord(STREAM* s, sint32* coord, BOOL delta) +static INLINE void update_read_coord(STREAM* s, INT32* coord, BOOL delta) { INT8 lsi8; INT16 lsi16; @@ -159,7 +159,7 @@ static INLINE void update_read_coord(STREAM* s, sint32* coord, BOOL delta) } } -static INLINE void update_read_color(STREAM* s, uint32* color) +static INLINE void update_read_color(STREAM* s, UINT32* color) { BYTE byte; @@ -171,7 +171,7 @@ static INLINE void update_read_color(STREAM* s, uint32* color) *color |= (byte << 16); } -static INLINE void update_read_colorref(STREAM* s, uint32* color) +static INLINE void update_read_colorref(STREAM* s, UINT32* color) { BYTE byte; @@ -184,7 +184,7 @@ static INLINE void update_read_colorref(STREAM* s, uint32* color) stream_seek_BYTE(s); } -static INLINE void update_read_color_quad(STREAM* s, uint32* color) +static INLINE void update_read_color_quad(STREAM* s, UINT32* color) { BYTE byte; @@ -197,7 +197,7 @@ static INLINE void update_read_color_quad(STREAM* s, uint32* color) stream_seek_BYTE(s); } -static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) +static INLINE void update_read_2byte_unsigned(STREAM* s, UINT32* value) { BYTE byte; @@ -215,7 +215,7 @@ static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) } } -static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) +static INLINE void update_read_2byte_signed(STREAM* s, INT32* value) { BYTE byte; BOOL negative; @@ -236,7 +236,7 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) *value *= -1; } -static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) +static INLINE void update_read_4byte_unsigned(STREAM* s, UINT32* value) { BYTE byte; BYTE count; @@ -280,7 +280,7 @@ static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) } } -static INLINE void update_read_delta(STREAM* s, sint32* value) +static INLINE void update_read_delta(STREAM* s, INT32* value) { BYTE byte; @@ -864,7 +864,7 @@ void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* void update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP_ORDER* save_bitmap) { if (orderInfo->fieldFlags & ORDER_FIELD_01) - stream_read_uint32(s, save_bitmap->savedBitmapPosition); + stream_read_UINT32(s, save_bitmap->savedBitmapPosition); if (orderInfo->fieldFlags & ORDER_FIELD_02) update_read_coord(s, &save_bitmap->nLeftRect, orderInfo->deltaCoordinates); @@ -1242,8 +1242,8 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b if (cache_bitmap_v2_order->flags & CBR2_PERSISTENT_KEY_PRESENT) { - stream_read_uint32(s, cache_bitmap_v2_order->key1); /* key1 (4 bytes) */ - stream_read_uint32(s, cache_bitmap_v2_order->key2); /* key2 (4 bytes) */ + stream_read_UINT32(s, cache_bitmap_v2_order->key1); /* key1 (4 bytes) */ + stream_read_UINT32(s, cache_bitmap_v2_order->key2); /* key2 (4 bytes) */ } if (cache_bitmap_v2_order->flags & CBR2_HEIGHT_SAME_AS_WIDTH) @@ -1297,8 +1297,8 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b cache_bitmap_v3_order->bpp = CBR23_BPP[bitsPerPixelId]; stream_read_UINT16(s, cache_bitmap_v3_order->cacheIndex); /* cacheIndex (2 bytes) */ - stream_read_uint32(s, cache_bitmap_v3_order->key1); /* key1 (4 bytes) */ - stream_read_uint32(s, cache_bitmap_v3_order->key2); /* key2 (4 bytes) */ + stream_read_UINT32(s, cache_bitmap_v3_order->key1); /* key1 (4 bytes) */ + stream_read_UINT32(s, cache_bitmap_v3_order->key2); /* key2 (4 bytes) */ bitmapData = &cache_bitmap_v3_order->bitmapData; @@ -1308,7 +1308,7 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b stream_read_BYTE(s, bitmapData->codecID); /* codecID (1 byte) */ stream_read_UINT16(s, bitmapData->width); /* width (2 bytes) */ stream_read_UINT16(s, bitmapData->height); /* height (2 bytes) */ - stream_read_uint32(s, bitmapData->length); /* length (4 bytes) */ + stream_read_UINT32(s, bitmapData->length); /* length (4 bytes) */ if (bitmapData->data == NULL) bitmapData->data = (BYTE*) malloc(bitmapData->length); @@ -1321,7 +1321,7 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags) { int i; - uint32* colorTable; + UINT32* colorTable; stream_read_BYTE(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */ stream_read_BYTE(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */ @@ -1329,9 +1329,9 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac colorTable = cache_color_table_order->colorTable; if (colorTable == NULL) - colorTable = (uint32*) malloc(cache_color_table_order->numberColors * 4); + colorTable = (UINT32*) malloc(cache_color_table_order->numberColors * 4); else - colorTable = (uint32*) realloc(colorTable, cache_color_table_order->numberColors * 4); + colorTable = (UINT32*) realloc(colorTable, cache_color_table_order->numberColors * 4); for (i = 0; i < (int) cache_color_table_order->numberColors; i++) { @@ -1559,7 +1559,7 @@ void update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMA stream_read_UINT16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */ nineGridInfo = &(create_nine_grid_bitmap->nineGridInfo); - stream_read_uint32(s, nineGridInfo->flFlags); /* flFlags (4 bytes) */ + stream_read_UINT32(s, nineGridInfo->flFlags); /* flFlags (4 bytes) */ stream_read_UINT16(s, nineGridInfo->ulLeftWidth); /* ulLeftWidth (2 bytes) */ stream_read_UINT16(s, nineGridInfo->ulRightWidth); /* ulRightWidth (2 bytes) */ stream_read_UINT16(s, nineGridInfo->ulTopHeight); /* ulTopHeight (2 bytes) */ @@ -1569,7 +1569,7 @@ void update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMA void update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker) { - stream_read_uint32(s, frame_marker->action); /* action (4 bytes) */ + stream_read_UINT32(s, frame_marker->action); /* action (4 bytes) */ } void update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first) @@ -1581,7 +1581,7 @@ void update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_read_UINT16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */ if (stream_bitmap_first->bitmapFlags & STREAM_BITMAP_V2) - stream_read_uint32(s, stream_bitmap_first->bitmapSize); /* bitmapSize (4 bytes) */ + stream_read_UINT32(s, stream_bitmap_first->bitmapSize); /* bitmapSize (4 bytes) */ else stream_read_UINT16(s, stream_bitmap_first->bitmapSize); /* bitmapSize (2 bytes) */ @@ -1601,8 +1601,8 @@ void update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* d { stream_seek_BYTE(s); /* pad1Octet (1 byte) */ stream_read_UINT16(s, draw_gdiplus_first->cbSize); /* cbSize (2 bytes) */ - stream_read_uint32(s, draw_gdiplus_first->cbTotalSize); /* cbTotalSize (4 bytes) */ - stream_read_uint32(s, draw_gdiplus_first->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_first->cbTotalSize); /* cbTotalSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_first->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ stream_seek(s, draw_gdiplus_first->cbSize); /* emfRecords */ } @@ -1617,8 +1617,8 @@ void update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_ { stream_seek_BYTE(s); /* pad1Octet (1 byte) */ stream_read_UINT16(s, draw_gdiplus_end->cbSize); /* cbSize (2 bytes) */ - stream_read_uint32(s, draw_gdiplus_end->cbTotalSize); /* cbTotalSize (4 bytes) */ - stream_read_uint32(s, draw_gdiplus_end->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_end->cbTotalSize); /* cbTotalSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_end->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */ stream_seek(s, draw_gdiplus_end->cbSize); /* emfRecords */ } @@ -1628,7 +1628,7 @@ void update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FI stream_read_UINT16(s, draw_gdiplus_cache_first->cacheType); /* cacheType (2 bytes) */ stream_read_UINT16(s, draw_gdiplus_cache_first->cacheIndex); /* cacheIndex (2 bytes) */ stream_read_UINT16(s, draw_gdiplus_cache_first->cbSize); /* cbSize (2 bytes) */ - stream_read_uint32(s, draw_gdiplus_cache_first->cbTotalSize); /* cbTotalSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_cache_first->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_seek(s, draw_gdiplus_cache_first->cbSize); /* emfRecords */ } @@ -1647,11 +1647,11 @@ void update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_ stream_read_UINT16(s, draw_gdiplus_cache_end->cacheType); /* cacheType (2 bytes) */ stream_read_UINT16(s, draw_gdiplus_cache_end->cacheIndex); /* cacheIndex (2 bytes) */ stream_read_UINT16(s, draw_gdiplus_cache_end->cbSize); /* cbSize (2 bytes) */ - stream_read_uint32(s, draw_gdiplus_cache_end->cbTotalSize); /* cbTotalSize (4 bytes) */ + stream_read_UINT32(s, draw_gdiplus_cache_end->cbTotalSize); /* cbTotalSize (4 bytes) */ stream_seek(s, draw_gdiplus_cache_end->cbSize); /* emfRecords */ } -void update_read_field_flags(STREAM* s, uint32* fieldFlags, BYTE flags, BYTE fieldBytes) +void update_read_field_flags(STREAM* s, UINT32* fieldFlags, BYTE flags, BYTE fieldBytes) { int i; BYTE byte; diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index ed8f9a5e3..482983a9d 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -69,7 +69,7 @@ static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s) { BYTE type; UINT16 length; - uint32 share_id; + UINT32 share_id; BYTE compressed_type; UINT16 compressed_len; @@ -132,7 +132,7 @@ static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s) return FALSE; case DATA_PDU_TYPE_FRAME_ACKNOWLEDGE: - stream_read_uint32(s, client->ack_frame_id); + stream_read_UINT32(s, client->ack_frame_id); break; case DATA_PDU_TYPE_REFRESH_RECT: diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 4b16778eb..32f432f85 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -125,14 +125,14 @@ void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT1 stream_write_UINT16(s, channel_id); /* pduSource */ } -BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id, +BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, UINT32* share_id, BYTE *compressed_type, UINT16 *compressed_len) { if (stream_get_left(s) < 12) return FALSE; /* Share Data Header */ - stream_read_uint32(s, *share_id); /* shareId (4 bytes) */ + stream_read_UINT32(s, *share_id); /* shareId (4 bytes) */ stream_seek_BYTE(s); /* pad1 (1 byte) */ stream_seek_BYTE(s); /* streamId (1 byte) */ stream_read_UINT16(s, *length); /* uncompressedLength (2 bytes) */ @@ -142,14 +142,14 @@ BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* s return TRUE; } -void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id) +void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, UINT32 share_id) { length -= RDP_PACKET_HEADER_MAX_LENGTH; length -= RDP_SHARE_CONTROL_HEADER_LENGTH; length -= RDP_SHARE_DATA_HEADER_LENGTH; /* Share Data Header */ - stream_write_uint32(s, share_id); /* shareId (4 bytes) */ + stream_write_UINT32(s, share_id); /* shareId (4 bytes) */ stream_write_BYTE(s, 0); /* pad1 (1 byte) */ stream_write_BYTE(s, STREAM_LOW); /* streamId (1 byte) */ stream_write_UINT16(s, length); /* uncompressedLength (2 bytes) */ @@ -300,11 +300,11 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id) stream_write_UINT16_be(s, length); /* userData (OCTET_STRING) */ } -static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) +static UINT32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) { BYTE* data; - uint32 sec_flags; - uint32 pad = 0; + UINT32 sec_flags; + UINT32 pad = 0; sec_flags = rdp->sec_flags; @@ -355,9 +355,9 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length) return pad; } -static uint32 rdp_get_sec_bytes(rdpRdp* rdp) +static UINT32 rdp_get_sec_bytes(rdpRdp* rdp) { - uint32 sec_bytes; + UINT32 sec_bytes; if (rdp->sec_flags & SEC_ENCRYPT) { @@ -388,7 +388,7 @@ static uint32 rdp_get_sec_bytes(rdpRdp* rdp) BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id) { UINT16 length; - uint32 sec_bytes; + UINT32 sec_bytes; BYTE* sec_hold; length = stream_get_length(s); @@ -413,7 +413,7 @@ BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id) BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id) { UINT16 length; - uint32 sec_bytes; + UINT32 sec_bytes; BYTE* sec_hold; length = stream_get_length(s); @@ -440,7 +440,7 @@ BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id) BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id) { UINT16 length; - uint32 sec_bytes; + UINT32 sec_bytes; BYTE* sec_hold; length = stream_get_length(s); @@ -467,7 +467,7 @@ BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id) void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s) { - stream_read_uint32(s, rdp->errorInfo); /* errorInfo (4 bytes) */ + stream_read_UINT32(s, rdp->errorInfo); /* errorInfo (4 bytes) */ if (rdp->errorInfo != ERRINFO_SUCCESS) rdp_print_errinfo(rdp->errorInfo); @@ -477,11 +477,11 @@ BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s) { BYTE type; UINT16 length; - uint32 share_id; + UINT32 share_id; BYTE compressed_type; UINT16 compressed_len; - uint32 roff; - uint32 rlen; + UINT32 roff; + UINT32 rlen; STREAM* comp_stream; rdp_read_share_data_header(s, &length, &type, &share_id, &compressed_type, &compressed_len); diff --git a/libfreerdp/core/rdp.h b/libfreerdp/core/rdp.h index 35a73fab9..dc1a3a79d 100644 --- a/libfreerdp/core/rdp.h +++ b/libfreerdp/core/rdp.h @@ -140,7 +140,7 @@ struct rdp_rdp struct crypto_des3_struct* fips_encrypt; struct crypto_des3_struct* fips_decrypt; struct crypto_hmac_struct* fips_hmac; - uint32 sec_flags; + UINT32 sec_flags; BOOL do_crypt; BOOL do_secure_checksum; BYTE sign_key[16]; @@ -152,8 +152,8 @@ struct rdp_rdp BYTE fips_sign_key[20]; BYTE fips_encrypt_key[24]; BYTE fips_decrypt_key[24]; - uint32 errorInfo; - uint32 finalize_sc_pdus; + UINT32 errorInfo; + UINT32 finalize_sc_pdus; BOOL disconnect; }; @@ -163,10 +163,10 @@ void rdp_write_security_header(STREAM* s, UINT16 flags); BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id); void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id); -BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id, +BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, UINT32* share_id, BYTE *compressed_type, UINT16 *compressed_len); -void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id); +void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, UINT32 share_id); STREAM* rdp_send_stream_init(rdpRdp* rdp); diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 64699d82c..46f982a25 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -25,7 +25,7 @@ #include "redirection.h" -void rdp_print_redirection_flags(uint32 flags) +void rdp_print_redirection_flags(UINT32 flags) { printf("redirectionFlags = {\n"); @@ -67,8 +67,8 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) stream_read_UINT16(s, flags); /* flags (2 bytes) */ stream_read_UINT16(s, length); /* length (2 bytes) */ - stream_read_uint32(s, redirection->sessionID); /* sessionID (4 bytes) */ - stream_read_uint32(s, redirection->flags); /* redirFlags (4 bytes) */ + stream_read_UINT32(s, redirection->sessionID); /* sessionID (4 bytes) */ + stream_read_UINT32(s, redirection->flags); /* redirFlags (4 bytes) */ DEBUG_REDIR("flags: 0x%04X, length:%d, sessionID:0x%08X", flags, length, redirection->sessionID); @@ -84,7 +84,7 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) if (redirection->flags & LB_LOAD_BALANCE_INFO) { - stream_read_uint32(s, redirection->LoadBalanceInfoLength); + stream_read_UINT32(s, redirection->LoadBalanceInfoLength); redirection->LoadBalanceInfo = (BYTE*) malloc(redirection->LoadBalanceInfoLength); stream_read(s, redirection->LoadBalanceInfo, redirection->LoadBalanceInfoLength); #ifdef WITH_DEBUG_REDIR @@ -108,7 +108,7 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) if (redirection->flags & LB_PASSWORD) { /* Note: length (hopefully) includes double zero termination */ - stream_read_uint32(s, redirection->PasswordCookieLength); + stream_read_UINT32(s, redirection->PasswordCookieLength); redirection->PasswordCookie = (BYTE*) malloc(redirection->PasswordCookieLength); stream_read(s, redirection->PasswordCookie, redirection->PasswordCookieLength); @@ -139,12 +139,12 @@ BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s) if (redirection->flags & LB_TARGET_NET_ADDRESSES) { int i; - uint32 count; - uint32 targetNetAddressesLength; + UINT32 count; + UINT32 targetNetAddressesLength; - stream_read_uint32(s, targetNetAddressesLength); + stream_read_UINT32(s, targetNetAddressesLength); - stream_read_uint32(s, redirection->targetNetAddressesCount); + stream_read_UINT32(s, redirection->targetNetAddressesCount); count = redirection->targetNetAddressesCount; redirection->targetNetAddresses = (rdpString*) xzalloc(count * sizeof(rdpString)); diff --git a/libfreerdp/core/redirection.h b/libfreerdp/core/redirection.h index d57b6980d..cf9e91df3 100644 --- a/libfreerdp/core/redirection.h +++ b/libfreerdp/core/redirection.h @@ -44,8 +44,8 @@ struct rdp_redirection { - uint32 flags; - uint32 sessionID; + UINT32 flags; + UINT32 sessionID; rdpString tsvUrl; rdpString username; rdpString domain; @@ -56,7 +56,7 @@ struct rdp_redirection DWORD LoadBalanceInfoLength; rdpString targetNetBiosName; rdpString targetNetAddress; - uint32 targetNetAddressesCount; + UINT32 targetNetAddressesCount; rdpString* targetNetAddresses; }; typedef struct rdp_redirection rdpRedirection; diff --git a/libfreerdp/core/rpc.c b/libfreerdp/core/rpc.c index 07e5427c0..98709f725 100644 --- a/libfreerdp/core/rpc.c +++ b/libfreerdp/core/rpc.c @@ -321,7 +321,7 @@ void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header) stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ - stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */ + stream_read_UINT32(s, header->call_id); /* call_id (4 bytes) */ } int rpc_out_write(rdpRpc* rpc, BYTE* data, int length) @@ -781,7 +781,7 @@ int rpc_read(rdpRpc* rpc, BYTE* data, int length) UINT16 frag_length; UINT16 auth_length; BYTE auth_pad_length; - uint32 call_id = -1; + UINT32 call_id = -1; int rpc_length = length + 0xFF; BYTE* rpc_data = malloc(rpc_length); @@ -793,7 +793,7 @@ int rpc_read(rdpRpc* rpc, BYTE* data, int length) if (rpc->read_buffer_len > 0) { - if (rpc->read_buffer_len > (uint32) length) + if (rpc->read_buffer_len > (UINT32) length) { printf("rpc_read error: receiving buffer is not large enough\n"); free(rpc_data); @@ -827,8 +827,8 @@ int rpc_read(rdpRpc* rpc, BYTE* data, int length) frag_length = *(UINT16*)(rpc_data + 8); auth_length = *(UINT16*)(rpc_data + 10); - call_id = *(uint32*)(rpc_data + 12); - status = *(uint32*)(rpc_data + 16); /* alloc_hint */ + call_id = *(UINT32*)(rpc_data + 12); + status = *(UINT32*)(rpc_data + 16); /* alloc_hint */ auth_pad_length = *(rpc_data + frag_length - auth_length - 6); /* -6 = -8 + 2 (sec_trailer + 2) */ /* data_length must be calculated because alloc_hint carries size of more than one pdu */ diff --git a/libfreerdp/core/rpc.h b/libfreerdp/core/rpc.h index 0f9926f95..619ac8119 100644 --- a/libfreerdp/core/rpc.h +++ b/libfreerdp/core/rpc.h @@ -51,7 +51,7 @@ struct _rpc_pdu_header BYTE packed_drep[4]; UINT16 frag_length; UINT16 auth_length; - uint32 call_id; + UINT32 call_id; }; typedef struct _rpc_pdu_header RPC_PDU_HEADER; @@ -59,7 +59,7 @@ typedef UINT16 p_context_id_t; typedef struct { uuid if_uuid; - uint32 if_version; + UINT32 if_version; } p_syntax_id_t; typedef struct { @@ -139,7 +139,7 @@ typedef struct { BYTE rpc_vers_minor; BYTE reserved[2];/* must be zero */ BYTE packed_drep[4]; - uint32 reject_status; + UINT32 reject_status; BYTE reserved2[4]; } rpcrt_optional_data_t; @@ -161,7 +161,7 @@ typedef struct{ BYTE auth_level; /* :01 which level within service */ BYTE auth_pad_length; /* :01 */ BYTE auth_reserved; /* :01 reserved, m.b.z. */ - uint32 auth_context_id; /* :04 */ + UINT32 auth_context_id; /* :04 */ BYTE* auth_value; /* credentials; size_is(auth_length) */ } auth_verifier_co_t; @@ -178,13 +178,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ UINT16 max_xmit_frag; /* ignored */ UINT16 max_recv_frag; /* ignored */ - uint32 assoc_group_id; /* ignored */ + UINT32 assoc_group_id; /* ignored */ /* presentation context list */ @@ -209,13 +209,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ UINT16 max_xmit_frag; /* ignored */ UINT16 max_recv_frag; /* ignored */ - uint32 assoc_group_id; /* ignored */ + UINT32 assoc_group_id; /* ignored */ port_any_t sec_addr; /* ignored */ /* restore 4-octet alignment */ @@ -244,13 +244,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ UINT16 max_xmit_frag; /* 16:02 max transmit frag size, bytes */ UINT16 max_recv_frag; /* 18:02 max receive frag size, bytes */ - uint32 assoc_group_id; /* 20:04 incarnation of client-server + UINT32 assoc_group_id; /* 20:04 incarnation of client-server * assoc group */ /* presentation context list */ @@ -273,13 +273,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ UINT16 max_xmit_frag; /* 16:02 max transmit frag size */ UINT16 max_recv_frag; /* 18:02 max receive frag size */ - uint32 assoc_group_id; /* 20:04 returned assoc_group_id */ + UINT32 assoc_group_id; /* 20:04 returned assoc_group_id */ port_any_t sec_addr; /* 24:yy optional secondary address * for process incarnation; local port * part of address only */ @@ -308,7 +308,7 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -332,7 +332,7 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -355,7 +355,7 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -377,13 +377,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ /* needed for request, response, fault */ - uint32 alloc_hint; /* 16:04 allocation hint */ + UINT32 alloc_hint; /* 16:04 allocation hint */ p_context_id_t p_cont_id; /* 20:02 pres context, i.e. data rep */ /* needed for response or fault */ @@ -393,7 +393,7 @@ typedef struct { /* fault code */ - uint32 status; /* 24:04 run-time fault code or zero */ + UINT32 status; /* 24:04 run-time fault code or zero */ /* always pad to next 8-octet boundary */ @@ -423,7 +423,7 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ @@ -445,13 +445,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ /* needed on request, response, fault */ - uint32 alloc_hint; /* 16:04 allocation hint */ + UINT32 alloc_hint; /* 16:04 allocation hint */ p_context_id_t p_cont_id; /* 20:02 pres context, i.e. data rep */ UINT16 opnum; /* 22:02 operation # * within the interface */ @@ -484,13 +484,13 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 length of auth_value */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ /* needed for request, response, fault */ - uint32 alloc_hint; /* 16:04 allocation hint */ + UINT32 alloc_hint; /* 16:04 allocation hint */ p_context_id_t p_cont_id; /* 20:02 pres context, i.e. * data rep */ @@ -523,7 +523,7 @@ typedef struct { BYTE packed_drep[4]; /* 04:04 NDR data rep format label*/ UINT16 frag_length; /* 08:02 total length of fragment */ UINT16 auth_length; /* 10:02 */ - uint32 call_id; /* 12:04 call identifier */ + UINT32 call_id; /* 12:04 call identifier */ /* end common fields */ } rpcconn_shutdown_hdr_t; @@ -568,9 +568,9 @@ struct rdp_ntlm_http struct rpc_ping_originator { - uint32 ConnectionTimeout; - uint32 LastPacketSentTimestamp; - uint32 KeepAliveInterval; + UINT32 ConnectionTimeout; + UINT32 LastPacketSentTimestamp; + UINT32 KeepAliveInterval; }; typedef struct rpc_ping_originator RpcPingOriginator; @@ -580,11 +580,11 @@ struct rpc_in_channel { /* Sending Channel */ - uint32 PlugState; + UINT32 PlugState; void* SendQueue; - uint32 BytesSent; - uint32 SenderAvailableWindow; - uint32 PeerReceiveWindow; + UINT32 BytesSent; + UINT32 SenderAvailableWindow; + UINT32 PeerReceiveWindow; /* Ping Originator */ @@ -598,11 +598,11 @@ struct rpc_out_channel { /* Receiving Channel */ - uint32 ReceiveWindow; - uint32 ReceiveWindowSize; - uint32 ReceiverAvailableWindow; - uint32 BytesReceived; - uint32 AvailableWindowAdvertised; + UINT32 ReceiveWindow; + UINT32 ReceiveWindowSize; + UINT32 ReceiverAvailableWindow; + UINT32 BytesReceived; + UINT32 AvailableWindowAdvertised; }; typedef struct rpc_out_channel RpcOutChannel; @@ -650,14 +650,14 @@ struct rdp_rpc rdpTransport* transport; BYTE* write_buffer; - uint32 write_buffer_len; + UINT32 write_buffer_len; BYTE* read_buffer; - uint32 read_buffer_len; + UINT32 read_buffer_len; - uint32 call_id; - uint32 pipe_call_id; + UINT32 call_id; + UINT32 pipe_call_id; - uint32 ReceiveWindow; + UINT32 ReceiveWindow; RpcVirtualConnection* VirtualConnection; }; diff --git a/libfreerdp/core/rts.c b/libfreerdp/core/rts.c index d3e2af35c..04d99bc70 100644 --- a/libfreerdp/core/rts.c +++ b/libfreerdp/core/rts.c @@ -134,7 +134,7 @@ void rts_pdu_header_read(STREAM* s, RTS_PDU_HEADER* header) stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ - stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */ + stream_read_UINT32(s, header->call_id); /* call_id (4 bytes) */ stream_read_UINT16(s, header->flags); /* flags (2 bytes) */ stream_read_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ } @@ -151,49 +151,49 @@ void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header) stream_write_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */ stream_write_UINT16(s, header->frag_length); /* frag_length (2 bytes) */ stream_write_UINT16(s, header->auth_length); /* auth_length (2 bytes) */ - stream_write_uint32(s, header->call_id); /* call_id (4 bytes) */ + stream_write_UINT32(s, header->call_id); /* call_id (4 bytes) */ stream_write_UINT16(s, header->flags); /* flags (2 bytes) */ stream_write_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */ } void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* ReceiveWindowSize (4 bytes) */ + stream_seek_UINT32(s); /* ReceiveWindowSize (4 bytes) */ } -void rts_receive_window_size_command_write(STREAM* s, uint32 ReceiveWindowSize) +void rts_receive_window_size_command_write(STREAM* s, UINT32 ReceiveWindowSize) { - stream_write_uint32(s, RTS_CMD_RECEIVE_WINDOW_SIZE); /* CommandType (4 bytes) */ - stream_write_uint32(s, ReceiveWindowSize); /* ReceiveWindowSize (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_RECEIVE_WINDOW_SIZE); /* CommandType (4 bytes) */ + stream_write_UINT32(s, ReceiveWindowSize); /* ReceiveWindowSize (4 bytes) */ } void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s) { /* Ack (24 bytes) */ - stream_seek_uint32(s); /* BytesReceived (4 bytes) */ - stream_seek_uint32(s); /* AvailableWindow (4 bytes) */ + stream_seek_UINT32(s); /* BytesReceived (4 bytes) */ + stream_seek_UINT32(s); /* AvailableWindow (4 bytes) */ stream_seek(s, 16); /* ChannelCookie (16 bytes) */ } -void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie) +void rts_flow_control_ack_command_write(STREAM* s, UINT32 BytesReceived, UINT32 AvailableWindow, BYTE* ChannelCookie) { - stream_write_uint32(s, RTS_CMD_FLOW_CONTROL_ACK); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_FLOW_CONTROL_ACK); /* CommandType (4 bytes) */ /* Ack (24 bytes) */ - stream_write_uint32(s, BytesReceived); /* BytesReceived (4 bytes) */ - stream_write_uint32(s, AvailableWindow); /* AvailableWindow (4 bytes) */ + stream_write_UINT32(s, BytesReceived); /* BytesReceived (4 bytes) */ + stream_write_UINT32(s, AvailableWindow); /* AvailableWindow (4 bytes) */ stream_write(s, ChannelCookie, 16); /* ChannelCookie (16 bytes) */ } void rts_connection_timeout_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* ConnectionTimeout (4 bytes) */ + stream_seek_UINT32(s); /* ConnectionTimeout (4 bytes) */ } -void rts_connection_timeout_command_write(STREAM* s, uint32 ConnectionTimeout) +void rts_connection_timeout_command_write(STREAM* s, UINT32 ConnectionTimeout) { - stream_write_uint32(s, RTS_CMD_CONNECTION_TIMEOUT); /* CommandType (4 bytes) */ - stream_write_uint32(s, ConnectionTimeout); /* ConnectionTimeout (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_CONNECTION_TIMEOUT); /* CommandType (4 bytes) */ + stream_write_UINT32(s, ConnectionTimeout); /* ConnectionTimeout (4 bytes) */ } void rts_cookie_command_read(rdpRpc* rpc, STREAM* s) @@ -203,41 +203,41 @@ void rts_cookie_command_read(rdpRpc* rpc, STREAM* s) void rts_cookie_command_write(STREAM* s, BYTE* Cookie) { - stream_write_uint32(s, RTS_CMD_COOKIE); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_COOKIE); /* CommandType (4 bytes) */ stream_write(s, Cookie, 16); /* Cookie (16 bytes) */ } void rts_channel_lifetime_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* ChannelLifetime (4 bytes) */ + stream_seek_UINT32(s); /* ChannelLifetime (4 bytes) */ } -void rts_channel_lifetime_command_write(STREAM* s, uint32 ChannelLifetime) +void rts_channel_lifetime_command_write(STREAM* s, UINT32 ChannelLifetime) { - stream_write_uint32(s, RTS_CMD_CHANNEL_LIFETIME); /* CommandType (4 bytes) */ - stream_write_uint32(s, ChannelLifetime); /* ChannelLifetime (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_CHANNEL_LIFETIME); /* CommandType (4 bytes) */ + stream_write_UINT32(s, ChannelLifetime); /* ChannelLifetime (4 bytes) */ } void rts_client_keepalive_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* ClientKeepalive (4 bytes) */ + stream_seek_UINT32(s); /* ClientKeepalive (4 bytes) */ } -void rts_client_keepalive_command_write(STREAM* s, uint32 ClientKeepalive) +void rts_client_keepalive_command_write(STREAM* s, UINT32 ClientKeepalive) { - stream_write_uint32(s, RTS_CMD_CLIENT_KEEPALIVE); /* CommandType (4 bytes) */ - stream_write_uint32(s, ClientKeepalive); /* ClientKeepalive (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_CLIENT_KEEPALIVE); /* CommandType (4 bytes) */ + stream_write_UINT32(s, ClientKeepalive); /* ClientKeepalive (4 bytes) */ } void rts_version_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* Version (4 bytes) */ + stream_seek_UINT32(s); /* Version (4 bytes) */ } void rts_version_command_write(STREAM* s) { - stream_write_uint32(s, RTS_CMD_VERSION); /* CommandType (4 bytes) */ - stream_write_uint32(s, 1); /* Version (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_VERSION); /* CommandType (4 bytes) */ + stream_write_UINT32(s, 1); /* Version (4 bytes) */ } void rts_empty_command_read(rdpRpc* rpc, STREAM* s) @@ -247,20 +247,20 @@ void rts_empty_command_read(rdpRpc* rpc, STREAM* s) void rts_empty_command_write(STREAM* s) { - stream_write_uint32(s, RTS_CMD_EMPTY); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_EMPTY); /* CommandType (4 bytes) */ } void rts_padding_command_read(rdpRpc* rpc, STREAM* s) { - uint32 ConformanceCount; + UINT32 ConformanceCount; - stream_read_uint32(s, ConformanceCount); /* ConformanceCount (4 bytes) */ + stream_read_UINT32(s, ConformanceCount); /* ConformanceCount (4 bytes) */ stream_seek(s, ConformanceCount); /* Padding (variable) */ } -void rts_padding_command_write(STREAM* s, uint32 ConformanceCount) +void rts_padding_command_write(STREAM* s, UINT32 ConformanceCount) { - stream_write_uint32(s, ConformanceCount); /* ConformanceCount (4 bytes) */ + stream_write_UINT32(s, ConformanceCount); /* ConformanceCount (4 bytes) */ stream_write_zero(s, ConformanceCount); /* Padding (variable) */ } @@ -271,7 +271,7 @@ void rts_negative_ance_command_read(rdpRpc* rpc, STREAM* s) void rts_negative_ance_command_write(STREAM* s) { - stream_write_uint32(s, RTS_CMD_NEGATIVE_ANCE); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_NEGATIVE_ANCE); /* CommandType (4 bytes) */ } void rts_ance_command_read(rdpRpc* rpc, STREAM* s) @@ -281,14 +281,14 @@ void rts_ance_command_read(rdpRpc* rpc, STREAM* s) void rts_ance_command_write(STREAM* s) { - stream_write_uint32(s, RTS_CMD_ANCE); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_ANCE); /* CommandType (4 bytes) */ } void rts_client_address_command_read(rdpRpc* rpc, STREAM* s) { - uint32 AddressType; + UINT32 AddressType; - stream_read_uint32(s, AddressType); /* AddressType (4 bytes) */ + stream_read_UINT32(s, AddressType); /* AddressType (4 bytes) */ if (AddressType == 0) { @@ -302,10 +302,10 @@ void rts_client_address_command_read(rdpRpc* rpc, STREAM* s) stream_seek(s, 12); /* padding (12 bytes) */ } -void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress) +void rts_client_address_command_write(STREAM* s, UINT32 AddressType, BYTE* ClientAddress) { - stream_write_uint32(s, RTS_CMD_CLIENT_ADDRESS); /* CommandType (4 bytes) */ - stream_write_uint32(s, AddressType); /* AddressType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_CLIENT_ADDRESS); /* CommandType (4 bytes) */ + stream_write_UINT32(s, AddressType); /* AddressType (4 bytes) */ if (AddressType == 0) { @@ -326,30 +326,30 @@ void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s) void rts_association_group_id_command_write(STREAM* s, BYTE* associationGroupId) { - stream_write_uint32(s, RTS_CMD_ASSOCIATION_GROUP_ID); /* CommandType (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_ASSOCIATION_GROUP_ID); /* CommandType (4 bytes) */ stream_write(s, associationGroupId, 16); /* AssociationGroupId (16 bytes) */ } void rts_destination_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* Destination (4 bytes) */ + stream_seek_UINT32(s); /* Destination (4 bytes) */ } -void rts_destination_command_write(STREAM* s, uint32 Destination) +void rts_destination_command_write(STREAM* s, UINT32 Destination) { - stream_write_uint32(s, RTS_CMD_DESTINATION); /* CommandType (4 bytes) */ - stream_write_uint32(s, Destination); /* Destination (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_DESTINATION); /* CommandType (4 bytes) */ + stream_write_UINT32(s, Destination); /* Destination (4 bytes) */ } void rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, STREAM* s) { - stream_seek_uint32(s); /* PingTrafficSent (4 bytes) */ + stream_seek_UINT32(s); /* PingTrafficSent (4 bytes) */ } -void rts_ping_traffic_sent_notify_command_write(STREAM* s, uint32 PingTrafficSent) +void rts_ping_traffic_sent_notify_command_write(STREAM* s, UINT32 PingTrafficSent) { - stream_write_uint32(s, RTS_CMD_PING_TRAFFIC_SENT_NOTIFY); /* CommandType (4 bytes) */ - stream_write_uint32(s, PingTrafficSent); /* PingTrafficSent (4 bytes) */ + stream_write_UINT32(s, RTS_CMD_PING_TRAFFIC_SENT_NOTIFY); /* CommandType (4 bytes) */ + stream_write_UINT32(s, PingTrafficSent); /* PingTrafficSent (4 bytes) */ } void rpc_generate_cookie(BYTE* cookie) @@ -361,7 +361,7 @@ BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; - uint32 ReceiveWindowSize; + UINT32 ReceiveWindowSize; BYTE* OUTChannelCookie; BYTE* VirtualConnectionCookie; @@ -490,8 +490,8 @@ BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc) { STREAM* s; RTS_PDU_HEADER header; - uint32 BytesReceived; - uint32 AvailableWindow; + UINT32 BytesReceived; + UINT32 AvailableWindow; BYTE* ChannelCookie; header.rpc_vers = 5; @@ -566,7 +566,7 @@ int rts_recv_pdu_commands(rdpRpc* rpc, RTS_PDU* rts_pdu) { int i; STREAM* s; - uint32 CommandType; + UINT32 CommandType; DEBUG_RTS("numberOfCommands:%d", rts_pdu->header.numberOfCommands); @@ -581,7 +581,7 @@ int rts_recv_pdu_commands(rdpRpc* rpc, RTS_PDU* rts_pdu) for (i = 0; i < rts_pdu->header.numberOfCommands; i++) { - stream_read_uint32(s, CommandType); /* CommandType (4 bytes) */ + stream_read_UINT32(s, CommandType); /* CommandType (4 bytes) */ DEBUG_RTS("CommandType: %s (0x%08X)", RTS_CMD_STRINGS[CommandType % 14], CommandType); diff --git a/libfreerdp/core/rts.h b/libfreerdp/core/rts.h index 8b2df4880..7cab90011 100644 --- a/libfreerdp/core/rts.h +++ b/libfreerdp/core/rts.h @@ -100,7 +100,7 @@ struct _rts_pdu_header BYTE packed_drep[4]; UINT16 frag_length; UINT16 auth_length; - uint32 call_id; + UINT32 call_id; UINT16 flags; UINT16 numberOfCommands; }; @@ -119,35 +119,35 @@ void rts_pdu_header_read(STREAM* s, RTS_PDU_HEADER* header); void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header); void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s); -void rts_receive_window_size_command_write(STREAM* s, uint32 ReceiveWindowSize); +void rts_receive_window_size_command_write(STREAM* s, UINT32 ReceiveWindowSize); void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s); -void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie); +void rts_flow_control_ack_command_write(STREAM* s, UINT32 BytesReceived, UINT32 AvailableWindow, BYTE* ChannelCookie); void rts_connection_timeout_command_read(rdpRpc* rpc, STREAM* s); -void rts_connection_timeout_command_write(STREAM* s, uint32 ConnectionTimeout); +void rts_connection_timeout_command_write(STREAM* s, UINT32 ConnectionTimeout); void rts_cookie_command_read(rdpRpc* rpc, STREAM* s); void rts_cookie_command_write(STREAM* s, BYTE* Cookie); void rts_channel_lifetime_command_read(rdpRpc* rpc, STREAM* s); -void rts_channel_lifetime_command_write(STREAM* s, uint32 ChannelLifetime); +void rts_channel_lifetime_command_write(STREAM* s, UINT32 ChannelLifetime); void rts_client_keepalive_command_read(rdpRpc* rpc, STREAM* s); -void rts_client_keepalive_command_write(STREAM* s, uint32 ClientKeepalive); +void rts_client_keepalive_command_write(STREAM* s, UINT32 ClientKeepalive); void rts_version_command_read(rdpRpc* rpc, STREAM* s); void rts_version_command_write(STREAM* s); void rts_empty_command_read(rdpRpc* rpc, STREAM* s); void rts_empty_command_write(STREAM* s); void rts_padding_command_read(rdpRpc* rpc, STREAM* s); -void rts_padding_command_write(STREAM* s, uint32 ConformanceCount); +void rts_padding_command_write(STREAM* s, UINT32 ConformanceCount); void rts_negative_ance_command_read(rdpRpc* rpc, STREAM* s); void rts_negative_ance_command_write(STREAM* s); void rts_ance_command_read(rdpRpc* rpc, STREAM* s); void rts_ance_command_write(STREAM* s); void rts_client_address_command_read(rdpRpc* rpc, STREAM* s); -void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress); +void rts_client_address_command_write(STREAM* s, UINT32 AddressType, BYTE* ClientAddress); void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s); void rts_association_group_id_command_write(STREAM* s, BYTE* AssociationGroupId); void rts_destination_command_read(rdpRpc* rpc, STREAM* s); -void rts_destination_command_write(STREAM* s, uint32 Destination); +void rts_destination_command_write(STREAM* s, UINT32 Destination); void rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, STREAM* s); -void rts_ping_traffic_sent_notify_command_write(STREAM* s, uint32 PingTrafficSent); +void rts_ping_traffic_sent_notify_command_write(STREAM* s, UINT32 PingTrafficSent); BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc); BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc); diff --git a/libfreerdp/core/security.c b/libfreerdp/core/security.c index 7e810aac8..29c50cdfd 100644 --- a/libfreerdp/core/security.c +++ b/libfreerdp/core/security.c @@ -192,7 +192,7 @@ void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_rand security_md5_16_32_32(&session_key_blob[16], client_random, server_random, output); } -void security_uint32_le(BYTE* output, uint32 value) +void security_UINT32_le(BYTE* output, UINT32 value) { output[0] = (value) & 0xFF; output[1] = (value >> 8) & 0xFF; @@ -200,7 +200,7 @@ void security_uint32_le(BYTE* output, uint32 value) output[3] = (value >> 24) & 0xFF; } -void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output) +void security_mac_data(BYTE* mac_salt_key, BYTE* data, UINT32 length, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; @@ -209,7 +209,7 @@ void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* outp /* MacData = MD5(MacSaltKey + pad2 + SHA1(MacSaltKey + pad1 + length + data)) */ - security_uint32_le(length_le, length); /* length must be little-endian */ + security_UINT32_le(length_le, length); /* length must be little-endian */ /* SHA1_Digest = SHA1(MacSaltKey + pad1 + length + data) */ sha1 = crypto_sha1_init(); @@ -227,7 +227,7 @@ void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* outp crypto_md5_final(md5, output); } -void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output) +void security_mac_signature(rdpRdp *rdp, BYTE* data, UINT32 length, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; @@ -235,7 +235,7 @@ void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; - security_uint32_le(length_le, length); /* length must be little-endian */ + security_UINT32_le(length_le, length); /* length must be little-endian */ /* SHA1_Digest = SHA1(MACKeyN + pad1 + length + data) */ sha1 = crypto_sha1_init(); @@ -255,7 +255,7 @@ void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output memcpy(output, md5_digest, 8); } -void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output) +void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, UINT32 length, BOOL encryption, BYTE* output) { CryptoMd5 md5; CryptoSha1 sha1; @@ -264,10 +264,10 @@ void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH]; BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH]; - security_uint32_le(length_le, length); /* length must be little-endian */ + security_UINT32_le(length_le, length); /* length must be little-endian */ if (encryption) { - security_uint32_le(use_count_le, rdp->encrypt_checksum_use_count); + security_UINT32_le(use_count_le, rdp->encrypt_checksum_use_count); } else { @@ -276,7 +276,7 @@ void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL * decrypt it, which means decrypt_checksum_use_count is * off by one. */ - security_uint32_le(use_count_le, rdp->decrypt_checksum_use_count - 1); + security_UINT32_le(use_count_le, rdp->decrypt_checksum_use_count - 1); } /* SHA1_Digest = SHA1(MACKeyN + pad1 + length + data) */ @@ -500,7 +500,7 @@ void security_hmac_signature(BYTE* data, int length, BYTE* output, rdpRdp* rdp) BYTE buf[20]; BYTE use_count_le[4]; - security_uint32_le(use_count_le, rdp->encrypt_use_count); + security_UINT32_le(use_count_le, rdp->encrypt_use_count); crypto_hmac_sha1_init(rdp->fips_hmac, rdp->fips_sign_key, 20); crypto_hmac_update(rdp->fips_hmac, data, length); @@ -528,7 +528,7 @@ BOOL security_fips_check_signature(BYTE* data, int length, BYTE* sig, rdpRdp* rd BYTE buf[20]; BYTE use_count_le[4]; - security_uint32_le(use_count_le, rdp->decrypt_use_count); + security_UINT32_le(use_count_le, rdp->decrypt_use_count); crypto_hmac_sha1_init(rdp->fips_hmac, rdp->fips_sign_key, 20); crypto_hmac_update(rdp->fips_hmac, data, length); diff --git a/libfreerdp/core/security.h b/libfreerdp/core/security.h index cca4fa784..c493921f1 100644 --- a/libfreerdp/core/security.h +++ b/libfreerdp/core/security.h @@ -30,10 +30,10 @@ void security_master_secret(BYTE* premaster_secret, BYTE* client_random, BYTE* s void security_session_key_blob(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output); void security_mac_salt_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output); void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output); -void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output); +void security_mac_data(BYTE* mac_salt_key, BYTE* data, UINT32 length, BYTE* output); -void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output); -void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output); +void security_mac_signature(rdpRdp *rdp, BYTE* data, UINT32 length, BYTE* output); +void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, UINT32 length, BOOL encryption, BYTE* output); BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp); BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp); diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c index fe81d875f..59a15102f 100644 --- a/libfreerdp/core/surface.c +++ b/libfreerdp/core/surface.c @@ -39,7 +39,7 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s) stream_read_BYTE(s, cmd->codecID); stream_read_UINT16(s, cmd->width); stream_read_UINT16(s, cmd->height); - stream_read_uint32(s, cmd->bitmapDataLength); + stream_read_UINT32(s, cmd->bitmapDataLength); pos = stream_get_pos(s) + cmd->bitmapDataLength; cmd->bitmapData = stream_get_tail(s); @@ -50,12 +50,12 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s) return 20 + cmd->bitmapDataLength; } -static void update_send_frame_acknowledge(rdpRdp* rdp, uint32 frameId) +static void update_send_frame_acknowledge(rdpRdp* rdp, UINT32 frameId) { STREAM* s; s = rdp_data_pdu_init(rdp); - stream_write_uint32(s, frameId); + stream_write_UINT32(s, frameId); rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FRAME_ACKNOWLEDGE, rdp->mcs->user_id); } @@ -64,7 +64,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s) SURFACE_FRAME_MARKER* marker = &update->surface_frame_marker; stream_read_UINT16(s, marker->frameAction); - stream_read_uint32(s, marker->frameId); + stream_read_UINT32(s, marker->frameId); IFCALL(update->SurfaceFrameMarker, update->context, marker); @@ -76,11 +76,11 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s) return 6; } -BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s) +BOOL update_recv_surfcmds(rdpUpdate* update, UINT32 size, STREAM* s) { BYTE* mark; UINT16 cmdType; - uint32 cmdLength; + UINT32 cmdLength; while (size > 2) { @@ -131,16 +131,16 @@ void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* c stream_write_BYTE(s, cmd->codecID); stream_write_UINT16(s, cmd->width); stream_write_UINT16(s, cmd->height); - stream_write_uint32(s, cmd->bitmapDataLength); + stream_write_UINT32(s, cmd->bitmapDataLength); } -void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId) +void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, UINT32 frameId) { stream_check_size(s, SURFCMD_FRAME_MARKER_LENGTH); stream_write_UINT16(s, CMDTYPE_FRAME_MARKER); stream_write_UINT16(s, frameAction); - stream_write_uint32(s, frameId); + stream_write_UINT32(s, frameId); } diff --git a/libfreerdp/core/surface.h b/libfreerdp/core/surface.h index 3890e0fd1..82dda2491 100644 --- a/libfreerdp/core/surface.h +++ b/libfreerdp/core/surface.h @@ -33,10 +33,10 @@ enum SURFCMD_CMDTYPE CMDTYPE_STREAM_SURFACE_BITS = 0x0006 }; -BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s); +BOOL update_recv_surfcmds(rdpUpdate* update, UINT32 size, STREAM* s); void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd); -void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId); +void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, UINT32 frameId); #endif /* __SURFACE */ diff --git a/libfreerdp/core/tcp.c b/libfreerdp/core/tcp.c index 9be5cde90..59bad4622 100644 --- a/libfreerdp/core/tcp.c +++ b/libfreerdp/core/tcp.c @@ -119,7 +119,7 @@ void tcp_get_mac_address(rdpTcp * tcp) BOOL tcp_connect(rdpTcp* tcp, const char* hostname, UINT16 port) { - uint32 option_value; + UINT32 option_value; socklen_t option_len; if (hostname[0] == '/') @@ -213,7 +213,7 @@ BOOL tcp_set_blocking_mode(rdpTcp* tcp, BOOL blocking) BOOL tcp_set_keep_alive_mode(rdpTcp* tcp) { #ifndef _WIN32 - uint32 option_value; + UINT32 option_value; socklen_t option_len; option_value = 1; diff --git a/libfreerdp/core/timezone.c b/libfreerdp/core/timezone.c index 5042ff42e..b9f311a14 100644 --- a/libfreerdp/core/timezone.c +++ b/libfreerdp/core/timezone.c @@ -84,7 +84,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) clientTimeZone = settings->client_time_zone; - stream_read_uint32(s, clientTimeZone->bias); /* Bias */ + stream_read_UINT32(s, clientTimeZone->bias); /* Bias */ /* standardName (64 bytes) */ freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); @@ -93,7 +93,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) free(str); rdp_read_system_time(s, &clientTimeZone->standardDate); /* StandardDate */ - stream_read_uint32(s, clientTimeZone->standardBias); /* StandardBias */ + stream_read_UINT32(s, clientTimeZone->standardBias); /* StandardBias */ /* daylightName (64 bytes) */ freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &str, 64 / 2); @@ -102,7 +102,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) free(str); rdp_read_system_time(s, &clientTimeZone->daylightDate); /* DaylightDate */ - stream_read_uint32(s, clientTimeZone->daylightBias); /* DaylightBias */ + stream_read_UINT32(s, clientTimeZone->daylightBias); /* DaylightBias */ return TRUE; } @@ -116,9 +116,9 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings) void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings) { - uint32 bias; - sint32 sbias; - uint32 bias2c; + UINT32 bias; + INT32 sbias; + UINT32 bias2c; WCHAR* standardName; WCHAR* daylightName; int standardNameLength; @@ -150,7 +150,7 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings) else bias = 1440 - clientTimeZone->bias; - stream_write_uint32(s, bias); /* Bias */ + stream_write_UINT32(s, bias); /* Bias */ /* standardName (64 bytes) */ stream_write(s, standardName, standardNameLength); @@ -164,12 +164,12 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings) sbias = clientTimeZone->standardBias - clientTimeZone->bias; if (sbias < 0) - bias2c = (uint32) sbias; + bias2c = (UINT32) sbias; else - bias2c = ~((uint32) sbias) + 1; + bias2c = ~((UINT32) sbias) + 1; /* Note that StandardBias is ignored if no valid standardDate is provided. */ - stream_write_uint32(s, bias2c); /* StandardBias */ + stream_write_UINT32(s, bias2c); /* StandardBias */ DEBUG_TIMEZONE("StandardBias=%d", bias2c); /* daylightName (64 bytes) */ @@ -181,12 +181,12 @@ void rdp_write_client_time_zone(STREAM* s, rdpSettings* settings) sbias = clientTimeZone->daylightBias - clientTimeZone->bias; if (sbias < 0) - bias2c = (uint32) sbias; + bias2c = (UINT32) sbias; else - bias2c = ~((uint32) sbias) + 1; + bias2c = ~((UINT32) sbias) + 1; /* Note that DaylightBias is ignored if no valid daylightDate is provided. */ - stream_write_uint32(s, bias2c); /* DaylightBias */ + stream_write_UINT32(s, bias2c); /* DaylightBias */ DEBUG_TIMEZONE("DaylightBias=%d", bias2c); free(standardName); diff --git a/libfreerdp/core/transport.h b/libfreerdp/core/transport.h index 40d8d7b07..453613558 100644 --- a/libfreerdp/core/transport.h +++ b/libfreerdp/core/transport.h @@ -59,7 +59,7 @@ struct rdp_transport struct rdp_tls* tls_out; struct rdp_credssp* credssp; struct rdp_settings* settings; - uint32 usleep_interval; + UINT32 usleep_interval; void* recv_extra; STREAM* recv_buffer; TransportRecv recv_callback; diff --git a/libfreerdp/core/tsg.c b/libfreerdp/core/tsg.c index 353689bb7..3847a5313 100644 --- a/libfreerdp/core/tsg.c +++ b/libfreerdp/core/tsg.c @@ -372,7 +372,7 @@ BYTE tsg_packet5[20] = 0x00, 0x00, 0x00, 0x00 }; -DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, uint32* lengths) +DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], UINT32 count, UINT32* lengths) { STREAM* s; int status; @@ -381,11 +381,11 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, byte* buffer1 = NULL ; byte* buffer2 = NULL ; byte* buffer3 = NULL ; - uint32 buffer1Length; - uint32 buffer2Length; - uint32 buffer3Length; - uint32 numBuffers = 0; - uint32 totalDataBytes = 0; + UINT32 buffer1Length; + UINT32 buffer2Length; + UINT32 buffer3Length; + UINT32 numBuffers = 0; + UINT32 totalDataBytes = 0; tsg = (rdpTsg*) IDL_handle; buffer1Length = buffer2Length = buffer3Length = 0; @@ -417,18 +417,18 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, s = stream_new(28 + totalDataBytes); /* PCHANNEL_CONTEXT_HANDLE_NOSERIALIZE_NR (20 bytes) */ - stream_write_uint32(s, 0); /* ContextType (4 bytes) */ + stream_write_UINT32(s, 0); /* ContextType (4 bytes) */ stream_write(s, tsg->ChannelContext, 16); /* ContextUuid (4 bytes) */ - stream_write_uint32_be(s, totalDataBytes); /* totalDataBytes (4 bytes) */ - stream_write_uint32_be(s, numBuffers); /* numBuffers (4 bytes) */ + stream_write_UINT32_be(s, totalDataBytes); /* totalDataBytes (4 bytes) */ + stream_write_UINT32_be(s, numBuffers); /* numBuffers (4 bytes) */ if (buffer1Length > 0) - stream_write_uint32_be(s, buffer1Length); /* buffer1Length (4 bytes) */ + stream_write_UINT32_be(s, buffer1Length); /* buffer1Length (4 bytes) */ if (buffer2Length > 0) - stream_write_uint32_be(s, buffer2Length); /* buffer2Length (4 bytes) */ + stream_write_UINT32_be(s, buffer2Length); /* buffer2Length (4 bytes) */ if (buffer3Length > 0) - stream_write_uint32_be(s, buffer3Length); /* buffer3Length (4 bytes) */ + stream_write_UINT32_be(s, buffer3Length); /* buffer3Length (4 bytes) */ if (buffer1Length > 0) stream_write(s, buffer1, buffer1Length); /* buffer1 (variable) */ @@ -456,7 +456,7 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port) { BYTE* data; - uint32 length; + UINT32 length; STREAM* s_p4; int status = -1; rdpRpc* rpc = tsg->rpc; @@ -578,9 +578,9 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port) s_p4 = stream_new(60 + dest_addr_unic_len + 2); stream_write(s_p4, tsg_packet4, 48); - stream_write_uint32(s_p4, (dest_addr_unic_len / 2) + 1); /* MaximumCount */ - stream_write_uint32(s_p4, 0x00000000); /* Offset */ - stream_write_uint32(s_p4, (dest_addr_unic_len / 2) + 1); /* ActualCount */ + stream_write_UINT32(s_p4, (dest_addr_unic_len / 2) + 1); /* MaximumCount */ + stream_write_UINT32(s_p4, 0x00000000); /* Offset */ + stream_write_UINT32(s_p4, (dest_addr_unic_len / 2) + 1); /* ActualCount */ stream_write(s_p4, dest_addr_unic, dest_addr_unic_len); stream_write_UINT16(s_p4, 0x0000); /* unicode zero to terminate hostname string */ @@ -653,7 +653,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port) return TRUE; } -int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length) +int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length) { int status; @@ -662,7 +662,7 @@ int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length) return status; } -int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length) +int tsg_write(rdpTsg* tsg, BYTE* data, UINT32 length) { return TsProxySendToServer((handle_t) tsg, data, 1, &length); } diff --git a/libfreerdp/core/tsg.h b/libfreerdp/core/tsg.h index 03d0c3120..57ceac26b 100644 --- a/libfreerdp/core/tsg.h +++ b/libfreerdp/core/tsg.h @@ -239,12 +239,12 @@ typedef struct _TSG_PACKET TSG_PACKET_TYPE_UNION tsgPacket; } TSG_PACKET, *PTSG_PACKET; -DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, uint32* lengths); +DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], UINT32 count, UINT32* lengths); BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port); -int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length); -int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length); +int tsg_write(rdpTsg* tsg, BYTE* data, UINT32 length); +int tsg_read(rdpTsg* tsg, BYTE* data, UINT32 length); rdpTsg* tsg_new(rdpTransport* transport); void tsg_free(rdpTsg* tsg); diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 1490c44ce..60cc2ba2c 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -123,7 +123,7 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u PALETTE_ENTRY* entry; stream_seek_UINT16(s); /* pad2Octets (2 bytes) */ - stream_read_uint32(s, palette_update->number); /* numberColors (4 bytes), must be set to 256 */ + stream_read_UINT32(s, palette_update->number); /* numberColors (4 bytes), must be set to 256 */ if (palette_update->number > 256) palette_update->number = 256; @@ -151,8 +151,8 @@ void update_read_synchronize(rdpUpdate* update, STREAM* s) void update_read_play_sound(STREAM* s, PLAY_SOUND_UPDATE* play_sound) { - stream_read_uint32(s, play_sound->duration); /* duration (4 bytes) */ - stream_read_uint32(s, play_sound->frequency); /* frequency (4 bytes) */ + stream_read_UINT32(s, play_sound->duration); /* duration (4 bytes) */ + stream_read_UINT32(s, play_sound->frequency); /* frequency (4 bytes) */ } void update_recv_play_sound(rdpUpdate* update, STREAM* s) @@ -169,7 +169,7 @@ void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_po void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system) { - stream_read_uint32(s, pointer_system->type); /* systemPointerType (4 bytes) */ + stream_read_UINT32(s, pointer_system->type); /* systemPointerType (4 bytes) */ } void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color) diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c index 075f3baec..57127021e 100644 --- a/libfreerdp/core/window.c +++ b/libfreerdp/core/window.c @@ -74,8 +74,8 @@ void update_read_cached_icon_info(STREAM* s, CACHED_ICON_INFO* cached_icon_info) void update_read_notify_icon_infotip(STREAM* s, NOTIFY_ICON_INFOTIP* notify_icon_infotip) { - stream_read_uint32(s, notify_icon_infotip->timeout); /* timeout (4 bytes) */ - stream_read_uint32(s, notify_icon_infotip->flags); /* infoFlags (4 bytes) */ + stream_read_UINT32(s, notify_icon_infotip->timeout); /* timeout (4 bytes) */ + stream_read_UINT32(s, notify_icon_infotip->flags); /* infoFlags (4 bytes) */ rail_read_unicode_string(s, ¬ify_icon_infotip->text); /* infoTipText */ rail_read_unicode_string(s, ¬ify_icon_infotip->title); /* title */ } @@ -86,12 +86,12 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN int size; if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER) - stream_read_uint32(s, window_state->ownerWindowId); /* ownerWindowId (4 bytes) */ + stream_read_UINT32(s, window_state->ownerWindowId); /* ownerWindowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE) { - stream_read_uint32(s, window_state->style); /* style (4 bytes) */ - stream_read_uint32(s, window_state->extendedStyle); /* extendedStyle (4 bytes) */ + stream_read_UINT32(s, window_state->style); /* style (4 bytes) */ + stream_read_UINT32(s, window_state->extendedStyle); /* extendedStyle (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW) @@ -102,38 +102,38 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET) { - stream_read_uint32(s, window_state->clientOffsetX); /* clientOffsetX (4 bytes) */ - stream_read_uint32(s, window_state->clientOffsetY); /* clientOffsetY (4 bytes) */ + stream_read_UINT32(s, window_state->clientOffsetX); /* clientOffsetX (4 bytes) */ + stream_read_UINT32(s, window_state->clientOffsetY); /* clientOffsetY (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE) { - stream_read_uint32(s, window_state->clientAreaWidth); /* clientAreaWidth (4 bytes) */ - stream_read_uint32(s, window_state->clientAreaHeight); /* clientAreaHeight (4 bytes) */ + stream_read_UINT32(s, window_state->clientAreaWidth); /* clientAreaWidth (4 bytes) */ + stream_read_UINT32(s, window_state->clientAreaHeight); /* clientAreaHeight (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT) stream_read_BYTE(s, window_state->RPContent); /* RPContent (1 byte) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT) - stream_read_uint32(s, window_state->rootParentHandle);/* rootParentHandle (4 bytes) */ + stream_read_UINT32(s, window_state->rootParentHandle);/* rootParentHandle (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) { - stream_read_uint32(s, window_state->windowOffsetX); /* windowOffsetX (4 bytes) */ - stream_read_uint32(s, window_state->windowOffsetY); /* windowOffsetY (4 bytes) */ + stream_read_UINT32(s, window_state->windowOffsetX); /* windowOffsetX (4 bytes) */ + stream_read_UINT32(s, window_state->windowOffsetY); /* windowOffsetY (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA) { - stream_read_uint32(s, window_state->windowClientDeltaX); /* windowClientDeltaX (4 bytes) */ - stream_read_uint32(s, window_state->windowClientDeltaY); /* windowClientDeltaY (4 bytes) */ + stream_read_UINT32(s, window_state->windowClientDeltaX); /* windowClientDeltaX (4 bytes) */ + stream_read_UINT32(s, window_state->windowClientDeltaY); /* windowClientDeltaY (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE) { - stream_read_uint32(s, window_state->windowWidth); /* windowWidth (4 bytes) */ - stream_read_uint32(s, window_state->windowHeight); /* windowHeight (4 bytes) */ + stream_read_UINT32(s, window_state->windowWidth); /* windowWidth (4 bytes) */ + stream_read_UINT32(s, window_state->windowHeight); /* windowHeight (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS) @@ -155,8 +155,8 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET) { - stream_read_uint32(s, window_state->visibleOffsetX); /* visibleOffsetX (4 bytes) */ - stream_read_uint32(s, window_state->visibleOffsetY); /* visibleOffsetY (4 bytes) */ + stream_read_UINT32(s, window_state->visibleOffsetX); /* visibleOffsetX (4 bytes) */ + stream_read_UINT32(s, window_state->visibleOffsetY); /* visibleOffsetY (4 bytes) */ } if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY) @@ -198,7 +198,7 @@ void update_recv_window_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_IN rdpContext* context = update->context; rdpWindowUpdate* window = update->window; - stream_read_uint32(s, orderInfo->windowId); /* windowId (4 bytes) */ + stream_read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_ICON) { @@ -233,7 +233,7 @@ void update_recv_window_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_IN void update_read_notification_icon_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, NOTIFY_ICON_STATE_ORDER* notify_icon_state) { if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_VERSION) - stream_read_uint32(s, notify_icon_state->version); /* version (4 bytes) */ + stream_read_UINT32(s, notify_icon_state->version); /* version (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_TIP) rail_read_unicode_string(s, ¬ify_icon_state->toolTip); /* toolTip (UNICODE_STRING) */ @@ -242,7 +242,7 @@ void update_read_notification_icon_state_order(STREAM* s, WINDOW_ORDER_INFO* ord update_read_notify_icon_infotip(s, ¬ify_icon_state->infoTip); /* infoTip (NOTIFY_ICON_INFOTIP) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_STATE) - stream_read_uint32(s, notify_icon_state->state); /* state (4 bytes) */ + stream_read_UINT32(s, notify_icon_state->state); /* state (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_ICON) update_read_icon_info(s, ¬ify_icon_state->icon); /* icon (ICON_INFO) */ @@ -261,8 +261,8 @@ void update_recv_notification_icon_info_order(rdpUpdate* update, STREAM* s, WIND rdpContext* context = update->context; rdpWindowUpdate* window = update->window; - stream_read_uint32(s, orderInfo->windowId); /* windowId (4 bytes) */ - stream_read_uint32(s, orderInfo->notifyIconId); /* notifyIconId (4 bytes) */ + stream_read_UINT32(s, orderInfo->windowId); /* windowId (4 bytes) */ + stream_read_UINT32(s, orderInfo->notifyIconId); /* notifyIconId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_DELETED) { @@ -288,23 +288,23 @@ void update_read_desktop_actively_monitored_order(STREAM* s, WINDOW_ORDER_INFO* int size; if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_DESKTOP_ACTIVE_WND) - stream_read_uint32(s, monitored_desktop->activeWindowId); /* activeWindowId (4 bytes) */ + stream_read_UINT32(s, monitored_desktop->activeWindowId); /* activeWindowId (4 bytes) */ if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_DESKTOP_ZORDER) { stream_read_BYTE(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */ - size = sizeof(uint32) * monitored_desktop->numWindowIds; + size = sizeof(UINT32) * monitored_desktop->numWindowIds; if (monitored_desktop->windowIds == NULL) - monitored_desktop->windowIds = (uint32*) malloc(size); + monitored_desktop->windowIds = (UINT32*) malloc(size); else - monitored_desktop->windowIds = (uint32*) realloc(monitored_desktop->windowIds, size); + monitored_desktop->windowIds = (UINT32*) realloc(monitored_desktop->windowIds, size); /* windowIds */ for (i = 0; i < (int) monitored_desktop->numWindowIds; i++) { - stream_read_uint32(s, monitored_desktop->windowIds[i]); + stream_read_UINT32(s, monitored_desktop->windowIds[i]); } } } @@ -339,7 +339,7 @@ void update_recv_altsec_window_order(rdpUpdate* update, STREAM* s) rdpWindowUpdate* window = update->window; stream_read_UINT16(s, orderSize); /* orderSize (2 bytes) */ - stream_read_uint32(s, window->orderInfo.fieldFlags); /* FieldsPresentFlags (4 bytes) */ + stream_read_UINT32(s, window->orderInfo.fieldFlags); /* FieldsPresentFlags (4 bytes) */ if (window->orderInfo.fieldFlags & WINDOW_ORDER_TYPE_WINDOW) update_recv_window_info_order(update, s, &window->orderInfo); diff --git a/libfreerdp/crypto/ber.c b/libfreerdp/crypto/ber.c index bab56f888..4c6383c5a 100644 --- a/libfreerdp/crypto/ber.c +++ b/libfreerdp/crypto/ber.c @@ -338,7 +338,7 @@ void ber_write_BOOL(STREAM* s, BOOL value) stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0); } -BOOL ber_read_integer(STREAM* s, uint32* value) +BOOL ber_read_integer(STREAM* s, UINT32* value) { int length; @@ -363,7 +363,7 @@ BOOL ber_read_integer(STREAM* s, uint32* value) *value += (byte << 16); } else if (length == 4) - stream_read_uint32_be(s, *value); + stream_read_UINT32_be(s, *value); else return FALSE; @@ -376,7 +376,7 @@ BOOL ber_read_integer(STREAM* s, uint32* value) * @param value */ -int ber_write_integer(STREAM* s, uint32 value) +int ber_write_integer(STREAM* s, UINT32 value) { ber_write_universal_tag(s, BER_TAG_INTEGER, FALSE); @@ -402,14 +402,14 @@ int ber_write_integer(STREAM* s, uint32 value) else if (value <= 0xFFFFFFFF) { ber_write_length(s, 4); - stream_write_uint32_be(s, value); + stream_write_UINT32_be(s, value); return 5; } return 0; } -int ber_skip_integer(uint32 value) +int ber_skip_integer(UINT32 value) { if (value <= 0xFF) { diff --git a/libfreerdp/crypto/crypto.c b/libfreerdp/crypto/crypto.c index f0bd6ae9d..509637b16 100644 --- a/libfreerdp/crypto/crypto.c +++ b/libfreerdp/crypto/crypto.c @@ -30,7 +30,7 @@ CryptoSha1 crypto_sha1_init(void) return sha1; } -void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length) +void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, UINT32 length) { SHA1_Update(&sha1->sha_ctx, data, length); } @@ -48,7 +48,7 @@ CryptoMd5 crypto_md5_init(void) return md5; } -void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length) +void crypto_md5_update(CryptoMd5 md5, const BYTE* data, UINT32 length) { MD5_Update(&md5->md5_ctx, data, length); } @@ -59,14 +59,14 @@ void crypto_md5_final(CryptoMd5 md5, BYTE* out_data) free(md5); } -CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length) +CryptoRc4 crypto_rc4_init(const BYTE* key, UINT32 length) { CryptoRc4 rc4 = malloc(sizeof(*rc4)); RC4_set_key(&rc4->rc4_key, length, key); return rc4; } -void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data) +void crypto_rc4(CryptoRc4 rc4, UINT32 length, const BYTE* in_data, BYTE* out_data) { RC4(&rc4->rc4_key, length, in_data, out_data); } @@ -95,13 +95,13 @@ CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec) return des3; } -void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data) +void crypto_des3_encrypt(CryptoDes3 des3, UINT32 length, const BYTE* in_data, BYTE* out_data) { int len; EVP_EncryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length); } -void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data) +void crypto_des3_decrypt(CryptoDes3 des3, UINT32 length, const BYTE* in_data, BYTE* out_data) { int len; EVP_DecryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length); @@ -125,17 +125,17 @@ CryptoHmac crypto_hmac_new(void) return hmac; } -void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE* data, uint32 length) +void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE* data, UINT32 length) { HMAC_Init_ex(&hmac->hmac_ctx, data, length, EVP_sha1(), NULL); } -void crypto_hmac_update(CryptoHmac hmac, const BYTE* data, uint32 length) +void crypto_hmac_update(CryptoHmac hmac, const BYTE* data, UINT32 length) { HMAC_Update(&hmac->hmac_ctx, data, length); } -void crypto_hmac_final(CryptoHmac hmac, BYTE* out_data, uint32 length) +void crypto_hmac_final(CryptoHmac hmac, BYTE* out_data, UINT32 length) { HMAC_Final(&hmac->hmac_ctx, out_data, &length); } @@ -148,7 +148,7 @@ void crypto_hmac_free(CryptoHmac hmac) free(hmac); } -CryptoCert crypto_cert_read(BYTE* data, uint32 length) +CryptoCert crypto_cert_read(BYTE* data, UINT32 length) { CryptoCert cert = malloc(sizeof(*cert)); /* this will move the data pointer but we don't care, we don't use it again */ @@ -204,7 +204,7 @@ exit: return status; } -static void crypto_rsa_common(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, int exponent_size, BYTE* output) +static void crypto_rsa_common(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, int exponent_size, BYTE* output) { BN_CTX* ctx; int output_length; @@ -249,42 +249,42 @@ static void crypto_rsa_common(const BYTE* input, int length, uint32 key_length, free(input_reverse); } -static void crypto_rsa_public(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) +static void crypto_rsa_public(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, exponent, EXPONENT_MAX_SIZE, output); } -static void crypto_rsa_private(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) +static void crypto_rsa_private(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output); } -void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) +void crypto_rsa_public_encrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_public(input, length, key_length, modulus, exponent, output); } -void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) +void crypto_rsa_public_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output) { crypto_rsa_public(input, length, key_length, modulus, exponent, output); } -void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) +void crypto_rsa_private_encrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_private(input, length, key_length, modulus, private_exponent, output); } -void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) +void crypto_rsa_private_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_private(input, length, key_length, modulus, private_exponent, output); } -void crypto_rsa_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) +void crypto_rsa_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output) { crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output); @@ -313,7 +313,7 @@ char* crypto_cert_fingerprint(X509* xcert) int i = 0; char* p; char* fp_buffer; - uint32 fp_len; + UINT32 fp_len; BYTE fp[EVP_MAX_MD_SIZE]; X509_digest(xcert, EVP_sha1(), fp, &fp_len); diff --git a/libfreerdp/crypto/er.c b/libfreerdp/crypto/er.c index c2415f7a1..e8109bba4 100644 --- a/libfreerdp/crypto/er.c +++ b/libfreerdp/crypto/er.c @@ -267,7 +267,7 @@ BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding) return TRUE; } -BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag) +BOOL er_write_bit_string_tag(STREAM* s, UINT32 length, BYTE padding, BOOL flag) { er_write_universal_tag(s, ER_TAG_BIT_STRING, FALSE); er_write_length(s, length, flag); @@ -344,7 +344,7 @@ void er_write_BOOL(STREAM* s, BOOL value) stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0); } -BOOL er_read_integer(STREAM* s, uint32* value) +BOOL er_read_integer(STREAM* s, UINT32* value) { int length; @@ -369,7 +369,7 @@ BOOL er_read_integer(STREAM* s, uint32* value) *value += (byte << 16); } else if (length == 4) - stream_read_uint32_be(s, *value); + stream_read_UINT32_be(s, *value); else return FALSE; @@ -382,7 +382,7 @@ BOOL er_read_integer(STREAM* s, uint32* value) * @param value */ -int er_write_integer(STREAM* s, sint32 value) +int er_write_integer(STREAM* s, INT32 value) { er_write_universal_tag(s, ER_TAG_INTEGER, FALSE); @@ -401,14 +401,14 @@ int er_write_integer(STREAM* s, sint32 value) else { er_write_length(s, 4, FALSE); - stream_write_uint32_be(s, value); + stream_write_UINT32_be(s, value); return 5; } return 0; } -int er_skip_integer(sint32 value) +int er_skip_integer(INT32 value) { if (value <= 127 && value >= -128) { diff --git a/libfreerdp/crypto/per.c b/libfreerdp/crypto/per.c index 741451ed3..1665c0502 100644 --- a/libfreerdp/crypto/per.c +++ b/libfreerdp/crypto/per.c @@ -188,7 +188,7 @@ void per_write_padding(STREAM* s, int length) * @return */ -BOOL per_read_integer(STREAM* s, uint32* integer) +BOOL per_read_integer(STREAM* s, UINT32* integer) { UINT16 length; @@ -214,7 +214,7 @@ BOOL per_read_integer(STREAM* s, uint32* integer) * @param integer integer */ -void per_write_integer(STREAM* s, uint32 integer) +void per_write_integer(STREAM* s, UINT32 integer) { if (integer <= 0xFF) { @@ -229,7 +229,7 @@ void per_write_integer(STREAM* s, uint32 integer) else if (integer <= 0xFFFFFFFF) { per_write_length(s, 4); - stream_write_uint32_be(s, integer); + stream_write_UINT32_be(s, integer); } } diff --git a/libfreerdp/gdi/32bpp.c b/libfreerdp/gdi/32bpp.c index a3e4b17c0..c604c9ed1 100644 --- a/libfreerdp/gdi/32bpp.c +++ b/libfreerdp/gdi/32bpp.c @@ -38,9 +38,9 @@ #include -uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color) +UINT32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color) { - uint32 color32; + UINT32 color32; BYTE a, r, g, b; a = 0xFF; @@ -61,8 +61,8 @@ uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color) int FillRect_32bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) { int x, y; - uint32 *dstp; - uint32 color32; + UINT32 *dstp; + UINT32 color32; int nXDest, nYDest; int nWidth, nHeight; @@ -75,7 +75,7 @@ int FillRect_32bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr) for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y); if (dstp != 0) { @@ -218,13 +218,13 @@ static int BitBlt_SRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_NOTSRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -243,11 +243,11 @@ static int BitBlt_NOTSRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_DSTINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint32* dstp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -265,13 +265,13 @@ static int BitBlt_DSTINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -290,13 +290,13 @@ static int BitBlt_SRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_NOTSRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -315,13 +315,13 @@ static int BitBlt_NOTSRCERASE_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_SRCINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -340,13 +340,13 @@ static int BitBlt_SRCINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_SRCAND_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -365,13 +365,13 @@ static int BitBlt_SRCAND_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid static int BitBlt_SRCPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -390,31 +390,31 @@ static int BitBlt_SRCPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; - uint32* patp; + UINT32* srcp; + UINT32* dstp; + UINT32* patp; BYTE* srcp8; - uint32 src32; - uint32 color32; + UINT32 src32; + UINT32 color32; HGDI_BITMAP hSrcBmp; /* D = (S & P) | (~S & D) */ color32 = gdi_get_color_32bpp(hdcDest, hdcDest->textColor); - patp = (uint32*) &color32; + patp = (UINT32*) &color32; hSrcBmp = (HGDI_BITMAP) hdcSrc->selectedObject; if (hdcSrc->bytesPerPixel == 1) { /* DSPDxax, used to draw glyphs */ - srcp = (uint32*) & src32; + srcp = (UINT32*) & src32; for (y = 0; y < nHeight; y++) { srcp8 = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -434,8 +434,8 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi { for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -455,22 +455,22 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_PSDPxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; - uint32* patp; - uint32 color32; + UINT32* srcp; + UINT32* dstp; + UINT32* patp; + UINT32 color32; /* D = (S & D) | (~S & P) */ if (hdcDest->brush->style == GDI_BS_SOLID) { color32 = gdi_get_color_32bpp(hdcDest, hdcDest->brush->color); - patp = (uint32*) &color32; + patp = (UINT32*) &color32; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -487,14 +487,14 @@ static int BitBlt_PSDPxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi { for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = (*srcp & *dstp) | (~(*srcp) & *patp); srcp++; dstp++; @@ -509,20 +509,20 @@ static int BitBlt_PSDPxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_SPna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; - uint32* patp; + UINT32* srcp; + UINT32* dstp; + UINT32* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *srcp & ~(*patp); srcp++; @@ -537,13 +537,13 @@ static int BitBlt_SPna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -562,18 +562,18 @@ static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_DPa_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint32* dstp; - uint32* patp; + UINT32* dstp; + UINT32* patp; for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp & *patp; dstp++; @@ -587,18 +587,18 @@ static int BitBlt_DPa_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, static int BitBlt_PDxn_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint32* dstp; - uint32* patp; + UINT32* dstp; + UINT32* patp; for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp ^ ~(*patp); dstp++; @@ -612,20 +612,20 @@ static int BitBlt_PDxn_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth static int BitBlt_MERGECOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; - uint32* patp; + UINT32* srcp; + UINT32* dstp; + UINT32* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *srcp & *patp; srcp++; @@ -640,13 +640,13 @@ static int BitBlt_MERGECOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_MERGEPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; + UINT32* srcp; + UINT32* dstp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -665,9 +665,9 @@ static int BitBlt_MERGEPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint32* dstp; - uint32* patp; - uint32 color32; + UINT32* dstp; + UINT32* patp; + UINT32 color32; if (hdcDest->brush->style == GDI_BS_SOLID) { @@ -675,7 +675,7 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -691,13 +691,13 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi { for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *patp; dstp++; } @@ -711,9 +711,9 @@ static int BitBlt_PATCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight) { int x, y; - uint32* dstp; - uint32* patp; - uint32 color32; + UINT32* dstp; + UINT32* patp; + UINT32 color32; if (hdcDest->brush->style == GDI_BS_SOLID) { @@ -721,7 +721,7 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { @@ -737,13 +737,13 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n { for (y = 0; y < nHeight; y++) { - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *patp ^ *dstp; dstp++; } @@ -757,20 +757,20 @@ static int BitBlt_PATINVERT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n static int BitBlt_PATPAINT_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc) { int x, y; - uint32* srcp; - uint32* dstp; - uint32* patp; + UINT32* srcp; + UINT32* dstp; + UINT32* patp; for (y = 0; y < nHeight; y++) { - srcp = (uint32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); - dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); + srcp = (UINT32*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y); + dstp = (UINT32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y); if (dstp != 0) { for (x = 0; x < nWidth; x++) { - patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y); + patp = (UINT32*) gdi_get_brush_pointer(hdcDest, x, y); *dstp = *dstp | (*patp | ~(*srcp)); srcp++; dstp++; @@ -925,102 +925,102 @@ int PatBlt_32bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i return 1; } -static INLINE void SetPixel_BLACK_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_BLACK_32bpp(UINT32* pixel, UINT32* pen) { /* D = 0 */ *pixel = 0; } -static INLINE void SetPixel_NOTMERGEPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTMERGEPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -static INLINE void SetPixel_MASKNOTPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKNOTPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -static INLINE void SetPixel_NOTCOPYPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTCOPYPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = ~P */ *pixel = ~(*pen); } -static INLINE void SetPixel_MASKPENNOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKPENNOT_32bpp(UINT32* pixel, UINT32* pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -static INLINE void SetPixel_NOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOT_32bpp(UINT32* pixel, UINT32* pen) { /* D = ~D */ *pixel = ~(*pixel); } -static INLINE void SetPixel_XORPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_XORPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -static INLINE void SetPixel_NOTMASKPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTMASKPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -static INLINE void SetPixel_MASKPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = D & P */ *pixel &= *pen; } -static INLINE void SetPixel_NOTXORPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTXORPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -static INLINE void SetPixel_NOP_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOP_32bpp(UINT32* pixel, UINT32* pen) { /* D = D */ } -static INLINE void SetPixel_MERGENOTPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGENOTPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -static INLINE void SetPixel_COPYPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_COPYPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = P */ *pixel = *pen; } -static INLINE void SetPixel_MERGEPENNOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGEPENNOT_32bpp(UINT32* pixel, UINT32* pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -static INLINE void SetPixel_MERGEPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGEPEN_32bpp(UINT32* pixel, UINT32* pen) { /* D = P | D */ *pixel |= *pen; } -static INLINE void SetPixel_WHITE_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_WHITE_32bpp(UINT32* pixel, UINT32* pen) { /* D = 1 */ *pixel = 0xFFFFFF; } -#define PIXEL_TYPE uint32 +#define PIXEL_TYPE UINT32 #define GDI_GET_POINTER gdi_GetPointer_32bpp #define GDI_GET_PEN_COLOR gdi_GetPenColor_32bpp diff --git a/libfreerdp/gdi/bitmap.c b/libfreerdp/gdi/bitmap.c index cd0ee68ee..2b9a916c2 100644 --- a/libfreerdp/gdi/bitmap.c +++ b/libfreerdp/gdi/bitmap.c @@ -72,9 +72,9 @@ INLINE UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y) return *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); } -INLINE uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE UINT32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y) { - return *((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])); + return *((UINT32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])); } INLINE BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y) @@ -87,9 +87,9 @@ INLINE UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y) return ((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])); } -INLINE uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y) +INLINE UINT32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y) { - return ((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])); + return ((UINT32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])); } /** @@ -119,9 +119,9 @@ INLINE void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel) *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel; } -INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel) +INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, UINT32 pixel) { - *((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])) = pixel; + *((UINT32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4])) = pixel; } /** diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index c5d85ed63..53a840a20 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -51,7 +51,7 @@ #include "gdi.h" /* Ternary Raster Operation Table */ -static const uint32 rop3_code_table[] = +static const UINT32 rop3_code_table[] = { 0x00000042, /* 0 */ 0x00010289, /* DPSoon */ @@ -313,7 +313,7 @@ static const uint32 rop3_code_table[] = /* GDI Helper Functions */ -INLINE uint32 gdi_rop3_code(BYTE code) +INLINE UINT32 gdi_rop3_code(BYTE code) { return rop3_code_table[code]; } @@ -476,7 +476,7 @@ void gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) if (brush->style == GDI_BS_SOLID) { - uint32 color; + UINT32 color; originalBrush = gdi->drawing->hdc->brush; color = freerdp_color_convert_rgb(patblt->foreColor, gdi->srcBpp, 32, gdi->clrconv); @@ -532,7 +532,7 @@ void gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect) { GDI_RECT rect; HGDI_BRUSH hBrush; - uint32 brush_color; + UINT32 brush_color; rdpGdi *gdi = context->gdi; gdi_CRgnToRect(opaque_rect->nLeftRect, opaque_rect->nTopRect, @@ -551,7 +551,7 @@ void gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_o int i; GDI_RECT rect; HGDI_BRUSH hBrush; - uint32 brush_color; + UINT32 brush_color; DELTA_RECT* rectangle; rdpGdi *gdi = context->gdi; @@ -573,7 +573,7 @@ void gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_o void gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) { - uint32 color; + UINT32 color; HGDI_PEN hPen; rdpGdi *gdi = context->gdi; @@ -591,12 +591,12 @@ void gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to) void gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline) { int i; - uint32 color; + UINT32 color; HGDI_PEN hPen; DELTA_POINT* points; rdpGdi* gdi = context->gdi; - sint32 x; - sint32 y; + INT32 x; + INT32 y; color = freerdp_color_convert_rgb(polyline->penColor, gdi->srcBpp, 32, gdi->clrconv); hPen = gdi_CreatePen(GDI_PS_SOLID, 1, (GDI_COLOR) color); @@ -634,8 +634,8 @@ void gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) void gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) { rdpBrush* brush; - uint32 foreColor; - uint32 backColor; + UINT32 foreColor; + UINT32 backColor; gdiBitmap* bitmap; HGDI_BRUSH originalBrush; rdpGdi* gdi = context->gdi; @@ -875,7 +875,7 @@ void gdi_resize(rdpGdi* gdi, int width, int height) * @return */ -int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer) +int gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer) { rdpGdi* gdi; rdpCache* cache; diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index f214e2236..f49b4e70b 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -231,7 +231,7 @@ void gdi_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y) gdi_glyph->bitmap->height, gdi_glyph->hdc, 0, 0, GDI_DSPDxax); } -void gdi_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void gdi_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { GDI_RECT rect; HGDI_BRUSH brush; @@ -249,7 +249,7 @@ void gdi_Glyph_BeginDraw(rdpContext* context, int x, int y, int width, int heigh gdi->textColor = gdi_SetTextColor(gdi->drawing->hdc, bgcolor); } -void gdi_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, uint32 bgcolor, uint32 fgcolor) +void gdi_Glyph_EndDraw(rdpContext* context, int x, int y, int width, int height, UINT32 bgcolor, UINT32 fgcolor) { rdpGdi* gdi = context->gdi; diff --git a/libfreerdp/gdi/pen.c b/libfreerdp/gdi/pen.c index b65c5355d..db98ceac6 100644 --- a/libfreerdp/gdi/pen.c +++ b/libfreerdp/gdi/pen.c @@ -69,7 +69,7 @@ INLINE UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen) return p; } -INLINE uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen) +INLINE UINT32 gdi_GetPenColor_32bpp(HGDI_PEN pen) { return pen->color; } diff --git a/libfreerdp/gdi/shape.c b/libfreerdp/gdi/shape.c index 6e86c3036..840c68771 100644 --- a/libfreerdp/gdi/shape.c +++ b/libfreerdp/gdi/shape.c @@ -54,7 +54,7 @@ static void Ellipse_Bresenham(HGDI_DC hdc, int x1, int y1, int x2, int y2) HGDI_BITMAP bmp; BYTE pixel8; UINT16 pixel16; - uint32 pixel32; + UINT32 pixel32; int bpp = hdc->bitsPerPixel; a = (x1 < x2) ? x2 - x1 : x1 - x2; diff --git a/libfreerdp/locale/keyboard.c b/libfreerdp/locale/keyboard.c index 91252f45b..0a5764476 100644 --- a/libfreerdp/locale/keyboard.c +++ b/libfreerdp/locale/keyboard.c @@ -41,12 +41,12 @@ #endif -uint32 RDP_SCANCODE_TO_X11_KEYCODE[256][2]; +UINT32 RDP_SCANCODE_TO_X11_KEYCODE[256][2]; RDP_SCANCODE X11_KEYCODE_TO_RDP_SCANCODE[256]; extern const RDP_SCANCODE VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[256]; -uint32 freerdp_detect_keyboard(uint32 keyboardLayoutID) +UINT32 freerdp_detect_keyboard(UINT32 keyboardLayoutID) { if (keyboardLayoutID != 0) DEBUG_KBD("keyboard layout configuration: %X", keyboardLayoutID); @@ -66,9 +66,9 @@ uint32 freerdp_detect_keyboard(uint32 keyboardLayoutID) return keyboardLayoutID; } -uint32 freerdp_keyboard_init(uint32 keyboardLayoutId) +UINT32 freerdp_keyboard_init(UINT32 keyboardLayoutId) { - uint32 keycode; + UINT32 keycode; #ifdef WITH_X11 @@ -90,7 +90,7 @@ uint32 freerdp_keyboard_init(uint32 keyboardLayoutId) return keyboardLayoutId; } -RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(uint32 keycode) +RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(UINT32 keycode) { DEBUG_KBD("x11 keycode: %02X -> rdp code: %02X%s", keycode, RDP_SCANCODE_CODE(X11_KEYCODE_TO_RDP_SCANCODE[keycode]), @@ -99,7 +99,7 @@ RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_x11_keycode(uint32 keycode) return X11_KEYCODE_TO_RDP_SCANCODE[keycode]; } -uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, BOOL extended) +UINT32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(UINT32 scancode, BOOL extended) { if (extended) return RDP_SCANCODE_TO_X11_KEYCODE[scancode][1]; @@ -107,7 +107,7 @@ uint32 freerdp_keyboard_get_x11_keycode_from_rdp_scancode(uint32 scancode, BOOL return RDP_SCANCODE_TO_X11_KEYCODE[scancode][0]; } -RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(uint32 vkcode) +RDP_SCANCODE freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(UINT32 vkcode) { return VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[vkcode]; } diff --git a/libfreerdp/locale/keyboard_keymap.c b/libfreerdp/locale/keyboard_keymap.c index 079463b85..e4eb06b9e 100644 --- a/libfreerdp/locale/keyboard_keymap.c +++ b/libfreerdp/locale/keyboard_keymap.c @@ -35,16 +35,16 @@ extern const RDP_SCANCODE VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[256]; -int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name) +int freerdp_keyboard_load_map(UINT32 keycode_to_vkcode[256], char* name) { FILE* fp; char* pch; char* beg; char* end; - uint32 vkcode; + UINT32 vkcode; int kbd_found = 0; char* keymap_path; - uint32 keycode = 0; + UINT32 keycode = 0; char buffer[1024] = ""; char keymap_name[256] = ""; char keymap_include[256] = ""; @@ -177,7 +177,7 @@ int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name) return 1; } -void freerdp_keyboard_load_maps(uint32 keycode_to_vkcode[256], char* names) +void freerdp_keyboard_load_maps(UINT32 keycode_to_vkcode[256], char* names) { char* kbd; char* names_end; diff --git a/libfreerdp/locale/keyboard_keymap.h b/libfreerdp/locale/keyboard_keymap.h index 3ae3b76ec..d64aae207 100644 --- a/libfreerdp/locale/keyboard_keymap.h +++ b/libfreerdp/locale/keyboard_keymap.h @@ -22,7 +22,7 @@ #include -int freerdp_keyboard_load_map(uint32 keycode_to_vkcode[256], char* name); -void freerdp_keyboard_load_maps(uint32 keycode_to_vkcode[256], char* names); +int freerdp_keyboard_load_map(UINT32 keycode_to_vkcode[256], char* name); +void freerdp_keyboard_load_maps(UINT32 keycode_to_vkcode[256], char* names); #endif /* __KEYBOARD_KEYMAP_H */ diff --git a/libfreerdp/locale/keyboard_layout.c b/libfreerdp/locale/keyboard_layout.c index 422d113f9..cca91c7b9 100644 --- a/libfreerdp/locale/keyboard_layout.c +++ b/libfreerdp/locale/keyboard_layout.c @@ -129,8 +129,8 @@ static const RDP_KEYBOARD_LAYOUT RDP_KEYBOARD_LAYOUT_TABLE[] = struct _RDP_KEYBOARD_LAYOUT_VARIANT { - uint32 code; /* Keyboard layout code */ - uint32 id; /* Keyboard variant ID */ + UINT32 code; /* Keyboard layout code */ + UINT32 id; /* Keyboard variant ID */ const char* name; /* Keyboard layout variant name */ }; typedef struct _RDP_KEYBOARD_LAYOUT_VARIANT RDP_KEYBOARD_LAYOUT_VARIANT; @@ -186,7 +186,7 @@ static const RDP_KEYBOARD_LAYOUT_VARIANT RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[] = struct _RDP_KEYBOARD_IME { - uint32 code; /* Keyboard layout code */ + UINT32 code; /* Keyboard layout code */ const char* file; /* IME file */ const char* name; /* Keyboard layout name */ }; @@ -478,7 +478,7 @@ const RDP_SCANCODE VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[256] = RDP_SCANCODE_UNKNOWN }; -RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) +RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(UINT32 types) { int num, length, i; RDP_KEYBOARD_LAYOUT* layouts; @@ -525,7 +525,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types) return layouts; } -const char* freerdp_keyboard_get_layout_name_from_id(uint32 keyboardLayoutID) +const char* freerdp_keyboard_get_layout_name_from_id(UINT32 keyboardLayoutID) { int i; diff --git a/libfreerdp/locale/keyboard_sun.c b/libfreerdp/locale/keyboard_sun.c index aa41e1cf6..92a783785 100644 --- a/libfreerdp/locale/keyboard_sun.c +++ b/libfreerdp/locale/keyboard_sun.c @@ -54,10 +54,10 @@ struct _SOLARIS_KEYBOARD { - uint32 type; /* Solaris keyboard type */ - uint32 layout; /* Layout */ + UINT32 type; /* Solaris keyboard type */ + UINT32 layout; /* Layout */ char* xkbType; /* XKB keyboard */ - uint32 keyboardLayoutId; /* XKB keyboard layout */ + UINT32 keyboardLayoutId; /* XKB keyboard layout */ }; typedef struct _SOLARIS_KEYBOARD SOLARIS_KEYBOARD; @@ -202,7 +202,7 @@ static const SOLARIS_KEYBOARD SOLARIS_KEYBOARD_TABLE[] = { 6, 272, "sun(type6)", KBD_PORTUGUESE_BRAZILIAN_ABNT } /* Brazil6_usb */ }; -uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length) +UINT32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length) { FILE* kbd; diff --git a/libfreerdp/locale/keyboard_sun.h b/libfreerdp/locale/keyboard_sun.h index 2404723fe..985e1e3ac 100644 --- a/libfreerdp/locale/keyboard_sun.h +++ b/libfreerdp/locale/keyboard_sun.h @@ -20,6 +20,6 @@ #ifndef __LOCALE_KEYBOARD_SUN_H #define __LOCALE_KEYBOARD_SUN_H -uint32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length); +UINT32 freerdp_detect_keyboard_type_and_layout_solaris(char* keyboard_type, int length); #endif /* __LOCALE_KEYBOARD_SUN_H */ diff --git a/libfreerdp/locale/keyboard_x11.c b/libfreerdp/locale/keyboard_x11.c index d974de55e..639414a44 100644 --- a/libfreerdp/locale/keyboard_x11.c +++ b/libfreerdp/locale/keyboard_x11.c @@ -45,7 +45,7 @@ extern const RDP_SCANCODE VIRTUAL_KEY_CODE_TO_DEFAULT_RDP_SCANCODE_TABLE[256]; -uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_variant) +UINT32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_variant) { char* pch; char* beg; @@ -54,7 +54,7 @@ uint32 freerdp_detect_keyboard_layout_from_xkb(char** xkb_layout, char** xkb_var char buffer[1024]; char* layout = NULL; char* variant = NULL; - uint32 keyboardLayoutId = 0; + UINT32 keyboardLayoutId = 0; /* We start by looking for _XKB_RULES_NAMES_BACKUP which appears to be used by libxklavier */ @@ -211,11 +211,11 @@ char* freerdp_detect_keymap_from_xkb() return keymap; } -uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]) +UINT32 freerdp_keyboard_init_x11(UINT32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]) { - uint32 vkcode; - uint32 keycode; - uint32 keycode_to_vkcode[256]; + UINT32 vkcode; + UINT32 keycode; + UINT32 keycode_to_vkcode[256]; memset(keycode_to_vkcode, 0, sizeof(keycode_to_vkcode)); memset(x11_keycode_to_rdp_scancode, 0, sizeof(x11_keycode_to_rdp_scancode)); diff --git a/libfreerdp/locale/keyboard_x11.h b/libfreerdp/locale/keyboard_x11.h index ccd875579..77dece1c9 100644 --- a/libfreerdp/locale/keyboard_x11.h +++ b/libfreerdp/locale/keyboard_x11.h @@ -20,6 +20,6 @@ #ifndef __LOCALE_KEYBOARD_X11_H #define __LOCALE_KEYBOARD_X11_H -uint32 freerdp_keyboard_init_x11(uint32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]); +UINT32 freerdp_keyboard_init_x11(UINT32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]); #endif /* __LOCALE_KEYBOARD_X11_H */ diff --git a/libfreerdp/locale/keyboard_xkbfile.c b/libfreerdp/locale/keyboard_xkbfile.c index d2a02bf66..49b06a9d3 100644 --- a/libfreerdp/locale/keyboard_xkbfile.c +++ b/libfreerdp/locale/keyboard_xkbfile.c @@ -179,7 +179,7 @@ void* freerdp_keyboard_xkb_init() return (void*) display; } -uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]) +UINT32 freerdp_keyboard_init_xkbfile(UINT32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]) { void* display; memset(x11_keycode_to_rdp_scancode, 0, sizeof(x11_keycode_to_rdp_scancode)); @@ -227,12 +227,12 @@ static char* comma_substring(char* s, int n) return s; } -uint32 detect_keyboard_layout_from_xkbfile(void* display) +UINT32 detect_keyboard_layout_from_xkbfile(void* display) { char* layout; char* variant; - uint32 group = 0; - uint32 keyboard_layout = 0; + UINT32 group = 0; + UINT32 keyboard_layout = 0; XkbRF_VarDefsRec rules_names; XKeyboardState coreKbdState; XkbStateRec state; diff --git a/libfreerdp/locale/keyboard_xkbfile.h b/libfreerdp/locale/keyboard_xkbfile.h index a6be05e42..9205bd13d 100644 --- a/libfreerdp/locale/keyboard_xkbfile.h +++ b/libfreerdp/locale/keyboard_xkbfile.h @@ -23,8 +23,8 @@ #include #include -uint32 freerdp_keyboard_init_xkbfile(uint32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]); -uint32 detect_keyboard_layout_from_xkbfile(void* display); +UINT32 freerdp_keyboard_init_xkbfile(UINT32 keyboardLayoutId, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]); +UINT32 detect_keyboard_layout_from_xkbfile(void* display); int freerdp_keyboard_load_map_from_xkbfile(void* display, RDP_SCANCODE x11_keycode_to_rdp_scancode[256]); #endif /* __LOCALE_KEYBOARD_XKB_H */ diff --git a/libfreerdp/locale/locale.c b/libfreerdp/locale/locale.c index ee1f0bfc9..8f72b2171 100644 --- a/libfreerdp/locale/locale.c +++ b/libfreerdp/locale/locale.c @@ -34,7 +34,7 @@ struct _SYSTEM_LOCALE { char language[4]; /* Two or three letter language code */ char country[10]; /* Two or three letter country code (Sometimes with Cyrl_ prefix) */ - uint32 code; /* 32-bit unsigned integer corresponding to the locale */ + UINT32 code; /* 32-bit unsigned integer corresponding to the locale */ }; typedef struct _SYSTEM_LOCALE SYSTEM_LOCALE; @@ -248,7 +248,7 @@ static const SYSTEM_LOCALE SYSTEM_LOCALE_TABLE[] = struct _LOCALE_NAME { - uint32 localeId; + UINT32 localeId; const char* name; }; typedef struct _LOCALE_NAME LOCALE_NAME; @@ -458,8 +458,8 @@ static const LOCALE_NAME LOCALE_NAME_TABLE[] = struct _LOCALE_KEYBOARD_LAYOUTS { - uint32 locale; /* Locale ID */ - uint32 keyboardLayouts[5]; /* array of associated keyboard layouts */ + UINT32 locale; /* Locale ID */ + UINT32 keyboardLayouts[5]; /* array of associated keyboard layouts */ }; typedef struct _LOCALE_KEYBOARD_LAYOUTS LOCALE_KEYBOARD_LAYOUTS; @@ -691,7 +691,7 @@ SYSTEM_LOCALE* freerdp_detect_system_locale() return locale; } -uint32 freerdp_get_system_locale_id() +UINT32 freerdp_get_system_locale_id() { SYSTEM_LOCALE* locale; @@ -703,7 +703,7 @@ uint32 freerdp_get_system_locale_id() return 0; } -const char* freerdp_get_system_locale_name_from_id(uint32 localeId) +const char* freerdp_get_system_locale_name_from_id(UINT32 localeId) { int index; @@ -716,7 +716,7 @@ const char* freerdp_get_system_locale_name_from_id(uint32 localeId) return NULL; } -uint32 freerdp_detect_keyboard_layout_from_system_locale() +UINT32 freerdp_detect_keyboard_layout_from_system_locale() { int i, j; char language[4]; diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c index 665e31cd0..f46a5fcb5 100644 --- a/libfreerdp/locale/timezone.c +++ b/libfreerdp/locale/timezone.c @@ -53,9 +53,9 @@ typedef struct _SYSTEM_TIME_ENTRY SYSTEM_TIME_ENTRY; struct _TIME_ZONE_RULE_ENTRY { - uint64 TicksStart; - uint64 TicksEnd; - sint32 DaylightDelta; + UINT64 TicksStart; + UINT64 TicksEnd; + INT32 DaylightDelta; SYSTEM_TIME_ENTRY StandardDate; SYSTEM_TIME_ENTRY DaylightDate; }; @@ -64,13 +64,13 @@ typedef struct _TIME_ZONE_RULE_ENTRY TIME_ZONE_RULE_ENTRY; struct _TIME_ZONE_ENTRY { const char* Id; - uint32 Bias; + UINT32 Bias; BOOL SupportsDST; const char* DisplayName; const char* StandardName; const char* DaylightName; TIME_ZONE_RULE_ENTRY* RuleTable; - uint32 RuleTableCount; + UINT32 RuleTableCount; }; typedef struct _TIME_ZONE_ENTRY TIME_ZONE_ENTRY; @@ -1598,7 +1598,7 @@ BOOL freerdp_match_unix_timezone_identifier_with_list(const char* tzid, const ch return FALSE; } -TIME_ZONE_ENTRY* freerdp_detect_windows_time_zone(uint32 bias) +TIME_ZONE_ENTRY* freerdp_detect_windows_time_zone(UINT32 bias) { int i, j; char* tzid; @@ -1632,10 +1632,10 @@ TIME_ZONE_ENTRY* freerdp_detect_windows_time_zone(uint32 bias) return NULL; } -TIME_ZONE_RULE_ENTRY* freerdp_get_current_time_zone_rule(TIME_ZONE_RULE_ENTRY* rules, uint32 count) +TIME_ZONE_RULE_ENTRY* freerdp_get_current_time_zone_rule(TIME_ZONE_RULE_ENTRY* rules, UINT32 count) { int i; - uint64 windows_time; + UINT64 windows_time; windows_time = freerdp_windows_gmtime(); @@ -1663,14 +1663,14 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone) #ifdef HAVE_TM_GMTOFF if (local_time->tm_gmtoff >= 0) - clientTimeZone->bias = (uint32) (local_time->tm_gmtoff / 60); + clientTimeZone->bias = (UINT32) (local_time->tm_gmtoff / 60); else - clientTimeZone->bias = (uint32) (1440 + (sint32) (local_time->tm_gmtoff / 60)); + clientTimeZone->bias = (UINT32) (1440 + (INT32) (local_time->tm_gmtoff / 60)); #elif sun if (local_time->tm_isdst > 0) - clientTimeZone->bias = (uint32) (altzone / 3600); + clientTimeZone->bias = (UINT32) (altzone / 3600); else - clientTimeZone->bias = (uint32) (timezone / 3600); + clientTimeZone->bias = (UINT32) (timezone / 3600); #else clientTimeZone->bias = 0; #endif diff --git a/libfreerdp/locale/virtual_key_codes.c b/libfreerdp/locale/virtual_key_codes.c index bd2d9cc81..af93af025 100644 --- a/libfreerdp/locale/virtual_key_codes.c +++ b/libfreerdp/locale/virtual_key_codes.c @@ -31,7 +31,7 @@ struct _VIRTUAL_KEY_CODE { - uint32 code; /* Windows Virtual Key Code */ + UINT32 code; /* Windows Virtual Key Code */ const char* name; /* Virtual Key Code Name */ }; typedef struct _VIRTUAL_KEY_CODE VIRTUAL_KEY_CODE; @@ -296,12 +296,12 @@ static const VIRTUAL_KEY_CODE VIRTUAL_KEY_CODE_TABLE[256] = { 0, "" } }; -const char* freerdp_keyboard_get_virtual_key_code_name(uint32 vkcode) +const char* freerdp_keyboard_get_virtual_key_code_name(UINT32 vkcode) { return VIRTUAL_KEY_CODE_TABLE[vkcode].name; } -uint32 freerdp_keyboard_get_virtual_key_code_from_name(const char* vkcode_name) +UINT32 freerdp_keyboard_get_virtual_key_code_from_name(const char* vkcode_name) { int i = 0; for (i = 0; i < ARRAY_SIZE(VIRTUAL_KEY_CODE_TABLE); i++) diff --git a/libfreerdp/locale/xkb_layout_ids.c b/libfreerdp/locale/xkb_layout_ids.c index 1037351fa..623b86db3 100644 --- a/libfreerdp/locale/xkb_layout_ids.c +++ b/libfreerdp/locale/xkb_layout_ids.c @@ -33,14 +33,14 @@ struct _XKB_VARIANT { const char* variant; /* XKB Keyboard layout variant */ - uint32 keyboardLayoutID; /* Keyboard Layout ID */ + UINT32 keyboardLayoutID; /* Keyboard Layout ID */ }; typedef struct _XKB_VARIANT XKB_VARIANT; struct _XKB_LAYOUT { const char* layout; /* XKB Keyboard layout */ - uint32 keyboardLayoutID; /* Keyboard Layout ID */ + UINT32 keyboardLayoutID; /* Keyboard Layout ID */ const XKB_VARIANT* variants; }; typedef struct _XKB_LAYOUT XKB_LAYOUT; @@ -895,7 +895,7 @@ static const XKB_LAYOUT xkbLayouts[] = { "tm", KBD_TURKISH_Q, tm_variants }, /* Turkmenistan */ }; -uint32 find_keyboard_layout_in_xorg_rules(char* layout, char* variant) +UINT32 find_keyboard_layout_in_xorg_rules(char* layout, char* variant) { int i, j; diff --git a/libfreerdp/locale/xkb_layout_ids.h b/libfreerdp/locale/xkb_layout_ids.h index bfd379c5b..6e0c6469b 100644 --- a/libfreerdp/locale/xkb_layout_ids.h +++ b/libfreerdp/locale/xkb_layout_ids.h @@ -22,6 +22,6 @@ #include -uint32 find_keyboard_layout_in_xorg_rules(char* layout, char* variant); +UINT32 find_keyboard_layout_in_xorg_rules(char* layout, char* variant); #endif /* __FREERDP_XKB_LAYOUT_IDS_H */ diff --git a/libfreerdp/rail/window.c b/libfreerdp/rail/window.c index 5bfc9c722..792bd6b62 100644 --- a/libfreerdp/rail/window.c +++ b/libfreerdp/rail/window.c @@ -34,7 +34,7 @@ struct _WINDOW_STYLE { - uint32 style; + UINT32 style; const char* name; BOOL multi; }; @@ -97,7 +97,7 @@ static const WINDOW_STYLE EXTENDED_WINDOW_STYLES[] = { WS_EX_WINDOWEDGE, "WS_EX_WINDOWEDGE", FALSE } }; -void print_window_styles(uint32 style) +void print_window_styles(UINT32 style) { int i; @@ -118,7 +118,7 @@ void print_window_styles(uint32 style) printf("}\n"); } -void print_extended_window_styles(uint32 style) +void print_extended_window_styles(UINT32 style) { int i; diff --git a/libfreerdp/rail/window_list.c b/libfreerdp/rail/window_list.c index f225b5cb1..dc42f1d01 100644 --- a/libfreerdp/rail/window_list.c +++ b/libfreerdp/rail/window_list.c @@ -77,7 +77,7 @@ rdpWindow* window_list_get_by_extra_id(rdpWindowList* list, void* extraId) return NULL; } -rdpWindow* window_list_get_by_id(rdpWindowList* list, uint32 windowId) +rdpWindow* window_list_get_by_id(rdpWindowList* list, UINT32 windowId) { rdpWindow* window; diff --git a/libfreerdp/utils/bitmap.c b/libfreerdp/utils/bitmap.c index 9fb07a5a1..65004c2a7 100644 --- a/libfreerdp/utils/bitmap.c +++ b/libfreerdp/utils/bitmap.c @@ -35,25 +35,25 @@ typedef struct typedef struct { - uint32 filesz; + UINT32 filesz; UINT16 creator1; UINT16 creator2; - uint32 bmp_offset; + UINT32 bmp_offset; } BITMAP_CORE_HEADER; typedef struct { - uint32 header_sz; - sint32 width; - sint32 height; + UINT32 header_sz; + INT32 width; + INT32 height; UINT16 nplanes; UINT16 bitspp; - uint32 compress_type; - uint32 bmp_bytesz; - sint32 hres; - sint32 vres; - uint32 ncolors; - uint32 nimpcolors; + UINT32 compress_type; + UINT32 bmp_bytesz; + INT32 hres; + INT32 vres; + UINT32 ncolors; + UINT32 nimpcolors; } BITMAP_INFO_HEADER; void freerdp_bitmap_write(char* filename, void* data, int width, int height, int bpp) diff --git a/libfreerdp/utils/dsp.c b/libfreerdp/utils/dsp.c index 503901fd4..189efc510 100644 --- a/libfreerdp/utils/dsp.c +++ b/libfreerdp/utils/dsp.c @@ -31,8 +31,8 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context, const BYTE* src, int bytes_per_sample, - uint32 schan, uint32 srate, int sframes, - uint32 rchan, uint32 rrate) + UINT32 schan, UINT32 srate, int sframes, + UINT32 rchan, UINT32 rrate) { BYTE* dst; BYTE* p; @@ -103,8 +103,8 @@ static const INT16 ima_step_size_table[] = static UINT16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm, int channel, BYTE sample) { - sint32 ss; - sint32 d; + INT32 ss; + INT32 d; ss = ima_step_size_table[adpcm->ima.last_step[channel]]; d = (ss >> 3); @@ -140,7 +140,7 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context, BYTE* dst; BYTE sample; UINT16 decoded; - uint32 out_size; + UINT32 out_size; int channel; int i; @@ -240,11 +240,11 @@ static const struct static BYTE dsp_encode_ima_adpcm_sample(ADPCM* adpcm, int channel, INT16 sample) { - sint32 e; - sint32 d; - sint32 ss; + INT32 e; + INT32 d; + INT32 ss; BYTE enc; - sint32 diff; + INT32 diff; ss = ima_step_size_table[adpcm->ima.last_step[channel]]; d = e = sample - adpcm->ima.last_sample[channel]; @@ -300,7 +300,7 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context, BYTE* dst; INT16 sample; BYTE encoded; - uint32 out_size; + UINT32 out_size; int i; out_size = size / 2; @@ -381,7 +381,7 @@ static const INT16 ms_adpcm_coeff2_table[] = static INT16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, BYTE sample, int channel) { INT8 nibble; - sint32 presample; + INT32 presample; nibble = (sample & 0x08 ? (INT8)sample - 16 : sample); presample = ((adpcm->ms.sample1[channel] * ms_adpcm_coeff1_table[adpcm->ms.predictor[channel]]) + @@ -404,7 +404,7 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, { BYTE* dst; BYTE sample; - uint32 out_size; + UINT32 out_size; out_size = size * 4; if (out_size > context->adpcm_maxlength) @@ -492,10 +492,10 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context, context->adpcm_size = dst - context->adpcm_buffer; } -static BYTE freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int channel) +static BYTE freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, INT32 sample, int channel) { - sint32 presample; - sint32 errordelta; + INT32 presample; + INT32 errordelta; presample = ((adpcm->ms.sample1[channel] * ms_adpcm_coeff1_table[adpcm->ms.predictor[channel]]) + (adpcm->ms.sample2[channel] * ms_adpcm_coeff2_table[adpcm->ms.predictor[channel]])) / 256; @@ -523,8 +523,8 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context, const BYTE* src, int size, int channels, int block_size) { BYTE* dst; - sint32 sample; - uint32 out_size; + INT32 sample; + UINT32 out_size; out_size = size / 2; if (out_size > context->adpcm_maxlength) diff --git a/libfreerdp/utils/msusb.c b/libfreerdp/utils/msusb.c index 3ec293bd7..b143e28ee 100644 --- a/libfreerdp/utils/msusb.c +++ b/libfreerdp/utils/msusb.c @@ -35,7 +35,7 @@ msusb_mspipe_new() } static void -msusb_mspipes_free(MSUSB_PIPE_DESCRIPTOR ** MsPipes, uint32 NumberOfPipes) +msusb_mspipes_free(MSUSB_PIPE_DESCRIPTOR ** MsPipes, UINT32 NumberOfPipes) { int pnum = 0; if (MsPipes) @@ -49,7 +49,7 @@ msusb_mspipes_free(MSUSB_PIPE_DESCRIPTOR ** MsPipes, uint32 NumberOfPipes) } void -msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, MSUSB_PIPE_DESCRIPTOR ** NewMsPipes, uint32 NewNumberOfPipes) +msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, MSUSB_PIPE_DESCRIPTOR ** NewMsPipes, UINT32 NewNumberOfPipes) { /* free orignal MsPipes */ msusb_mspipes_free(MsInterface->MsPipes, MsInterface->NumberOfPipes); @@ -60,7 +60,7 @@ msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, MSUSB_PIPE_DESCR } static MSUSB_PIPE_DESCRIPTOR ** -msusb_mspipes_read(BYTE * data, uint32 data_size, uint32 NumberOfPipes, int * offset) +msusb_mspipes_read(BYTE * data, UINT32 data_size, UINT32 NumberOfPipes, int * offset) { MSUSB_PIPE_DESCRIPTOR ** MsPipes; int pnum, move = 0; @@ -73,8 +73,8 @@ msusb_mspipes_read(BYTE * data, uint32 data_size, uint32 NumberOfPipes, int * of MSUSB_PIPE_DESCRIPTOR * MsPipe = msusb_mspipe_new(); data_read_UINT16(data + move, MsPipe->MaximumPacketSize); - data_read_uint32(data + move + 4, MsPipe->MaximumTransferSize); - data_read_uint32(data + move + 8, MsPipe->PipeFlags); + data_read_UINT32(data + move + 4, MsPipe->MaximumTransferSize); + data_read_UINT32(data + move + 8, MsPipe->PipeFlags); move += 12; /* Already set to zero by memset MsPipe->PipeHandle = 0; @@ -111,7 +111,7 @@ msusb_msinterface_free(MSUSB_INTERFACE_DESCRIPTOR * MsInterface) } static void -msusb_msinterface_free_list(MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces, uint32 NumInterfaces) +msusb_msinterface_free_list(MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces, UINT32 NumInterfaces) { int inum = 0; @@ -133,7 +133,7 @@ msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR * MsConfig, BYTE InterfaceNumb } MSUSB_INTERFACE_DESCRIPTOR * -msusb_msinterface_read(BYTE * data, uint32 data_size, int * offset) +msusb_msinterface_read(BYTE * data, UINT32 data_size, int * offset) { MSUSB_INTERFACE_DESCRIPTOR * MsInterface; @@ -143,7 +143,7 @@ msusb_msinterface_read(BYTE * data, uint32 data_size, int * offset) data_read_UINT16(data + 2, MsInterface->NumberOfPipesExpected); data_read_BYTE(data + 4, MsInterface->InterfaceNumber); data_read_BYTE(data + 5, MsInterface->AlternateSetting); - data_read_uint32(data + 8, MsInterface->NumberOfPipes); + data_read_UINT32(data + 8, MsInterface->NumberOfPipes); *offset += 12; MsInterface->InterfaceHandle = 0; @@ -184,9 +184,9 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, BYTE * data, i /* Padding */ data_write_BYTE(data + 7, 0); /* InterfaceHandle */ - data_write_uint32(data + 8, MsInterface->InterfaceHandle); + data_write_UINT32(data + 8, MsInterface->InterfaceHandle); /* NumberOfPipes */ - data_write_uint32(data + 12, MsInterface->NumberOfPipes); + data_write_UINT32(data + 12, MsInterface->NumberOfPipes); move += 16; /* Pipes */ MsPipes = MsInterface->MsPipes; @@ -200,13 +200,13 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, BYTE * data, i /* Interval */ data_write_BYTE(data + move + 3, MsPipe->bInterval); /* PipeType */ - data_write_uint32(data + move + 4, MsPipe->PipeType); + data_write_UINT32(data + move + 4, MsPipe->PipeType); /* PipeHandle */ - data_write_uint32(data + move + 8, MsPipe->PipeHandle); + data_write_UINT32(data + move + 8, MsPipe->PipeHandle); /* MaximumTransferSize */ - data_write_uint32(data + move + 12, MsPipe->MaximumTransferSize); + data_write_UINT32(data + move + 12, MsPipe->MaximumTransferSize); /* PipeFlags */ - data_write_uint32(data + move + 16, MsPipe->PipeFlags); + data_write_UINT32(data + move + 16, MsPipe->PipeFlags); move += 20; } @@ -217,7 +217,7 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, BYTE * data, i } static MSUSB_INTERFACE_DESCRIPTOR ** -msusb_msinterface_read_list(BYTE * data, uint32 data_size, uint32 NumInterfaces) +msusb_msinterface_read_list(BYTE * data, UINT32 data_size, UINT32 NumInterfaces) { MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces; int inum, offset = 0; @@ -242,9 +242,9 @@ msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR * MsConfg, BYTE * data, int * offse int inum = 0; /* ConfigurationHandle*/ - data_write_uint32(data + *offset, MsConfg->ConfigurationHandle); + data_write_UINT32(data + *offset, MsConfg->ConfigurationHandle); /* NumInterfaces*/ - data_write_uint32(data + *offset + 4, MsConfg->NumInterfaces); + data_write_UINT32(data + *offset + 4, MsConfg->NumInterfaces); *offset += 8; /* Interfaces */ MsInterfaces = MsConfg->MsInterfaces; @@ -279,7 +279,7 @@ msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR * MsConfig) } MSUSB_CONFIG_DESCRIPTOR * -msusb_msconfig_read(BYTE * data, uint32 data_size, uint32 NumInterfaces) +msusb_msconfig_read(BYTE * data, UINT32 data_size, UINT32 NumInterfaces) { MSUSB_CONFIG_DESCRIPTOR * MsConfig; BYTE lenConfiguration, typeConfiguration; diff --git a/libfreerdp/utils/pcap.c b/libfreerdp/utils/pcap.c index 3984c96b4..8e88b0d90 100644 --- a/libfreerdp/utils/pcap.c +++ b/libfreerdp/utils/pcap.c @@ -83,7 +83,7 @@ void pcap_write_record(rdpPcap* pcap, pcap_record* record) fwrite(record->data, record->length, 1, pcap->fp); } -void pcap_add_record(rdpPcap* pcap, void* data, uint32 length) +void pcap_add_record(rdpPcap* pcap, void* data, UINT32 length) { pcap_record* record; struct timeval tp; diff --git a/libfreerdp/utils/rail.c b/libfreerdp/utils/rail.c index 90b65487d..6ab19ec02 100644 --- a/libfreerdp/utils/rail.c +++ b/libfreerdp/utils/rail.c @@ -90,12 +90,12 @@ void rail_write_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16) stream_write_UINT16(s, rectangle_16->bottom); /* bottom (2 bytes) */ } -void* rail_clone_order(uint32 event_type, void* order) +void* rail_clone_order(UINT32 event_type, void* order) { struct { - uint32 type; - uint32 size; + UINT32 type; + UINT32 size; } ordersize_table[] = { {RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS, sizeof(RAIL_SYSPARAM_ORDER)}, @@ -174,7 +174,7 @@ void* rail_clone_order(uint32 event_type, void* order) return new_order; } -void rail_free_cloned_order(uint32 event_type, void* order) +void rail_free_cloned_order(UINT32 event_type, void* order) { //printf("rail_free_cloned_order: type=%d order=%p\n", event_type, order); if ((event_type == RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS) || diff --git a/libfreerdp/utils/sleep.c b/libfreerdp/utils/sleep.c index ae24add6b..1a74eaad6 100644 --- a/libfreerdp/utils/sleep.c +++ b/libfreerdp/utils/sleep.c @@ -32,7 +32,7 @@ #include #endif -void freerdp_sleep(uint32 seconds) +void freerdp_sleep(UINT32 seconds) { #ifndef _WIN32 sleep(seconds); @@ -41,14 +41,14 @@ void freerdp_sleep(uint32 seconds) #endif } -void freerdp_usleep(uint32 useconds) +void freerdp_usleep(UINT32 useconds) { #ifndef _WIN32 usleep(useconds); #else - uint64 t1; - uint64 t2; - uint64 freq; + UINT64 t1; + UINT64 t2; + UINT64 freq; QueryPerformanceCounter((LARGE_INTEGER*) &t1); QueryPerformanceCounter((LARGE_INTEGER*) &freq); diff --git a/libfreerdp/utils/stopwatch.c b/libfreerdp/utils/stopwatch.c index c1f3f4d8e..a9ffd6bb6 100644 --- a/libfreerdp/utils/stopwatch.c +++ b/libfreerdp/utils/stopwatch.c @@ -66,18 +66,18 @@ double stopwatch_get_elapsed_time_in_seconds(STOPWATCH* stopwatch) return ((double) stopwatch->elapsed) / CLOCKS_PER_SEC; } -void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, uint32* sec, uint32* usec) +void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, UINT32* sec, UINT32* usec) { double uelapsed; double clocks_per_usec; - *sec = ((uint32) stopwatch->elapsed) / CLOCKS_PER_SEC; + *sec = ((UINT32) stopwatch->elapsed) / CLOCKS_PER_SEC; uelapsed = stopwatch->elapsed - ((double)(*sec) * CLOCKS_PER_SEC); clocks_per_usec = (CLOCKS_PER_SEC / 1000000); if (clocks_per_usec > 0.0) - *usec = (uint32)(uelapsed / clocks_per_usec); + *usec = (UINT32)(uelapsed / clocks_per_usec); else *usec = 0; } diff --git a/libfreerdp/utils/string.c b/libfreerdp/utils/string.c index e79c926b9..92f900f71 100644 --- a/libfreerdp/utils/string.c +++ b/libfreerdp/utils/string.c @@ -31,7 +31,7 @@ void freerdp_string_read_length32(STREAM* s, rdpString* string) { - stream_read_uint32(s, string->length); + stream_read_UINT32(s, string->length); string->unicode = (char*) malloc(string->length); stream_read(s, string->unicode, string->length); freerdp_UnicodeToAsciiAlloc((WCHAR*) string->unicode, &string->ascii, string->length / 2); diff --git a/libfreerdp/utils/svc_plugin.c b/libfreerdp/utils/svc_plugin.c index 4824f6e90..1d8f31fea 100644 --- a/libfreerdp/utils/svc_plugin.c +++ b/libfreerdp/utils/svc_plugin.c @@ -75,7 +75,7 @@ static void svc_data_in_item_free(svc_data_in_item* item) struct rdp_svc_plugin_private { void* init_handle; - uint32 open_handle; + UINT32 open_handle; STREAM* data_in; LIST* data_in_list; @@ -105,7 +105,7 @@ static rdpSvcPlugin* svc_plugin_find_by_init_handle(void* init_handle) return NULL; } -static rdpSvcPlugin* svc_plugin_find_by_open_handle(uint32 open_handle) +static rdpSvcPlugin* svc_plugin_find_by_open_handle(UINT32 open_handle) { rdpSvcPluginList * list; rdpSvcPlugin * plugin; @@ -150,8 +150,8 @@ static void svc_plugin_remove(rdpSvcPlugin* plugin) ReleaseMutex(g_mutex); } -static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, uint32 dataLength, - uint32 totalLength, uint32 dataFlags) +static void svc_plugin_process_received(rdpSvcPlugin* plugin, void* pData, UINT32 dataLength, + UINT32 totalLength, UINT32 dataFlags) { STREAM* data_in; svc_data_in_item* item; @@ -211,8 +211,8 @@ static void svc_plugin_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event_in) freerdp_thread_signal(plugin->priv->thread); } -static void svc_plugin_open_event(uint32 openHandle, uint32 event, void* pData, uint32 dataLength, - uint32 totalLength, uint32 dataFlags) +static void svc_plugin_open_event(UINT32 openHandle, UINT32 event, void* pData, UINT32 dataLength, + UINT32 totalLength, UINT32 dataFlags) { rdpSvcPlugin* plugin; @@ -303,9 +303,9 @@ static void* svc_plugin_thread_func(void* arg) return 0; } -static void svc_plugin_process_connected(rdpSvcPlugin* plugin, void* pData, uint32 dataLength) +static void svc_plugin_process_connected(rdpSvcPlugin* plugin, void* pData, UINT32 dataLength) { - uint32 error; + UINT32 error; error = plugin->channel_entry_points.pVirtualChannelOpen(plugin->priv->init_handle, &plugin->priv->open_handle, plugin->channel_def.name, svc_plugin_open_event); @@ -349,7 +349,7 @@ static void svc_plugin_process_terminated(rdpSvcPlugin* plugin) IFCALL(plugin->terminate_callback, plugin); } -static void svc_plugin_init_event(void* pInitHandle, uint32 event, void* pData, uint32 dataLength) +static void svc_plugin_init_event(void* pInitHandle, UINT32 event, void* pData, UINT32 dataLength) { rdpSvcPlugin* plugin; @@ -408,7 +408,7 @@ void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints) int svc_plugin_send(rdpSvcPlugin* plugin, STREAM* data_out) { - uint32 error = 0; + UINT32 error = 0; DEBUG_SVC("length %d", (int) stream_get_length(data_out)); @@ -429,7 +429,7 @@ int svc_plugin_send(rdpSvcPlugin* plugin, STREAM* data_out) int svc_plugin_send_event(rdpSvcPlugin* plugin, RDP_EVENT* event) { - uint32 error = 0; + UINT32 error = 0; DEBUG_SVC("event_type %d", event->event_type); diff --git a/libfreerdp/utils/tcp.c b/libfreerdp/utils/tcp.c index 44f862b37..ffd3ac6a0 100644 --- a/libfreerdp/utils/tcp.c +++ b/libfreerdp/utils/tcp.c @@ -185,7 +185,7 @@ int freerdp_tcp_disconnect(int sockfd) int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay) { - uint32 option_value; + UINT32 option_value; socklen_t option_len; option_value = no_delay; diff --git a/libfreerdp/utils/time.c b/libfreerdp/utils/time.c index 09f678b73..6e7885b0e 100644 --- a/libfreerdp/utils/time.c +++ b/libfreerdp/utils/time.c @@ -29,10 +29,10 @@ #include -uint64 freerdp_windows_gmtime() +UINT64 freerdp_windows_gmtime() { time_t unix_time; - uint64 windows_time; + UINT64 windows_time; gmtime(&unix_time); windows_time = freerdp_get_windows_time_from_unix_time(unix_time); @@ -40,14 +40,14 @@ uint64 freerdp_windows_gmtime() return windows_time; } -uint64 freerdp_get_windows_time_from_unix_time(time_t unix_time) +UINT64 freerdp_get_windows_time_from_unix_time(time_t unix_time) { - uint64 windows_time; + UINT64 windows_time; windows_time = (unix_time * 10000000) + 621355968000000000ULL; return windows_time; } -time_t freerdp_get_unix_time_from_windows_time(uint64 windows_time) +time_t freerdp_get_unix_time_from_windows_time(UINT64 windows_time) { time_t unix_time; unix_time = (windows_time - 621355968000000000ULL) / 10000000; diff --git a/server/Sample/sf_audin.c b/server/Sample/sf_audin.c index 807af2a4e..9c19aaa7a 100644 --- a/server/Sample/sf_audin.c +++ b/server/Sample/sf_audin.c @@ -46,7 +46,7 @@ static void sf_peer_audin_opening(audin_server_context* context) context->SelectFormat(context, 0); } -static void sf_peer_audin_open_result(audin_server_context* context, uint32 result) +static void sf_peer_audin_open_result(audin_server_context* context, UINT32 result) { printf("AUDIN open result %d.\n", result); } diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 08941af9b..9c4cf489f 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -321,9 +321,9 @@ static void test_peer_draw_icon(freerdp_peer* client, int x, int y) test_peer_end_frame(client); } -static BOOL test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) +static BOOL test_sleep_tsdiff(UINT32 *old_sec, UINT32 *old_usec, UINT32 new_sec, UINT32 new_usec) { - sint32 sec, usec; + INT32 sec, usec; if (*old_sec==0 && *old_usec==0) { @@ -362,8 +362,8 @@ static BOOL test_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, void tf_peer_dump_rfx(freerdp_peer* client) { STREAM* s; - uint32 prev_seconds; - uint32 prev_useconds; + UINT32 prev_seconds; + UINT32 prev_useconds; rdpUpdate* update; rdpPcap* pcap_rfx; pcap_record record; @@ -401,7 +401,7 @@ static void* tf_debug_channel_thread_func(void* arg) void* fd; STREAM* s; void* buffer; - uint32 bytes_returned = 0; + UINT32 bytes_returned = 0; testPeerContext* context = (testPeerContext*) arg; freerdp_thread* thread = context->debug_channel_thread; @@ -537,7 +537,7 @@ BOOL tf_peer_activate(freerdp_peer* client) return TRUE; } -void tf_peer_synchronize_event(rdpInput* input, uint32 flags) +void tf_peer_synchronize_event(rdpInput* input, UINT32 flags) { printf("Client sent a synchronize event (flags:0x%X)\n", flags); } diff --git a/server/Sample/sfreerdp.h b/server/Sample/sfreerdp.h index 616899ca1..a0b497627 100644 --- a/server/Sample/sfreerdp.h +++ b/server/Sample/sfreerdp.h @@ -48,7 +48,7 @@ struct test_peer_context freerdp_thread* debug_channel_thread; audin_server_context* audin; BOOL audin_open; - uint32 frame_id; + UINT32 frame_id; rdpsnd_server_context* rdpsnd; }; typedef struct test_peer_context testPeerContext; diff --git a/server/Windows/wf_peer.c b/server/Windows/wf_peer.c index df134f5eb..74e454911 100644 --- a/server/Windows/wf_peer.c +++ b/server/Windows/wf_peer.c @@ -115,7 +115,7 @@ BOOL wf_peer_logon(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL return TRUE; } -void wf_peer_synchronize_event(rdpInput* input, uint32 flags) +void wf_peer_synchronize_event(rdpInput* input, UINT32 flags) { } diff --git a/server/Windows/wf_peer.h b/server/Windows/wf_peer.h index fb8a74c16..0aa76f82a 100644 --- a/server/Windows/wf_peer.h +++ b/server/Windows/wf_peer.h @@ -37,7 +37,7 @@ void wf_rfx_encode(freerdp_peer* client); BOOL wf_peer_post_connect(freerdp_peer* client); BOOL wf_peer_activate(freerdp_peer* client); -void wf_peer_synchronize_event(rdpInput* input, uint32 flags); +void wf_peer_synchronize_event(rdpInput* input, UINT32 flags); void wf_peer_send_changes(freerdp_peer* client); diff --git a/server/X11/xf_encode.c b/server/X11/xf_encode.c index afa70ed4b..94ba317c9 100644 --- a/server/X11/xf_encode.c +++ b/server/X11/xf_encode.c @@ -81,7 +81,7 @@ void* xf_frame_rate_thread(void* param) xfEvent* event; xfPeerContext* xfp; freerdp_peer* client; - uint32 wait_interval; + UINT32 wait_interval; client = (freerdp_peer*) param; xfp = (xfPeerContext*) client->context; @@ -110,7 +110,7 @@ void* xf_monitor_updates(void* param) int pending_events; xfPeerContext* xfp; freerdp_peer* client; - uint32 wait_interval; + UINT32 wait_interval; struct timeval timeout; int x, y, width, height; XDamageNotifyEvent* notify; diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index a646b58eb..a8acf68b4 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -27,7 +27,7 @@ #include "xf_input.h" -void xf_input_synchronize_event(rdpInput* input, uint32 flags) +void xf_input_synchronize_event(rdpInput* input, UINT32 flags) { printf("Client sent a synchronize event (flags:0x%X)\n", flags); } diff --git a/server/X11/xf_input.h b/server/X11/xf_input.h index b53b27db5..201b21b53 100644 --- a/server/X11/xf_input.h +++ b/server/X11/xf_input.h @@ -24,7 +24,7 @@ #include "xfreerdp.h" -void xf_input_synchronize_event(rdpInput* input, uint32 flags); +void xf_input_synchronize_event(rdpInput* input, UINT32 flags); void xf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void xf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code); void xf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y); diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 2fcb19b89..d0cf6fc94 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -320,9 +320,9 @@ void xf_peer_live_rfx(freerdp_peer* client) pthread_create(&(xfp->thread), 0, xf_monitor_updates, (void*) client); } -static BOOL xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec) +static BOOL xf_peer_sleep_tsdiff(UINT32 *old_sec, UINT32 *old_usec, UINT32 new_sec, UINT32 new_usec) { - sint32 sec, usec; + INT32 sec, usec; if (*old_sec == 0 && *old_usec == 0) { @@ -361,8 +361,8 @@ static BOOL xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_s void xf_peer_dump_rfx(freerdp_peer* client) { STREAM* s; - uint32 prev_seconds; - uint32 prev_useconds; + UINT32 prev_seconds; + UINT32 prev_useconds; rdpUpdate* update; rdpPcap* pcap_rfx; pcap_record record; From 47c44ae3ddce92036307f229fbe868c1a497a4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 11:35:29 -0400 Subject: [PATCH 39/43] libfreerdp: fix monolithic build --- libfreerdp/channels/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libfreerdp/channels/CMakeLists.txt b/libfreerdp/channels/CMakeLists.txt index 4d4a51f3a..a95637bfc 100644 --- a/libfreerdp/channels/CMakeLists.txt +++ b/libfreerdp/channels/CMakeLists.txt @@ -32,10 +32,6 @@ endif() set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -if(STATIC_CHANNELS) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) -endif() - if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) From fba82c1a2370e6cd2b2decdba3b94c5fef8b8e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 12:23:35 -0400 Subject: [PATCH 40/43] wfreerdp: fix compilation on Windows --- channels/disk/ChannelOptions.cmake | 7 ++----- channels/rdpdr/ChannelOptions.cmake | 6 +----- client/Windows/CMakeLists.txt | 6 ++---- client/Windows/wfreerdp.c | 27 ++++++++++++++------------- include/freerdp/client/channels.h | 6 +++--- 5 files changed, 22 insertions(+), 30 deletions(-) diff --git a/channels/disk/ChannelOptions.cmake b/channels/disk/ChannelOptions.cmake index 08ae24735..9bb8f8f15 100644 --- a/channels/disk/ChannelOptions.cmake +++ b/channels/disk/ChannelOptions.cmake @@ -6,9 +6,6 @@ set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS]") string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) -if(WIN32) - option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) -else() - option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) -endif() +option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) + diff --git a/channels/rdpdr/ChannelOptions.cmake b/channels/rdpdr/ChannelOptions.cmake index 85e3f63b5..6ae191b62 100644 --- a/channels/rdpdr/ChannelOptions.cmake +++ b/channels/rdpdr/ChannelOptions.cmake @@ -6,9 +6,5 @@ set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]") string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) -if(WIN32) - option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) -else() - option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) -endif() +option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index f289dad00..18c2cffb4 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -36,12 +36,10 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) + if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) - - if(WITH_RDPDR AND STATIC_CHANNELS) - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rdpdr disk printer) - endif() else() set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-core diff --git a/client/Windows/wfreerdp.c b/client/Windows/wfreerdp.c index d9c371447..61acdb5fd 100644 --- a/client/Windows/wfreerdp.c +++ b/client/Windows/wfreerdp.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include "wf_gdi.h" @@ -453,9 +454,21 @@ BOOL wf_check_fds(freerdp* instance) int wf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data) { + void* entry = NULL; rdpChannels* channels = (rdpChannels*) user_data; - printf("loading plugin %s\n", name); + entry = freerdp_channels_find_static_virtual_channel_entry(name); + + if (entry) + { + if (freerdp_channels_client_load(channels, settings, entry, plugin_data) == 0) + { + printf("loading channel %s (static)\n", name); + return 1; + } + } + + printf("loading channel %s (plugin)\n", name); freerdp_channels_load_plugin(channels, settings, name, plugin_data); return 1; @@ -637,12 +650,6 @@ static DWORD WINAPI kbd_thread_func(LPVOID lpParam) return (DWORD) NULL; } -#ifdef WITH_RDPDR -DEFINE_SVC_PLUGIN_ENTRY(rdpdr) ; -DEFINE_DEV_PLUGIN_ENTRY(disk) ; -DEFINE_DEV_PLUGIN_ENTRY(printer) ; -#endif - INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { @@ -701,12 +708,6 @@ INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine instance->context->argc = __argc; instance->context->argv = __argv; -#ifdef WITH_RDPDR - REGISTER_SVC_PLUGIN_ENTRY(rdpdr); - REGISTER_DEV_PLUGIN_ENTRY(disk); - REGISTER_DEV_PLUGIN_ENTRY(printer); -#endif - if (!CreateThread(NULL, 0, kbd_thread_func, NULL, 0, NULL)) printf("error creating keyboard handler thread"); diff --git a/include/freerdp/client/channels.h b/include/freerdp/client/channels.h index 1d699f229..824ed40e3 100644 --- a/include/freerdp/client/channels.h +++ b/include/freerdp/client/channels.h @@ -22,9 +22,9 @@ #include -void* freerdp_channels_find_static_virtual_channel_entry(const char* name); -void* freerdp_channels_find_static_device_service_entry(const char* name); -void* freerdp_channels_find_static_entry(const char* name, const char* entry); +FREERDP_API void* freerdp_channels_find_static_virtual_channel_entry(const char* name); +FREERDP_API void* freerdp_channels_find_static_device_service_entry(const char* name); +FREERDP_API void* freerdp_channels_find_static_entry(const char* name, const char* entry); #endif /* FREERDP_CHANNELS_CLIENT */ From cdf56c0e3fbf2b5eb5e11da007cfdf4b42827786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 9 Oct 2012 12:38:18 -0400 Subject: [PATCH 41/43] dfreerdp: fix loading of static channels --- client/DirectFB/CMakeLists.txt | 1 + client/DirectFB/dfreerdp.c | 28 +++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/client/DirectFB/CMakeLists.txt b/client/DirectFB/CMakeLists.txt index 30a44fe1b..e5975cd9f 100644 --- a/client/DirectFB/CMakeLists.txt +++ b/client/DirectFB/CMakeLists.txt @@ -31,6 +31,7 @@ set(${MODULE_PREFIX}_SRCS add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${DIRECTFB_LIBRARIES}) +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) if(MONOLITHIC_BUILD) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) diff --git a/client/DirectFB/dfreerdp.c b/client/DirectFB/dfreerdp.c index d957c1478..e960fd908 100644 --- a/client/DirectFB/dfreerdp.c +++ b/client/DirectFB/dfreerdp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -158,8 +159,8 @@ BOOL df_pre_connect(freerdp* instance) dfi->clrconv->palette = xnew(rdpPalette); freerdp_channels_pre_connect(instance->context->channels, instance); - - instance->context->cache = cache_new(instance->settings); + + instance->context->cache = cache_new(instance->settings); return TRUE; } @@ -223,9 +224,21 @@ BOOL df_post_connect(freerdp* instance) static int df_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data) { + void* entry = NULL; rdpChannels* channels = (rdpChannels*) user_data; - printf("loading plugin %s\n", name); + entry = freerdp_channels_find_static_virtual_channel_entry(name); + + if (entry) + { + if (freerdp_channels_client_load(channels, settings, entry, plugin_data) == 0) + { + printf("loading channel %s (static)\n", name); + return 1; + } + } + + printf("loading channel %s (plugin)\n", name); freerdp_channels_load_plugin(channels, settings, name, plugin_data); return 1; @@ -260,14 +273,12 @@ BOOL df_verify_certificate(freerdp* instance, char* subject, char* issuer, char* return FALSE; } -static int -df_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) +static int df_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size) { return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } -static void -df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance) +static void df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance) { RDP_EVENT* event; RDP_CB_FORMAT_LIST_EVENT* format_list_event; @@ -280,8 +291,7 @@ df_process_cb_monitor_ready_event(rdpChannels* channels, freerdp* instance) freerdp_channels_send_event(channels, event); } -static void -df_process_channel_event(rdpChannels* channels, freerdp* instance) +static void df_process_channel_event(rdpChannels* channels, freerdp* instance) { RDP_EVENT* event; From 10f6b797cd984807b6bb9a6af540d3bf0cd2eb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Moreau?= Date: Tue, 9 Oct 2012 13:04:41 -0400 Subject: [PATCH 42/43] xfreerdp: fix compilation on Mac OS X --- client/Mac/.gitignore | 2 ++ client/Mac/Info.plist | 6 +++--- libfreerdp/core/http.c | 4 ---- libfreerdp/locale/keyboard_keymap.c | 4 ++++ winpr/include/winpr/wtypes.h | 1 - winpr/libwinpr/crt/alignment.c | 5 +++++ 6 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 client/Mac/.gitignore diff --git a/client/Mac/.gitignore b/client/Mac/.gitignore new file mode 100644 index 000000000..600769254 --- /dev/null +++ b/client/Mac/.gitignore @@ -0,0 +1,2 @@ +*.app + diff --git a/client/Mac/Info.plist b/client/Mac/Info.plist index 530ecb9a7..119d3fec6 100644 --- a/client/Mac/Info.plist +++ b/client/Mac/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + CFBundleIconFile CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + CFBundlePackageType APPL CFBundleShortVersionString @@ -23,7 +23,7 @@ CFBundleVersion 1 LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright Copyright © 2012 __MyCompanyName__. All rights reserved. NSMainNibFile diff --git a/libfreerdp/core/http.c b/libfreerdp/core/http.c index da25709ef..561174326 100644 --- a/libfreerdp/core/http.c +++ b/libfreerdp/core/http.c @@ -151,10 +151,6 @@ void http_request_set_auth_param(HttpRequest* http_request, char* auth_param) #ifndef _WIN32 -#ifndef errno_t -typedef int errno_t; -#endif - errno_t _itoa_s(int value, char* buffer, size_t sizeInCharacters, int radix) { int length; diff --git a/libfreerdp/locale/keyboard_keymap.c b/libfreerdp/locale/keyboard_keymap.c index e4eb06b9e..920e6b59f 100644 --- a/libfreerdp/locale/keyboard_keymap.c +++ b/libfreerdp/locale/keyboard_keymap.c @@ -23,6 +23,10 @@ #include "keyboard_keymap.h" +#include +#include +#include + #include #include #include diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 65868531c..6a7c1099e 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -262,7 +262,6 @@ typedef struct _PROCESS_INFORMATION typedef DWORD (*PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter); typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE; -typedef void* HMODULE; typedef void* FARPROC; #endif diff --git a/winpr/libwinpr/crt/alignment.c b/winpr/libwinpr/crt/alignment.c index 084eef03f..bc60d35a6 100644 --- a/winpr/libwinpr/crt/alignment.c +++ b/winpr/libwinpr/crt/alignment.c @@ -28,7 +28,12 @@ #ifndef _WIN32 #include + +#ifdef __APPLE__ +#include +#else #include +#endif void* _aligned_malloc(size_t size, size_t alignment) { From b8cd2175d5d8ccf1b7eab1a412490ee51077beb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Moreau?= Date: Tue, 9 Oct 2012 13:38:42 -0400 Subject: [PATCH 43/43] macfreerdp: fix compilation --- .gitignore | 2 ++ client/Mac/AppDelegate.m | 5 +++-- client/Mac/MRDPRailView.h | 1 + winpr/include/winpr/wtypes.h | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8bb66ef8b..e47362dfd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # CMake CMakeFiles/ +CMakeScripts/ CMakeCache.txt config.h install_manifest.txt @@ -23,6 +24,7 @@ client/X11/xfreerdp.1 # Mac OS X .DS_Store +*.xcodeproj/ # Windows *.vcxproj diff --git a/client/Mac/AppDelegate.m b/client/Mac/AppDelegate.m index 3b7658d80..755f02de6 100644 --- a/client/Mac/AppDelegate.m +++ b/client/Mac/AppDelegate.m @@ -10,8 +10,9 @@ @implementation AppDelegate -//@synthesize window = _window; -//@synthesize mrdpView; +@synthesize window = _window; + +@synthesize mrdpView; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { diff --git a/client/Mac/MRDPRailView.h b/client/Mac/MRDPRailView.h index ee2df3866..d33f4628b 100644 --- a/client/Mac/MRDPRailView.h +++ b/client/Mac/MRDPRailView.h @@ -2,6 +2,7 @@ #import "freerdp/gdi/gdi.h" #import "freerdp/rail/rail.h" + #import "MRDPRailWindow.h" @interface MRDPRailView : NSView diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 6a7c1099e..67698a54f 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -39,12 +39,12 @@ #define __int3264 __int32 #endif -#ifdef OBJC_BOOL_DEFINED -typedef OBJC_BOOL BOOL, *PBOOL, *LPBOOL; -#else -typedef int BOOL, *PBOOL, *LPBOOL; +#ifndef __OBJC__ +typedef int BOOL; #endif +typedef BOOL *PBOOL, *LPBOOL; + typedef unsigned char BYTE, *PBYTE, *LPBYTE; typedef BYTE BOOLEAN, *PBOOLEAN; typedef unsigned short WCHAR, *PWCHAR;