--- liblzf/lzfP.h 2002/06/09 22:41:34 1.1 +++ liblzf/lzfP.h 2003/12/23 04:52:00 1.5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Marc Alexander Lehmann + * Copyright (c) 2000-2003 Marc Alexander Lehmann * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: @@ -50,7 +50,7 @@ /* * sacrifice some compression quality in favour of compression speed. * (roughly 1-2% worse compression for large blocks and - * 9-10% for small, redundant, blocks and 20% better speed in both cases) + * 9-10% for small, redundant, blocks and >>20% better speed in both cases) * In short: enable this for binary data, disable this for text data. */ #ifndef ULTRA_FAST @@ -80,11 +80,29 @@ # define INIT_HTAB 0 #endif +/* + * avoid assigning values to errno variable? for some embedding purposes + * (linux kernel for example), this is not + */ +#ifndef AVOID_ERRNO +# define AVOID_ERRNO 0 +#endif + +/* + * Wether to pass the LZF_STATE variable as argument, or allocate it + * on the stack. For small-stack environments, define this to zero. + */ +#ifndef LZF_STATE_ARG +# define LZF_STATE_ARG 1 +#endif + /*****************************************************************************/ /* nothing should be changed below */ typedef unsigned char u8; +typedef const u8 *LZF_STATE[1 << (HLOG)]; + #if !STRICT_ALIGN /* for unaligned accesses we need a 16 bit datatype. */ # include @@ -93,7 +111,6 @@ # elif UINT_MAX == 65535 typedef unsigned int u16; # else -# warn need 16 bit datatype when STRICT_ALIGN == 0, this is non-fatal # undef STRICT_ALIGN # define STRICT_ALIGN 1 # endif