summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordscho <dscho>2003-07-28 12:01:07 +0000
committerdscho <dscho>2003-07-28 12:01:07 +0000
commit13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b (patch)
tree8ca17b27e8b953403b93625381aa162d734c4287 /examples
parenteef408c1d84c7aaceb9732dd9a7e216886d2c2f8 (diff)
downloadlibvncserver-13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b.zip
libvncserver-13b358fed1b89a7a7f8c47bc175dcb3ccae1e39b.tar.gz
fixed maxRectsPerUpdate with Tight encoding bug; some autoconfing; stderr should not be used in a library (use rfbLog instead)
Diffstat (limited to 'examples')
-rw-r--r--examples/1instance.c6
-rw-r--r--examples/Makefile.in100
-rw-r--r--examples/fontsel.c4
-rw-r--r--examples/mac.c4
-rw-r--r--examples/pnmshow.c2
-rw-r--r--examples/pnmshow24.c2
-rw-r--r--examples/vncev.c2
7 files changed, 67 insertions, 53 deletions
diff --git a/examples/1instance.c b/examples/1instance.c
index 8feadb5..f6c4315 100644
--- a/examples/1instance.c
+++ b/examples/1instance.c
@@ -68,7 +68,7 @@ int get_next_message(char* buffer,int len,single_instance_struct* str,int usecs)
}
buffer[reallen]=0;
#ifdef DEBUG_1INSTANCE
- if(reallen!=0) fprintf(stderr,"message received: %s.\n",buffer);
+ if(reallen!=0) rfbLog("message received: %s.\n",buffer);
#endif
}
@@ -104,7 +104,7 @@ void send_message(single_instance_struct* str,char* message)
#endif
write(str->fd,message,strlen(message));
#ifdef DEBUG_1INSTANCE
- fprintf(stderr,"send: %s => %d(%d)\n",message,i,strlen(message));
+ rfbLog("send: %s => %d(%d)\n",message,i,strlen(message));
#endif
}
@@ -118,7 +118,7 @@ single_instance_struct str1 = { "/tmp/1instance" };
void my_dispatcher(char* message)
{
#ifdef DEBUG_1INSTANCE
- fprintf(stderr,"Message arrived: %s.\n",message);
+ rfbLog("Message arrived: %s.\n",message);
#endif
if(!strcmp(message,"quit")) {
delete_control_file(str1);
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 8af4b97..71354df 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,6 +1,7 @@
-# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -12,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-
SHELL = @SHELL@
srcdir = @srcdir@
@@ -43,9 +43,13 @@ AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
@@ -55,18 +59,21 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AWK = @AWK@
CC = @CC@
CCLD = @CCLD@
CXX = @CXX@
DEPDIR = @DEPDIR@
-EXEEXT = @EXEEXT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RPMSOURCEDIR = @RPMSOURCEDIR@
+STRIP = @STRIP@
VERSION = @VERSION@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
@@ -75,7 +82,6 @@ X_PRE_LIBS = @X_PRE_LIBS@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
-
CFLAGS = -I.. -g -Wall
@HAVE_LIBPTHREAD_TRUE@BACKGROUND_TEST = blooptest
@@ -203,13 +209,14 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/blooptest.Po \
-@AMDEP_TRUE@ $(DEPDIR)/colourmaptest.Po $(DEPDIR)/example.Po \
-@AMDEP_TRUE@ $(DEPDIR)/fontsel.Po $(DEPDIR)/mac.Po \
-@AMDEP_TRUE@ $(DEPDIR)/pnmshow.Po $(DEPDIR)/pnmshow24.Po \
-@AMDEP_TRUE@ $(DEPDIR)/regiontest.Po $(DEPDIR)/simple.Po \
-@AMDEP_TRUE@ $(DEPDIR)/simple15.Po $(DEPDIR)/storepasswd.Po \
-@AMDEP_TRUE@ $(DEPDIR)/vncev.Po
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/blooptest.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/colourmaptest.Po ./$(DEPDIR)/example.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/fontsel.Po ./$(DEPDIR)/mac.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/pnmshow.Po ./$(DEPDIR)/pnmshow24.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/regiontest.Po ./$(DEPDIR)/simple.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/simple15.Po ./$(DEPDIR)/storepasswd.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/vncev.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
@@ -229,9 +236,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && \
- CONFIG_HEADERS= CONFIG_LINKS= \
- CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
@@ -278,27 +283,27 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/blooptest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/colourmaptest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/example.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fontsel.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mac.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pnmshow24.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regiontest.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/simple15.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/storepasswd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vncev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blooptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colourmaptest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnmshow24.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regiontest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple15.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/storepasswd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vncev.Po@am__quote@
distclean-depend:
- -rm -rf $(DEPDIR)
+ -rm -rf ./$(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -308,53 +313,61 @@ distclean-depend:
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
+ETAGS = etags
+ETAGSFLAGS =
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -fID $$unique $(LISP)
+ mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
GTAGS:
- here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir) \
- || exit 1; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -378,6 +391,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -385,7 +399,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
diff --git a/examples/fontsel.c b/examples/fontsel.c
index 5b9745e..9ff47a6 100644
--- a/examples/fontsel.c
+++ b/examples/fontsel.c
@@ -54,7 +54,7 @@ int main(int argc,char** argv)
rfbScreen = s;
font=rfbLoadConsoleFont(DEFAULTFONT);
if(!font) {
- fprintf(stderr,"Couldn't find %s\n",DEFAULTFONT);
+ rfbLog("Couldn't find %s\n",DEFAULTFONT);
exit(1);
}
@@ -62,7 +62,7 @@ int main(int argc,char** argv)
rfbProcessEvents(s,900000);
i = rfbSelectBox(s,font,fontlist,10,20,200,300,0xffdfdf,0x602040,2,showFont);
- fprintf(stderr,"Selection: %d: %s\n",i,(i>=0)?fontlist[i]:"cancelled");
+ rfbLog("Selection: %d: %s\n",i,(i>=0)?fontlist[i]:"cancelled");
rfbFreeFont(font);
diff --git a/examples/mac.c b/examples/mac.c
index 6b50174..009ae08 100644
--- a/examples/mac.c
+++ b/examples/mac.c
@@ -493,7 +493,7 @@ refreshCallback(CGRectCount count, const CGRect *rectArray, void *ignore)
rfbClientPtr cl;
int i;
for(i=0,cl=rfbScreen->rfbClientHead;cl;cl=cl->next,i++)
- fprintf(stderr,"%02d: %s\n",i,cl->host);
+ rfbLog("%02d: %s\n",i,cl->host);
} else if(message[0]=='t') {
rfbClientPtr cl;
for(cl=rfbScreen->rfbClientHead;cl;cl=cl->next)
@@ -556,7 +556,7 @@ int main(int argc,char *argv[])
send_message(&single_instance,message);
exit(0);
} else if(!strcmp(argv[i],"-listclients")) {
- fprintf(stderr,"list clients\n");
+ rfbLog("list clients\n");
send_message(&single_instance,"l");
exit(0);
} else
diff --git a/examples/pnmshow.c b/examples/pnmshow.c
index e41ad4e..b8481f8 100644
--- a/examples/pnmshow.c
+++ b/examples/pnmshow.c
@@ -36,7 +36,7 @@ int main(int argc,char** argv)
/* get width & height */
sscanf(buffer,"%d %d",&width,&height);
- fprintf(stderr,"Got width %d and height %d.\n",width,height);
+ rfbLog("Got width %d and height %d.\n",width,height);
fgets(buffer,1024,in);
/* vncviewers have problems with widths which are no multiple of 4. */
diff --git a/examples/pnmshow24.c b/examples/pnmshow24.c
index 533c1fb..9780419 100644
--- a/examples/pnmshow24.c
+++ b/examples/pnmshow24.c
@@ -40,7 +40,7 @@ int main(int argc,char** argv)
/* get width & height */
sscanf(buffer,"%d %d",&width,&height);
- fprintf(stderr,"Got width %d and height %d.\n",width,height);
+ rfbLog("Got width %d and height %d.\n",width,height);
fgets(buffer,1024,in);
/* vncviewers have problems with widths which are no multiple of 4. */
diff --git a/examples/vncev.c b/examples/vncev.c
index 5dbfd0d..b465d47 100644
--- a/examples/vncev.c
+++ b/examples/vncev.c
@@ -63,7 +63,7 @@ void output(rfbScreenInfoPtr s,char* line)
{
rfbDoCopyRect(s,0,0,640,480-lineHeight,0,-lineHeight);
rfbDrawString(s,&default8x16Font,10,lineY,line,0x01);
- fprintf(stderr,"%s\n",line);
+ rfbLog("%s\n",line);
}
void dokey(Bool down,KeySym k,rfbClientPtr cl)
OpenPOWER on IntegriCloud