Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 72676 Details for
Bug 111432
pose-3.5-r6.ebuild (updated ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
pose-zlib diff
pose-zlib.diff (text/plain), 7.70 KB, created by
Terry Markovich
on 2005-11-11 09:45:11 UTC
(
hide
)
Description:
pose-zlib diff
Filename:
MIME Type:
Creator:
Terry Markovich
Created:
2005-11-11 09:45:11 UTC
Size:
7.70 KB
patch
obsolete
>diff -Naur Emulator_Src_3.5-old/BuildUnix/Makefile.am Emulator_Src_3.5-new/BuildUnix/Makefile.am >--- Emulator_Src_3.5-old/BuildUnix/Makefile.am 2005-11-03 18:02:34.000000000 -0500 >+++ Emulator_Src_3.5-new/BuildUnix/Makefile.am 2005-11-03 18:10:45.000000000 -0500 >@@ -4,7 +4,7 @@ > ## All rights reserved. > ## ====================================================================================== > >-SUBDIRS = Gzip jpeg espws-2.0 >+SUBDIRS = jpeg espws-2.0 > > SUFFIXES = .cpp > >@@ -37,7 +37,6 @@ > INCLUDES += -I$(srcdir)/../SrcShared/Palm/Platform/Incs/Core/System > INCLUDES += -I$(srcdir)/../SrcShared/Palm/Platform/Incs/Core/UI > INCLUDES += -I$(srcdir)/../SrcShared/Palm/Platform/Incs/Libraries >-INCLUDES += -I$(srcdir)/../SrcShared/Gzip > INCLUDES += -I$(srcdir)/../SrcShared/jpeg > INCLUDES += -I$(srcdir)/../SrcShared/omnithread > INCLUDES += -I$(srcdir)/../SrcShared/Patches >@@ -403,7 +402,7 @@ > > bin_PROGRAMS = pose > >-pose_LDADD = Gzip/libposergzip.a >+pose_LDADD = -lz > pose_LDADD += jpeg/libposerjpeg.a > pose_LDADD += espws-2.0/libposerespws.a > pose_LDADD += -lfltk >diff -Naur Emulator_Src_3.5-old/BuildUnix/configure.in Emulator_Src_3.5-new/BuildUnix/configure.in >--- Emulator_Src_3.5-old/BuildUnix/configure.in 2005-11-03 18:02:57.000000000 -0500 >+++ Emulator_Src_3.5-new/BuildUnix/configure.in 2005-11-03 18:11:53.000000000 -0500 >@@ -406,4 +406,4 @@ > > AM_CONDITIONAL(SOLARIS, test x$USE_SOLARIS_CPP = xtrue) > >-AC_OUTPUT(Makefile Gzip/Makefile jpeg/Makefile espws-2.0/Makefile) >+AC_OUTPUT(Makefile jpeg/Makefile espws-2.0/Makefile) >diff -Naur Emulator_Src_3.5-old/SrcShared/Miscellaneous.cpp Emulator_Src_3.5-new/SrcShared/Miscellaneous.cpp >--- Emulator_Src_3.5-old/SrcShared/Miscellaneous.cpp 2002-03-29 08:11:15.000000000 -0500 >+++ Emulator_Src_3.5-new/SrcShared/Miscellaneous.cpp 2005-11-03 18:19:00.000000000 -0500 >@@ -36,82 +36,11 @@ > #include <locale.h> // localeconv, lconv > #include <strstream> // strstream > #include <time.h> // time, localtime >+#include <zlib.h> > > >-extern "C" { >- // These are defined in machdep_maccess.h, too >-#undef get_byte >-#undef put_byte >-#undef put_long >-#include "gzip.h" >-#include "lzw.h" >- >-int (*write_buf_proc)(char *buf, unsigned size); >- >-DECLARE(uch, inbuf, INBUFSIZ +INBUF_EXTRA); >-DECLARE(uch, outbuf, OUTBUFSIZ+OUTBUF_EXTRA); >-DECLARE(ush, d_buf, DIST_BUFSIZE); >-DECLARE(uch, window, 2L*WSIZE); >-DECLARE(ush, tab_prefix, 1L<<BITS); >- >-int test = 0; /* test .gz file integrity */ >-int level = 1; /* compression level */ >-int exit_code = OK; /* program exit code */ >-int verbose = 2; /* be verbose (-v) */ >-int quiet = 0; /* be quiet (-q) */ >- >-char ifname[] = "ifname"; >-char ofname[] = "ofname"; >-char* progname = "progname"; >- >-long bytes_in; /* number of input bytes */ >-long bytes_out; /* number of output bytes */ >-int ifd; /* input file descriptor */ >-int ofd; /* output file descriptor */ >-unsigned insize; /* valid bytes in inbuf */ >-unsigned inptr; /* index of next byte to be processed in inbuf */ >-unsigned outcnt; /* bytes in output buffer */ >- >-#include <setjmp.h> >-jmp_buf env; >- >-RETSIGTYPE abort_gzip() >-{ >- LogDump (); >- abort (); >-// longjmp (env, 1); >-} >- >-int my_fprintf (FILE*, const char* fmt, ...) >-{ >- int n; >- va_list arg; >- >- va_start (arg, fmt); >- n = LogGetStdLog ()->VPrintf (fmt, arg); >- va_end (arg); >- >- return n; >-} >- >-} // extern "C" >- >- >-extern "C" >-{ >- int PrvGzipReadProc (char* buf, unsigned size); >- int PrvGzipWriteProc (char* buf, unsigned size); >-} >- >-static void* gSrcP; >-static void* gDstP; >-static long gSrcBytes; >-static long gDstBytes; >-static long gSrcOffset; >-static long gDstOffset; >- > // =========================================================================== >-// ¥ StMemory Class >+// ? StMemory Class > // =========================================================================== > // Constructor allocates the Ptr > // Destructor disposes of the Ptr >@@ -595,7 +524,7 @@ > > > // --------------------------------------------------------------------------- >-// ¥ PinRectInRect >+// ? PinRectInRect > // --------------------------------------------------------------------------- > > Bool PinRectInRect (EmRect& inner, const EmRect& outer) >@@ -1725,41 +1654,17 @@ > > void GzipEncode (void** srcPP, void** dstPP, long srcBytes, long dstBytes) > { >- gSrcP = *srcPP; >- gDstP = *dstPP; >- gSrcBytes = srcBytes; >- gDstBytes = dstBytes; >- gSrcOffset = 0; >- gDstOffset = 0; >- >- bytes_in = srcBytes; // (for gzip internal debugging) >- >- ush attr = 0; /* ascii/binary flag */ >- ush deflate_flags = 0; /* pkzip -es, -en or -ex equivalent */ >- int method; >- >- clear_bufs (); >- >- read_buf = &::PrvGzipReadProc; >- write_buf_proc = &::PrvGzipWriteProc; >- >- bi_init (NO_FILE); >- ct_init (&attr, &method); >- lm_init (level, &deflate_flags); >- >- deflate (); >- >- // Perform a put_byte(0) to pad out the >- // compressed buffer. gzip apparently can skid off the >- // end of the compressed data when inflating it, so we need >- // an extra zero. >- >- put_byte (0); >- >- flush_outbuf (); >- >- *srcPP = ((char*) gSrcP) + gSrcOffset; >- *dstPP = ((char*) gDstP) + gDstOffset; >+ // We only allow the entire buffer to be compressed at once. >+ // That's the only way this gets used. If you don't do that, this >+ // function will report that nothing was compressed. >+ Bytef* srcP = (Bytef*) *srcPP; >+ Bytef* dstP = (Bytef*) *dstPP; >+ uLongf mydstBytes = dstBytes; >+ if (compress(dstP, &mydstBytes, srcP, srcBytes) == Z_OK) >+ { >+ *srcPP = srcP + srcBytes; >+ *dstPP = dstP + mydstBytes; >+ } > } > > >@@ -1781,22 +1686,17 @@ > > void GzipDecode (void** srcPP, void** dstPP, long srcBytes, long dstBytes) > { >- gSrcP = *srcPP; >- gDstP = *dstPP; >- gSrcBytes = srcBytes; >- gDstBytes = dstBytes; >- gSrcOffset = 0; >- gDstOffset = 0; >- >- clear_bufs (); >- >- read_buf = &::PrvGzipReadProc; >- write_buf_proc = &::PrvGzipWriteProc; >- >- inflate (); >- >- *srcPP = ((char*) gSrcP) + gSrcOffset; >- *dstPP = ((char*) gDstP) + gDstOffset; >+ // We only allow the entire buffer to be decompressed at once. >+ // That's the only way this gets used. If you don't do that, this >+ // function will report that nothing was decompressed. >+ Bytef* srcP = (Bytef*) *srcPP; >+ Bytef* dstP = (Bytef*) *dstPP; >+ uLongf mydstBytes = dstBytes; >+ if (uncompress(dstP, &mydstBytes, srcP, srcBytes) == Z_OK) >+ { >+ *srcPP = srcP + srcBytes; >+ *dstPP = dstP + mydstBytes; >+ } > } > > >@@ -1814,69 +1714,12 @@ > > long GzipWorstSize (long srcBytes) > { >- long maxDestBytes = srcBytes * 2; >- >- return maxDestBytes; >-} >- >- >-/*********************************************************************** >- * >- * FUNCTION: PrvGzipReadProc >- * >- * DESCRIPTION: . >- * >- * PARAMETERS: . >- * >- * RETURNED: . >- * >- ***********************************************************************/ >- >-int PrvGzipReadProc (char* buf, unsigned size) >-{ >- if (gSrcOffset == gSrcBytes) >- return EOF; >- >- if (size > (unsigned) (gSrcBytes - gSrcOffset)) >- size = gSrcBytes - gSrcOffset; >- >- if (size > 0) >- { >- memcpy (buf, ((char*) gSrcP) + gSrcOffset, size); >- gSrcOffset += size; >- } >- >- return size; >-} >- >- >-/*********************************************************************** >- * >- * FUNCTION: PrvGzipWriteProc >- * >- * DESCRIPTION: . >- * >- * PARAMETERS: . >- * >- * RETURNED: . >- * >- ***********************************************************************/ >- >-int PrvGzipWriteProc (char* buf, unsigned size) >-{ >- if (gDstOffset == gDstBytes) >- return EOF; >- >- if (size > (unsigned) (gDstBytes - gDstOffset)) >- size = gDstBytes - gDstOffset; >- >- if (size > 0) >- { >- memcpy (((char*) gDstP) + gDstOffset, buf, size); >- gDstOffset += size; >- } >- >- return size; >+ // "the destination buffer... must be at least 0.1% larger than >+ // sourceLen plus 12 bytes." --zlib manual >+ >+ // We'll make it a generous 1% larger. >+ srcBytes += 12; >+ return (srcBytes + (srcBytes / 100)); > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 111432
:
72081
|
72082
|
72675
| 72676