Skip to content

Commit

Permalink
Imported nxcomp-3.4.0-6.tar.gz
Browse files Browse the repository at this point in the history
Summary: Imported nxcomp-3.4.0-6.tar.gz
Keywords:

Imported nxcomp-3.4.0-6.tar.gz
into Git repository
  • Loading branch information
Reinhard Tartler committed Nov 13, 2011
1 parent 799bf67 commit 4779616
Show file tree
Hide file tree
Showing 257 changed files with 448 additions and 305 deletions.
2 changes: 1 addition & 1 deletion nxcomp/ActionCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ActionCache.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ActionCacheCompat.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Agent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Agent.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
3 changes: 2 additions & 1 deletion nxcomp/Alpha.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand All @@ -17,6 +17,7 @@

#include "Misc.h"
#include "Unpack.h"
#include "Alpha.h"

#define PANIC
#define WARNING
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Alpha.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
24 changes: 19 additions & 5 deletions nxcomp/Auth.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down Expand Up @@ -268,7 +268,7 @@ int Auth::getCookie()
snprintf(line, DEFAULT_STRING_LIMIT, "%.200s", display_);
}

char *parameters[256];
const char *parameters[256];

parameters[0] = command;
parameters[1] = command;
Expand All @@ -295,7 +295,7 @@ int Auth::getCookie()
// implementation.
//

FILE *data = Popen(parameters, "r");
FILE *data = Popen((char *const *) parameters, "r");

int result = -1;

Expand Down Expand Up @@ -342,7 +342,21 @@ int Auth::getCookie()
<< "'.\n" << logofs_flush;
#endif

if (sscanf(line, "%*s %*s %511s", realCookie_) != 1)
//
// Skip the hostname in the authority entry
// just in case it includes some white spaces.
//

char *cookie = NULL;

cookie = index(line, ':');

if (cookie == NULL)
{
cookie = line;
}

if (sscanf(cookie, "%*s %*s %511s", realCookie_) != 1)
{
#ifdef PANIC
*logofs << "Auth: PANIC! Failed to identify the cookie "
Expand Down Expand Up @@ -499,7 +513,7 @@ int Auth::checkCookie(unsigned char *buffer)
return -1;
}

char *protoName = "MIT-MAGIC-COOKIE-1";
const char *protoName = "MIT-MAGIC-COOKIE-1";
int protoSize = strlen(protoName);

int matchedProtoSize;
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Auth.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Bitmap.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/Bitmap.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/BlockCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/BlockCache.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/BlockCacheSet.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/BlockCacheSet.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
23 changes: 23 additions & 0 deletions nxcomp/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
ChangeLog:

nxcomp-3.4.0-6

- Solved compilation problems on Solaris.

nxcomp-3.4.0-5

- Solved compilation problems on GCC 4.4.

nxcomp-3.4.0-4

- Added reference to fixed TR02H02325.

nxcomp-3.4.0-3

- Updated copyright to year 2010.

nxcomp-3.4.0-2

- Fixed TR03G02204. Changed the parsing of X authority entries in
order to handle the case where the hostname includes white spaces.

- Fixed TR02H02325. Bug in PNG decompression on 16bpp displays.

nxcomp-3.4.0-1

- Opened the 3.4.0 branch based on nxcomp-3.3.0-4.
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeGC.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeGC.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeGCCompat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeGCCompat.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeProperty.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChangeProperty.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
6 changes: 3 additions & 3 deletions nxcomp/Channel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down Expand Up @@ -2037,10 +2037,10 @@ Split *Channel::handleSplitCommitRemove(int request, int resource, int position)
<< ".\n" << logofs_flush;
#endif

if (control -> isProtoStep7() == 1 &&
if ((control -> isProtoStep7() == 1 &&
(resource != split -> getResource() ||
request != split -> getRequest() ||
position != split -> getPosition()) ||
position != split -> getPosition())) ||
(request != split -> getRequest() ||
position != split -> getPosition()))
{
Expand Down
6 changes: 3 additions & 3 deletions nxcomp/Channel.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down Expand Up @@ -498,9 +498,9 @@ class Channel

int canCleanStore(MessageStore *store)
{
return (store -> getSize() > 0 && (store -> getRemoteStorageSize() >
return ((store -> getSize() > 0 && (store -> getRemoteStorageSize() >
(control -> RemoteTotalStorageSize / 100 * store ->
cacheLowerThreshold)) || (store -> getLocalStorageSize() >
cacheLowerThreshold))) || (store -> getLocalStorageSize() >
(control -> LocalTotalStorageSize / 100 * store ->
cacheLowerThreshold)));
}
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChannelCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChannelCache.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/ChannelStore.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/CharCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
2 changes: 1 addition & 1 deletion nxcomp/CharCache.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2009 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
Expand Down
Loading

0 comments on commit 4779616

Please sign in to comment.