* Description: Mini inflate implementation (RFC 1951)
*-----------------------------------------------------------------------*/
/*
- *
- * This program 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.
- *
- * This program 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 this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * SPDX-License-Identifier: GPL-2.0+
*/
#include <config.h>
-
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
-
#include <jffs2/mini_inflate.h>
/* The order that the code lengths in section 3.2.7 are in */
static unsigned char huffman_order[] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
11, 4, 12, 3, 13, 2, 14, 1, 15};
-inline void cramfs_memset(int *s, const int c, size n)
+static inline void cramfs_memset(int *s, const int c, size n)
{
n--;
for (;n > 0; n--) s[n] = c;
/* pull 'bits' bits out of the stream. The last bit pulled it returned as the
* msb. (section 3.1.1)
*/
-inline unsigned long pull_bits(struct bitstream *stream,
- const unsigned int bits)
+static inline unsigned long pull_bits(struct bitstream *stream,
+ const unsigned int bits)
{
unsigned long ret;
int i;
return ret;
}
-inline int pull_bit(struct bitstream *stream)
+static inline int pull_bit(struct bitstream *stream)
{
int ret = ((*(stream->data) >> stream->bit) & 1);
if (stream->bit++ == 7) {
#endif
return stream.error ? -stream.error : stream.decoded;
}
-
-#endif /* CFG_CMD_JFFS2 */