xfreerdp: fix including from C++

This commit is contained in:
Marc-André Moreau 2013-04-03 18:48:59 -04:00
parent 55fb73fc42
commit 7b2f70c0c7
3 changed files with 10 additions and 1 deletions

View File

@ -1520,6 +1520,7 @@ xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv)
for (index = 0; index < argc; index++) for (index = 0; index < argc; index++)
{ {
printf("argv[%d]: %s\n", index, argv[index]);
instance->context->argv[index] = _strdup(argv[index]); instance->context->argv[index] = _strdup(argv[index]);
} }

View File

@ -39,6 +39,10 @@ typedef struct xf_info xfInfo;
#include "xf_window.h" #include "xf_window.h"
#include "xf_monitor.h" #include "xf_monitor.h"
#ifdef __cplusplus
extern "C" {
#endif
struct xf_WorkArea struct xf_WorkArea
{ {
UINT32 x; UINT32 x;
@ -236,4 +240,8 @@ FREERDP_API int xf_stop(xfInfo* xfi);
FREERDP_API xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv); FREERDP_API xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv);
FREERDP_API void xf_free(xfInfo* xfi); FREERDP_API void xf_free(xfInfo* xfi);
#ifdef __cplusplus
}
#endif
#endif /* __XF_INTERFACE_H */ #endif /* __XF_INTERFACE_H */

View File

@ -331,7 +331,7 @@ WINPR_API void stream_extend(wStream* stream, int request_size);
} while (0) } while (0)
static INLINE BOOL stream_skip(wStream* s, int sz) { static INLINE BOOL stream_skip(wStream* s, int sz) {
if (stream_get_left(s) < sz) if ((int) stream_get_left(s) < sz)
return FALSE; return FALSE;
stream_seek(s, sz); stream_seek(s, sz);
return TRUE; return TRUE;