[X2Go-Commits] [x2goclient] 01/01: help.cpp: fix a compile warning (by including winsock2.h) and error (caused by a typo) on Windows.
git-admin at x2go.org
git-admin at x2go.org
Thu Apr 23 01:24:43 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/help-cmd
in repository x2goclient.
commit 729415a354ea6fb26aa8f72866033ac908be8c44
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Apr 23 01:24:08 2015 +0200
help.cpp: fix a compile warning (by including winsock2.h) and error (caused by a typo) on Windows.
---
debian/changelog | 2 ++
src/help.cpp | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 519281a..71ed3eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -284,6 +284,8 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
- help.cpp: add support for newlines within descriptions.
- help.cpp: use new newline feature for some options.
- help.cpp: trying to split at hyphens was a bad idea. Remove that part.
+ - help.cpp: fix a compile warning (by including winsock2.h) and error
+ (caused by a typo) on Windows.
[ Fernando Pedemonte ]
* New upstream release (4.0.4.0):
diff --git a/src/help.cpp b/src/help.cpp
index 6c91341..2ac08e4 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -28,6 +28,8 @@
/* For terminal size. */
#ifdef Q_OS_WIN
+/* winsock2.h is not really needed, but including it silences a compile warning... */
+#include <winsock2.h>
#include <windows.h>
#elif defined (Q_OS_UNIX)
#include <stdio.h>
@@ -182,7 +184,7 @@ QString help::pretty_print (help::data_t data) {
HANDLE stderr_handle = GetStdHandle (STD_ERROR_HANDLE);
if (stderr_handle && (stderr_handle != INVALID_HANDLE_VALUE)) {
if (GetConsoleScreenBufferInfo (stderr_handle, &terminal_internal)) {
- terminal_cols = (terminal_internal.srWindow.Right - terminal_internal.Left) + 1;
+ terminal_cols = (terminal_internal.srWindow.Right - terminal_internal.srWindow.Left) + 1;
}
}
#elif defined (Q_OS_UNIX)
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list