Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/liblzf/dist Adjust liblzf to offer the LZF_STAT...



details:   https://anonhg.NetBSD.org/src/rev/69deacf777c2
branches:  trunk
changeset: 751387:69deacf777c2
user:      tls <tls%NetBSD.org@localhost>
date:      Wed Feb 03 03:55:38 2010 +0000

description:
Adjust liblzf to offer the LZF_STATE_ARG API, which is better for small-stack
environments (think bootblocks etc) and no worse elsewise (you can always
just pass the same state argument...) and have correct prototypes when doing
so.

diffstat:

 external/bsd/liblzf/dist/lzf.h   |  7 +++++--
 external/bsd/liblzf/dist/lzfP.h  |  2 +-
 external/bsd/liblzf/dist/lzf_c.c |  2 +-
 external/bsd/liblzf/dist/lzf_d.c |  2 +-
 4 files changed, 8 insertions(+), 5 deletions(-)

diffs (60 lines):

diff -r 4479138db306 -r 69deacf777c2 external/bsd/liblzf/dist/lzf.h
--- a/external/bsd/liblzf/dist/lzf.h    Wed Feb 03 03:50:40 2010 +0000
+++ b/external/bsd/liblzf/dist/lzf.h    Wed Feb 03 03:55:38 2010 +0000
@@ -37,6 +37,8 @@
 #ifndef LZF_H
 #define LZF_H
 
+#include "lzfP.h"
+
 /***********************************************************************
 **
 **     lzf -- an extremely fast/free compression/decompression-method
@@ -75,8 +77,9 @@
  */
 unsigned int 
 lzf_compress (const void *const in_data,  unsigned int in_len,
-              void             *out_data, unsigned int out_len);
-
+              void             *out_data, unsigned int out_len,
+             LZF_STATE htab);
+        
 /*
  * Decompress data compressed with some version of the lzf_compress
  * function and stored at location in_data and length in_len. The result
diff -r 4479138db306 -r 69deacf777c2 external/bsd/liblzf/dist/lzfP.h
--- a/external/bsd/liblzf/dist/lzfP.h   Wed Feb 03 03:50:40 2010 +0000
+++ b/external/bsd/liblzf/dist/lzfP.h   Wed Feb 03 03:55:38 2010 +0000
@@ -106,7 +106,7 @@
  * NOTE: this breaks the prototype in lzf.h.
  */
 #ifndef LZF_STATE_ARG
-# define LZF_STATE_ARG 0
+# define LZF_STATE_ARG 1
 #endif
 
 /*
diff -r 4479138db306 -r 69deacf777c2 external/bsd/liblzf/dist/lzf_c.c
--- a/external/bsd/liblzf/dist/lzf_c.c  Wed Feb 03 03:50:40 2010 +0000
+++ b/external/bsd/liblzf/dist/lzf_c.c  Wed Feb 03 03:55:38 2010 +0000
@@ -34,7 +34,7 @@
  * either the BSD or the GPL.
  */
 
-#include "lzfP.h"
+#include "lzf.h"
 
 #define HSIZE (1 << (HLOG))
 
diff -r 4479138db306 -r 69deacf777c2 external/bsd/liblzf/dist/lzf_d.c
--- a/external/bsd/liblzf/dist/lzf_d.c  Wed Feb 03 03:50:40 2010 +0000
+++ b/external/bsd/liblzf/dist/lzf_d.c  Wed Feb 03 03:55:38 2010 +0000
@@ -34,7 +34,7 @@
  * either the BSD or the GPL.
  */
 
-#include "lzfP.h"
+#include "lzf.h"
 
 #if AVOID_ERRNO
 # define SET_ERRNO(n)



Home | Main Index | Thread Index | Old Index