mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-07 22:58:11 +00:00
562 lines
16 KiB
Plaintext
562 lines
16 KiB
Plaintext
|
diff -ruN ../old/Imakefile ./Imakefile
|
||
|
--- ../old/Imakefile Thu Jan 22 12:18:18 1998
|
||
|
+++ ./Imakefile Tue Feb 24 22:30:41 1998
|
||
|
@@ -12,5 +12,5 @@
|
||
|
DependSubdirs($(SUBDIRS))
|
||
|
|
||
|
all::
|
||
|
- (set -e; cd Xvnc; unset MAKEFLAGS MAKELEVEL; \
|
||
|
+ (set +e; unset MAKEFLAGS MAKELEVEL; set -e; cd Xvnc; \
|
||
|
./vncxmkmf; make Makefiles; make depend; make all )
|
||
|
diff -ruN ../old/Xvnc/config/FreeBSD.cf ./Xvnc/config/FreeBSD.cf
|
||
|
--- ../old/Xvnc/config/FreeBSD.cf Wed Dec 31 16:00:00 1969
|
||
|
+++ ./Xvnc/config/FreeBSD.cf Tue Feb 24 23:42:33 1998
|
||
|
@@ -0,0 +1,100 @@
|
||
|
+XCOMM platform: $XConsortium: FreeBSD.cf /main/10 1996/01/22 17:35:30 gildea $
|
||
|
+
|
||
|
+#ifndef OSName
|
||
|
+#define OSName FreeBSD 2.1
|
||
|
+#endif
|
||
|
+#ifndef OSVendor
|
||
|
+#define OSVendor Walnut Creek CD-ROM
|
||
|
+#endif
|
||
|
+XCOMM operating system: OSName
|
||
|
+#ifndef OSMajorVersion
|
||
|
+#define OSMajorVersion 2
|
||
|
+#endif
|
||
|
+#ifndef OSMinorVersion
|
||
|
+#define OSMinorVersion 1
|
||
|
+#endif
|
||
|
+#ifndef OSTeenyVersion
|
||
|
+#define OSTeenyVersion 0
|
||
|
+#endif
|
||
|
+
|
||
|
+#define HasPutenv YES
|
||
|
+#define HasBSD44Sockets YES
|
||
|
+
|
||
|
+#define CppCmd /usr/libexec/cpp -traditional
|
||
|
+#define PreProcessCmd /usr/libexec/cpp -traditional
|
||
|
+#undef InstallCmd
|
||
|
+#define InstallCmd /usr/bin/install
|
||
|
+
|
||
|
+#define UseGas YES
|
||
|
+#ifndef GccUsesGas
|
||
|
+# define GccUsesGas YES
|
||
|
+#endif
|
||
|
+
|
||
|
+#ifndef AsmDefines
|
||
|
+# define AsmDefines -DUSE_GAS
|
||
|
+#endif
|
||
|
+
|
||
|
+#if GccUsesGas
|
||
|
+# define GccGasOption -DGCCUSESGAS
|
||
|
+#else
|
||
|
+# define GccGasOption /**/
|
||
|
+#endif
|
||
|
+
|
||
|
+#ifndef HasGcc2
|
||
|
+# define HasGcc2 YES
|
||
|
+#endif
|
||
|
+
|
||
|
+#define MkdirHierCmd mkdir -p
|
||
|
+
|
||
|
+#define CcCmd gcc
|
||
|
+#ifndef DefaultCCOptions
|
||
|
+#define DefaultCCOptions -pipe
|
||
|
+#endif
|
||
|
+
|
||
|
+#ifdef i386Architecture
|
||
|
+#define OptimizedCDebugFlags -m486 -O2 -fno-strength-reduce
|
||
|
+#else
|
||
|
+#define OptimizedCDebugFlags -O2
|
||
|
+#endif
|
||
|
+
|
||
|
+#if OSMajorVersion > 1
|
||
|
+#define ServerOSDefines XFree86ServerOSDefines
|
||
|
+#define XawI18nDefines -DUSE_XWCHAR_STRING
|
||
|
+#define HasMakefileSafeInclude YES
|
||
|
+#define IncludeMakefile(file) @@# dependencies are in .depend
|
||
|
+#define DependFileName .depend
|
||
|
+#ifndef ExtraLibraries
|
||
|
+#define ExtraLibraries -lz
|
||
|
+#endif
|
||
|
+#else
|
||
|
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
|
||
|
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
|
||
|
+#ifndef ExtraLibraries
|
||
|
+#define ExtraLibraries /* -lmalloc */
|
||
|
+#endif
|
||
|
+#endif
|
||
|
+
|
||
|
+#define ServerExtraDefines GccGasOption XFree86ServerDefines
|
||
|
+
|
||
|
+#define StandardDefines -DCSRG_BASED
|
||
|
+
|
||
|
+#define TroffCmd groff -Tps
|
||
|
+#define SetTtyGroup YES
|
||
|
+#define HasNdbm YES
|
||
|
+#define HasShm YES
|
||
|
+#define HasWChar32 YES
|
||
|
+
|
||
|
+#define HasLibCrypt YES
|
||
|
+
|
||
|
+#define AvoidNullMakeCommand YES
|
||
|
+
|
||
|
+#define BuildServer YES
|
||
|
+#define XF86SVGAServer NO
|
||
|
+#define XvncServer YES
|
||
|
+#define ProjectRoot /usr/X11R6
|
||
|
+
|
||
|
+#include <bsdLib.rules>
|
||
|
+
|
||
|
+#ifdef i386Architecture
|
||
|
+#include <xfree86.cf>
|
||
|
+#endif
|
||
|
diff -ruN ../old/Xvnc/config/bsdLib.rules ./Xvnc/config/bsdLib.rules
|
||
|
--- ../old/Xvnc/config/bsdLib.rules Wed Dec 31 16:00:00 1969
|
||
|
+++ ./Xvnc/config/bsdLib.rules Tue Feb 24 22:30:41 1998
|
||
|
@@ -0,0 +1,93 @@
|
||
|
+XCOMM $XConsortium: bsdLib.rules /main/2 1996/01/24 06:38:15 kaleb $
|
||
|
+
|
||
|
+/*
|
||
|
+ * NetBSD/FreeBSD shared library rules
|
||
|
+ */
|
||
|
+
|
||
|
+#ifndef HasSharedLibraries
|
||
|
+#define HasSharedLibraries YES
|
||
|
+#endif
|
||
|
+#ifndef SharedDataSeparation
|
||
|
+#define SharedDataSeparation NO
|
||
|
+#endif
|
||
|
+#ifndef SharedCodeDef
|
||
|
+#define SharedCodeDef
|
||
|
+#endif
|
||
|
+#ifndef SharedLibraryDef
|
||
|
+#define SharedLibraryDef -DBSDSHLIB
|
||
|
+#endif
|
||
|
+#ifndef ShLibIncludeFile
|
||
|
+#define ShLibIncludeFile <bsdLib.tmpl>
|
||
|
+#endif
|
||
|
+#ifndef SharedLibraryLoadFlags
|
||
|
+#define SharedLibraryLoadFlags -Bshareable
|
||
|
+#endif
|
||
|
+#ifndef PositionIndependentCFlags
|
||
|
+#define PositionIndependentCFlags -fpic
|
||
|
+#endif
|
||
|
+
|
||
|
+/*
|
||
|
+ * InstallSharedLibrary - generate rules to install the shared library.
|
||
|
+ */
|
||
|
+#ifndef InstallSharedLibrary
|
||
|
+#define InstallSharedLibrary(libname,rev,dest) @@\
|
||
|
+install:: Concat(lib,libname.so.rev) @@\
|
||
|
+ MakeDir($(DESTDIR)dest) @@\
|
||
|
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
|
||
|
+@@\
|
||
|
+
|
||
|
+#endif /* InstallSharedLibrary */
|
||
|
+
|
||
|
+/*
|
||
|
+ * NormalSharedLibraryTarget - generate rules to create a shared library;
|
||
|
+ * build it into a different name so that the we do not hose people by having
|
||
|
+ * the library gone for long periods.
|
||
|
+ */
|
||
|
+#ifndef SharedLibraryTarget
|
||
|
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
|
||
|
+AllTarget(Concat(lib,libname.so.rev)) @@\
|
||
|
+ @@\
|
||
|
+Concat(lib,libname.so.rev): solist @@\
|
||
|
+ $(RM) $@~ @@\
|
||
|
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
|
||
|
+ $(RM) $@ @@\
|
||
|
+ $(MV) $@~ $@ @@\
|
||
|
+ LinkBuildLibrary($@) @@\
|
||
|
+ @@\
|
||
|
+clean:: @@\
|
||
|
+ $(RM) Concat(lib,libname.so.rev)
|
||
|
+
|
||
|
+#endif /* SharedLibraryTarget */
|
||
|
+
|
||
|
+/*
|
||
|
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
|
||
|
+ */
|
||
|
+#ifndef SharedLibraryDataTarget
|
||
|
+#define SharedLibraryDataTarget(libname,rev,salist)
|
||
|
+#endif /* SharedLibraryDataTarget */
|
||
|
+
|
||
|
+#ifndef InstallSharedLibraryData
|
||
|
+#define InstallSharedLibraryData(libname,rev,dest)
|
||
|
+#endif /* InstallSharedLibraryData */
|
||
|
+
|
||
|
+/*
|
||
|
+ * SharedLibReferences - variables for shared libraries
|
||
|
+ */
|
||
|
+#ifndef SharedLibReferences
|
||
|
+#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
|
||
|
+revname = rev @@\
|
||
|
+Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
|
||
|
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
|
||
|
+LintLibReferences(varname,libname,libsource)
|
||
|
+#endif
|
||
|
+
|
||
|
+/*
|
||
|
+ * SharedDSLibReferences - variables for shared libraries
|
||
|
+ */
|
||
|
+#ifndef SharedDSLibReferences
|
||
|
+#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
|
||
|
+revname = rev @@\
|
||
|
+Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
|
||
|
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\
|
||
|
+LintLibReferences(varname,libname,libsource)
|
||
|
+#endif
|
||
|
diff -ruN ../old/Xvnc/config/bsdLib.tmpl ./Xvnc/config/bsdLib.tmpl
|
||
|
--- ../old/Xvnc/config/bsdLib.tmpl Wed Dec 31 16:00:00 1969
|
||
|
+++ ./Xvnc/config/bsdLib.tmpl Tue Feb 24 22:30:41 1998
|
||
|
@@ -0,0 +1,15 @@
|
||
|
+XCOMM $XConsortium: bsdLib.tmpl,v 1.2 95/01/23 19:07:12 kaleb Exp $
|
||
|
+
|
||
|
+/*
|
||
|
+ * NetBSD/FreeBSD shared library template
|
||
|
+ */
|
||
|
+
|
||
|
+#ifndef SharedXtReqs
|
||
|
+#define SharedXtReqs /**/
|
||
|
+#endif
|
||
|
+#ifndef SharedXawReqs
|
||
|
+#define SharedXawReqs /**/
|
||
|
+#endif
|
||
|
+#ifndef SharedXmuReqs
|
||
|
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB)
|
||
|
+#endif
|
||
|
diff -ruN ../old/Xvnc/lib/font/bitmap/bitmapfunc.c ./Xvnc/lib/font/bitmap/bitmapfunc.c
|
||
|
--- ../old/Xvnc/lib/font/bitmap/bitmapfunc.c Tue Jan 20 04:38:40 1998
|
||
|
+++ ./Xvnc/lib/font/bitmap/bitmapfunc.c Tue Feb 24 23:15:16 1998
|
||
|
@@ -53,8 +53,11 @@
|
||
|
static BitmapFileFunctionsRec readers[] = {
|
||
|
pcfReadFont, pcfReadFontInfo,
|
||
|
pcfReadFont, pcfReadFontInfo,
|
||
|
+ pcfReadFont, pcfReadFontInfo,
|
||
|
snfReadFont, snfReadFontInfo,
|
||
|
snfReadFont, snfReadFontInfo,
|
||
|
+ snfReadFont, snfReadFontInfo,
|
||
|
+ bdfReadFont, bdfReadFontInfo,
|
||
|
bdfReadFont, bdfReadFontInfo,
|
||
|
bdfReadFont, bdfReadFontInfo,
|
||
|
};
|
||
|
@@ -71,6 +74,10 @@
|
||
|
BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
CAPABILITIES,
|
||
|
+ ".pcf.gz", 7,
|
||
|
+ BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
+ CAPABILITIES,
|
||
|
".snf", 4,
|
||
|
BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
@@ -79,11 +86,19 @@
|
||
|
BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
CAPABILITIES,
|
||
|
+ ".snf.gz", 7,
|
||
|
+ BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
+ CAPABILITIES,
|
||
|
".bdf", 4,
|
||
|
BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
CAPABILITIES,
|
||
|
".bdf.Z", 6,
|
||
|
+ BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
+ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
+ CAPABILITIES,
|
||
|
+ ".bdf.gz", 7,
|
||
|
BitmapOpenBitmap, BitmapOpenScalable,
|
||
|
BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
|
||
|
CAPABILITIES,
|
||
|
diff -ruN ../old/Xvnc/lib/font/fontfile/Imakefile ./Xvnc/lib/font/fontfile/Imakefile
|
||
|
--- ../old/Xvnc/lib/font/fontfile/Imakefile Tue Jan 20 04:38:42 1998
|
||
|
+++ ./Xvnc/lib/font/fontfile/Imakefile Tue Feb 24 23:27:48 1998
|
||
|
@@ -8,10 +8,10 @@
|
||
|
#endif
|
||
|
SRCS = dirfile.c fontdir.c fontfile.c fileio.c fontscale.c \
|
||
|
defaults.c bitsource.c register.c renderers.c \
|
||
|
- bufio.c decompress.c filewr.c
|
||
|
+ bufio.c decompress.c filewr.c gunzip.c
|
||
|
OBJS = dirfile.o fontdir.o fontfile.o fileio.o fontscale.o \
|
||
|
defaults.o bitsource.o register.o renderers.o \
|
||
|
- bufio.o decompress.o filewr.o
|
||
|
+ bufio.o decompress.o filewr.o gunzip.o
|
||
|
|
||
|
SubdirLibraryRule($(OBJS))
|
||
|
NormalLibraryObjectRule()
|
||
|
diff -ruN ../old/Xvnc/lib/font/fontfile/fileio.c ./Xvnc/lib/font/fontfile/fileio.c
|
||
|
--- ../old/Xvnc/lib/font/fontfile/fileio.c Tue Jan 20 04:38:42 1998
|
||
|
+++ ./Xvnc/lib/font/fontfile/fileio.c Wed Feb 25 13:09:47 1998
|
||
|
@@ -62,6 +62,13 @@
|
||
|
return 0;
|
||
|
}
|
||
|
raw = cooked;
|
||
|
+ } else if (len > 3 && !strcmp(name + len - 3, ".gz")) {
|
||
|
+ cooked = BufFilePushZIP (raw);
|
||
|
+ if (!cooked) {
|
||
|
+ BufFileClose (raw, TRUE);
|
||
|
+ return 0;
|
||
|
+ }
|
||
|
+ raw = cooked;
|
||
|
}
|
||
|
return (FontFilePtr) raw;
|
||
|
}
|
||
|
diff -ruN ../old/Xvnc/lib/font/fontfile/gunzip.c ./Xvnc/lib/font/fontfile/gunzip.c
|
||
|
--- ../old/Xvnc/lib/font/fontfile/gunzip.c Wed Dec 31 16:00:00 1969
|
||
|
+++ ./Xvnc/lib/font/fontfile/gunzip.c Tue Feb 24 23:12:36 1998
|
||
|
@@ -0,0 +1,224 @@
|
||
|
+/* $XConsortium: gunzip.c /main/1 1996/11/03 19:33:23 kaleb $ */
|
||
|
+/* lib/font/fontfile/gunzip.c
|
||
|
+ written by Mark Eichin <eichin@kitten.gen.ma.us> September 1996.
|
||
|
+ intended for inclusion in X11 public releases. */
|
||
|
+
|
||
|
+#include "fontmisc.h"
|
||
|
+#include <bufio.h>
|
||
|
+#include <zlib.h>
|
||
|
+
|
||
|
+typedef struct _xzip_buf {
|
||
|
+ z_stream z;
|
||
|
+ int zstat;
|
||
|
+ BufChar b[BUFFILESIZE];
|
||
|
+ BufChar b_in[BUFFILESIZE];
|
||
|
+ BufFilePtr f;
|
||
|
+} xzip_buf;
|
||
|
+
|
||
|
+static int BufZipFileSkip(); /* f, count */
|
||
|
+static int BufZipFileFill(); /* read: f; write: char, f */
|
||
|
+static int BufZipFileClose(); /* f, flag */
|
||
|
+static int BufCheckZipHeader(); /* f */
|
||
|
+
|
||
|
+BufFilePtr
|
||
|
+BufFilePushZIP (f)
|
||
|
+ BufFilePtr f;
|
||
|
+{
|
||
|
+ xzip_buf *x;
|
||
|
+
|
||
|
+ x = (xzip_buf *) xalloc (sizeof (xzip_buf));
|
||
|
+ if (!x) return 0;
|
||
|
+ /* these are just for raw calloc/free */
|
||
|
+ x->z.zalloc = Z_NULL;
|
||
|
+ x->z.zfree = Z_NULL;
|
||
|
+ x->z.opaque = Z_NULL;
|
||
|
+ x->f = f;
|
||
|
+
|
||
|
+ /* force inflateInit to allocate it's own history buffer */
|
||
|
+ x->z.next_in = Z_NULL;
|
||
|
+ x->z.next_out = Z_NULL;
|
||
|
+ x->z.avail_in = x->z.avail_out = 0;
|
||
|
+
|
||
|
+ /* using negative windowBits sets "nowrap" mode, which turns off
|
||
|
+ zlib header checking [undocumented, for gzip compatibility only?] */
|
||
|
+ x->zstat = inflateInit2(&(x->z), -MAX_WBITS);
|
||
|
+ if (x->zstat != Z_OK) {
|
||
|
+ xfree(x);
|
||
|
+ return 0;
|
||
|
+ }
|
||
|
+
|
||
|
+ /* now that the history buffer is allocated, we provide the data buffer */
|
||
|
+ x->z.next_out = x->b;
|
||
|
+ x->z.avail_out = BUFFILESIZE;
|
||
|
+ x->z.next_out = x->b_in;
|
||
|
+ x->z.avail_in = 0;
|
||
|
+
|
||
|
+ if (BufCheckZipHeader(x->f)) {
|
||
|
+ xfree(x);
|
||
|
+ return 0;
|
||
|
+ }
|
||
|
+
|
||
|
+ return BufFileCreate(x,
|
||
|
+ BufZipFileFill,
|
||
|
+ BufZipFileSkip,
|
||
|
+ BufZipFileClose);
|
||
|
+}
|
||
|
+
|
||
|
+static int BufZipFileClose(f, flag)
|
||
|
+ BufFilePtr f;
|
||
|
+ int flag;
|
||
|
+{
|
||
|
+ xzip_buf *x = (xzip_buf *)f->private;
|
||
|
+ inflateEnd (&(x->z));
|
||
|
+ BufFileClose (x->f, flag);
|
||
|
+ xfree (x);
|
||
|
+ return 1;
|
||
|
+}
|
||
|
+
|
||
|
+/* here's the real work.
|
||
|
+ -- we need to put stuff in f.buffer, update f.left and f.bufp,
|
||
|
+ then return the first byte (or BUFFILEEOF).
|
||
|
+ -- to do this, we need to get stuff into avail_in, and next_in,
|
||
|
+ and call inflate appropriately.
|
||
|
+ -- we may also need to add CRC maintenance - if inflate tells us
|
||
|
+ Z_STREAM_END, we then have 4bytes CRC and 4bytes length...
|
||
|
+ gzio.c:gzread shows most of the mechanism.
|
||
|
+ */
|
||
|
+static int BufZipFileFill (f)
|
||
|
+ BufFilePtr f;
|
||
|
+{
|
||
|
+ xzip_buf *x = (xzip_buf *)f->private;
|
||
|
+
|
||
|
+ /* we only get called when left == 0... */
|
||
|
+ /* but just in case, deal */
|
||
|
+ if (f->left >= 0) {
|
||
|
+ f->left--;
|
||
|
+ return *(f->bufp++);
|
||
|
+ }
|
||
|
+ /* did we run out last time? */
|
||
|
+ switch (x->zstat) {
|
||
|
+ case Z_OK:
|
||
|
+ break;
|
||
|
+ case Z_STREAM_END:
|
||
|
+ case Z_DATA_ERROR:
|
||
|
+ case Z_ERRNO:
|
||
|
+ return BUFFILEEOF;
|
||
|
+ default:
|
||
|
+ return BUFFILEEOF;
|
||
|
+ }
|
||
|
+ /* now we work to consume what we can */
|
||
|
+ /* let zlib know what we can handle */
|
||
|
+ x->z.next_out = x->b;
|
||
|
+ x->z.avail_out = BUFFILESIZE;
|
||
|
+
|
||
|
+ /* and try to consume all of it */
|
||
|
+ while (x->z.avail_out > 0) {
|
||
|
+ /* if we don't have anything to work from... */
|
||
|
+ if (x->z.avail_in == 0) {
|
||
|
+ /* ... fill the z buf from underlying file */
|
||
|
+ int i, c;
|
||
|
+ for (i = 0; i < sizeof(x->b_in); i++) {
|
||
|
+ c = BufFileGet(x->f);
|
||
|
+ if (c == BUFFILEEOF) break;
|
||
|
+ x->b_in[i] = c;
|
||
|
+ }
|
||
|
+ x->z.avail_in += i;
|
||
|
+ x->z.next_in = x->b_in;
|
||
|
+ }
|
||
|
+ /* so now we have some output space and some input data */
|
||
|
+ x->zstat = inflate(&(x->z), Z_NO_FLUSH);
|
||
|
+ /* the inflation output happens in the f buffer directly... */
|
||
|
+ if (x->zstat == Z_STREAM_END) {
|
||
|
+ /* deal with EOF, crc */
|
||
|
+ break;
|
||
|
+ }
|
||
|
+ if (x->zstat != Z_OK) {
|
||
|
+ break;
|
||
|
+ }
|
||
|
+ }
|
||
|
+ f->bufp = x->b;
|
||
|
+ f->left = BUFFILESIZE - x->z.avail_out;
|
||
|
+
|
||
|
+ if (f->left >= 0) {
|
||
|
+ f->left--;
|
||
|
+ return *(f->bufp++);
|
||
|
+ } else {
|
||
|
+ return BUFFILEEOF;
|
||
|
+ }
|
||
|
+}
|
||
|
+
|
||
|
+/* there should be a BufCommonSkip... */
|
||
|
+static int BufZipFileSkip (f, c)
|
||
|
+ BufFilePtr f;
|
||
|
+ int c;
|
||
|
+{
|
||
|
+ /* BufFileRawSkip returns the count unchanged.
|
||
|
+ BufCompressedSkip returns 0.
|
||
|
+ That means it probably never gets called... */
|
||
|
+ int retval = c;
|
||
|
+ while(c--) {
|
||
|
+ int get = BufFileGet(f);
|
||
|
+ if (get == BUFFILEEOF) return get;
|
||
|
+ }
|
||
|
+ return retval;
|
||
|
+}
|
||
|
+
|
||
|
+/* now we need to duplicate check_header */
|
||
|
+/* contents:
|
||
|
+ 0x1f, 0x8b -- magic number
|
||
|
+ 1 byte -- method (Z_DEFLATED)
|
||
|
+ 1 byte -- flags (mask with RESERVED -> fail)
|
||
|
+ 4 byte -- time (discard)
|
||
|
+ 1 byte -- xflags (discard)
|
||
|
+ 1 byte -- "os" code (discard)
|
||
|
+ [if flags & EXTRA_FIELD:
|
||
|
+ 2 bytes -- LSBfirst length n
|
||
|
+ n bytes -- extra data (discard)]
|
||
|
+ [if flags & ORIG_NAME:
|
||
|
+ n bytes -- null terminated name (discard)]
|
||
|
+ [if flags & COMMENT:
|
||
|
+ n bytes -- null terminated comment (discard)]
|
||
|
+ [if flags & HEAD_CRC:
|
||
|
+ 2 bytes -- crc of headers? (discard)]
|
||
|
+ */
|
||
|
+
|
||
|
+/* gzip flag byte -- from gzio.c */
|
||
|
+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
|
||
|
+#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
|
||
|
+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
|
||
|
+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
|
||
|
+#define COMMENT 0x10 /* bit 4 set: file comment present */
|
||
|
+#define RESERVED 0xE0 /* bits 5..7: reserved */
|
||
|
+
|
||
|
+#define GET(f) do {c = BufFileGet(f); if (c == BUFFILEEOF) return c;} while(0)
|
||
|
+static int BufCheckZipHeader(f)
|
||
|
+ BufFilePtr f;
|
||
|
+{
|
||
|
+ int c, flags;
|
||
|
+ GET(f); if (c != 0x1f) return 1; /* magic 1 */
|
||
|
+ GET(f); if (c != 0x8b) return 2; /* magic 2 */
|
||
|
+ GET(f); if (c != Z_DEFLATED) return 3; /* method */
|
||
|
+ GET(f); if (c & RESERVED) return 4; /* reserved flags */
|
||
|
+ flags = c;
|
||
|
+ GET(f); GET(f); GET(f); GET(f); /* time */
|
||
|
+ GET(f); /* xflags */
|
||
|
+ GET(f); /* os code */
|
||
|
+ if (flags & EXTRA_FIELD) {
|
||
|
+ int len;
|
||
|
+ GET(f); len = c;
|
||
|
+ GET(f); len += (c<<8);
|
||
|
+ while (len-- >= 0) {
|
||
|
+ GET(f);
|
||
|
+ }
|
||
|
+ }
|
||
|
+ if (flags & ORIG_NAME) {
|
||
|
+ do { GET(f); } while (c != 0);
|
||
|
+ }
|
||
|
+ if (flags & COMMENT) {
|
||
|
+ do { GET(f); } while (c != 0);
|
||
|
+ }
|
||
|
+ if (flags & HEAD_CRC) {
|
||
|
+ GET(f); GET(f); /* header crc */
|
||
|
+ }
|
||
|
+ return 0;
|
||
|
+}
|
||
|
diff -ruN ../old/Xvnc/lib/font/include/bufio.h ./Xvnc/lib/font/include/bufio.h
|
||
|
--- ../old/Xvnc/lib/font/include/bufio.h Tue Jan 20 04:38:42 1998
|
||
|
+++ ./Xvnc/lib/font/include/bufio.h Tue Feb 24 23:16:12 1998
|
||
|
@@ -55,6 +55,7 @@
|
||
|
extern BufFilePtr BufFileCreate ();
|
||
|
extern BufFilePtr BufFileOpenRead (), BufFileOpenWrite ();
|
||
|
extern BufFilePtr BufFilePushCompressed ();
|
||
|
+extern BufFilePtr BufFilePushZip ();
|
||
|
extern int BufFileClose ();
|
||
|
extern int BufFileFlush ();
|
||
|
#define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))
|
||
|
diff -ruN ../old/Xvnc/programs/Xserver/hw/vnc/auth.c ./Xvnc/programs/Xserver/hw/vnc/auth.c
|
||
|
--- ../old/Xvnc/programs/Xserver/hw/vnc/auth.c Wed Jan 21 10:12:44 1998
|
||
|
+++ ./Xvnc/programs/Xserver/hw/vnc/auth.c Tue Feb 24 22:30:41 1998
|
||
|
@@ -24,6 +24,9 @@
|
||
|
* USA.
|
||
|
*/
|
||
|
|
||
|
+#ifdef __FreeBSD__
|
||
|
+# include <sys/types.h>
|
||
|
+#endif
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <netinet/in.h>
|