Commit ffe30366 authored by Christian Beier's avatar Christian Beier

Put files used by both libs into a 'common' dir.

No functional changes. All files used by _both_ libvncserver and
libvncclient are put into a 'common' directory and references
from other files as well as Autotools and CMake build systems are
updated.
Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
parent 5e1488be
...@@ -11,7 +11,7 @@ set(FULL_PACKAGE_NAME "LibVNCServer") ...@@ -11,7 +11,7 @@ set(FULL_PACKAGE_NAME "LibVNCServer")
set(PACKAGE_VERSION "0.9.7") set(PACKAGE_VERSION "0.9.7")
set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver") set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver")
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/libvncserver) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/libvncserver ${CMAKE_SOURCE_DIR}/common)
find_package(ZLIB) find_package(ZLIB)
find_package(JPEG) find_package(JPEG)
...@@ -80,6 +80,7 @@ configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_BINARY_DIR}/rfb ...@@ -80,6 +80,7 @@ configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_BINARY_DIR}/rfb
configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbint.h) configure_file(${CMAKE_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_BINARY_DIR}/rfb/rfbint.h)
set(LIBVNCSERVER_DIR ${CMAKE_SOURCE_DIR}/libvncserver) set(LIBVNCSERVER_DIR ${CMAKE_SOURCE_DIR}/libvncserver)
set(COMMON_DIR ${CMAKE_SOURCE_DIR}/common)
set(LIBVNCCLIENT_DIR ${CMAKE_SOURCE_DIR}/libvncclient) set(LIBVNCCLIENT_DIR ${CMAKE_SOURCE_DIR}/libvncclient)
set(LIBVNCSRVTEST_DIR ${CMAKE_SOURCE_DIR}/examples) set(LIBVNCSRVTEST_DIR ${CMAKE_SOURCE_DIR}/examples)
set(LIBVNCCLITEST_DIR ${CMAKE_SOURCE_DIR}/client_examples) set(LIBVNCCLITEST_DIR ${CMAKE_SOURCE_DIR}/client_examples)
...@@ -101,10 +102,10 @@ set(LIBVNCSERVER_SOURCES ...@@ -101,10 +102,10 @@ set(LIBVNCSERVER_SOURCES
${LIBVNCSERVER_DIR}/font.c ${LIBVNCSERVER_DIR}/font.c
${LIBVNCSERVER_DIR}/draw.c ${LIBVNCSERVER_DIR}/draw.c
${LIBVNCSERVER_DIR}/selbox.c ${LIBVNCSERVER_DIR}/selbox.c
${LIBVNCSERVER_DIR}/d3des.c ${COMMON_DIR}/d3des.c
${LIBVNCSERVER_DIR}/vncauth.c ${COMMON_DIR}/vncauth.c
${LIBVNCSERVER_DIR}/cargs.c ${LIBVNCSERVER_DIR}/cargs.c
${LIBVNCSERVER_DIR}/minilzo.c ${COMMON_DIR}/minilzo.c
${LIBVNCSERVER_DIR}/ultra.c ${LIBVNCSERVER_DIR}/ultra.c
${LIBVNCSERVER_DIR}/scale.c ${LIBVNCSERVER_DIR}/scale.c
) )
...@@ -115,7 +116,7 @@ set(LIBVNCCLIENT_SOURCES ...@@ -115,7 +116,7 @@ set(LIBVNCCLIENT_SOURCES
${LIBVNCCLIENT_DIR}/rfbproto.c ${LIBVNCCLIENT_DIR}/rfbproto.c
${LIBVNCCLIENT_DIR}/sockets.c ${LIBVNCCLIENT_DIR}/sockets.c
${LIBVNCCLIENT_DIR}/vncviewer.c ${LIBVNCCLIENT_DIR}/vncviewer.c
${LIBVNCCLIENT_DIR}/minilzo.c ${COMMON_DIR}/minilzo.c
${LIBVNCCLIENT_DIR}/tls.c ${LIBVNCCLIENT_DIR}/tls.c
) )
......
...@@ -448,4 +448,3 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); ...@@ -448,4 +448,3 @@ LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
#endif #endif
#endif /* already included */ #endif /* already included */
...@@ -2932,4 +2932,3 @@ lookbehind_overrun: ...@@ -2932,4 +2932,3 @@ lookbehind_overrun:
} }
/***** End of minilzo.c *****/ /***** End of minilzo.c *****/
...@@ -97,4 +97,3 @@ lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len, ...@@ -97,4 +97,3 @@ lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len,
#endif #endif
#endif /* already included */ #endif /* already included */
...@@ -209,4 +209,3 @@ rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) { ...@@ -209,4 +209,3 @@ rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) {
rfbDes(where + i, where + i); rfbDes(where + i, where + i);
} }
} }
INCLUDES = -I$(top_srcdir) INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/common
libvncclient_la_SOURCES=cursor.c listen.c rfbproto.c sockets.c vncviewer.c minilzo.c tls.c libvncclient_la_SOURCES=cursor.c listen.c rfbproto.c sockets.c vncviewer.c ../common/minilzo.c tls.c
noinst_HEADERS=lzoconf.h minilzo.h tls.h noinst_HEADERS=../common/lzoconf.h ../common/minilzo.h tls.h
rfbproto.o: rfbproto.c corre.c hextile.c rre.c tight.c zlib.c zrle.c ultra.c rfbproto.o: rfbproto.c corre.c hextile.c rre.c tight.c zlib.c zrle.c ultra.c
......
This diff is collapsed.
/* minilzo.h -- mini subset of the LZO real-time data compression library
This file is part of the LZO real-time data compression library.
Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
The LZO library 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.
The LZO library 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 the LZO library; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/opensource/lzo/
*/
/*
* NOTE:
* the full LZO package can be found at
* http://www.oberhumer.com/opensource/lzo/
*/
#ifndef __MINILZO_H
#define __MINILZO_H
#define MINILZO_VERSION 0x1080
#ifdef __LZOCONF_H
# error "you cannot use both LZO and miniLZO"
#endif
#undef LZO_HAVE_CONFIG_H
#include "lzoconf.h"
#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
# error "version mismatch in header files"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************************
//
************************************************************************/
/* Memory required for the wrkmem parameter.
* When the required size is 0, you can also pass a NULL pointer.
*/
#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
#define LZO1X_MEM_DECOMPRESS (0)
/* compression */
LZO_EXTERN(int)
lzo1x_1_compress ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem );
/* decompression */
LZO_EXTERN(int)
lzo1x_decompress ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem /* NOT USED */ );
/* safe decompression with overrun testing */
LZO_EXTERN(int)
lzo1x_decompress_safe ( const lzo_byte *src, lzo_uint src_len,
lzo_byte *dst, lzo_uintp dst_len,
lzo_voidp wrkmem /* NOT USED */ );
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* already included */
...@@ -2185,5 +2185,5 @@ PrintPixelFormat(rfbPixelFormat *format) ...@@ -2185,5 +2185,5 @@ PrintPixelFormat(rfbPixelFormat *format)
#define rfbUseKey rfbClientUseKey #define rfbUseKey rfbClientUseKey
#define rfbCPKey rfbClientCPKey #define rfbCPKey rfbClientCPKey
#include "../libvncserver/vncauth.c" #include "vncauth.c"
#include "../libvncserver/d3des.c" #include "d3des.c"
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
#define PIXEL_T __RFB_CONCAT3E(uint,BPP,_t) #define PIXEL_T __RFB_CONCAT3E(uint,BPP,_t)
#if BPP!=8 #if BPP!=8
#define ZYWRLE_DECODE 1 #define ZYWRLE_DECODE 1
#include "../libvncserver/zywrletemplate.c" #include "zywrletemplate.c"
#endif #endif
#undef CPIXEL #undef CPIXEL
......
INCLUDES = -I$(top_srcdir) INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/common
if WITH_TIGHTVNC_FILETRANSFER if WITH_TIGHTVNC_FILETRANSFER
TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \ TIGHTVNCFILETRANSFERHDRS=tightvnc-filetransfer/filelistinfo.h \
...@@ -18,8 +18,8 @@ includedir=$(prefix)/include/rfb ...@@ -18,8 +18,8 @@ includedir=$(prefix)/include/rfb
include_HEADERS=../rfb/rfb.h ../rfb/rfbconfig.h ../rfb/rfbint.h \ include_HEADERS=../rfb/rfb.h ../rfb/rfbconfig.h ../rfb/rfbint.h \
../rfb/rfbproto.h ../rfb/keysym.h ../rfb/rfbregion.h ../rfb/rfbclient.h ../rfb/rfbproto.h ../rfb/keysym.h ../rfb/rfbregion.h ../rfb/rfbclient.h
noinst_HEADERS=d3des.h ../rfb/default8x16.h zrleoutstream.h \ noinst_HEADERS=../common/d3des.h ../rfb/default8x16.h zrleoutstream.h \
zrlepalettehelper.h zrletypes.h private.h minilzo.h lzoconf.h scale.h \ zrlepalettehelper.h zrletypes.h private.h ../common/minilzo.h ../common/lzoconf.h scale.h \
$(TIGHTVNCFILETRANSFERHDRS) $(TIGHTVNCFILETRANSFERHDRS)
EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \ EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
...@@ -27,7 +27,7 @@ EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \ ...@@ -27,7 +27,7 @@ EXTRA_DIST=tableinit24.c tableinittctemplate.c tabletranstemplate.c \
zrleencodetemplate.c zrleencodetemplate.c
if HAVE_LIBZ if HAVE_LIBZ
ZLIBSRCS = zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c zywrletemplate.c ZLIBSRCS = zlib.c zrle.c zrleoutstream.c zrlepalettehelper.c ../common/zywrletemplate.c
if HAVE_LIBJPEG if HAVE_LIBJPEG
JPEGSRCS = tight.c JPEGSRCS = tight.c
endif endif
...@@ -36,7 +36,7 @@ endif ...@@ -36,7 +36,7 @@ endif
LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c \ LIB_SRCS = main.c rfbserver.c rfbregion.c auth.c sockets.c \
stats.c corre.c hextile.c rre.c translate.c cutpaste.c \ stats.c corre.c hextile.c rre.c translate.c cutpaste.c \
httpd.c cursor.c font.c \ httpd.c cursor.c font.c \
draw.c selbox.c d3des.c vncauth.c cargs.c minilzo.c ultra.c scale.c \ draw.c selbox.c ../common/d3des.c ../common/vncauth.c cargs.c ../common/minilzo.c ultra.c scale.c \
$(ZLIBSRCS) $(JPEGSRCS) $(TIGHTVNCFILETRANSFERSRCS) $(ZLIBSRCS) $(JPEGSRCS) $(TIGHTVNCFILETRANSFERSRCS)
libvncserver_la_SOURCES=$(LIB_SRCS) libvncserver_la_SOURCES=$(LIB_SRCS)
......
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