Initial revision
commit
757fdc2454
@ -0,0 +1,369 @@
|
||||
main.o: main.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/asm/errno.h \
|
||||
/usr/include/sys/socket.h /usr/include/bits/socket.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/signal.h \
|
||||
/usr/include/bits/signum.h /usr/include/bits/siginfo.h \
|
||||
/usr/include/bits/sigaction.h /usr/include/bits/sigcontext.h \
|
||||
/usr/include/asm/sigcontext.h /usr/include/bits/sigstack.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h
|
||||
rfbserver.o: rfbserver.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/pwd.h /usr/include/sys/socket.h \
|
||||
/usr/include/bits/socket.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h /usr/include/arpa/inet.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h
|
||||
miregion.o: miregion.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h include/Xserver/miscstruct.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/X11/Xprotostr.h include/Xserver/regionstr.h \
|
||||
include/Xserver/gc.h include/X11/Xproto.h include/Xserver/screenint.h \
|
||||
include/Xserver/pixmap.h
|
||||
auth.o: auth.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h rfb.h include/Xserver/scrnintstr.h \
|
||||
include/Xserver/screenint.h include/Xserver/misc.h \
|
||||
include/X11/Xosdefs.h include/X11/Xfuncproto.h include/X11/Xmd.h \
|
||||
include/X11/X.h include/Xserver/os.h include/X11/Xalloca.h \
|
||||
/usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/socket.h \
|
||||
/usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
|
||||
/usr/include/asm/sockios.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h
|
||||
sockets.o: sockets.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
|
||||
/usr/include/bits/endian.h /usr/include/sys/select.h \
|
||||
/usr/include/bits/select.h /usr/include/bits/sigset.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/sys/time.h \
|
||||
/usr/include/bits/time.h /usr/include/sys/socket.h \
|
||||
/usr/include/bits/socket.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/netinet/in.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
|
||||
/usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/fcntl.h \
|
||||
/usr/include/bits/fcntl.h /usr/include/errno.h \
|
||||
/usr/include/bits/errno.h /usr/include/linux/errno.h \
|
||||
/usr/include/asm/errno.h /usr/include/unistd.h \
|
||||
/usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
|
||||
/usr/include/getopt.h /usr/include/pthread.h /usr/include/sched.h \
|
||||
/usr/include/bits/sched.h /usr/include/signal.h \
|
||||
/usr/include/bits/pthreadtypes.h /usr/include/bits/sigthread.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h
|
||||
xalloc.o: xalloc.c include/X11/Xos.h include/X11/Xosdefs.h \
|
||||
/usr/include/sys/types.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/bits/types.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/string.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
|
||||
/usr/include/unistd.h /usr/include/bits/posix_opt.h \
|
||||
/usr/include/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/sys/time.h /usr/include/bits/time.h /usr/include/stdio.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/libio.h /usr/include/_G_config.h \
|
||||
/usr/include/bits/stdio_lim.h include/Xserver/misc.h \
|
||||
include/X11/Xfuncproto.h include/X11/Xmd.h include/X11/X.h \
|
||||
include/Xserver/os.h include/X11/Xalloca.h include/X11/Xfuncs.h \
|
||||
include/Xserver/input.h include/Xserver/screenint.h \
|
||||
include/X11/Xproto.h include/X11/Xprotostr.h include/Xserver/window.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/miscstruct.h include/Xserver/opaque.h \
|
||||
/usr/include/signal.h /usr/include/bits/signum.h \
|
||||
/usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
|
||||
/usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
|
||||
/usr/include/bits/sigstack.h /usr/include/sys/resource.h \
|
||||
/usr/include/bits/resource.h /usr/include/sys/stat.h \
|
||||
/usr/include/bits/stat.h /usr/include/ctype.h /usr/include/stdlib.h \
|
||||
/usr/include/alloca.h
|
||||
stats.o: stats.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h rfb.h include/Xserver/scrnintstr.h \
|
||||
include/Xserver/screenint.h include/Xserver/misc.h \
|
||||
include/X11/Xosdefs.h include/X11/Xfuncproto.h include/X11/Xmd.h \
|
||||
include/X11/X.h include/Xserver/os.h include/X11/Xalloca.h \
|
||||
/usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/socket.h \
|
||||
/usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
|
||||
/usr/include/asm/sockios.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h
|
||||
corre.o: corre.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h rfb.h include/Xserver/scrnintstr.h \
|
||||
include/Xserver/screenint.h include/Xserver/misc.h \
|
||||
include/X11/Xosdefs.h include/X11/Xfuncproto.h include/X11/Xmd.h \
|
||||
include/X11/X.h include/Xserver/os.h include/X11/Xalloca.h \
|
||||
/usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/socket.h \
|
||||
/usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
|
||||
/usr/include/asm/sockios.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h
|
||||
hextile.o: hextile.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/sys/types.h \
|
||||
/usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h
|
||||
rre.o: rre.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/sys/types.h \
|
||||
/usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h
|
||||
translate.o: translate.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h rfb.h include/Xserver/scrnintstr.h \
|
||||
include/Xserver/screenint.h include/Xserver/misc.h \
|
||||
include/X11/Xosdefs.h include/X11/Xfuncproto.h include/X11/Xmd.h \
|
||||
include/X11/X.h include/Xserver/os.h include/X11/Xalloca.h \
|
||||
/usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/bits/socket.h \
|
||||
/usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
|
||||
/usr/include/asm/sockios.h /usr/include/bits/in.h \
|
||||
/usr/include/bits/byteswap.h tableinittctemplate.c \
|
||||
tabletranstemplate.c
|
||||
cutpaste.o: cutpaste.c /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h rfb.h \
|
||||
include/Xserver/scrnintstr.h include/Xserver/screenint.h \
|
||||
include/Xserver/misc.h include/X11/Xosdefs.h include/X11/Xfuncproto.h \
|
||||
include/X11/Xmd.h include/X11/X.h include/Xserver/os.h \
|
||||
include/X11/Xalloca.h /usr/include/string.h include/X11/Xfuncs.h \
|
||||
include/Xserver/miscstruct.h include/X11/Xprotostr.h \
|
||||
include/Xserver/region.h include/Xserver/regionstr.h \
|
||||
include/Xserver/pixmap.h include/Xserver/gc.h include/X11/Xproto.h \
|
||||
include/Xserver/colormap.h include/Xserver/window.h \
|
||||
include/Xserver/cursor.h include/Xserver/validate.h \
|
||||
include/Xserver/dix.h include/Xserver/input.h rfbproto.h \
|
||||
libvncauth/vncauth.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h /usr/include/stdint.h \
|
||||
/usr/include/bits/wordsize.h /usr/include/sys/types.h \
|
||||
/usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
|
||||
/usr/include/asm/socket.h /usr/include/asm/sockios.h \
|
||||
/usr/include/bits/in.h /usr/include/bits/byteswap.h
|
@ -0,0 +1,21 @@
|
||||
set args -desktop 'foobie bletch'
|
||||
r
|
||||
quit
|
||||
where
|
||||
info thread
|
||||
info threads
|
||||
thr 1
|
||||
where
|
||||
quit
|
||||
quit
|
||||
r
|
||||
where
|
||||
info threads
|
||||
thr 2
|
||||
where
|
||||
f 31
|
||||
kill
|
||||
r
|
||||
r
|
||||
r
|
||||
quit
|
@ -0,0 +1,63 @@
|
||||
CC=gcc
|
||||
CFLAGS=-g -Wall
|
||||
#CFLAGS=-O2 -Wall
|
||||
RANLIB=ranlib
|
||||
|
||||
INCLUDES=-I. -Ilibvncauth -Iinclude -Iinclude/X11 -Iinclude/Xserver
|
||||
VNCAUTHLIB=-Llibvncauth -lvncauth
|
||||
VNCSERVERLIB=-L. -lvncserver -lz -ljpeg
|
||||
|
||||
# These two lines enable useage of PThreads
|
||||
CFLAGS += -DHAVE_PTHREADS
|
||||
VNCSERVERLIB += -lpthread
|
||||
|
||||
LIBS=$(VNCSERVERLIB) $(VNCAUTHLIB)
|
||||
|
||||
# for Mac OS X
|
||||
OSX_LIBS = -framework ApplicationServices -framework Carbon
|
||||
|
||||
# for Example
|
||||
PTHREAD_LIBS = -lpthread
|
||||
|
||||
SOURCES=main.c rfbserver.c miregion.c auth.c sockets.c xalloc.c \
|
||||
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
|
||||
zlib.c tight.c
|
||||
OBJS=main.o rfbserver.o miregion.o auth.o sockets.o xalloc.o \
|
||||
stats.o corre.o hextile.o rre.o translate.o cutpaste.o \
|
||||
zlib.o tight.o
|
||||
|
||||
all: example storepasswd
|
||||
|
||||
install_OSX: OSXvnc-server
|
||||
cp OSXvnc-server storepasswd ../OSXvnc/build/OSXvnc.app/Contents/MacOS
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c $<
|
||||
|
||||
libvncserver.a: $(OBJS)
|
||||
$(AR) cru $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
example: example.o libvncauth/libvncauth.a libvncserver.a
|
||||
$(CC) -o example example.o $(LIBS) $(PTHREAD_LIBS)
|
||||
|
||||
OSXvnc-server: mac.o libvncauth/libvncauth.a libvncserver.a
|
||||
$(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS)
|
||||
|
||||
storepasswd: storepasswd.o libvncauth/libvncauth.a
|
||||
$(CC) -o storepasswd storepasswd.o $(VNCAUTHLIB)
|
||||
|
||||
libvncauth/libvncauth.a:
|
||||
(cd libvncauth; make)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o *.a example.o \
|
||||
libvncauth/*.o libvncauth/*~ libvncauth/*.a
|
||||
|
||||
realclean: clean
|
||||
rm -f OSXvnc-server storepasswd
|
||||
|
||||
depend:
|
||||
$(CC) -M $(INCLUDES) $(SOURCES) >.depend
|
||||
|
||||
#include .depend
|
@ -0,0 +1,19 @@
|
||||
OSXvnc: a VNC server for Mac OS X
|
||||
Copyright (C) 2001 Dan McGuirk
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.dfdf
|
||||
|
||||
|
||||
For help with OSXvnc, please visit http://www.osxvnc.com/.
|
@ -0,0 +1,17 @@
|
||||
.cutpaste
|
||||
|
||||
httpd
|
||||
|
||||
.other encodings
|
||||
|
||||
adapt rdp2vnc (rdesktop)
|
||||
|
||||
udp
|
||||
|
||||
rfbCloseClient, rfbConnect, ConnectToTcpAddr
|
||||
|
||||
CORBA
|
||||
|
||||
translate.c: warning about non 8-bit colourmaps
|
||||
|
||||
cursors
|
@ -0,0 +1,141 @@
|
||||
/*
|
||||
* auth.c - deal with authentication.
|
||||
*
|
||||
* This file implements the VNC authentication protocol when setting up an RFB
|
||||
* connection.
|
||||
*/
|
||||
|
||||
/*
|
||||
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
|
||||
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "rfb.h"
|
||||
|
||||
|
||||
char *rfbAuthPasswdFile = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* rfbAuthNewClient is called when we reach the point of authenticating
|
||||
* a new client. If authentication isn't being used then we simply send
|
||||
* rfbNoAuth. Otherwise we send rfbVncAuth plus the challenge.
|
||||
*/
|
||||
|
||||
void
|
||||
rfbAuthNewClient(cl)
|
||||
rfbClientPtr cl;
|
||||
{
|
||||
char buf[4 + CHALLENGESIZE];
|
||||
int len;
|
||||
|
||||
cl->state = RFB_AUTHENTICATION;
|
||||
|
||||
if (rfbAuthPasswdFile && !cl->reverseConnection) {
|
||||
|
||||
*(CARD32 *)buf = Swap32IfLE(rfbVncAuth);
|
||||
vncRandomBytes(cl->authChallenge);
|
||||
memcpy(&buf[4], (char *)cl->authChallenge, CHALLENGESIZE);
|
||||
len = 4 + CHALLENGESIZE;
|
||||
|
||||
} else {
|
||||
|
||||
*(CARD32 *)buf = Swap32IfLE(rfbNoAuth);
|
||||
len = 4;
|
||||
cl->state = RFB_INITIALISATION;
|
||||
}
|
||||
|
||||
if (WriteExact(cl, buf, len) < 0) {
|
||||
rfbLogPerror("rfbAuthNewClient: write");
|
||||
rfbCloseClient(cl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* rfbAuthProcessClientMessage is called when the client sends its
|
||||
* authentication response.
|
||||
*/
|
||||
|
||||
void
|
||||
rfbAuthProcessClientMessage(cl)
|
||||
rfbClientPtr cl;
|
||||
{
|
||||
char *passwd;
|
||||
int i, n;
|
||||
CARD8 response[CHALLENGESIZE];
|
||||
CARD32 authResult;
|
||||
|
||||
if ((n = ReadExact(cl, (char *)response, CHALLENGESIZE)) <= 0) {
|
||||
if (n != 0)
|
||||
rfbLogPerror("rfbAuthProcessClientMessage: read");
|
||||
rfbCloseClient(cl);
|
||||
return;
|
||||
}
|
||||
|
||||
passwd = vncDecryptPasswdFromFile(rfbAuthPasswdFile);
|
||||
|
||||
if (passwd == NULL) {
|
||||
rfbLog("rfbAuthProcessClientMessage: could not get password from %s\n",
|
||||
rfbAuthPasswdFile);
|
||||
|
||||
authResult = Swap32IfLE(rfbVncAuthFailed);
|
||||
|
||||
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
|
||||
rfbLogPerror("rfbAuthProcessClientMessage: write");
|
||||
}
|
||||
rfbCloseClient(cl);
|
||||
return;
|
||||
}
|
||||
|
||||
vncEncryptBytes(cl->authChallenge, passwd);
|
||||
|
||||
/* Lose the password from memory */
|
||||
for (i = strlen(passwd); i >= 0; i--) {
|
||||
passwd[i] = '\0';
|
||||
}
|
||||
|
||||
free((char *)passwd);
|
||||
|
||||
if (memcmp(cl->authChallenge, response, CHALLENGESIZE) != 0) {
|
||||
rfbLog("rfbAuthProcessClientMessage: authentication failed from %s\n",
|
||||
cl->host);
|
||||
|
||||
authResult = Swap32IfLE(rfbVncAuthFailed);
|
||||
|
||||
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
|
||||
rfbLogPerror("rfbAuthProcessClientMessage: write");
|
||||
}
|
||||
rfbCloseClient(cl);
|
||||
return;
|
||||
}
|
||||
|
||||
authResult = Swap32IfLE(rfbVncAuthOK);
|
||||
|
||||
if (WriteExact(cl, (char *)&authResult, 4) < 0) {
|
||||
rfbLogPerror("rfbAuthProcessClientMessage: write");
|
||||
rfbCloseClient(cl);
|
||||
return;
|
||||
}
|
||||
|
||||
cl->state = RFB_INITIALISATION;
|
||||
}
|
@ -0,0 +1,355 @@
|
||||
/*
|
||||
* corre.c
|
||||
*
|
||||
* Routines to implement Compact Rise-and-Run-length Encoding (CoRRE). This
|
||||
* code is based on krw's original javatel rfbserver.
|
||||
*/
|
||||
|
||||
/*
|
||||
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
|
||||
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "rfb.h"
|
||||
|
||||
/*
|
||||
* rreBeforeBuf contains pixel data in the client's format.
|
||||
* rreAfterBuf contains the RRE encoded version. If the RRE encoded version is
|
||||
* larger than the raw data or if it exceeds rreAfterBufSize then
|
||||
* raw encoding is used instead.
|
||||
*/
|
||||
|
||||
static int rreBeforeBufSize = 0;
|
||||
static char *rreBeforeBuf = NULL;
|
||||
|
||||
static int rreAfterBufSize = 0;
|
||||
static char *rreAfterBuf = NULL;
|
||||
static int rreAfterBufLen;
|
||||
|
||||
static int subrectEncode8(CARD8 *data, int w, int h);
|
||||
static int subrectEncode16(CARD16 *data, int w, int h);
|
||||
static int subrectEncode32(CARD32 *data, int w, int h);
|
||||
static CARD32 getBgColour(char *data, int size, int bpp);
|
||||
static Bool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
|
||||
int w, int h);
|
||||
|
||||
|
||||
/*
|
||||
* rfbSendRectEncodingCoRRE - send an arbitrary size rectangle using CoRRE
|
||||
* encoding.
|
||||
*/
|
||||
|
||||
Bool
|
||||
rfbSendRectEncodingCoRRE(cl, x, y, w, h)
|
||||
rfbClientPtr cl;
|
||||
int x, y, w, h;
|
||||
{
|
||||
if (h > cl->correMaxHeight) {
|
||||
rfbSendRectEncodingCoRRE(cl, x, y, w, cl->correMaxHeight );
|
||||
rfbSendRectEncodingCoRRE(cl, x, y + cl->correMaxHeight, w,
|
||||
h - cl->correMaxHeight);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (w > cl->correMaxWidth) {
|
||||
rfbSendRectEncodingCoRRE(cl, x, y, cl->correMaxWidth, h);
|
||||
rfbSendRectEncodingCoRRE(cl, x + cl->correMaxWidth, y,
|
||||
w - cl->correMaxWidth, h);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* rfbSendSmallRectEncodingCoRRE - send a small (guaranteed < 256x256)
|
||||
* rectangle using CoRRE encoding.
|
||||
*/
|
||||
|
||||
static Bool
|
||||
rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h)
|
||||
rfbClientPtr cl;
|
||||
int x, y, w, h;
|
||||
{
|
||||
rfbFramebufferUpdateRectHeader rect;
|
||||
rfbRREHeader hdr;
|
||||
int nSubrects;
|
||||
int i;
|
||||
char *fbptr = (cl->screen->frameBuffer + (cl->screen->paddedWidthInBytes * y)
|
||||
+ (x * (cl->screen->bitsPerPixel / 8)));
|
||||
|
||||
int maxRawSize = (cl->screen->width * cl->screen->height
|
||||
* (cl->format.bitsPerPixel / 8));
|
||||
|
||||
if (rreBeforeBufSize < maxRawSize) {
|
||||
rreBeforeBufSize = maxRawSize;
|
||||
if (rreBeforeBuf == NULL)
|
||||
rreBeforeBuf = (char *)xalloc(rreBeforeBufSize);
|
||||
else
|
||||
rreBeforeBuf = (char *)xrealloc(rreBeforeBuf, rreBeforeBufSize);
|
||||
}
|
||||
|
||||
if (rreAfterBufSize < maxRawSize) {
|
||||
rreAfterBufSize = maxRawSize;
|
||||
if (rreAfterBuf == NULL)
|
||||
rreAfterBuf = (char *)xalloc(rreAfterBufSize);
|
||||
else
|
||||
rreAfterBuf = (char *)xrealloc(rreAfterBuf, rreAfterBufSize);
|
||||
}
|
||||
|
||||
(*cl->translateFn)(cl->translateLookupTable,&(cl->screen->rfbServerFormat),
|
||||
&cl->format, fbptr, rreBeforeBuf,
|
||||
cl->screen->paddedWidthInBytes, w, h);
|
||||
|
||||
switch (cl->format.bitsPerPixel) {
|
||||
case 8:
|
||||
nSubrects = subrectEncode8((CARD8 *)rreBeforeBuf, w, h);
|
||||
break;
|
||||
case 16:
|
||||
nSubrects = subrectEncode16((CARD16 *)rreBeforeBuf, w, h);
|
||||
break;
|
||||
case 32:
|
||||
nSubrects = subrectEncode32((CARD32 *)rreBeforeBuf, w, h);
|
||||
break;
|
||||
default:
|
||||
rfbLog("getBgColour: bpp %d?\n",cl->format.bitsPerPixel);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (nSubrects < 0) {
|
||||
|
||||
/* RRE encoding was too large, use raw */
|
||||
|
||||
return rfbSendRectEncodingRaw(cl, x, y, w, h);
|
||||
}
|
||||
|
||||
cl->rfbRectanglesSent[rfbEncodingCoRRE]++;
|
||||
cl->rfbBytesSent[rfbEncodingCoRRE] += (sz_rfbFramebufferUpdateRectHeader
|
||||
+ sz_rfbRREHeader + rreAfterBufLen);
|
||||
|
||||
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader + sz_rfbRREHeader
|
||||
> UPDATE_BUF_SIZE)
|
||||
{
|
||||
if (!rfbSendUpdateBuf(cl))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rect.r.x = Swap16IfLE(x);
|
||||
rect.r.y = Swap16IfLE(y);
|
||||
rect.r.w = Swap16IfLE(w);
|
||||
rect.r.h = Swap16IfLE(h);
|
||||
rect.encoding = Swap32IfLE(rfbEncodingCoRRE);
|
||||
|
||||
memcpy(&cl->updateBuf[cl->ublen], (char *)&rect,
|
||||
sz_rfbFramebufferUpdateRectHeader);
|
||||
cl->ublen += sz_rfbFramebufferUpdateRectHeader;
|
||||
|
||||
hdr.nSubrects = Swap32IfLE(nSubrects);
|
||||
|
||||
memcpy(&cl->updateBuf[cl->ublen], (char *)&hdr, sz_rfbRREHeader);
|
||||
cl->ublen += sz_rfbRREHeader;
|
||||
|
||||
for (i = 0; i < rreAfterBufLen;) {
|
||||
|
||||
int bytesToCopy = UPDATE_BUF_SIZE - cl->ublen;
|
||||
|
||||
if (i + bytesToCopy > rreAfterBufLen) {
|
||||
bytesToCopy = rreAfterBufLen - i;
|
||||
}
|
||||
|
||||
memcpy(&cl->updateBuf[cl->ublen], &rreAfterBuf[i], bytesToCopy);
|
||||
|
||||
cl->ublen += bytesToCopy;
|
||||
i += bytesToCopy;
|
||||
|
||||
if (cl->ublen == UPDATE_BUF_SIZE) {
|
||||
if (!rfbSendUpdateBuf(cl))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* subrectEncode() encodes the given multicoloured rectangle as a background
|
||||
* colour overwritten by single-coloured rectangles. It returns the number
|
||||
* of subrectangles in the encoded buffer, or -1 if subrect encoding won't
|
||||
* fit in the buffer. It puts the encoded rectangles in rreAfterBuf. The
|
||||
* single-colour rectangle partition is not optimal, but does find the biggest
|
||||
* horizontal or vertical rectangle top-left anchored to each consecutive
|
||||
* coordinate position.
|
||||
*
|
||||
* The coding scheme is simply [<bgcolour><subrect><subrect>...] where each
|
||||
* <subrect> is [<colour><x><y><w><h>].
|
||||
*/
|
||||
|
||||
#define DEFINE_SUBRECT_ENCODE(bpp) \
|
||||
static int \
|
||||
subrectEncode##bpp(data,w,h) \
|
||||
CARD##bpp *data; \
|
||||
int w; \
|
||||
int h; \
|
||||
{ \
|
||||
CARD##bpp cl; \
|
||||
rfbCoRRERectangle subrect; \
|
||||
int x,y; \
|
||||
int i,j; \
|
||||
int hx=0,hy,vx=0,vy; \
|
||||
int hyflag; \
|
||||
CARD##bpp *seg; \
|
||||
CARD##bpp *line; \
|
||||
int hw,hh,vw,vh; \
|
||||
int thex,they,thew,theh; \
|
||||
int numsubs = 0; \
|
||||
int newLen; \
|
||||
CARD##bpp bg = (CARD##bpp)getBgColour((char*)data,w*h,bpp); \
|
||||
\
|
||||
*((CARD##bpp*)rreAfterBuf) = bg; \
|
||||
\
|
||||
rreAfterBufLen = (bpp/8); \
|
||||
\
|
||||
for (y=0; y<h; y++) { \
|
||||
line = data+(y*w); \
|
||||
for (x=0; x<w; x++) { \
|
||||
if (line[x] != bg) { \
|
||||
cl = line[x]; \
|
||||
hy = y-1; \
|
||||
hyflag = 1; \
|
||||
for (j=y; j<h; j++) { \
|
||||
seg = data+(j*w); \
|
||||
if (seg[x] != cl) {break;} \
|
||||
i = x; \
|
||||
while ((seg[i] == cl) && (i < w)) i += 1; \
|
||||
i -= 1; \
|
||||
if (j == y) vx = hx = i; \
|
||||
if (i < vx) vx = i; \
|
||||
if ((hyflag > 0) && (i >= hx)) {hy += 1;} else {hyflag = 0;} \
|
||||
} \
|
||||
vy = j-1; \
|
||||
\
|
||||
/* We now have two possible subrects: (x,y,hx,hy) and (x,y,vx,vy) \
|
||||
* We'll choose the bigger of the two. \
|
||||
*/ \
|
||||
hw = hx-x+1; \
|
||||
hh = hy-y+1; \
|
||||
vw = vx-x+1; \
|
||||
vh = vy-y+1; \
|
||||
\
|
||||
thex = x; \
|
||||
they = y; \
|
||||
\
|
||||
if ((hw*hh) > (vw*vh)) { \
|
||||
thew = hw; \
|
||||
theh = hh; \
|
||||
} else { \
|
||||
thew = vw; \
|
||||
theh = vh; \
|
||||
} \
|
||||
\
|
||||
subrect.x = thex; \
|
||||
subrect.y = they; \
|
||||
subrect.w = thew; \
|
||||
subrect.h = theh; \
|
||||
\
|
||||
newLen = rreAfterBufLen + (bpp/8) + sz_rfbCoRRERectangle; \
|
||||
if ((newLen > (w * h * (bpp/8))) || (newLen > rreAfterBufSize)) \
|
||||
return -1; \
|
||||
\
|
||||
numsubs += 1; \
|
||||
*((CARD##bpp*)(rreAfterBuf + rreAfterBufLen)) = cl; \
|
||||
rreAfterBufLen += (bpp/8); \
|
||||
memcpy(&rreAfterBuf[rreAfterBufLen],&subrect,sz_rfbCoRRERectangle); \
|
||||
rreAfterBufLen += sz_rfbCoRRERectangle; \
|
||||
\
|
||||
/* \
|
||||
* Now mark the subrect as done. \
|
||||
*/ \
|
||||
for (j=they; j < (they+theh); j++) { \
|
||||
for (i=thex; i < (thex+thew); i++) { \
|
||||
data[j*w+i] = bg; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
return numsubs; \
|
||||
}
|
||||
|
||||
DEFINE_SUBRECT_ENCODE(8)
|
||||
DEFINE_SUBRECT_ENCODE(16)
|
||||
DEFINE_SUBRECT_ENCODE(32)
|
||||
|
||||
|
||||
/*
|
||||
* getBgColour() gets the most prevalent colour in a byte array.
|
||||
*/
|
||||
static CARD32
|
||||
getBgColour(data,size,bpp)
|
||||
char *data;
|
||||
int size;
|
||||
int bpp;
|
||||
{
|
||||
|
||||
#define NUMCLRS 256
|
||||
|
||||
static int counts[NUMCLRS];
|
||||
int i,j,k;
|
||||
|
||||
int maxcount = 0;
|
||||
CARD8 maxclr = 0;
|
||||
|
||||
if (bpp != 8) {
|
||||
if (bpp == 16) {
|
||||
return ((CARD16 *)data)[0];
|
||||
} else if (bpp == 32) {
|
||||
return ((CARD32 *)data)[0];
|
||||
} else {
|
||||
rfbLog("getBgColour: bpp %d?\n",bpp);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<NUMCLRS; i++) {
|
||||
counts[i] = 0;
|
||||
}
|
||||
|
||||
for (j=0; j<size; j++) {
|
||||
k = (int)(((CARD8 *)data)[j]);
|
||||
if (k >= NUMCLRS) {
|
||||
rfbLog("getBgColour: unusual colour = %d\n", k);
|
||||
exit(1);
|
||||
}
|
||||
counts[k] += 1;
|
||||
if (counts[k] > maxcount) {
|
||||
maxcount = counts[k];
|
||||
maxclr = ((CARD8 *)data)[j];
|
||||
}
|
||||
}
|
||||
|
||||
return maxclr;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* cutpaste.c - routines to deal with cut & paste buffers / selection.
|
||||
*/
|
||||
|
||||
/*
|
||||
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
|
||||
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "rfb.h"
|
||||
|
||||
|
||||
/*
|
||||
* rfbSetXCutText sets the cut buffer to be the given string. We also clear
|
||||
* the primary selection. Ideally we'd like to set it to the same thing, but I
|
||||
* can't work out how to do that without some kind of helper X client.
|
||||
*/
|
||||
|
||||
void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len)
|
||||
{
|
||||
rfbSendServerCutText(rfbScreen, str, len);
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
/*
|
||||
*
|
||||
* This is an example of how to use libvncserver.
|
||||
*
|
||||
* libvncserver example
|
||||
* Copyright (C) 2001 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef __IRIX__
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#define XK_MISCELLANY
|
||||
#include "rfb.h"
|
||||
#include "keysymdef.h"
|
||||
|
||||
const int maxx=640, maxy=480, bpp=4;
|
||||
|
||||
void doptr(int buttonMask,int x,int y,rfbClientPtr cl)
|
||||
{
|
||||
if(buttonMask && x>=0 && y>=0 && x<maxx && y<maxy) {
|
||||
int i;
|
||||
for(i=0;i<bpp;i++)
|
||||
cl->screen->frameBuffer[y*cl->screen->paddedWidthInBytes+x*bpp+i]^=0xff;
|
||||
rfbMarkRectAsModified(cl->screen,x,y,x+1,y+1);
|
||||
rfbGotXCutText(cl->screen,"Hallo",5);
|
||||
}
|
||||
}
|
||||
|
||||
void dokey(Bool down,KeySym key,rfbClientPtr cl)
|
||||
{
|
||||
if(down && key==XK_Escape)
|
||||
rfbCloseClient(cl);
|
||||
}
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
int i,j;
|
||||
rfbScreenInfoPtr rfbScreen = rfbDefaultScreenInit(argc,argv);
|
||||
rfbScreen->desktopName="LibVNCServer Example";
|
||||
rfbScreen->frameBuffer = (char*)malloc(maxx*maxy*bpp);
|
||||
rfbScreen->width=maxx;
|
||||
rfbScreen->height=maxy;
|
||||
rfbScreen->paddedWidthInBytes=maxx*bpp;
|
||||
rfbScreen->ptrAddEvent=doptr;
|
||||
rfbScreen->kbdAddEvent=dokey;
|
||||
|
||||
for(i=0;i<maxx;++i)
|
||||
for(j=0;j<maxy;++j) {
|
||||
rfbScreen->frameBuffer[(j*maxx+i)*bpp]=i*256/maxx;
|
||||
rfbScreen->frameBuffer[(j*maxx+i)*bpp+1]=j*256/maxy;
|
||||
rfbScreen->frameBuffer[(j*maxx+i)*bpp+2]=(i+j)*256/(maxx*maxy);
|
||||
}
|
||||
|
||||
runEventLoop(rfbScreen,40000,FALSE);
|
||||
runEventLoop(rfbScreen,40000,TRUE);
|
||||
while(1);
|
||||
|
||||
return(0);
|
||||
}
|
@ -0,0 +1,347 @@
|
||||
/*
|
||||
* hextile.c
|
||||
*
|
||||
* Routines to implement Hextile Encoding
|
||||
*/
|
||||
|
||||
/*
|
||||
* OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
|
||||
* Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "rfb.h"
|
||||
|
||||
static Bool sendHextiles8(rfbClientPtr cl, int x, int y, int w, int h);
|
||||
static Bool sendHextiles16(rfbClientPtr cl, int x, int y, int w, int h);
|
||||
static Bool sendHextiles32(rfbClientPtr cl, int x, int y, int w, int h);
|
||||
|
||||
|
||||
/*
|
||||
* rfbSendRectEncodingHextile - send a rectangle using hextile encoding.
|
||||
*/
|
||||
|
||||
Bool
|
||||
rfbSendRectEncodingHextile(cl, x, y, w, h)
|
||||
rfbClientPtr cl;
|
||||
int x, y, w, h;
|
||||
{
|
||||
rfbFramebufferUpdateRectHeader rect;
|
||||
|
||||
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader > UPDATE_BUF_SIZE) {
|
||||
if (!rfbSendUpdateBuf(cl))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rect.r.x = Swap16IfLE(x);
|
||||
rect.r.y = Swap16IfLE(y);
|
||||
rect.r.w = Swap16IfLE(w);
|
||||
rect.r.h = Swap16IfLE(h);
|
||||
rect.encoding = Swap32IfLE(rfbEncodingHextile);
|
||||
|
||||
memcpy(&cl->updateBuf[cl->ublen], (char *)&rect,
|
||||
sz_rfbFramebufferUpdateRectHeader);
|
||||
cl->ublen += sz_rfbFramebufferUpdateRectHeader;
|
||||
|
||||
cl->rfbRectanglesSent[rfbEncodingHextile]++;
|
||||
cl->rfbBytesSent[rfbEncodingHextile] += sz_rfbFramebufferUpdateRectHeader;
|
||||
|
||||
switch (cl->format.bitsPerPixel) {
|
||||
case 8:
|
||||
return sendHextiles8(cl, x, y, w, h);
|
||||
case 16:
|
||||
return sendHextiles16(cl, x, y, w, h);
|
||||
case 32:
|
||||
return sendHextiles32(cl, x, y, w, h);
|
||||
}
|
||||
|
||||
rfbLog("rfbSendRectEncodingHextile: bpp %d?\n", cl->format.bitsPerPixel);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#define PUT_PIXEL8(pix) (cl->updateBuf[cl->ublen++] = (pix))
|
||||
|
||||
#define PUT_PIXEL16(pix) (cl->updateBuf[cl->ublen++] = ((char*)&(pix))[0], \
|
||||
cl->updateBuf[cl->ublen++] = ((char*)&(pix))[1])
|
||||
|
||||
#define PUT_PIXEL32(pix) (cl->updateBuf[cl->ublen++] = ((char*)&(pix))[0], \
|
||||
cl->updateBuf[cl->ublen++] = ((char*)&(pix))[1], \
|
||||
cl->updateBuf[cl->ublen++] = ((char*)&(pix))[2], \
|
||||
cl->updateBuf[cl->ublen++] = ((char*)&(pix))[3])
|
||||
|
||||
|
||||
#define DEFINE_SEND_HEXTILES(bpp) \
|
||||
\
|
||||
\
|
||||
static Bool subrectEncode##bpp(rfbClientPtr cli, CARD##bpp *data, int w, int h, \
|
||||
CARD##bpp bg, CARD##bpp fg, Bool mono); \
|
||||
static void testColours##bpp(CARD##bpp *data, int size, Bool *mono, \
|
||||
Bool *solid, CARD##bpp *bg, CARD##bpp *fg); \
|
||||
\
|
||||
\
|
||||
/* \
|
||||
* rfbSendHextiles \
|
||||
*/ \
|
||||
\
|
||||
static Bool \
|
||||
sendHextiles##bpp(cl, rx, ry, rw, rh) \
|
||||
rfbClientPtr cl; \
|
||||
int rx, ry, rw, rh; \
|
||||
{ \
|
||||
int x, y, w, h; \
|
||||
int startUblen; \
|
||||
char *fbptr; \
|
||||
CARD##bpp bg = 0, fg = 0, newBg, newFg; \
|
||||
Bool mono, solid; \
|
||||
Bool validBg = FALSE; \
|
||||
Bool validFg = FALSE; \
|
||||
CARD##bpp clientPixelData[16*16*(bpp/8)]; \
|
||||
\
|
||||
for (y = ry; y < ry+rh; y += 16) { \
|
||||
for (x = rx; x < rx+rw; x += 16) { \
|
||||
w = h = 16; \
|
||||
if (rx+rw - x < 16) \
|
||||
w = rx+rw - x; \
|
||||
if (ry+rh - y < 16) \
|
||||
h = ry+rh - y; \
|
||||
\
|
||||
if ((cl->ublen + 1 + (2 + 16 * 16) * (bpp/8)) > \
|
||||
UPDATE_BUF_SIZE) { \
|
||||
if (!rfbSendUpdateBuf(cl)) \
|
||||
return FALSE; \
|
||||
} \
|
||||
\
|
||||
fbptr = (cl->screen->frameBuffer + (cl->screen->paddedWidthInBytes * y) \
|
||||
+ (x * (cl->screen->bitsPerPixel / 8))); \
|
||||
\
|
||||
(*cl->translateFn)(cl->translateLookupTable, &(cl->screen->rfbServerFormat), \
|
||||
&cl->format, fbptr, (char *)clientPixelData, \
|
||||
cl->screen |