[gtk-vnc] Remove trailing whitespace from all files
- From: Daniel P. Berrange <dberrange src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk-vnc] Remove trailing whitespace from all files
- Date: Mon, 6 Jul 2009 11:25:14 +0000 (UTC)
commit 7ec22ecc2ff2902db88302d371fea9363a8e7886
Author: Daniel P. Berrange <berrange redhat com>
Date: Mon Jul 6 12:24:56 2009 +0100
Remove trailing whitespace from all files
COPYING.LIB | 2 +-
README | 6 +-
autogen.sh | 4 +-
configure.ac | 4 +-
examples/gvncviewer.c | 4 +-
examples/gvncviewer.py | 2 +-
plugin/gtk-vnc-plugin.c | 6 +-
plugin/npshell.c | 30 +++++-----
plugin/npunix.c | 22 ++++----
src/blt.h | 4 +-
src/blt1.h | 2 +-
src/continuation.c | 2 +-
src/continuation.h | 2 +-
src/coroutine.h | 2 +-
src/coroutine_gthread.c | 2 +-
src/coroutine_ucontext.c | 2 +-
src/d3des.c | 132 +++++++++++++++++++++++-----------------------
src/d3des.h | 60 ++++++++++----------
src/gvnc.c | 20 ++++----
src/gvnc.h | 2 +-
src/utils.h | 2 +-
src/vnc.override | 8 ++--
src/vnc_keycodes.h | 4 +-
src/vncdisplay.c | 24 ++++----
src/vncdisplay.h | 2 +-
src/vncmodule.c | 16 +++---
src/x_keymap.h | 2 +-
27 files changed, 184 insertions(+), 184 deletions(-)
---
diff --git a/COPYING.LIB b/COPYING.LIB
index a2a1d92..ce120de 100644
--- a/COPYING.LIB
+++ b/COPYING.LIB
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
diff --git a/README b/README
index 7f7d8ef..4fb259d 100644
--- a/README
+++ b/README
@@ -1,13 +1,13 @@
GTK VNC Readme
===============
-gtk-vnc is a VNC viewer widget for GTK. It is built using
-coroutines allowing it to be completely asynchronous while
+gtk-vnc is a VNC viewer widget for GTK. It is built using
+coroutines allowing it to be completely asynchronous while
remaining single threaded. It provides a core C library, and
bindings for Python (PyGTK)
The API is still in early stages of development & so until
-version 1.0 is declared, the API may change. The primary
+version 1.0 is declared, the API may change. The primary
public API is provided by the vncdisplay.h class & should
be reasonably free of API churn. The other header files are
internal VNC protocol implementation & will very likely change.
diff --git a/autogen.sh b/autogen.sh
index c939642..4859a64 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,7 +3,7 @@
set -e
srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
@@ -55,6 +55,6 @@ rm -f COPYING
cd $THEDIR
$srcdir/configure --enable-warnings "$@" && {
- echo
+ echo
echo "Now type 'make' to compile gtk-vnc."
}
diff --git a/configure.ac b/configure.ac
index f2aba77..f443ce0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@ AC_ARG_WITH(examples,
esac],[withval=no])
WITH_EXAMPLES=$withval
-
+
dnl check ld support --version-script
ld --help>/tmp/$$ 2>&1
if `cat /tmp/$$|grep version-script>/dev/null 2>&1`; then
@@ -307,7 +307,7 @@ fi
echo "
Configure summary:
- Compiler ...................: ${CC}
+ Compiler ...................: ${CC}
Compiler Flags .............: ${CFLAGS}
Prefix......................: ${prefix}
diff --git a/examples/gvncviewer.c b/examples/gvncviewer.c
index 0d4d227..97bdef8 100644
--- a/examples/gvncviewer.c
+++ b/examples/gvncviewer.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -34,7 +34,7 @@
static gchar **args = NULL;
static const GOptionEntry options [] =
{
- {
+ {
G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &args,
NULL, "hostname[:display]" },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, 0 }
diff --git a/examples/gvncviewer.py b/examples/gvncviewer.py
index c0afe86..74d284a 100644
--- a/examples/gvncviewer.py
+++ b/examples/gvncviewer.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# GTK VNC Widget
-#
+#
# Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
#
# This library is free software; you can redistribute it and/or
diff --git a/plugin/gtk-vnc-plugin.c b/plugin/gtk-vnc-plugin.c
index 3caae62..c5e5b53 100644
--- a/plugin/gtk-vnc-plugin.c
+++ b/plugin/gtk-vnc-plugin.c
@@ -205,10 +205,10 @@ GtkVNCXSetWindow (NPP instance, NPWindow *window)
/* All the events that our canvas wants to receive */
gtk_widget_add_events
(This->vnc,
- GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
GDK_POINTER_MOTION_MASK |
GDK_SCROLL_MASK |
GDK_EXPOSURE_MASK |
diff --git a/plugin/npshell.c b/plugin/npshell.c
index 05e5965..0252a02 100644
--- a/plugin/npshell.c
+++ b/plugin/npshell.c
@@ -46,8 +46,8 @@
* This file defines a "shell" plugin that plugin developers can use
* as the basis for a real plugin. This shell just provides empty
* implementations of all functions that the plugin can implement
- * that will be called by Netscape (the NPP_xxx methods defined in
- * npapi.h).
+ * that will be called by Netscape (the NPP_xxx methods defined in
+ * npapi.h).
*
* dp Suresh <dp netscape com>
* updated 5/1998 <pollmann netscape com>
@@ -59,11 +59,11 @@
/*
The contents of this file are subject to the Mozilla Public License
-Version 1.1 (the "License"); you may not use this file except in compliance
+Version 1.1 (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.mozilla.org/MPL/
-Software distributed under the License is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is stub code that defines the binary interface to a Mozilla
@@ -144,7 +144,7 @@ NPP_Shutdown(void)
debug ("NPP_Shutdown");
}
-NPError
+NPError
NPP_New(NPMIMEType pluginType G_GNUC_UNUSED,
NPP instance,
uint16 mode,
@@ -212,7 +212,7 @@ NPP_New(NPMIMEType pluginType G_GNUC_UNUSED,
return NPERR_NO_ERROR;
}
-NPError
+NPError
NPP_Destroy(NPP instance, NPSavedData** save G_GNUC_UNUSED)
{
PluginInstance* This;
@@ -237,7 +237,7 @@ NPP_Destroy(NPP instance, NPSavedData** save G_GNUC_UNUSED)
}
-NPError
+NPError
NPP_SetWindow(NPP instance, NPWindow* window)
{
debug ("NPP_SetWindow");
@@ -245,7 +245,7 @@ NPP_SetWindow(NPP instance, NPWindow* window)
return GtkVNCXSetWindow(instance, window);
}
-int32
+int32
NPP_WriteReady(NPP instance, NPStream *stream)
{
/*printf("NPP_WriteReady()\n");*/
@@ -259,7 +259,7 @@ NPP_WriteReady(NPP instance, NPStream *stream)
return -1L; /* don't accept any bytes in NPP_Write() */
}
-int32
+int32
NPP_Write(NPP instance, NPStream *stream,
int32 offset G_GNUC_UNUSED, int32 len G_GNUC_UNUSED,
void *buffer G_GNUC_UNUSED)
@@ -274,7 +274,7 @@ NPP_Write(NPP instance, NPStream *stream,
return -1L; /* don't accept any bytes in NPP_Write() */
}
-NPError
+NPError
NPP_DestroyStream(NPP instance, NPStream *stream G_GNUC_UNUSED,
NPError reason G_GNUC_UNUSED)
{
@@ -290,7 +290,7 @@ NPP_DestroyStream(NPP instance, NPStream *stream G_GNUC_UNUSED,
return NPERR_NO_ERROR;
}
-void
+void
NPP_StreamAsFile(NPP instance G_GNUC_UNUSED, NPStream *stream G_GNUC_UNUSED,
const char* fname G_GNUC_UNUSED)
{
@@ -315,7 +315,7 @@ NPP_URLNotify(NPP instance G_GNUC_UNUSED, const char* url G_GNUC_UNUSED,
}
-void
+void
NPP_Print(NPP instance, NPPrint* printInfo)
{
/*printf("NPP_Print()\n");*/
@@ -326,7 +326,7 @@ NPP_Print(NPP instance, NPPrint* printInfo)
/***** Insert NPP_Print code here *****\
PluginInstance* This = (PluginInstance*) instance->pdata;
\**************************************/
-
+
if (printInfo->mode == NP_FULL) {
/*
* PLUGIN DEVELOPERS:
@@ -351,7 +351,7 @@ NPP_Print(NPP instance, NPPrint* printInfo)
NPBool printOne =
printInfo->print.fullPrint.printOne;
\**************************************/
-
+
/* Do the default*/
printInfo->print.fullPrint.pluginPrinted = FALSE;
}
diff --git a/plugin/npunix.c b/plugin/npunix.c
index 9e47aa6..67a72f0 100644
--- a/plugin/npunix.c
+++ b/plugin/npunix.c
@@ -260,7 +260,7 @@ void NPN_PopPopupsEnabledState(NPP instance)
* Wrapper functions : Netscape Navigator -> plugin
*
* These functions let the plugin developer just create the APIs
- * as documented and defined in npapi.h, without needing to
+ * as documented and defined in npapi.h, without needing to
* install those functions in the function table or worry about
* setting up globals for 68K plugins.
*
@@ -273,7 +273,7 @@ Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
NPError ret;
PLUGINDEBUGSTR("New");
ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
- return ret;
+ return ret;
}
static NPError
@@ -342,7 +342,7 @@ Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
static void
Private_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData)
-
+
{
PLUGINDEBUGSTR("URLNotify");
NPP_URLNotify(instance, url, reason, notifyData);
@@ -375,13 +375,13 @@ Private_GetJavaClass(void)
}
#endif
-static int16
+static int16
Private_HandleEvent(NPP instance, void* event)
{
return NPP_HandleEvent(instance, event);
}
-/***********************************************************************
+/***********************************************************************
*
* These functions are located automagically by netscape.
*
@@ -434,12 +434,12 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
NPError err = NPERR_NO_ERROR;
PLUGINDEBUGSTR("NP_Initialize");
-
+
/* validate input parameters */
if ((nsTable == NULL) || (pluginFuncs == NULL))
err = NPERR_INVALID_FUNCTABLE_ERROR;
-
+
/*
* Check the major version passed in Netscape's function table.
* We won't load if the major version is newer than what we expect.
@@ -454,11 +454,11 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
err = NPERR_INCOMPATIBLE_VERSION_ERROR;
if (nsTable->size < sizeof(NPNetscapeFuncs))
err = NPERR_INVALID_FUNCTABLE_ERROR;
- if (pluginFuncs->size < sizeof(NPPluginFuncs))
+ if (pluginFuncs->size < sizeof(NPPluginFuncs))
err = NPERR_INVALID_FUNCTABLE_ERROR;
}
-
-
+
+
if (err == NPERR_NO_ERROR) {
/*
* Copy all the fields of Netscape function table into our
@@ -517,7 +517,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
err = NPP_Initialize();
}
-
+
return err;
}
diff --git a/src/blt.h b/src/blt.h
index 394309e..1090bd8 100644
--- a/src/blt.h
+++ b/src/blt.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -152,7 +152,7 @@ static void HEXTILE(struct gvnc *gvnc, uint8_t flags, uint16_t x, uint16_t y,
FAST_FILL(gvnc, bg, x, y, width, height);
else
FILL(gvnc, bg, x, y, width, height);
-
+
/* AnySubrects */
if (flags & 0x08) {
diff --git a/src/blt1.h b/src/blt1.h
index 4b395f0..9bdda04 100644
--- a/src/blt1.h
+++ b/src/blt1.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/continuation.c b/src/continuation.c
index feb9af2..4f5b027 100644
--- a/src/continuation.c
+++ b/src/continuation.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/continuation.h b/src/continuation.h
index 62309f3..585788e 100644
--- a/src/continuation.h
+++ b/src/continuation.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/coroutine.h b/src/coroutine.h
index 529e068..90ad9e8 100644
--- a/src/coroutine.h
+++ b/src/coroutine.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/coroutine_gthread.c b/src/coroutine_gthread.c
index 3448d63..4c684c5 100644
--- a/src/coroutine_gthread.c
+++ b/src/coroutine_gthread.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/coroutine_ucontext.c b/src/coroutine_ucontext.c
index ce968cb..91059ad 100644
--- a/src/coroutine_ucontext.c
+++ b/src/coroutine_ucontext.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/d3des.c b/src/d3des.c
index 551d19c..71cb1ed 100644
--- a/src/d3des.c
+++ b/src/d3des.c
@@ -1,4 +1,4 @@
-/* D3DES (V5.09) -
+/* D3DES (V5.09) -
*
* A portable, public domain, version of the Data Encryption Standard.
*
@@ -6,7 +6,7 @@
* Thanks to: Dan Hoey for his excellent Initial and Inverse permutation
* code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis
* Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau,
- * for humouring me on.
+ * for humouring me on.
*
* THIS SOFTWARE PLACED IN THE PUBLIC DOMAIN BY THE AUTHOUR
* 920825 19:42 EDST
@@ -14,14 +14,14 @@
* Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge.
* (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992.
*/
-
+
#include "d3des.h"
-
+
static void scrunch(unsigned char *, unsigned long *);
static void unscrun(unsigned long *, unsigned char *);
static void desfunc(unsigned long *, unsigned long *);
static void cookey(unsigned long *);
-
+
static unsigned long KnL[32] = { 0L };
/*
static unsigned long KnR[32] = { 0L };
@@ -34,14 +34,14 @@ static unsigned char Df_Key[24] = {
/* VNC requires that this array be reversed so that the MSB is ignored instead
* of the LSB - Anthony Liguori */
-#if 0
+#if 0
static unsigned short bytebit[8] = {
0200, 0100, 040, 020, 010, 04, 02, 01 };
#else
static unsigned short bytebit[8] = {
01, 02, 04, 010, 020, 040, 0100, 0200 };
#endif
-
+
static unsigned long bigbyte[24] = {
0x800000L, 0x400000L, 0x200000L, 0x100000L,
0x80000L, 0x40000L, 0x20000L, 0x10000L,
@@ -49,24 +49,24 @@ static unsigned long bigbyte[24] = {
0x800L, 0x400L, 0x200L, 0x100L,
0x80L, 0x40L, 0x20L, 0x10L,
0x8L, 0x4L, 0x2L, 0x1L };
-
+
/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */
-
+
static unsigned char pc1[56] = {
56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17,
9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35,
62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21,
13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 };
-
+
static unsigned char totrot[16] = {
1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 };
-
+
static unsigned char pc2[48] = {
13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9,
22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1,
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 };
-
+
void deskey(key, edf) /* Thanks to James Gillogly & Phil Karn! */
unsigned char *key;
short edf;
@@ -74,7 +74,7 @@ short edf;
int i, j, l, m, n;
unsigned char pc1m[56], pcr[56];
unsigned long kn[32];
-
+
for ( j = 0; j < 56; j++ ) {
l = pc1[j];
m = l & 07;
@@ -103,14 +103,14 @@ short edf;
cookey(kn);
return;
}
-
+
static void cookey(raw1)
unsigned long *raw1;
{
unsigned long *cook, *raw0;
unsigned long dough[32];
int i;
-
+
cook = dough;
for( i = 0; i < 16; i++, raw1++ ) {
raw0 = raw1++;
@@ -126,38 +126,38 @@ unsigned long *raw1;
usekey(dough);
return;
}
-
+
void cpkey(into)
unsigned long *into;
{
unsigned long *from, *endp;
-
+
from = KnL, endp = &KnL[32];
while( from < endp ) *into++ = *from++;
return;
}
-
+
void usekey(from)
unsigned long *from;
{
unsigned long *to, *endp;
-
+
to = KnL, endp = &KnL[32];
while( to < endp ) *to++ = *from++;
return;
}
-
+
void des(inblock, outblock)
unsigned char *inblock, *outblock;
{
unsigned long work[2];
-
+
scrunch(inblock, work);
desfunc(work, KnL);
unscrun(work, outblock);
return;
}
-
+
static void scrunch(outof, into)
unsigned char *outof;
@@ -174,7 +174,7 @@ unsigned long *into;
return;
}
-
+
static void unscrun(outof, into)
unsigned long *outof;
unsigned char *into;
@@ -207,7 +207,7 @@ static unsigned long SP1[64] = {
0x01000004L, 0x00000404L, 0x00010404L, 0x01010400L,
0x00000404L, 0x01000400L, 0x01000400L, 0x00000000L,
0x00010004L, 0x00010400L, 0x00000000L, 0x01010004L };
-
+
static unsigned long SP2[64] = {
0x80108020L, 0x80008000L, 0x00008000L, 0x00108020L,
0x00100000L, 0x00000020L, 0x80100020L, 0x80008020L,
@@ -225,7 +225,7 @@ static unsigned long SP2[64] = {
0x00100020L, 0x80008020L, 0x80000020L, 0x00100020L,
0x00108000L, 0x00000000L, 0x80008000L, 0x00008020L,
0x80000000L, 0x80100020L, 0x80108020L, 0x00108000L };
-
+
static unsigned long SP3[64] = {
0x00000208L, 0x08020200L, 0x00000000L, 0x08020008L,
0x08000200L, 0x00000000L, 0x00020208L, 0x08000200L,
@@ -243,7 +243,7 @@ static unsigned long SP3[64] = {
0x00000008L, 0x00020208L, 0x00020200L, 0x08000008L,
0x08020000L, 0x08000208L, 0x00000208L, 0x08020000L,
0x00020208L, 0x00000008L, 0x08020008L, 0x00020200L };
-
+
static unsigned long SP4[64] = {
0x00802001L, 0x00002081L, 0x00002081L, 0x00000080L,
0x00802080L, 0x00800081L, 0x00800001L, 0x00002001L,
@@ -261,7 +261,7 @@ static unsigned long SP4[64] = {
0x00800001L, 0x00002001L, 0x00802080L, 0x00800081L,
0x00002001L, 0x00002080L, 0x00800000L, 0x00802001L,
0x00000080L, 0x00800000L, 0x00002000L, 0x00802080L };
-
+
static unsigned long SP5[64] = {
0x00000100L, 0x02080100L, 0x02080000L, 0x42000100L,
0x00080000L, 0x00000100L, 0x40000000L, 0x02080000L,
@@ -279,7 +279,7 @@ static unsigned long SP5[64] = {
0x02080000L, 0x00000000L, 0x40080000L, 0x42000000L,
0x00080100L, 0x02000100L, 0x40000100L, 0x00080000L,
0x00000000L, 0x40080000L, 0x02080100L, 0x40000100L };
-
+
static unsigned long SP6[64] = {
0x20000010L, 0x20400000L, 0x00004000L, 0x20404010L,
0x20400000L, 0x00000010L, 0x20404010L, 0x00400000L,
@@ -297,7 +297,7 @@ static unsigned long SP6[64] = {
0x00000010L, 0x00004000L, 0x20400000L, 0x00404010L,
0x00004000L, 0x00400010L, 0x20004010L, 0x00000000L,
0x20404000L, 0x20000000L, 0x00400010L, 0x20004010L };
-
+
static unsigned long SP7[64] = {
0x00200000L, 0x04200002L, 0x04000802L, 0x00000000L,
0x00000800L, 0x04000802L, 0x00200802L, 0x04200800L,
@@ -315,7 +315,7 @@ static unsigned long SP7[64] = {
0x00200800L, 0x00000000L, 0x00000002L, 0x04200802L,
0x00000000L, 0x00200802L, 0x04200000L, 0x00000800L,
0x04000002L, 0x04000800L, 0x00000800L, 0x00200002L };
-
+
static unsigned long SP8[64] = {
0x10001040L, 0x00001000L, 0x00040000L, 0x10041040L,
0x10000000L, 0x10001040L, 0x00000040L, 0x10000000L,
@@ -333,13 +333,13 @@ static unsigned long SP8[64] = {
0x10040000L, 0x10001000L, 0x10001040L, 0x00000000L,
0x10041040L, 0x00041000L, 0x00041000L, 0x00001040L,
0x00001040L, 0x00040040L, 0x10000000L, 0x10041000L };
-
+
static void desfunc(block, keys)
unsigned long *block, *keys;
{
unsigned long fval, work, right, leftt;
int round;
-
+
leftt = block[0];
right = block[1];
work = ((leftt >> 4) ^ right) & 0x0f0f0f0fL;
@@ -359,7 +359,7 @@ unsigned long *block, *keys;
leftt ^= work;
right ^= work;
leftt = ((leftt << 1) | ((leftt >> 31) & 1L)) & 0xffffffffL;
-
+
for( round = 0; round < 8; round++ ) {
work = (right << 28) | (right >> 4);
work ^= *keys++;
@@ -386,7 +386,7 @@ unsigned long *block, *keys;
fval |= SP2[(work >> 24) & 0x3fL];
right ^= fval;
}
-
+
right = (right << 31) | (right >> 1);
work = (leftt ^ right) & 0xaaaaaaaaL;
leftt ^= work;
@@ -408,15 +408,15 @@ unsigned long *block, *keys;
*block = leftt;
return;
}
-
+
#ifdef D2_DES
-
+
void des2key(hexkey, mode) /* stomps on Kn3 too */
unsigned char *hexkey; /* unsigned char[16] */
short mode;
{
short revmod;
-
+
revmod = (mode == EN0) ? DE1 : EN0;
deskey(&hexkey[8], revmod);
cpkey(KnR);
@@ -424,12 +424,12 @@ short mode;
cpkey(Kn3); /* Kn3 = KnL */
return;
}
-
+
void Ddes(from, into)
unsigned char *from, *into; /* unsigned char[8] */
{
unsigned long work[2];
-
+
scrunch(from, work);
desfunc(work, KnL);
desfunc(work, KnR);
@@ -437,14 +437,14 @@ unsigned char *from, *into; /* unsigned char[8] */
unscrun(work, into);
return;
}
-
+
void D2des(from, into)
unsigned char *from; /* unsigned char[16] */
unsigned char *into; /* unsigned char[16] */
{
unsigned long *right, *l1, swap;
unsigned long leftt[2], bufR[2];
-
+
right = bufR;
l1 = &leftt[1];
scrunch(from, leftt);
@@ -465,7 +465,7 @@ unsigned char *into; /* unsigned char[16] */
unscrun(right, &into[8]);
return;
}
-
+
void makekey(aptr, kptr)
char *aptr; /* NULL-terminated */
unsigned char *kptr; /* unsigned char[8] */
@@ -473,7 +473,7 @@ unsigned char *kptr; /* unsigned char[8] */
unsigned char *store;
int first, i;
unsigned long savek[96];
-
+
cpDkey(savek);
des2key(Df_Key, EN0);
for( i = 0; i < 8; i++ ) kptr[i] = Df_Key[i];
@@ -490,7 +490,7 @@ unsigned char *kptr; /* unsigned char[8] */
useDkey(savek);
return;
}
-
+
void make2key(aptr, kptr)
char *aptr; /* NULL-terminated */
unsigned char *kptr; /* unsigned char[16] */
@@ -498,7 +498,7 @@ unsigned char *kptr; /* unsigned char[16] */
unsigned char *store;
int first, i;
unsigned long savek[96];
-
+
cpDkey(savek);
des2key(Df_Key, EN0);
for( i = 0; i < 16; i++ ) kptr[i] = Df_Key[i];
@@ -515,26 +515,26 @@ unsigned char *kptr; /* unsigned char[16] */
useDkey(savek);
return;
}
-
+
#ifndef D3_DES /* D2_DES only */
-
+
void cp2key(into)
unsigned long *into; /* unsigned long[64] */
{
unsigned long *from, *endp;
-
+
cpkey(into);
into = &into[32];
from = KnR, endp = &KnR[32];
while( from < endp ) *into++ = *from++;
return;
}
-
+
void use2key(from) /* stomps on Kn3 too */
unsigned long *from; /* unsigned long[64] */
{
unsigned long *to, *endp;
-
+
usekey(from);
from = &from[32];
to = KnR, endp = &KnR[32];
@@ -542,16 +542,16 @@ unsigned long *from; /* unsigned long[64] */
cpkey(Kn3); /* Kn3 = KnL */
return;
}
-
+
#else /* D3_DES too */
-
+
void des3key(hexkey, mode)
unsigned char *hexkey; /* unsigned char[24] */
short mode;
{
unsigned char *first, *third;
short revmod;
-
+
if( mode == EN0 ) {
revmod = DE1;
first = hexkey;
@@ -569,12 +569,12 @@ short mode;
deskey(first, mode);
return;
}
-
+
void cp3key(into)
unsigned long *into; /* unsigned long[96] */
{
unsigned long *from, *endp;
-
+
cpkey(into);
into = &into[32];
from = KnR, endp = &KnR[32];
@@ -583,12 +583,12 @@ unsigned long *into; /* unsigned long[96] */
while( from < endp ) *into++ = *from++;
return;
}
-
+
void use3key(from)
unsigned long *from; /* unsigned long[96] */
{
unsigned long *to, *endp;
-
+
usekey(from);
from = &from[32];
to = KnR, endp = &KnR[32];
@@ -597,15 +597,15 @@ unsigned long *from; /* unsigned long[96] */
while( to < endp ) *to++ = *from++;
return;
}
-
+
static void D3des(unsigned char *, unsigned char *);
-
+
static void D3des(from, into) /* amateur theatrics */
unsigned char *from; /* unsigned char[24] */
unsigned char *into; /* unsigned char[24] */
{
unsigned long swap, leftt[2], middl[2], right[2];
-
+
scrunch(from, leftt);
scrunch(&from[8], middl);
scrunch(&from[16], right);
@@ -634,8 +634,8 @@ unsigned char *into; /* unsigned char[24] */
unscrun(middl, &into[8]);
unscrun(right, &into[16]);
return;
- }
-
+ }
+
void make3key(aptr, kptr)
char *aptr; /* NULL-terminated */
unsigned char *kptr; /* unsigned char[24] */
@@ -643,7 +643,7 @@ unsigned char *kptr; /* unsigned char[24] */
unsigned char *store;
int first, i;
unsigned long savek[96];
-
+
cp3key(savek);
des3key(Df_Key, EN0);
for( i = 0; i < 24; i++ ) kptr[i] = Df_Key[i];
@@ -660,10 +660,10 @@ unsigned char *kptr; /* unsigned char[24] */
use3key(savek);
return;
}
-
+
#endif /* D3_DES */
#endif /* D2_DES */
-
+
/* Validation sets:
*
* Single-length key, single-length plaintext -
@@ -693,4 +693,4 @@ unsigned char *kptr; /* unsigned char[24] */
*
* d3des V5.09 rwo 9208.04 20:31 Graven Imagery
**********************************************************************/
-
+
diff --git a/src/d3des.h b/src/d3des.h
index 08ce786..c344582 100644
--- a/src/d3des.h
+++ b/src/d3des.h
@@ -9,60 +9,60 @@
* Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
* (GEnie : OUTER; CIS : [71755,204])
*/
-
-#undef D2_DES
-#undef D3_DES
-
+
+#undef D2_DES
+#undef D3_DES
+
#ifdef D3_DES
#ifndef D2_DES
#define D2_DES /* D2_DES is needed for D3_DES */
#endif
#endif
-
+
#define EN0 0 /* MODE == encrypt */
#define DE1 1 /* MODE == decrypt */
-
+
/* Useful on 68000-ish machines, but NOT USED here. */
-
+
typedef union {
unsigned long blok[2];
unsigned short word[4];
unsigned char byte[8];
} M68K;
-
+
typedef union {
unsigned long dblok[4];
unsigned short dword[8];
unsigned char dbyte[16];
} M68K2;
-
+
extern void deskey(unsigned char *, short);
/* hexkey[8] MODE
* Sets the internal key register according to the hexadecimal
* key contained in the 8 bytes of hexkey, according to the DES,
* for encryption or decryption according to MODE.
*/
-
+
extern void usekey(unsigned long *);
/* cookedkey[32]
* Loads the internal key register with the data in cookedkey.
*/
-
+
extern void cpkey(unsigned long *);
/* cookedkey[32]
* Copies the contents of the internal key register into the storage
* located at &cookedkey[0].
*/
-
+
extern void des(unsigned char *, unsigned char *);
/* from[8] to[8]
* Encrypts/Decrypts (according to the key currently loaded in the
* internal key register) one block of eight bytes at address 'from'
* into the block at address 'to'. They can be the same.
*/
-
+
#ifdef D2_DES
-
+
#define desDkey(a,b) des2key((a),(b))
extern void des2key(unsigned char *, short);
/* hexkey[16] MODE
@@ -71,28 +71,28 @@ extern void des2key(unsigned char *, short);
* for DOUBLE encryption or decryption according to MODE.
* NOTE: this clobbers all three key registers!
*/
-
+
extern void Ddes(unsigned char *, unsigned char *);
/* from[8] to[8]
* Encrypts/Decrypts (according to the keyS currently loaded in the
* internal key registerS) one block of eight bytes at address 'from'
* into the block at address 'to'. They can be the same.
*/
-
+
extern void D2des(unsigned char *, unsigned char *);
/* from[16] to[16]
* Encrypts/Decrypts (according to the keyS currently loaded in the
* internal key registerS) one block of SIXTEEN bytes at address 'from'
* into the block at address 'to'. They can be the same.
*/
-
+
extern void makekey(char *, unsigned char *);
/* *password, single-length key[8]
* With a double-length default key, this routine hashes a NULL-terminated
* string into an eight-byte random-looking key, suitable for use with the
* deskey() routine.
*/
-
+
#define makeDkey(a,b) make2key((a),(b))
extern void make2key(char *, unsigned char *);
/* *password, double-length key[16]
@@ -100,57 +100,57 @@ extern void make2key(char *, unsigned char *);
* string into a sixteen-byte random-looking key, suitable for use with the
* des2key() routine.
*/
-
+
#ifndef D3_DES /* D2_DES only */
-
+
#define useDkey(a) use2key((a))
#define cpDkey(a) cp2key((a))
-
+
extern void use2key(unsigned long *);
/* cookedkey[64]
* Loads the internal key registerS with the data in cookedkey.
* NOTE: this clobbers all three key registers!
*/
-
+
extern voi cp2key(unsigned long *);
/* cookedkey[64]
* Copies the contents of the internal key registerS into the storage
* located at &cookedkey[0].
*/
-
+
#else /* D3_DES too */
-
+
#define useDkey(a) use3key((a))
#define cpDkey(a) cp3key((a))
-
+
extern void des3key(unsigned char *, short);
/* hexkey[24] MODE
* Sets the internal key registerS according to the hexadecimal
* keyS contained in the 24 bytes of hexkey, according to the DES,
* for DOUBLE encryption or decryption according to MODE.
*/
-
+
extern void use3key(unsigned long *);
/* cookedkey[96]
* Loads the 3 internal key registerS with the data in cookedkey.
*/
-
+
extern void cp3key(unsigned long *);
/* cookedkey[96]
* Copies the contents of the 3 internal key registerS into the storage
* located at &cookedkey[0].
*/
-
+
extern void make3key(char *, unsigned char *);
/* *password, triple-length key[24]
* With a triple-length default key, this routine hashes a NULL-terminated
* string into a twenty-four-byte random-looking key, suitable for use with
* the des3key() routine.
*/
-
+
#endif /* D3_DES */
#endif /* D2_DES */
-
+
/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
********************************************************************/
diff --git a/src/gvnc.c b/src/gvnc.c
index ade2b72..d782b0f 100644
--- a/src/gvnc.c
+++ b/src/gvnc.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -1148,7 +1148,7 @@ gboolean gvnc_pointer_event(struct gvnc *gvnc, uint8_t button_mask,
gvnc_buffered_write_u16(gvnc, x);
gvnc_buffered_write_u16(gvnc, y);
gvnc_buffered_flush(gvnc);
- return !gvnc_has_error(gvnc);
+ return !gvnc_has_error(gvnc);
}
gboolean gvnc_client_cut_text(struct gvnc *gvnc,
@@ -1208,7 +1208,7 @@ static uint32_t gvnc_swap_img_32(struct gvnc *gvnc, uint32_t pixel)
return (((pixel >> 24) & 0xFF) << 0) |
(((pixel >> 16) & 0xFF) << 8) |
(((pixel >> 8) & 0xFF) << 16) |
- (((pixel >> 0) & 0xFF) << 24);
+ (((pixel >> 0) & 0xFF) << 24);
else
return pixel;
}
@@ -1362,16 +1362,16 @@ static void gvnc_copyrect_update(struct gvnc *gvnc,
uint8_t *dst, *src;
int pitch = gvnc->local.linesize;
int i;
-
+
src_x = gvnc_read_u16(gvnc);
src_y = gvnc_read_u16(gvnc);
-
+
if (src_y < dst_y) {
pitch = -pitch;
src_y += (height - 1);
dst_y += (height - 1);
}
-
+
dst = gvnc_get_local(gvnc, dst_x, dst_y);
src = gvnc_get_local(gvnc, src_x, src_y);
for (i = 0; i < height; i++) {
@@ -1456,7 +1456,7 @@ static void gvnc_read_cpixel(struct gvnc *gvnc, uint8_t *pixel)
((gvnc->fmt.green_max << gvnc->fmt.green_shift) < (1 << 24)) &&
((gvnc->fmt.blue_max << gvnc->fmt.blue_shift) < (1 << 24)));
- /*
+ /*
* We need to analyse the shifts to see if they fit in 3 bytes,
* rather than looking at the declared 'depth' for the format
* because despite what the RFB spec says, this is what RealVNC
@@ -1617,8 +1617,8 @@ static void gvnc_zrle_update_tile(struct gvnc *gvnc, uint16_t x, uint16_t y,
} else if (subencoding == 128) {
/* Plain RLE */
gvnc_zrle_update_tile_rle(gvnc, x, y, width, height);
- } else if (subencoding == 129) {
-
+ } else if (subencoding == 129) {
+
} else if (subencoding >= 130) {
/* Palette RLE */
gvnc_zrle_update_tile_prle(gvnc, subencoding - 128,
@@ -3066,7 +3066,7 @@ static gboolean gvnc_start_tls(struct gvnc *gvnc, int anonTLS)
gvnc->has_error = TRUE;
return FALSE;
}
-
+
GVNC_DEBUG("Handshake done");
if (anonTLS) {
diff --git a/src/gvnc.h b/src/gvnc.h
index f748de0..1b4eefa 100644
--- a/src/gvnc.h
+++ b/src/gvnc.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/utils.h b/src/utils.h
index 3a695e4..e32db11 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/vnc.override b/src/vnc.override
index 775ce08..dc823d6 100644
--- a/src/vnc.override
+++ b/src/vnc.override
@@ -12,18 +12,18 @@ ignore-glob
*_get_type
vnc_display_send_keys_ex
%%
-override vnc_display_send_keys kwargs
+override vnc_display_send_keys kwargs
static PyObject*
_wrap_vnc_display_send_keys(PyGObject *self,
- PyObject *args, PyObject *kwargs)
+ PyObject *args, PyObject *kwargs)
{
- static char *kwlist[] = {"keys", "kind", NULL};
+ static char *kwlist[] = {"keys", "kind", NULL};
PyObject *keyList;
int kind = VNC_DISPLAY_KEY_EVENT_CLICK;
int ret, i, len;
guint *keys;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"O|I:VncDisplay.send_keys", kwlist,
&keyList, &kind))
return NULL;
diff --git a/src/vnc_keycodes.h b/src/vnc_keycodes.h
index c2a84e2..bfede2e 100644
--- a/src/vnc_keycodes.h
+++ b/src/vnc_keycodes.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
/* All keycodes from 0 to 0xFF correspond to the hardware keycodes generated
* by a US101 PC keyboard with the following encoding:
- *
+ *
* 0) Sequences of XX are replaced with XX
* 1) Sequences of 0xe0 XX are replaces with XX | 0x80
* 2) All other keys are defined below
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index d0997ce..3bae0d8 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -214,7 +214,7 @@ vnc_display_get_property (GObject *object,
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ break;
}
}
@@ -254,7 +254,7 @@ vnc_display_set_property (GObject *object,
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ break;
}
}
@@ -941,7 +941,7 @@ static gboolean emit_signal_auth_cred(gpointer opaque)
}
coroutine_yieldto(s->caller, NULL);
-
+
return FALSE;
}
@@ -1001,7 +1001,7 @@ static gboolean on_resize(void *opaque, int width, int height)
return do_resize(opaque, width, height, FALSE);
}
-static gboolean on_pixel_format(void *opaque,
+static gboolean on_pixel_format(void *opaque,
struct gvnc_pixel_format *fmt G_GNUC_UNUSED)
{
VncDisplay *obj = VNC_DISPLAY(opaque);
@@ -1104,7 +1104,7 @@ static gboolean on_auth_type(void *opaque, unsigned int ntype, unsigned int *typ
}
}
}
-
+
gvnc_set_auth_type(priv->gvnc, types[0]);
return TRUE;
}
@@ -1130,7 +1130,7 @@ static gboolean on_auth_subtype(void *opaque, unsigned int ntype, unsigned int *
}
}
}
-
+
gvnc_set_auth_subtype(priv->gvnc, types[0]);
return TRUE;
}
@@ -2238,13 +2238,13 @@ gboolean vnc_display_is_pointer_absolute(VncDisplay *obj)
GOptionGroup *
vnc_display_get_option_group (void)
{
- GOptionGroup *group;
+ GOptionGroup *group;
+
+ group = g_option_group_new ("gtk-vnc", "GTK-VNC Options", "Show GTK-VNC Options", NULL, NULL);
- group = g_option_group_new ("gtk-vnc", "GTK-VNC Options", "Show GTK-VNC Options", NULL, NULL);
+ g_option_group_add_entries (group, gtk_vnc_args);
- g_option_group_add_entries (group, gtk_vnc_args);
-
- return group;
+ return group;
}
#ifdef WIN32
diff --git a/src/vncdisplay.h b/src/vncdisplay.h
index e449ef4..c3779ad 100644
--- a/src/vncdisplay.h
+++ b/src/vncdisplay.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/vncmodule.c b/src/vncmodule.c
index 417d294..f7f778a 100644
--- a/src/vncmodule.c
+++ b/src/vncmodule.c
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
@@ -19,19 +19,19 @@
*/
#include <pygobject.h>
-
-void gtkvnc_register_classes (PyObject *d);
+
+void gtkvnc_register_classes (PyObject *d);
void gtkvnc_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef gtkvnc_functions[];
-
+
DL_EXPORT(void) initgtkvnc(void);
DL_EXPORT(void) initgtkvnc(void)
{
PyObject *m, *d;
-
+
init_pygobject ();
-
+
m = Py_InitModule ("gtkvnc", gtkvnc_functions);
if (PyErr_Occurred())
Py_FatalError("can't init module");
@@ -39,10 +39,10 @@ DL_EXPORT(void) initgtkvnc(void)
d = PyModule_GetDict (m);
if (PyErr_Occurred())
Py_FatalError("can't get dict");
-
+
gtkvnc_add_constants(m, "VNC_DISPLAY_");
gtkvnc_register_classes (d);
-
+
if (PyErr_Occurred ()) {
Py_FatalError ("can't initialise module vnc");
}
diff --git a/src/x_keymap.h b/src/x_keymap.h
index 0a37ade..2ed0edc 100644
--- a/src/x_keymap.h
+++ b/src/x_keymap.h
@@ -1,6 +1,6 @@
/*
* GTK VNC Widget
- *
+ *
* Copyright (C) 2006 Anthony Liguori <anthony codemonkey ws>
*
* This library is free software; you can redistribute it and/or
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]