Commit eeb2061d authored by dscho's avatar dscho

API change: Bool, KeySym, Pixel get prefix "rfb"; constants in rfbconfig.h get...

API change: Bool, KeySym, Pixel get prefix "rfb"; constants in rfbconfig.h get prefix "LIBVNCSERVER_"
parent 964aa162
......@@ -22,7 +22,7 @@ Occasional important patches were sent by (in order I found the names in my
archives and please don't beat me, if I forgot you, but just send me an
email!): Akira Hatakeyama, Karl J. Runge, Justin "Zippy" Dearing,
Oliver Mihatsch, Greg Sternberg, Werner Hofer, Giampiero Giancipoli,
Glenn Mabutt, Paul Kreiner.
Glenn Mabutt, Paul Kreiner, Erik Kunze.
Probably I forgot quite a few people sending a patch here and there, which
really made a difference. Without those, some obscure bugs still would
......
use AX_PREFIX_CONFIG_H to prefix constants in config.h to avoid
name clashes (also suggested by Erik)
transformed Bool, KeySym, Pixel to rfbBool, rfbKeySym, rfbPixel
(as suggested by Erik)
purged exit() calls (suggested by Erik)
fixed bug with maxRectsPerUpdate and Tight Encoding (these are incompatible)
checked sync with TightVNC 1.2.8:
viewonly/full passwords; if given a list, only the first is a full one
......
This diff is collapsed.
Upcoming 0.5 release!
Question: Why the *&!"/(§ did you change so many things in the API?
Answer: It was necessary to make this library slightly less
painful to use with other libraries.
Anyway, most changes are just search-and-replace:
#include "rfb.h" -> #include <rfb/rfb.h>
CARD8 -> uint8_t
CARD16 -> uint16_t
CARD32 -> uint32_t
Pixel -> rfbPixel
KeySym -> rfbKeySym
Bool -> rfbBool
also, rfbUsage doesn't exit any longer, but returns FALSE
If you used some constants defined in rfbconfig.h, you now
have to prefix LIBVNCSERVER_ to the constants.
Upcoming 0.6 release!
lots of bugs fixed.
Version 5.0:
The library just got autoconf && automake support as well as a real install
target!
......
......@@ -152,7 +152,7 @@ Hooks and IO functions
There exist the following IO functions as members of rfbScreen:
kbdAddEvent, kbdReleaseAllKeys, ptrAddEvent and setXCutText
kbdAddEvent(Bool down,KeySym key,rfbClientPtr cl)
kbdAddEvent(rfbBool down,rfbKeySym key,rfbClientPtr cl)
is called when a key is pressed.
kbdReleaseAllKeys(rfbClientPtr cl)
is not called at all (maybe in the future).
......
......@@ -512,4 +512,92 @@ dnl discussed. The probability that the "fast" types may be removed before
dnl the standard is finalized is high enough that they are not currently
dnl implemented.
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_prefix_config_h.html
dnl
AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER])
AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
m4_pushdef([_script],[conftest.prefix])dnl
m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
_PKG=`echo ifelse($2, , $PACKAGE, $2)`
_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
_INP=`echo ifelse($3, , _, $3)`
if test "$ac_prefix_conf_INP" = "_"; then
for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
test -f "$ac_prefix_conf_INP" && continue
case $ac_file in
*.h) test -f $ac_file && _INP=$ac_file ;;
*)
esac
done
fi
if test "$_INP" = "_"; then
case "$_OUT" in
*/*) _INP=`basename "$_OUT"`
;;
*-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
;;
*) _INP=config.h
;;
esac
fi
if test -z "$_PKG" ; then
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
else
if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
_INP="$srcdir/$_INP"
fi fi
AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
if test -f $_INP ; then
echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
echo "@%:@endif/" >>_script
echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
echo "@%:@endif/" >> _script
# now executing _script on _DEF input to create _OUT output file
echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
sed -f _script $_INP >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
echo "@%:@endif" >>$tmp/pconfig.h
if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
AC_MSG_NOTICE([$_OUT is unchanged])
else
ac_dir=`AS_DIRNAME(["$_OUT"])`
AS_MKDIR_P(["$ac_dir"])
rm -f "$_OUT"
mv $tmp/pconfig.h "$_OUT"
fi
cp _script _configs.sed
else
AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
fi
rm -f conftest.*
fi
m4_popdef([_symbol])dnl
m4_popdef([_script])dnl
AS_VAR_POPDEF([_INP])dnl
AS_VAR_POPDEF([_UPP])dnl
AS_VAR_POPDEF([_LOW])dnl
AS_VAR_POPDEF([_PKG])dnl
AS_VAR_POPDEF([_DEF])dnl
AS_VAR_POPDEF([_OUT])dnl
],[PACKAGE="$PACKAGE"])])
This diff is collapsed.
......@@ -26,7 +26,7 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
/*
* rfbAuthNewClient is called when we reach the point of authenticating
......
......@@ -12,7 +12,7 @@
* see GPL (latest version) for full details
*/
#include "rfb.h"
#include <rfb/rfb.h>
void
rfbUsage(void)
......@@ -35,8 +35,6 @@ rfbUsage(void)
fprintf(stderr, "-httpdir dir-path enable http server using dir-path home\n");
fprintf(stderr, "-httpport portnum use portnum for http connection\n");
fprintf(stderr, "-enablehttpproxy enable http proxy support\n");
exit(1);
}
/* purges COUNT arguments from ARGV at POSITION and decrements ARGC.
......@@ -50,7 +48,7 @@ void rfbPurgeArguments(int* argc,int* position,int count,char *argv[])
(*position)--;
}
void
rfbBool
rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
{
int i,i1;
......@@ -60,28 +58,46 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
for (i = i1 = 1; i < *argc;) {
if (strcmp(argv[i], "-help") == 0) {
rfbUsage();
exit(1);
return FALSE;
} else if (strcmp(argv[i], "-rfbport") == 0) { /* -rfbport port */
if (i + 1 >= *argc) rfbUsage();
rfbScreen->rfbPort = atoi(argv[++i]);
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->rfbPort = atoi(argv[++i]);
} else if (strcmp(argv[i], "-rfbwait") == 0) { /* -rfbwait ms */
if (i + 1 >= *argc) rfbUsage();
rfbScreen->rfbMaxClientWait = atoi(argv[++i]);
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->rfbMaxClientWait = atoi(argv[++i]);
} else if (strcmp(argv[i], "-rfbauth") == 0) { /* -rfbauth passwd-file */
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->rfbAuthPasswdData = argv[++i];
} else if (strcmp(argv[i], "-passwd") == 0) { /* -passwd password */
char **passwds = malloc(sizeof(char**)*2);
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
passwds[0] = argv[++i];
passwds[1] = 0;
rfbScreen->rfbAuthPasswdData = (void*)passwds;
rfbScreen->passwordCheck = rfbCheckPasswordByList;
} else if (strcmp(argv[i], "-deferupdate") == 0) { /* -deferupdate milliseconds */
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->rfbDeferUpdateTime = atoi(argv[++i]);
} else if (strcmp(argv[i], "-desktop") == 0) { /* -desktop desktop-name */
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->desktopName = argv[++i];
} else if (strcmp(argv[i], "-alwaysshared") == 0) {
rfbScreen->rfbAlwaysShared = TRUE;
......@@ -90,10 +106,16 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
} else if (strcmp(argv[i], "-dontdisconnect") == 0) {
rfbScreen->rfbDontDisconnect = TRUE;
} else if (strcmp(argv[i], "-httpdir") == 0) { /* -httpdir directory-path */
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->httpDir = argv[++i];
} else if (strcmp(argv[i], "-httpport") == 0) { /* -httpport portnum */
if (i + 1 >= *argc) rfbUsage();
if (i + 1 >= *argc) {
rfbUsage();
return FALSE;
}
rfbScreen->httpPort = atoi(argv[++i]);
} else if (strcmp(argv[i], "-enablehttpproxy") == 0) {
rfbScreen->httpEnableProxyConnect = TRUE;
......@@ -105,21 +127,21 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
i1++;
i=i1;
}
return TRUE;
}
void rfbSizeUsage()
{
fprintf(stderr, "-width sets the width of the framebuffer\n");
fprintf(stderr, "-height sets the height of the framebuffer\n");
exit(1);
}
void
rfbBool
rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[])
{
int i,i1;
if(!argc) return;
if(!argc) return TRUE;
for (i = i1 = 1; i < *argc-1;) {
if (strcmp(argv[i], "-bpp") == 0) {
*bpp = atoi(argv[++i]);
......@@ -136,5 +158,6 @@ rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[])
i1++;
i=i1;
}
return TRUE;
}
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -13,6 +12,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -43,13 +43,9 @@ AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
......@@ -59,21 +55,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RPMSOURCEDIR = @RPMSOURCEDIR@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......@@ -82,10 +75,11 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = VncViewer.jar index.vnc javaviewer.pseudo_proxy.patch
subdir = classes
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/rfb/rfbconfig.h
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
......@@ -96,31 +90,29 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu classes/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
......@@ -144,7 +136,6 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
......@@ -152,7 +143,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
......
This diff is collapsed.
# Process this file with autoconf to produce a configure script.
AC_INIT(LibVNCServer, 0.6pre, http://sourceforge.net/projects/libvncserver)
AM_INIT_AUTOMAKE(LibVNCServer, 0.6pre)
AM_CONFIG_HEADER([rfb/rfbconfig.h])
AM_CONFIG_HEADER([config.h])
AX_PREFIX_CONFIG_H([rfb/rfbconfig.h])
# Checks for programs.
AC_PROG_CC
......
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -13,6 +12,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -43,13 +43,9 @@ AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
......@@ -59,21 +55,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RPMSOURCEDIR = @RPMSOURCEDIR@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......@@ -82,6 +75,7 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
CFLAGS = -I ..
LDADD = ../libvncserver.a
......@@ -95,7 +89,7 @@ noinst_PROGRAMS = zippy
zippy_SOURCES = zippy.c
subdir = contrib
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/rfb/rfbconfig.h
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@HAVE_X_TRUE@bin_PROGRAMS = x11vnc$(EXEEXT)
@HAVE_X_FALSE@bin_PROGRAMS =
......@@ -103,6 +97,7 @@ noinst_PROGRAMS = zippy$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
@HAVE_X_TRUE@am_x11vnc_OBJECTS = x11vnc.$(OBJEXT)
@HAVE_X_FALSE@am_x11vnc_OBJECTS =
x11vnc_OBJECTS = $(am_x11vnc_OBJECTS)
@HAVE_X_TRUE@x11vnc_DEPENDENCIES = ../libvncserver.a
@HAVE_X_FALSE@x11vnc_DEPENDENCIES =
......@@ -114,13 +109,12 @@ zippy_DEPENDENCIES = ../libvncserver.a
zippy_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/rfb
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/x11vnc.Po ./$(DEPDIR)/zippy.Po
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/x11vnc.Po $(DEPDIR)/zippy.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
......@@ -136,8 +130,9 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu contrib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
......@@ -145,16 +140,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
......@@ -177,17 +172,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11vnc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zippy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/x11vnc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/zippy.Po@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
-rm -rf $(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
......@@ -197,61 +192,53 @@ distclean-depend:
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
mkid -fID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
......@@ -276,7 +263,6 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
......@@ -284,7 +270,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
......
......@@ -99,24 +99,6 @@
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>
/*
* Work around Bool and KeySym same names in X and rfb.
* Bool is #define int in <X11/Xlib.h>
* KeySym is typedef XID in <X11/X.h>
* (note that X and rfb KeySym types are the same so a bit silly to worry...
* the Bool types are different though)
*/
typedef Bool X_Bool;
typedef KeySym X_KeySym;
/* the #define Bool can be removed: */
#ifdef Bool
#undef Bool
#endif
/* the KeySym typedef cannot be removed, so use an alias for rest of file: */
#define KeySym RFBKeySym
#include <rfb/rfb.h>
/* X and rfb framebuffer */
......@@ -224,7 +206,7 @@ int cursor_x, cursor_y; /* x and y from the viewer(s) */
int got_user_input = 0;
int shut_down = 0;
#if defined(HAVE_LIBPTHREAD) && defined(X11VNC_THREADED)
#if defined(LIBVNCSERVER_HAVE_LIBPTHREAD) && defined(LIBVNCSERVER_X11VNC_THREADED)
int use_threads = 1;
#else
int use_threads = 0;
......@@ -365,7 +347,7 @@ char modifiers[0x100];
KeyCode keycodes[0x100], left_shift_code, right_shift_code, altgr_code;
void initialize_keycodes() {
X_KeySym key, *keymap;
KeySym key, *keymap;
int i, j, minkey, maxkey, syms_per_keycode;
memset(modifiers, -1, sizeof(modifiers));
......@@ -377,7 +359,7 @@ void initialize_keycodes() {
/* handle alphabetic char with only one keysym (no upper + lower) */
for (i = minkey; i <= maxkey; i++) {
X_KeySym lower, upper;
KeySym lower, upper;
/* 2nd one */
key = keymap[(i - minkey) * syms_per_keycode + 1];
if (key != NoSymbol) {
......@@ -422,9 +404,9 @@ void DebugXTestFakeKeyEvent(Display* dpy, KeyCode keysym, Bool down, time_t cur_
/* #define XTestFakeKeyEvent DebugXTestFakeKeyEvent */
void tweak_mod(signed char mod, Bool down) {
Bool is_shift = mod_state & (LEFTSHIFT|RIGHTSHIFT);
X_Bool dn = (X_Bool) down;
void tweak_mod(signed char mod, rfbBool down) {
rfbBool is_shift = mod_state & (LEFTSHIFT|RIGHTSHIFT);
Bool dn = (Bool) down;
if (mod < 0) {
return;
......@@ -451,7 +433,7 @@ void tweak_mod(signed char mod, Bool down) {
X_UNLOCK;
}
static void modifier_tweak_keyboard(Bool down, KeySym keysym, rfbClientPtr client) {
static void modifier_tweak_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
KeyCode k;
int tweak = 0;
......@@ -478,12 +460,12 @@ static void modifier_tweak_keyboard(Bool down, KeySym keysym, rfbClientPtr clien
k = keycodes[keysym];
} else {
X_LOCK;
k = XKeysymToKeycode(dpy, (X_KeySym) keysym);
k = XKeysymToKeycode(dpy, (KeySym) keysym);
X_UNLOCK;
}
if ( k != NoSymbol ) {
X_LOCK;
XTestFakeKeyEvent(dpy, k, (X_Bool) down, CurrentTime);
XTestFakeKeyEvent(dpy, k, (Bool) down, CurrentTime);
X_UNLOCK;
}
......@@ -495,7 +477,7 @@ static void modifier_tweak_keyboard(Bool down, KeySym keysym, rfbClientPtr clien
/*
* key event handler
*/
static void keyboard(Bool down, KeySym keysym, rfbClientPtr client) {
static void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
KeyCode k;
if (0) {
......@@ -516,10 +498,10 @@ static void keyboard(Bool down, KeySym keysym, rfbClientPtr client) {
X_LOCK;
k = XKeysymToKeycode(dpy, (X_KeySym) keysym);
k = XKeysymToKeycode(dpy, (KeySym) keysym);
if ( k != NoSymbol ) {
XTestFakeKeyEvent(dpy, k, (X_Bool) down, CurrentTime);
XTestFakeKeyEvent(dpy, k, (Bool) down, CurrentTime);
XFlush(dpy);
last_event = last_input = time(0);
......@@ -902,7 +884,7 @@ void redraw_mouse(void) {
void update_mouse(void) {
Window root_w, child_w;
Bool ret;
rfbBool ret;
int root_x, root_y, win_x, win_y, which = 0;
unsigned int mask;
......@@ -2168,7 +2150,7 @@ void print_help() {
" to cut down on load (default %d).\n"
"-nap monitor activity and if low take longer naps between\n"
" polls to really cut down load when idle (default %s).\n"
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
"-threads whether or not to use the threaded libvncserver\n"
"-nothreads algorithm [rfbRunEventLoop] (default %s).\n"
#endif
......@@ -2196,7 +2178,7 @@ void print_help() {
defer_update,
waitms,
take_naps ? "on":"off",
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
use_threads ? "on":"off",
#endif
fs_frac,
......@@ -2295,7 +2277,7 @@ int main(int argc, char** argv) {
waitms = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-nap")) {
take_naps = 1;
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
} else if (!strcmp(argv[i], "-threads")) {
use_threads = 1;
} else if (!strcmp(argv[i], "-nothreads")) {
......
......@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <rfb/rfb.h>
#include <rfb/keysym.h>
#include "default8x16.h"
#include <rfb/default8x16.h>
int maxx=400, maxy=400, bpp=4;
/* odd maxx doesn't work (vncviewer bug) */
......@@ -17,13 +17,14 @@ void linecount (char* frame_buffer);
/* handles mouse events */
void on_mouse_event (int buttonMask,int x,int y,rfbClientPtr cl);
/* handles keyboard events */
void on_key_press (Bool down,KeySym key,rfbClientPtr cl);
void on_key_press (rfbBool down,rfbKeySym key,rfbClientPtr cl);
int main (int argc, char **argv)
{
rfbScreenInfoPtr server;
rfbProcessSizeArguments(&maxx,&maxy,&bpp,&argc,argv);
if(!rfbProcessSizeArguments(&maxx,&maxy,&bpp,&argc,argv))
return 1;
server = rfbGetScreen (&argc, argv, maxx, maxy, 8, 3, bpp);
server->desktopName = "Zippy das wundersquirrel\'s VNC server";
......@@ -137,7 +138,7 @@ void linecount (char* frame_buffer)
}
void on_key_press (Bool down,KeySym key,rfbClientPtr cl)
void on_key_press (rfbBool down,rfbKeySym key,rfbClientPtr cl)
{
if (down) /* or else the action occurs on both the press and depress */
switch (key) {
......
......@@ -27,7 +27,7 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
/*
* rreBeforeBuf contains pixel data in the client's format.
......@@ -47,7 +47,7 @@ static int subrectEncode8(uint8_t *data, int w, int h);
static int subrectEncode16(uint16_t *data, int w, int h);
static int subrectEncode32(uint32_t *data, int w, int h);
static uint32_t getBgColour(char *data, int size, int bpp);
static Bool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
static rfbBool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
int w, int h);
......@@ -56,7 +56,7 @@ static Bool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
* encoding.
*/
Bool
rfbBool
rfbSendRectEncodingCoRRE(cl, x, y, w, h)
rfbClientPtr cl;
int x, y, w, h;
......@@ -84,7 +84,7 @@ rfbSendRectEncodingCoRRE(cl, x, y, w, h)
* rectangle using CoRRE encoding.
*/
static Bool
static rfbBool
rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h)
rfbClientPtr cl;
int x, y, w, h;
......@@ -131,7 +131,7 @@ rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h)
break;
default:
rfbLog("getBgColour: bpp %d?\n",cl->format.bitsPerPixel);
exit(1);
return FALSE;
}
if (nSubrects < 0) {
......@@ -327,7 +327,7 @@ getBgColour(data,size,bpp)
return ((uint32_t *)data)[0];
} else {
rfbLog("getBgColour: bpp %d?\n",bpp);
exit(1);
return 0;
}
}
......@@ -339,7 +339,7 @@ getBgColour(data,size,bpp)
k = (int)(((uint8_t *)data)[j]);
if (k >= NUMCLRS) {
rfbLog("getBgColour: unusual colour = %d\n", k);
exit(1);
return 0;
}
counts[k] += 1;
if (counts[k] > maxcount) {
......
......@@ -22,13 +22,13 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
/*
* Send cursor shape either in X-style format or in client pixel format.
*/
Bool
rfbBool
rfbSendCursorShape(cl)
rfbClientPtr cl;
{
......@@ -176,7 +176,7 @@ rfbSendCursorShape(cl)
* Send cursor position (PointerPos pseudo-encoding).
*/
Bool
rfbBool
rfbSendCursorPos(rfbClientPtr cl)
{
rfbFramebufferUpdateRectHeader rect;
......@@ -502,7 +502,7 @@ void rfbPrintXCursor(rfbCursorPtr cursor)
}
}
void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,Bool freeOld)
void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,rfbBool freeOld)
{
LOCK(rfbScreen->cursorMutex);
while(rfbScreen->cursorIsDrawn) {
......
......@@ -23,7 +23,7 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
/*
......
#include "rfb.h"
#include <rfb/rfb.h>
void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,Pixel col)
void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col)
{
int rowstride = s->paddedWidthInBytes, bpp = s->bitsPerPixel>>3;
int i,j;
......@@ -17,7 +17,7 @@ void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,Pixel col)
#define SETPIXEL(x,y) \
memcpy(s->frameBuffer+(y)*rowstride+(x)*bpp,colour,bpp)
void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,Pixel col)
void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,rfbPixel col)
{
int rowstride = s->paddedWidthInBytes, bpp = s->bitsPerPixel>>3;
char* colour=(char*)&col;
......@@ -28,7 +28,7 @@ void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,Pixel col)
rfbMarkRectAsModified(s,x,y,x+1,y+1);
}
void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,Pixel col)
void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col)
{
int rowstride = s->paddedWidthInBytes, bpp = s->bitsPerPixel>>3;
int i;
......
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -13,6 +12,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -43,13 +43,9 @@ AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
......@@ -59,21 +55,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RPMSOURCEDIR = @RPMSOURCEDIR@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......@@ -82,6 +75,7 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
CFLAGS = -I.. -g -Wall
@HAVE_LIBPTHREAD_TRUE@BACKGROUND_TEST = blooptest
......@@ -98,7 +92,7 @@ noinst_PROGRAMS = example pnmshow regiontest pnmshow24 fontsel \
LDADD = ../libvncserver.a
subdir = examples
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/rfb/rfbconfig.h
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@noinst_PROGRAMS = example$(EXEEXT) \
@HAVE_LIBPTHREAD_FALSE@@OSX_TRUE@ pnmshow$(EXEEXT) \
......@@ -204,19 +198,18 @@ vncev_DEPENDENCIES = ../libvncserver.a
vncev_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/rfb
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/blooptest.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/colourmaptest.Po ./$(DEPDIR)/example.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/fontsel.Po ./$(DEPDIR)/mac.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/pnmshow.Po ./$(DEPDIR)/pnmshow24.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/regiontest.Po ./$(DEPDIR)/simple.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/simple15.Po ./$(DEPDIR)/storepasswd.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/vncev.Po
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/blooptest.Po \
@AMDEP_TRUE@ $(DEPDIR)/colourmaptest.Po $(DEPDIR)/example.Po \
@AMDEP_TRUE@ $(DEPDIR)/fontsel.Po $(DEPDIR)/mac.Po \
@AMDEP_TRUE@ $(DEPDIR)/pnmshow.Po $(DEPDIR)/pnmshow24.Po \
@AMDEP_TRUE@ $(DEPDIR)/regiontest.Po $(DEPDIR)/simple.Po \
@AMDEP_TRUE@ $(DEPDIR)/simple15.Po $(DEPDIR)/storepasswd.Po \
@AMDEP_TRUE@ $(DEPDIR)/vncev.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
......@@ -236,7 +229,9 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
......@@ -283,27 +278,27 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blooptest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colourmaptest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow24.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regiontest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple15.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storepasswd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncev.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/blooptest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/colourmaptest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/example.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fontsel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mac.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow24.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regiontest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple15.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/storepasswd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vncev.Po@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
-rm -rf $(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
......@@ -313,61 +308,53 @@ distclean-depend:
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
mkid -fID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
......@@ -391,7 +378,6 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
......@@ -399,7 +385,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
......
......@@ -59,7 +59,7 @@ void initBuffer(unsigned char* buffer)
/* Here we create a structure so that every client has it's own pointer */
typedef struct ClientData {
Bool oldButton;
rfbBool oldButton;
int oldx,oldy;
} ClientData;
......@@ -166,7 +166,7 @@ void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
/* Here the key events are handled */
void dokey(Bool down,KeySym key,rfbClientPtr cl)
void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
{
if(down) {
if(key==XK_Escape)
......@@ -312,7 +312,7 @@ int main(int argc,char** argv)
rfbRunEventLoop(rfbScreen,40000,FALSE);
#endif /* OWN LOOP */
#else
#if !defined(HAVE_LIBPTHREAD)
#if !defined(LIBVNCSERVER_HAVE_LIBPTHREAD)
#error "I need pthreads for that."
#endif
......
......@@ -12,8 +12,8 @@
* It includes the keyboard functions:
*
void KbdAddEvent(down, keySym, cl)
Bool down;
KeySym keySym;
rfbBool down;
rfbKeySym keySym;
rfbClientPtr cl;
void KbdReleaseAllKeys()
*
......@@ -37,7 +37,7 @@
/* zlib doesn't like Byte already defined */
#undef Byte
#undef TRUE
#undef Bool
#undef rfbBool
#include <rfb/rfb.h>
#include <rfb/keysym.h>
......@@ -47,17 +47,17 @@
#include <signal.h>
#include <pthread.h>
Bool rfbNoDimming = FALSE;
Bool rfbNoSleep = TRUE;
rfbBool rfbNoDimming = FALSE;
rfbBool rfbNoSleep = TRUE;
static pthread_mutex_t dimming_mutex;
static unsigned long dim_time;
static unsigned long sleep_time;
static mach_port_t master_dev_port;
static io_connect_t power_mgt;
static Bool initialized = FALSE;
static Bool dim_time_saved = FALSE;
static Bool sleep_time_saved = FALSE;
static rfbBool initialized = FALSE;
static rfbBool dim_time_saved = FALSE;
static rfbBool sleep_time_saved = FALSE;
static int
saveDimSettings(void)
......@@ -213,7 +213,7 @@ void rfbShutdown(rfbClientPtr cl);
/* some variables to enable special behaviour */
int startTime = -1, maxSecsToConnect = 0;
Bool disconnectAfterFirstClient = TRUE;
rfbBool disconnectAfterFirstClient = TRUE;
/* Where do I get the "official" list of Mac key codes?
Ripped these out of a Mac II emulator called Basilisk II
......@@ -391,7 +391,7 @@ static int keyTable[] = {
};
void
KbdAddEvent(Bool down, KeySym keySym, struct _rfbClientRec* cl)
KbdAddEvent(rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl)
{
int i;
CGKeyCode keyCode = -1;
......@@ -446,7 +446,7 @@ PtrAddEvent(buttonMask, x, y, cl)
(buttonMask & (1 << 7)) ? TRUE : FALSE);
}
Bool viewOnly = FALSE, sharedMode = FALSE;
rfbBool viewOnly = FALSE, sharedMode = FALSE;
void
ScreenInit(int argc, char**argv)
......@@ -502,7 +502,7 @@ refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore)
break;
}
}
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
else if(message[0]=='b')
rfbSendBackChannel(rfbScreen,message+1,strlen(message+1));
#endif
......@@ -560,7 +560,7 @@ int main(int argc,char *argv[])
send_message(&single_instance,"l");
exit(0);
} else
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
if(i<argc-1 && !strcmp(argv[i],"-backchannel")) {
if(strlen(argv[i+1])>1022)
argv[i+1][1022]=0;
......
......@@ -2,7 +2,7 @@
#include <rfb/rfb.h>
#include <rfb/keysym.h>
void HandleKey(Bool down,KeySym key,rfbClientPtr cl)
void HandleKey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
{
if(down && (key==XK_Escape || key=='q' || key=='Q'))
rfbCloseClient(cl);
......
......@@ -2,11 +2,11 @@
#include <rfb/rfb.h>
#include <rfb/keysym.h>
#ifndef ALLOW24BPP
#ifndef LIBVNCSERVER_ALLOW24BPP
#error "I need the ALLOW24BPP flag to work"
#endif
void HandleKey(Bool down,KeySym key,rfbClientPtr cl)
void HandleKey(rfbBool down,rfbKeySym key,rfbClientPtr cl)
{
if(down && (key==XK_Escape || key=='q' || key=='Q'))
rfbCloseClient(cl);
......
......@@ -4,7 +4,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <rfb/rfb.h>
#include "default8x16.h"
#include <rfb/default8x16.h>
char f[640*480];
char* keys[0x400];
......@@ -66,7 +66,7 @@ void output(rfbScreenInfoPtr s,char* line)
rfbLog("%s\n",line);
}
void dokey(Bool down,KeySym k,rfbClientPtr cl)
void dokey(rfbBool down,rfbKeySym k,rfbClientPtr cl)
{
char buffer[1024+32];
......
#include "rfb.h"
#include <rfb/rfb.h>
int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int x,int y,unsigned char c,Pixel col)
int x,int y,unsigned char c,rfbPixel col)
{
int i,j,width,height;
unsigned char* data=font->data+font->metaData[c*5];
......@@ -34,7 +34,7 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
}
void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int x,int y,const char* string,Pixel colour)
int x,int y,const char* string,rfbPixel colour)
{
while(*string) {
x+=rfbDrawChar(rfbScreen,font,x,y,*string,colour);
......@@ -46,7 +46,7 @@ void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int x,int y,unsigned char c,
int x1,int y1,int x2,int y2,
Pixel col,Pixel bcol)
rfbPixel col,rfbPixel bcol)
{
int i,j,width,height;
unsigned char* data=font->data+font->metaData[c*5];
......@@ -102,7 +102,7 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int x,int y,const char* string,
int x1,int y1,int x2,int y2,
Pixel colour,Pixel backColour)
rfbPixel colour,rfbPixel backColour)
{
while(*string) {
x+=rfbDrawCharWithClip(rfbScreen,font,x,y,*string,x1,y1,x2,y2,
......
......@@ -25,18 +25,18 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
static Bool sendHextiles8(rfbClientPtr cl, int x, int y, int w, int h);
static Bool sendHextiles16(rfbClientPtr cl, int x, int y, int w, int h);
static Bool sendHextiles32(rfbClientPtr cl, int x, int y, int w, int h);
static rfbBool sendHextiles8(rfbClientPtr cl, int x, int y, int w, int h);
static rfbBool sendHextiles16(rfbClientPtr cl, int x, int y, int w, int h);
static rfbBool sendHextiles32(rfbClientPtr cl, int x, int y, int w, int h);
/*
* rfbSendRectEncodingHextile - send a rectangle using hextile encoding.
*/
Bool
rfbBool
rfbSendRectEncodingHextile(cl, x, y, w, h)
rfbClientPtr cl;
int x, y, w, h;
......@@ -89,17 +89,17 @@ rfbSendRectEncodingHextile(cl, x, y, w, h)
#define DEFINE_SEND_HEXTILES(bpp) \
\
\
static Bool subrectEncode##bpp(rfbClientPtr cli, uint##bpp##_t *data, int w, int h, \
uint##bpp##_t bg, uint##bpp##_t fg, Bool mono); \
static void testColours##bpp(uint##bpp##_t *data, int size, Bool *mono, \
Bool *solid, uint##bpp##_t *bg, uint##bpp##_t *fg); \
static rfbBool subrectEncode##bpp(rfbClientPtr cli, uint##bpp##_t *data, int w, int h, \
uint##bpp##_t bg, uint##bpp##_t fg, rfbBool mono); \
static void testColours##bpp(uint##bpp##_t *data, int size, rfbBool *mono, \
rfbBool *solid, uint##bpp##_t *bg, uint##bpp##_t *fg); \
\
\
/* \
* rfbSendHextiles \
*/ \
\
static Bool \
static rfbBool \
sendHextiles##bpp(cl, rx, ry, rw, rh) \
rfbClientPtr cl; \
int rx, ry, rw, rh; \
......@@ -108,9 +108,9 @@ sendHextiles##bpp(cl, rx, ry, rw, rh)
int startUblen; \
char *fbptr; \
uint##bpp##_t bg = 0, fg = 0, newBg, newFg; \
Bool mono, solid; \
Bool validBg = FALSE; \
Bool validFg = FALSE; \
rfbBool mono, solid; \
rfbBool validBg = FALSE; \
rfbBool validFg = FALSE; \
uint##bpp##_t clientPixelData[16*16*(bpp/8)]; \
\
for (y = ry; y < ry+rh; y += 16) { \
......@@ -192,9 +192,9 @@ sendHextiles##bpp(cl, rx, ry, rw, rh)
} \
\
\
static Bool \
static rfbBool \
subrectEncode##bpp(rfbClientPtr cl, uint##bpp##_t *data, int w, int h, \
uint##bpp##_t bg, uint##bpp##_t fg, Bool mono) \
uint##bpp##_t bg, uint##bpp##_t fg, rfbBool mono) \
{ \
uint##bpp##_t cl2; \
int x,y; \
......@@ -298,8 +298,8 @@ static void
testColours##bpp(data,size,mono,solid,bg,fg) \
uint##bpp##_t *data; \
int size; \
Bool *mono; \
Bool *solid; \
rfbBool *mono; \
rfbBool *solid; \
uint##bpp##_t *bg; \
uint##bpp##_t *fg; \
{ \
......
......@@ -22,16 +22,16 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
#include <ctype.h>
#ifdef HAVE_UNISTD_H
#ifdef LIBVNCSERVER_HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_FCNTL_H
#ifdef LIBVNCSERVER_HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <errno.h>
......@@ -40,13 +40,13 @@
#include <winsock.h>
#define close closesocket
#else
#ifdef HAVE_SYS_TIME_H
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#ifdef LIBVNCSERVER_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#ifdef LIBVNCSERVER_HAVE_NETINET_IN_H
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
......@@ -70,9 +70,9 @@
#define OK_STR "HTTP/1.0 200 OK\nContent-Type: text/html\r\n\r\n"
static void httpProcessInput();
static Bool compareAndSkip(char **ptr, const char *str);
static Bool parseParams(const char *request, char *result, int max_bytes);
static Bool validateString(char *str);
static rfbBool compareAndSkip(char **ptr, const char *str);
static rfbBool parseParams(const char *request, char *result, int max_bytes);
static rfbBool validateString(char *str);
#define BUF_SIZE 32768
......@@ -104,7 +104,7 @@ httpInitSockets(rfbScreenInfoPtr rfbScreen)
if ((rfbScreen->httpListenSock = ListenOnTCPPort(rfbScreen->httpPort)) < 0) {
rfbLogPerror("ListenOnTCPPort");
exit(1);
return;
}
/*AddEnabledDevice(httpListenSock);*/
......@@ -214,7 +214,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
char *fname;
unsigned int maxFnameLen;
FILE* fd;
Bool performSubstitutions = FALSE;
rfbBool performSubstitutions = FALSE;
char str[256+32];
#ifndef WIN32
struct passwd *user = getpwuid(getuid());
......@@ -473,7 +473,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
}
static Bool
static rfbBool
compareAndSkip(char **ptr, const char *str)
{
if (strncmp(*ptr, str, strlen(str)) == 0) {
......@@ -489,7 +489,7 @@ compareAndSkip(char **ptr, const char *str)
* of <param> tags for inclusion into an HTML page with embedded applet.
*/
static Bool
static rfbBool
parseParams(const char *request, char *result, int max_bytes)
{
char param_request[128];
......@@ -559,7 +559,7 @@ parseParams(const char *request, char *result, int max_bytes)
* signs, underscores, and dots. Replace all '+' signs with spaces.
*/
static Bool
static rfbBool
validateString(char *str)
{
char *ptr;
......
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -13,6 +12,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -43,13 +43,9 @@ AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
......@@ -59,21 +55,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RPMSOURCEDIR = @RPMSOURCEDIR@
STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......@@ -82,6 +75,7 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
CFLAGS = -g -I.. -I. -Wall
libvncclient_a_SOURCES = cursor.c listen.c rfbproto.c sockets.c vncviewer.c
......@@ -98,7 +92,7 @@ noinst_PROGRAMS = client_test
client_test_LDADD = libvncclient.a
subdir = libvncclient
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/rfb/rfbconfig.h
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(lib_LIBRARIES)
......@@ -116,15 +110,14 @@ client_test_DEPENDENCIES = libvncclient.a
client_test_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/rfb
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/client_test.Po ./$(DEPDIR)/cursor.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/listen.Po ./$(DEPDIR)/rfbproto.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/vncviewer.Po
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/client_test.Po $(DEPDIR)/cursor.Po \
@AMDEP_TRUE@ $(DEPDIR)/listen.Po $(DEPDIR)/rfbproto.Po \
@AMDEP_TRUE@ $(DEPDIR)/sockets.Po $(DEPDIR)/vncviewer.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
......@@ -140,24 +133,23 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libvncclient/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
AR = ar
libLIBRARIES_INSTALL = $(INSTALL_DATA)
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
$(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
@$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
$(RANLIB) $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
......@@ -166,7 +158,6 @@ install-libLIBRARIES: $(lib_LIBRARIES)
uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
rm -f $(DESTDIR)$(libdir)/$$p; \
done
......@@ -190,21 +181,21 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfbproto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncviewer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/client_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cursor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/listen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rfbproto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sockets.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vncviewer.Po@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
-rm -rf $(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
......@@ -214,61 +205,53 @@ distclean-depend:
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
mkid -fID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
......@@ -293,7 +276,6 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
......@@ -301,7 +283,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
......
......@@ -29,7 +29,7 @@
#define HandleCoRREBPP CONCAT2E(HandleCoRRE,BPP)
#define CARDBPP CONCAT3E(uint,BPP,_t)
static Bool
static rfbBool
HandleCoRREBPP (rfbClient* client, int rx, int ry, int rw, int rh)
{
rfbRREHeader hdr;
......
......@@ -43,7 +43,7 @@
* why we call it "software cursor").
********************************************************************/
Bool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc)
rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc)
{
int bytesPerPixel;
size_t bytesPerRow, bytesMaskData;
......
......@@ -30,7 +30,7 @@
#define CARDBPP CONCAT3E(uint,BPP,_t)
#define GET_PIXEL CONCAT2E(GET_PIXEL,BPP)
static Bool
static rfbBool
HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh)
{
CARDBPP bg, fg;
......
......@@ -43,7 +43,8 @@ listenForIncomingConnections(rfbClient* client)
listenSocket = ListenAtTcpPort(client->listenPort);
if ((listenSocket < 0)) exit(1);
if ((listenSocket < 0))
return;
rfbClientLog("%s -listen: Listening on port %d\n",
client->programName,client->listenPort);
......@@ -66,8 +67,10 @@ listenForIncomingConnections(rfbClient* client)
if (FD_ISSET(listenSocket, &fds)) {
client->sock = AcceptTcpConnection(listenSocket);
if (client->sock < 0) exit(1);
if (!SetNonBlocking(client->sock)) exit(1);
if (client->sock < 0)
return;
if (!SetNonBlocking(client->sock))
return;
/* Now fork off a new process to deal with it... */
......@@ -75,7 +78,7 @@ listenForIncomingConnections(rfbClient* client)
case -1:
perror("fork");
exit(1);
return;
case 0:
/* child - return to caller */
......
......@@ -27,10 +27,10 @@
#include <errno.h>
#include <pwd.h>
#include <rfb/rfbclient.h>
#ifdef HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
#include <zlib.h>
#endif
#ifdef HAVE_LIBJPEG
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
#include <jpeglib.h>
#endif
#include <stdarg.h>
......@@ -40,7 +40,7 @@
* rfbClientLog prints a time-stamped message to the log file (stderr).
*/
Bool rfbEnableClientLogging=TRUE;
rfbBool rfbEnableClientLogging=TRUE;
void
rfbClientLog(const char *format, ...)
......@@ -124,21 +124,21 @@ void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y, int w,
}
}
static Bool HandleRRE8(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleRRE16(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleRRE32(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleCoRRE8(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleCoRRE16(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleCoRRE32(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleHextile8(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleHextile16(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleHextile32(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleZlib8(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleZlib16(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleZlib32(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleTight8(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleTight16(rfbClient* client, int rx, int ry, int rw, int rh);
static Bool HandleTight32(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleRRE8(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleRRE16(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleRRE32(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleCoRRE8(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleCoRRE16(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleCoRRE32(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleHextile8(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleHextile16(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleHextile32(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleZlib8(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleZlib16(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleZlib32(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleTight8(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleTight16(rfbClient* client, int rx, int ry, int rw, int rh);
static rfbBool HandleTight32(rfbClient* client, int rx, int ry, int rw, int rh);
static long ReadCompactLen (rfbClient* client);
......@@ -159,7 +159,7 @@ static int raw_buffer_size = -1;
static char *raw_buffer;
static z_stream decompStream;
static Bool decompStreamInited = FALSE;
static rfbBool decompStreamInited = FALSE;
/*
......@@ -174,25 +174,25 @@ static char zlib_buffer[ZLIB_BUFFER_SIZE];
/* Four independent compression streams for zlib library. */
static z_stream zlibStream[4];
static Bool zlibStreamActive[4] = {
static rfbBool zlibStreamActive[4] = {
FALSE, FALSE, FALSE, FALSE
};
/* Filter stuff. Should be initialized by filter initialization code. */
static Bool cutZeros;
static rfbBool cutZeros;
static int rectWidth, rectColors;
static char tightPalette[256*4];
static uint8_t tightPrevRow[2048*3*sizeof(uint16_t)];
/* JPEG decoder state. */
static Bool jpegError;
static rfbBool jpegError;
/*
* ConnectToRFBServer.
*/
Bool
rfbBool
ConnectToRFBServer(rfbClient* client,const char *hostname, int port)
{
unsigned int host;
......@@ -218,7 +218,7 @@ static void rfbEncryptBytes(unsigned char *bytes, char *passwd);
* InitialiseRFBConnection.
*/
Bool
rfbBool
InitialiseRFBConnection(rfbClient* client)
{
rfbProtocolVersionMsg pv;
......@@ -368,7 +368,7 @@ InitialiseRFBConnection(rfbClient* client)
* SetFormatAndEncodings.
*/
Bool
rfbBool
SetFormatAndEncodings(rfbClient* client)
{
rfbSetPixelFormatMsg spf;
......@@ -376,9 +376,9 @@ SetFormatAndEncodings(rfbClient* client)
rfbSetEncodingsMsg *se = (rfbSetEncodingsMsg *)buf;
uint32_t *encs = (uint32_t *)(&buf[sz_rfbSetEncodingsMsg]);
int len = 0;
Bool requestCompressLevel = FALSE;
Bool requestQualityLevel = FALSE;
Bool requestLastRectEncoding = FALSE;
rfbBool requestCompressLevel = FALSE;
rfbBool requestQualityLevel = FALSE;
rfbBool requestLastRectEncoding = FALSE;
spf.type = rfbSetPixelFormat;
spf.format = client->format;
......@@ -519,7 +519,7 @@ SetFormatAndEncodings(rfbClient* client)
* SendIncrementalFramebufferUpdateRequest.
*/
Bool
rfbBool
SendIncrementalFramebufferUpdateRequest(rfbClient* client)
{
return SendFramebufferUpdateRequest(client, 0, 0, client->si.framebufferWidth,
......@@ -531,8 +531,8 @@ SendIncrementalFramebufferUpdateRequest(rfbClient* client)
* SendFramebufferUpdateRequest.
*/
Bool
SendFramebufferUpdateRequest(rfbClient* client, int x, int y, int w, int h, Bool incremental)
rfbBool
SendFramebufferUpdateRequest(rfbClient* client, int x, int y, int w, int h, rfbBool incremental)
{
rfbFramebufferUpdateRequestMsg fur;
......@@ -554,7 +554,7 @@ SendFramebufferUpdateRequest(rfbClient* client, int x, int y, int w, int h, Bool
* SendPointerEvent.
*/
Bool
rfbBool
SendPointerEvent(rfbClient* client,int x, int y, int buttonMask)
{
rfbPointerEventMsg pe;
......@@ -574,8 +574,8 @@ SendPointerEvent(rfbClient* client,int x, int y, int buttonMask)
* SendKeyEvent.
*/
Bool
SendKeyEvent(rfbClient* client, uint32_t key, Bool down)
rfbBool
SendKeyEvent(rfbClient* client, uint32_t key, rfbBool down)
{
rfbKeyEventMsg ke;
......@@ -590,7 +590,7 @@ SendKeyEvent(rfbClient* client, uint32_t key, Bool down)
* SendClientCutText.
*/
Bool
rfbBool
SendClientCutText(rfbClient* client, char *str, int len)
{
rfbClientCutTextMsg cct;
......@@ -611,7 +611,7 @@ SendClientCutText(rfbClient* client, char *str, int len)
* HandleRFBServerMessage.
*/
Bool
rfbBool
HandleRFBServerMessage(rfbClient* client)
{
rfbServerToClientMsg msg;
......
......@@ -29,7 +29,7 @@
#define HandleRREBPP CONCAT2E(HandleRRE,BPP)
#define CARDBPP CONCAT3E(uint,BPP,_t)
static Bool
static rfbBool
HandleRREBPP (rfbClient* client, int rx, int ry, int rw, int rh)
{
rfbRREHeader hdr;
......
......@@ -34,7 +34,7 @@
void PrintInHex(char *buf, int len);
Bool errorMessageOnReadFailure = TRUE;
rfbBool errorMessageOnReadFailure = TRUE;
#define BUF_SIZE 8192
static char buf[BUF_SIZE];
......@@ -55,7 +55,7 @@ static int buffered = 0;
* events are processed, as there is no XtAppMainLoop in the program.
*/
Bool
rfbBool
ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
{
if (n <= buffered) {
......@@ -138,7 +138,7 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n)
* Write an exact number of bytes, and don't return until you've sent them.
*/
Bool
rfbBool
WriteToRFBServer(rfbClient* client, char *buf, int n)
{
fd_set fds;
......@@ -322,7 +322,7 @@ AcceptTcpConnection(int listenSock)
* SetNonBlocking sets a socket into non-blocking mode.
*/
Bool
rfbBool
SetNonBlocking(int sock)
{
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
......@@ -337,7 +337,7 @@ SetNonBlocking(int sock)
* StringToIPAddr - convert a host string to an IP address.
*/
Bool
rfbBool
StringToIPAddr(const char *str, unsigned int *addr)
{
struct hostent *hp;
......@@ -367,7 +367,7 @@ StringToIPAddr(const char *str, unsigned int *addr)
* Test if the other end of a socket is on the same machine.
*/
Bool
rfbBool
SameMachine(int sock)
{
struct sockaddr_in peeraddr, myaddr;
......
......@@ -80,12 +80,12 @@ static void FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *destBuffe
static void FilterGradientBPP (rfbClient* client, int numRows, CARDBPP *destBuffer);
#if BPP != 8
static Bool DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h);
static rfbBool DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h);
#endif
/* Definitions */
static Bool
static rfbBool
HandleTightBPP (rfbClient* client, int rx, int ry, int rw, int rh)
{
CARDBPP fill_colour;
......@@ -297,7 +297,7 @@ HandleTightBPP (rfbClient* client, int rx, int ry, int rw, int rh)
/*
The following variables are defined in rfbproto.c:
static Bool cutZeros;
static rfbBool cutZeros;
static int rectWidth, rectColors;
static uint8_t tightPalette[256*4];
static uint8_t tightPrevRow[2048*3*sizeof(CARD16)];
......@@ -526,13 +526,13 @@ FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *dst)
/*
The following variables are defined in rfbproto.c:
static Bool jpegError;
static rfbBool jpegError;
static struct jpeg_source_mgr jpegSrcManager;
static JOCTET *jpegBufferPtr;
static size_t *jpegBufferLen;
*/
static Bool
static rfbBool
DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h)
{
struct jpeg_decompress_struct cinfo;
......
......@@ -28,7 +28,7 @@
static void Dummy(rfbClient* client) {
}
static Bool DummyPoint(rfbClient* client, int x, int y) {
static rfbBool DummyPoint(rfbClient* client, int x, int y) {
return TRUE;
}
static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
......@@ -36,7 +36,7 @@ static void DummyRect(rfbClient* client, int x, int y, int w, int h) {
static char* NoPassword(rfbClient* client) {
return "";
}
static Bool MallocFrameBuffer(rfbClient* client) {
static rfbBool MallocFrameBuffer(rfbClient* client) {
if(client->frameBuffer)
free(client->frameBuffer);
client->frameBuffer=malloc(client->width*client->height*client->format.bitsPerPixel/8);
......@@ -94,7 +94,7 @@ rfbClient* rfbGetClient(int* argc,char** argv,
return client;
}
Bool rfbInitClient(rfbClient* client,const char* vncServerHost,int vncServerPort)
rfbBool rfbInitClient(rfbClient* client,const char* vncServerHost,int vncServerPort)
{
/* Unless we accepted an incoming connection, make a TCP connection to the
given VNC server */
......
......@@ -30,7 +30,7 @@
#define HandleZlibBPP CONCAT2E(HandleZlib,BPP)
#define CARDBPP CONCAT2E(uint,BPP,_t)
static Bool
static rfbBool
HandleZlibBPP (rfbClient* client, int rx, int ry, int rw, int rh)
{
rfbZlibHeader hdr;
......
......@@ -10,8 +10,8 @@
* see GPL (latest version) for full details
*/
#include "rfb.h"
#include "rfbregion.h"
#include <rfb/rfb.h>
#include <rfb/rfbregion.h>
#include <stdarg.h>
#include <errno.h>
......@@ -21,7 +21,7 @@
#define true -1
#endif
#ifdef HAVE_SYS_TYPES_H
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
......@@ -34,7 +34,7 @@
#include <signal.h>
#include <time.h>
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
MUTEX(logMutex);
#endif
......@@ -133,7 +133,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
#if 0
/* TODO: is this needed? Or does it mess up deferring? */
/* while(!sraRgnEmpty(cl->copyRegion)) */ {
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
if(!cl->screen->backgroundLoop)
#endif
{
......@@ -234,12 +234,12 @@ void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y
sraRgnDestroy(region);
}
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
static void *
clientOutput(void *data)
{
rfbClientPtr cl = (rfbClientPtr)data;
Bool haveUpdate;
rfbBool haveUpdate;
sraRegion* updateRegion;
while (1) {
......@@ -360,7 +360,7 @@ rfbRefuseOnHoldClient(rfbClientPtr cl)
}
static void
defaultKbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl)
defaultKbdAddEvent(rfbBool down, rfbKeySym keySym, rfbClientPtr cl)
{
}
......@@ -434,7 +434,7 @@ rfbCursorPtr defaultGetCursorPtr(rfbClientPtr cl)
}
/* response is cl->authChallenge vncEncrypted with passwd */
Bool defaultPasswordCheck(rfbClientPtr cl,const char* response,int len)
rfbBool defaultPasswordCheck(rfbClientPtr cl,const char* response,int len)
{
int i;
char *passwd=vncDecryptPasswdFromFile(cl->screen->rfbAuthPasswdData);
......@@ -464,7 +464,7 @@ Bool defaultPasswordCheck(rfbClientPtr cl,const char* response,int len)
/* for this method, rfbAuthPasswdData is really a pointer to an array
of char*'s, where the last pointer is 0. */
Bool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len)
rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len)
{
char **passwds;
int i=0;
......@@ -586,7 +586,10 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
rfbScreen->passwordCheck = defaultPasswordCheck;
rfbProcessArguments(rfbScreen,argc,argv);
if(!rfbProcessArguments(rfbScreen,argc,argv)) {
free(rfbScreen);
return 0;
}
#ifdef WIN32
{
......@@ -649,7 +652,7 @@ void rfbNewFramebuffer(rfbScreenInfoPtr rfbScreen, char *framebuffer,
int bytesPerPixel)
{
rfbPixelFormat old_format;
Bool format_changed = FALSE;
rfbBool format_changed = FALSE;
rfbClientIteratorPtr iterator;
rfbClientPtr cl;
......@@ -747,7 +750,7 @@ void rfbInitServer(rfbScreenInfoPtr rfbScreen)
httpInitSockets(rfbScreen);
}
#ifndef HAVE_GETTIMEOFDAY
#ifndef LIBVNCSERVER_HAVE_GETTIMEOFDAY
#include <fcntl.h>
#include <conio.h>
#include <sys/timeb.h>
......@@ -810,10 +813,10 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
rfbReleaseClientIterator(i);
}
void rfbRunEventLoop(rfbScreenInfoPtr rfbScreen, long usec, Bool runInBackground)
void rfbRunEventLoop(rfbScreenInfoPtr rfbScreen, long usec, rfbBool runInBackground)
{
if(runInBackground) {
#ifdef HAVE_LIBPTHREAD
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
pthread_t listener_thread;
rfbScreen->backgroundLoop = TRUE;
......@@ -822,7 +825,7 @@ void rfbRunEventLoop(rfbScreenInfoPtr rfbScreen, long usec, Bool runInBackground
return;
#else
rfbLog("Can't run in background, because I don't have PThreads!\n");
exit(-1);
return;
#endif
}
......
This diff is collapsed.
......@@ -53,27 +53,27 @@
typedef struct {
Bool shareDesktop;
Bool viewOnly;
Bool fullScreen;
Bool grabKeyboard;
Bool raiseOnBeep;
rfbBool shareDesktop;
rfbBool viewOnly;
rfbBool fullScreen;
rfbBool grabKeyboard;
rfbBool raiseOnBeep;
const char* encodingsString;
Bool useBGR233;
rfbBool useBGR233;
int nColours;
Bool useSharedColours;
Bool forceOwnCmap;
Bool forceTrueColour;
rfbBool useSharedColours;
rfbBool forceOwnCmap;
rfbBool forceTrueColour;
int requestedDepth;
Bool useShm;
rfbBool useShm;
int wmDecorationWidth;
int wmDecorationHeight;
Bool debug;
rfbBool debug;
int popupButtonCount;
......@@ -82,19 +82,19 @@ typedef struct {
int compressLevel;
int qualityLevel;
Bool enableJPEG;
Bool useRemoteCursor;
rfbBool enableJPEG;
rfbBool useRemoteCursor;
} AppData;
struct _rfbClient;
typedef Bool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
typedef char* (*GetPasswordProc)(struct _rfbClient* client);
typedef Bool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
typedef void (*BellProc)(struct _rfbClient* client);
typedef struct _rfbClient {
......@@ -108,7 +108,7 @@ typedef struct _rfbClient {
const char* programName;
const char* serverHost;
int serverPort;
Bool listenSpecified;
rfbBool listenSpecified;
int listenPort, flashPort;
/* Note that the CoRRE encoding uses this buffer and assumes it is big enough
......@@ -122,13 +122,13 @@ typedef struct _rfbClient {
/* rfbproto.c */
int sock;
Bool canUseCoRRE;
Bool canUseHextile;
rfbBool canUseCoRRE;
rfbBool canUseHextile;
char *desktopName;
rfbPixelFormat format;
rfbServerInitMsg si;
char *serverCutText;
Bool newServerCutText;
rfbBool newServerCutText;
/* cursor.c */
uint8_t *rcSource, *rcMask;
......@@ -147,7 +147,7 @@ typedef struct _rfbClient {
// TODO: make callback
extern Bool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
/* listen.c */
......@@ -155,38 +155,38 @@ extern void listenForIncomingConnections(rfbClient* viewer);
/* rfbproto.c */
extern Bool rfbEnableClientLogging;
extern rfbBool rfbEnableClientLogging;
extern void rfbClientLog(const char *format, ...);
extern Bool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
extern Bool InitialiseRFBConnection(rfbClient* client);
extern Bool SetFormatAndEncodings(rfbClient* client);
extern Bool SendIncrementalFramebufferUpdateRequest(rfbClient* client);
extern Bool SendFramebufferUpdateRequest(rfbClient* client,
extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
extern rfbBool InitialiseRFBConnection(rfbClient* client);
extern rfbBool SetFormatAndEncodings(rfbClient* client);
extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client);
extern rfbBool SendFramebufferUpdateRequest(rfbClient* client,
int x, int y, int w, int h,
Bool incremental);
extern Bool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask);
extern Bool SendKeyEvent(rfbClient* client,uint32_t key, Bool down);
extern Bool SendClientCutText(rfbClient* client,char *str, int len);
extern Bool HandleRFBServerMessage(rfbClient* client);
rfbBool incremental);
extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask);
extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down);
extern rfbBool SendClientCutText(rfbClient* client,char *str, int len);
extern rfbBool HandleRFBServerMessage(rfbClient* client);
extern void PrintPixelFormat(rfbPixelFormat *format);
/* sockets.c */
extern Bool errorMessageOnReadFailure;
extern rfbBool errorMessageOnReadFailure;
extern Bool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
extern Bool WriteToRFBServer(rfbClient* client, char *buf, int n);
extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n);
extern int FindFreeTcpPort(void);
extern int ListenAtTcpPort(int port);
extern int ConnectClientToTcpAddr(unsigned int host, int port);
extern int AcceptTcpConnection(int listenSock);
extern Bool SetNonBlocking(int sock);
extern rfbBool SetNonBlocking(int sock);
extern Bool StringToIPAddr(const char *str, unsigned int *addr);
extern Bool SameMachine(int sock);
extern rfbBool StringToIPAddr(const char *str, unsigned int *addr);
extern rfbBool SameMachine(int sock);
/* vncviewer.c */
rfbClient* rfbGetClient(int* argc,char** argv,int bitsPerSample,int samplesPerPixel,int bytesPerPixel);
Bool rfbInitClient(rfbClient* client,const char* vncServerHost,int vncServerPort);
rfbBool rfbInitClient(rfbClient* client,const char* vncServerHost,int vncServerPort);
void rfbClientCleanup(rfbClient* client);
/* rfb/rfbconfig.h.in. Generated from configure.ac by autoheader. */
/* rfb/rfbconfig.h.in. Generated automatically from configure.ac by autoheader. */
/* Enable 24 bit per pixel in native framebuffer */
#undef ALLOW24BPP
......@@ -6,161 +6,146 @@
/* Enable BackChannel communication */
#undef BACKCHANNEL
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* Define if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* Define if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
/* Define to 1 if you have the <fcntl.h> header file. */
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `ftime' function. */
/* Define if you have the `ftime' function. */
#undef HAVE_FTIME
/* Define to 1 if you have the `gethostbyname' function. */
/* Define if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostname' function. */
/* Define if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
/* Define to 1 if you have the `gettimeofday' function. */
/* Define if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `inet_ntoa' function. */
/* Define if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define to 1 if you have the <inttypes.h> header file. */
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
/* Define if you have the `jpeg' library (-ljpeg). */
#undef HAVE_LIBJPEG
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* Define if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `pthread' library (-lpthread). */
/* Define if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
/* Define to 1 if you have the `socket' library (-lsocket). */
/* Define if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the `z' library (-lz). */
/* Define if you have the `z' library (-lz). */
#undef HAVE_LIBZ
/* Define to 1 if your system has a working `malloc' function. */
/* Define if your system has a working `malloc' function. */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memmove' function. */
/* Define if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
/* Define if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the `mkfifo' function. */
/* Define if you have the `mkfifo' function. */
#undef HAVE_MKFIFO
/* Define to 1 if you have the <netdb.h> header file. */
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the `select' function. */
/* Define if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `socket' function. */
/* Define if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
/* Define if `stat' has the bug that it succeeds when given the zero-length
file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
/* Define to 1 if you have the <stdint.h> header file. */
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */
/* Define if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strcspn' function. */
/* Define if you have the `strcspn' function. */
#undef HAVE_STRCSPN
/* Define to 1 if you have the `strdup' function. */
/* Define if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
/* Define if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the `strftime' function. */
/* Define if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strstr' function. */
/* Define if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the <syslog.h> header file. */
/* Define if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
/* Define to 1 if you have the <sys/socket.h> header file. */
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/timeb.h> header file. */
/* Define if you have the <sys/timeb.h> header file. */
#undef HAVE_SYS_TIMEB_H
/* Define to 1 if you have the <sys/time.h> header file. */
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <unistd.h> header file. */
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vprintf' function. */
/* Define if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Use zrle compression; needs a c++ compiler */
#undef HAVE_ZRLE
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
/* Define if `lstat' dereferences a symlink specified with a trailing slash.
*/
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The number of bytes in type char */
#undef SIZEOF_CHAR
......@@ -176,20 +161,20 @@
/* The number of bytes in type void* */
#undef SIZEOF_VOIDP
/* Define to 1 if you have the ANSI C header files. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* Define if your processor stores words with the most significant byte first
(like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to 1 if the X Window System is missing or not being used. */
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to empty if `const' does not conform to ANSI C. */
......
......@@ -52,39 +52,36 @@
#include <rfb/rfbint.h>
#include <rfb/keysym.h>
#ifdef HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
#include <zlib.h>
#endif
#if defined(WIN32)
#define WORDS_BIGENDIAN
#undef Bool
#define Bool int
#define rfbBool int
#include <sys/timeb.h>
#include <winsock.h>
#undef SOCKET
#define SOCKET int
#else
#define max(a,b) (((a)>(b))?(a):(b))
#ifdef HAVE_SYS_TIME_H
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETINET_IN_H
#ifdef LIBVNCSERVER_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#define SOCKET int
#ifndef Bool
typedef int8_t Bool;
typedef int8_t rfbBool;
#undef FALSE
#define FALSE 0
#undef TRUE
#define TRUE -1
#endif
#endif
typedef uint32_t KeySym;
typedef uint32_t Pixel;
typedef uint32_t rfbKeySym;
typedef uint32_t rfbPixel;
#ifndef INADDR_NONE
#define INADDR_NONE ((in_addr_t) 0xffffffff)
......@@ -313,7 +310,7 @@ typedef struct {
#define rfbSetColourMapEntries 1
#define rfbBell 2
#define rfbServerCutText 3
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
#define rfbBackChannel 15
#endif
......@@ -341,15 +338,15 @@ typedef struct {
#define rfbEncodingRRE 2
#define rfbEncodingCoRRE 4
#define rfbEncodingHextile 5
#ifdef HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
#define rfbEncodingZlib 6
#define rfbEncodingTight 7
#define rfbEncodingZlibHex 8
#endif
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
#define rfbEncodingBackChannel 15
#endif
#ifdef HAVE_ZRLE
#ifdef LIBVNCSERVER_HAVE_ZRLE
#define rfbEncodingZRLE 16
#endif
......@@ -537,7 +534,7 @@ typedef struct {
#define rfbHextileExtractW(byte) (((byte) >> 4) + 1)
#define rfbHextileExtractH(byte) (((byte) & 0xf) + 1)
#ifdef HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* zlib - zlib compressed Encoding. We have an rfbZlibHeader structure
* giving the number of bytes following. Finally the data follows is
......@@ -798,7 +795,7 @@ typedef struct {
#define sz_rfbServerCutTextMsg 8
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
typedef rfbServerCutTextMsg rfbBackChannelMsg;
#define sz_rfbBackChannelMsg 8
#endif
......
......@@ -25,38 +25,38 @@ extern sraRegion *sraRgnCreateRgn(const sraRegion *src);
extern void sraRgnDestroy(sraRegion *rgn);
extern void sraRgnMakeEmpty(sraRegion *rgn);
extern Bool sraRgnAnd(sraRegion *dst, const sraRegion *src);
extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src);
extern void sraRgnOr(sraRegion *dst, const sraRegion *src);
extern Bool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
extern void sraRgnOffset(sraRegion *dst, int dx, int dy);
extern Bool sraRgnPopRect(sraRegion *region, sraRect *rect,
extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect,
unsigned long flags);
extern unsigned long sraRgnCountRects(const sraRegion *rgn);
extern Bool sraRgnEmpty(const sraRegion *rgn);
extern rfbBool sraRgnEmpty(const sraRegion *rgn);
extern sraRegion *sraRgnBBox(const sraRegion *src);
/* -=- rectangle iterator */
typedef struct sraRectangleIterator {
Bool reverseX,reverseY;
rfbBool reverseX,reverseY;
int ptrSize,ptrPos;
struct sraSpan** sPtrs;
} sraRectangleIterator;
extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s);
extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,Bool reverseX,Bool reverseY);
extern Bool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r);
extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY);
extern rfbBool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r);
extern void sraRgnReleaseIterator(sraRectangleIterator *i);
void sraRgnPrint(const sraRegion *s);
/* -=- Rectangle clipper (for speed) */
extern Bool sraClipRect(int *x, int *y, int *w, int *h,
extern rfbBool sraClipRect(int *x, int *y, int *w, int *h,
int cx, int cy, int cw, int ch);
#endif
......@@ -5,8 +5,8 @@
* Only deals with rectangular regions, though.
*/
#include "rfb.h"
#include "rfbregion.h"
#include <rfb/rfb.h>
#include <rfb/rfbregion.h>
/* -=- Internal Span structure */
......@@ -82,7 +82,6 @@ sraSpanCheck(const sraSpan *span, const char *text) {
if (span->start == span->end) {
printf(text);
printf(":%d-%d\n", span->start, span->end);
exit(0);
}
}
......@@ -169,7 +168,7 @@ sraSpanListMakeEmpty(sraSpanList *list) {
list->back._next = NULL;
}
Bool
rfbBool
sraSpanListEqual(const sraSpanList *s1, const sraSpanList *s2) {
sraSpan *sp1, *sp2;
......@@ -178,7 +177,7 @@ sraSpanListEqual(const sraSpanList *s1, const sraSpanList *s2) {
return 1;
} else {
printf("sraSpanListEqual:incompatible spans (only one NULL!)\n");
exit(1);
return FALSE;
}
}
......@@ -202,7 +201,7 @@ sraSpanListEqual(const sraSpanList *s1, const sraSpanList *s2) {
}
}
Bool
rfbBool
sraSpanListEmpty(const sraSpanList *list) {
return (list->front._next == &(list->back));
}
......@@ -272,7 +271,7 @@ sraSpanListOr(sraSpanList *dest, const sraSpanList *src) {
return;
} else {
printf("sraSpanListOr:incompatible spans (only one NULL!)\n");
exit(1);
return;
}
}
......@@ -352,7 +351,7 @@ sraSpanListOr(sraSpanList *dest, const sraSpanList *src) {
}
}
Bool
rfbBool
sraSpanListAnd(sraSpanList *dest, const sraSpanList *src) {
sraSpan *d_curr, *s_curr, *d_next;
......@@ -361,7 +360,7 @@ sraSpanListAnd(sraSpanList *dest, const sraSpanList *src) {
return 1;
} else {
printf("sraSpanListAnd:incompatible spans (only one NULL!)\n");
exit(1);
return FALSE;
}
}
......@@ -432,7 +431,7 @@ sraSpanListAnd(sraSpanList *dest, const sraSpanList *src) {
return !sraSpanListEmpty(dest);
}
Bool
rfbBool
sraSpanListSubtract(sraSpanList *dest, const sraSpanList *src) {
sraSpan *d_curr, *s_curr;
......@@ -441,7 +440,7 @@ sraSpanListSubtract(sraSpanList *dest, const sraSpanList *src) {
return 1;
} else {
printf("sraSpanListSubtract:incompatible spans (only one NULL!)\n");
exit(1);
return FALSE;
}
}
......@@ -547,7 +546,7 @@ sraRgnMakeEmpty(sraRegion *rgn) {
/* -=- Boolean Region ops */
Bool
rfbBool
sraRgnAnd(sraRegion *dst, const sraRegion *src) {
return sraSpanListAnd((sraSpanList*)dst, (sraSpanList*)src);
}
......@@ -557,7 +556,7 @@ sraRgnOr(sraRegion *dst, const sraRegion *src) {
sraSpanListOr((sraSpanList*)dst, (sraSpanList*)src);
}
Bool
rfbBool
sraRgnSubtract(sraRegion *dst, const sraRegion *src) {
return sraSpanListSubtract((sraSpanList*)dst, (sraSpanList*)src);
}
......@@ -614,12 +613,12 @@ sraRegion *sraRgnBBox(const sraRegion *src) {
return sraRgnCreateRect(xmin,ymin,xmax,ymax);
}
Bool
rfbBool
sraRgnPopRect(sraRegion *rgn, sraRect *rect, unsigned long flags) {
sraSpan *vcurr, *hcurr;
sraSpan *vend, *hend;
Bool right2left = flags & 2;
Bool bottom2top = flags & 1;
rfbBool right2left = flags & 2;
rfbBool bottom2top = flags & 1;
/* - Pick correct order */
if (bottom2top) {
......@@ -672,7 +671,7 @@ sraRgnCountRects(const sraRegion *rgn) {
return count;
}
Bool
rfbBool
sraRgnEmpty(const sraRegion *rgn) {
return sraSpanListEmpty((sraSpanList*)rgn);
}
......@@ -706,7 +705,7 @@ sraRectangleIterator *sraRgnGetIterator(sraRegion *s)
return(i);
}
sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,Bool reverseX,Bool reverseY)
sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY)
{
sraRectangleIterator *i = sraRgnGetIterator(s);
if(reverseY) {
......@@ -718,7 +717,7 @@ sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,Bool reverseX,Bool r
return(i);
}
Bool sraReverse(sraRectangleIterator *i)
rfbBool sraReverse(sraRectangleIterator *i)
{
return( ((i->ptrPos&2) && i->reverseX) ||
(!(i->ptrPos&2) && i->reverseY));
......@@ -732,7 +731,7 @@ sraSpan* sraNextSpan(sraRectangleIterator *i)
return(i->sPtrs[i->ptrPos]->_next);
}
Bool sraRgnIteratorNext(sraRectangleIterator* i,sraRect* r)
rfbBool sraRgnIteratorNext(sraRectangleIterator* i,sraRect* r)
{
/* is the subspan finished? */
while(sraNextSpan(i) == i->sPtrs[i->ptrPos+1]) {
......@@ -761,7 +760,7 @@ Bool sraRgnIteratorNext(sraRectangleIterator* i,sraRect* r)
if((i->ptrPos%4)!=2) {
rfbLog("sraRgnIteratorNext: offset is wrong (%d%%4!=2)\n",i->ptrPos);
exit(-1);
return FALSE;
}
r->y1 = i->sPtrs[i->ptrPos-2]->start;
......@@ -783,7 +782,7 @@ sraRgnPrint(const sraRegion *rgn) {
sraSpanListPrint((sraSpanList*)rgn);
}
Bool
rfbBool
sraClipRect(int *x, int *y, int *w, int *h,
int cx, int cy, int cw, int ch) {
if (*x < cx) {
......@@ -812,7 +811,7 @@ int main(int argc, char** argv)
sraRegionPtr region, region1, region2;
sraRectangleIterator* i;
sraRect rect;
Bool b;
rfbBool b;
region = sraRgnCreateRect(10, 10, 600, 300);
region1 = sraRgnCreateRect(40, 50, 350, 200);
......
This diff is collapsed.
......@@ -26,7 +26,7 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
/*
* rreBeforeBuf contains pixel data in the client's format.
......@@ -52,7 +52,7 @@ static uint32_t getBgColour(char *data, int size, int bpp);
* rfbSendRectEncodingRRE - send a given rectangle using RRE encoding.
*/
Bool
rfbBool
rfbSendRectEncodingRRE(cl, x, y, w, h)
rfbClientPtr cl;
int x, y, w, h;
......@@ -100,7 +100,7 @@ rfbSendRectEncodingRRE(cl, x, y, w, h)
break;
default:
rfbLog("getBgColour: bpp %d?\n",cl->format.bitsPerPixel);
exit(1);
return FALSE;
}
if (nSubrects < 0) {
......@@ -296,7 +296,7 @@ getBgColour(data,size,bpp)
return ((uint32_t *)data)[0];
} else {
rfbLog("getBgColour: bpp %d?\n",bpp);
exit(1);
return 0;
}
}
......@@ -308,7 +308,7 @@ getBgColour(data,size,bpp)
k = (int)(((uint8_t *)data)[j]);
if (k >= NUMCLRS) {
rfbLog("getBgColour: unusual colour = %d\n", k);
exit(1);
return 0;
}
counts[k] += 1;
if (counts[k] > maxcount) {
......
#include <ctype.h>
#include "rfb.h"
#include "keysym.h"
#include <rfb/rfb.h>
#include <rfb/keysym.h>
typedef struct {
rfbScreenInfoPtr screen;
......@@ -12,9 +12,9 @@ typedef struct {
int x1,y1,x2,y2,textH,pageH;
int xhot,yhot;
int buttonWidth,okBX,cancelBX,okX,cancelX,okY;
Bool okInverted,cancelInverted;
rfbBool okInverted,cancelInverted;
int lastButtons;
Pixel colour,backColour;
rfbPixel colour,backColour;
SelectionChangedHookPtr selChangedHook;
enum { SELECTING, OK, CANCEL } state;
} rfbSelectData;
......@@ -22,11 +22,11 @@ typedef struct {
static const char* okStr="OK";
static const char* cancelStr="Cancel";
static void selPaintButtons(rfbSelectData* m,Bool invertOk,Bool invertCancel)
static void selPaintButtons(rfbSelectData* m,rfbBool invertOk,rfbBool invertCancel)
{
rfbScreenInfoPtr s = m->screen;
Pixel bcolour = m->backColour;
Pixel colour = m->colour;
rfbPixel bcolour = m->backColour;
rfbPixel colour = m->colour;
rfbFillRect(s,m->x1,m->okY-m->textH,m->x2,m->okY,bcolour);
......@@ -52,7 +52,7 @@ static void selPaintButtons(rfbSelectData* m,Bool invertOk,Bool invertCancel)
}
/* line is relative to displayStart */
static void selPaintLine(rfbSelectData* m,int line,Bool invert)
static void selPaintLine(rfbSelectData* m,int line,rfbBool invert)
{
int y1 = m->y1+line*m->textH, y2 = y1+m->textH;
if(y2>m->y2)
......@@ -122,7 +122,7 @@ static void selSelect(rfbSelectData* m,int _index)
/* todo: scrollbars */
}
static void selKbdAddEvent(Bool down,KeySym keySym,rfbClientPtr cl)
static void selKbdAddEvent(rfbBool down,rfbKeySym keySym,rfbClientPtr cl)
{
if(down) {
if(keySym>' ' && keySym<0xff) {
......@@ -203,7 +203,7 @@ static rfbCursorPtr selGetCursorPtr(rfbClientPtr cl)
int rfbSelectBox(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
char** list,
int x1,int y1,int x2,int y2,
Pixel colour,Pixel backColour,
rfbPixel colour,rfbPixel backColour,
int border,SelectionChangedHookPtr selChangedHook)
{
int bpp = rfbScreen->bitsPerPixel/8;
......
This diff is collapsed.
......@@ -24,13 +24,13 @@
* USA.
*/
#include "rfb.h"
#include <rfb/rfb.h>
static const char* encNames[] = {
"raw", "copyRect", "RRE", "[encoding 3]", "CoRRE", "hextile",
"zlib", "tight", "[encoding 8]", "[encoding 9]", "[encoding 10]",
"[encoding 11]", "[encoding 12]", "[encoding 13]", "[encoding 14]",
#ifdef BACKCHANNEL
#ifdef LIBVNCSERVER_BACKCHANNEL
"BackChannel",
#else
"[encoding 15]",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -28,10 +28,10 @@
#include <string.h>
#include <math.h>
#ifdef HAVE_SYS_TYPES_H
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#ifdef LIBVNCSERVER_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
......@@ -142,7 +142,7 @@ void
vncRandomBytes(unsigned char *bytes)
{
int i;
static Bool s_srandom_called = FALSE;
static rfbBool s_srandom_called = FALSE;
if (!s_srandom_called) {
srandom((unsigned int)time(0) ^ (unsigned int)getpid());
......
......@@ -6,7 +6,7 @@
static int tty=2;
static int tty_inject_device;
void do_key(Bool down,KeySym keySym,rfbClientPtr cl)
void do_key(rfbBool down,rfbKeySym keySym,rfbClientPtr cl)
{
static char isControl=0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment