1 | /* |
1 | /* |
2 | * Copyright (c) 2000-2002 Marc Alexander Lehmann <pcg@goof.com> |
2 | * Copyright (c) 2000-2003 Marc Alexander Lehmann <pcg@goof.com> |
3 | * |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without modifica- |
4 | * Redistribution and use in source and binary forms, with or without modifica- |
5 | * tion, are permitted provided that the following conditions are met: |
5 | * tion, are permitted provided that the following conditions are met: |
6 | * |
6 | * |
7 | * 1. Redistributions of source code must retain the above copyright notice, |
7 | * 1. Redistributions of source code must retain the above copyright notice, |
… | |
… | |
78 | */ |
78 | */ |
79 | #ifndef INIT_HTAB |
79 | #ifndef INIT_HTAB |
80 | # define INIT_HTAB 0 |
80 | # define INIT_HTAB 0 |
81 | #endif |
81 | #endif |
82 | |
82 | |
|
|
83 | /* |
|
|
84 | * avoid assigning values to errno variable? for some embedding purposes |
|
|
85 | * (linux kernel for example), this is not |
|
|
86 | */ |
|
|
87 | #ifndef AVOID_ERRNO |
|
|
88 | # define AVOID_ERRNO 0 |
|
|
89 | #endif |
|
|
90 | |
|
|
91 | /* |
|
|
92 | * Wether to pass the LZF_STATE variable as argument, or allocate it |
|
|
93 | * on the stack. For small-stack environments, define this to zero. |
|
|
94 | */ |
|
|
95 | #ifndef LZF_STATE_ARG |
|
|
96 | # define LZF_STATE_ARG 1 |
|
|
97 | #endif |
|
|
98 | |
83 | /*****************************************************************************/ |
99 | /*****************************************************************************/ |
84 | /* nothing should be changed below */ |
100 | /* nothing should be changed below */ |
85 | |
101 | |
86 | typedef unsigned char u8; |
102 | typedef unsigned char u8; |
|
|
103 | |
|
|
104 | typedef const u8 *LZF_STATE[1 << (HLOG)]; |
87 | |
105 | |
88 | #if !STRICT_ALIGN |
106 | #if !STRICT_ALIGN |
89 | /* for unaligned accesses we need a 16 bit datatype. */ |
107 | /* for unaligned accesses we need a 16 bit datatype. */ |
90 | # include <limits.h> |
108 | # include <limits.h> |
91 | # if USHRT_MAX == 65535 |
109 | # if USHRT_MAX == 65535 |