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