There was a long standing TODO to make the counting of the supported
encodings dynamic. It never triggered, until ZYWRLE was added.
Noticed by Christian Ehrlicher.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since we separated the packages LibVNCServer and x11vnc, there is
a configure switch --with-x11vnc, without which x11vnc is not built.
However, even _with_ this switch, it is not built, because the Makefile
would not recurse into the x11vnc/ subdirectory. Fix that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When swapping the values for the colour table to little-endian (because
they are 16-bit values), we need to cast "unsigned char" to "unsigned
short"; otherwise, Microsoft's compiler would keep complaining.
Noticed by Christian Ehrlicher.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The variable tightQualityLevel is used for ZYWRLE compression, too,
so if libjpeg is not present, but libz is, we still need to have
that struct member.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ZYWRLE used a static buffer, which does not work too well if you have
more than one client in a threaded server. Instead, we have the data
in the client structure now.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
While adjusting the coding style, three stupid mistakes happened. The
quality is _not_ just 1, 2, 3, but really 1, 3, 2. And the macros
ZYWRLE_PACK_COEFF() and ZYWRLE_UNPACK_COEFF() expand to more than one
statement, which means that we need curly brackets around them when they
are in an if clause.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
At least one developer (me) uses git to work on local branches, and this
file does not hurt.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We used to assume that a char[256] is properly aligned to be cast to
an rfbServerInitMsg, but that was not the case. So use a union instead.
Noticed by Flavio Leitner.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>