/* Modified Nobutaka Watazaki */
/* */
/* Ver. 1.14 Soruce All chagned 1995.01.14 N.Watazaki */
+/* Ver. 1.14g modified 2000.05.06 T.OKAMOTO */
/* ------------------------------------------------------------------------ */
+/* macro VERSION is defined in config.h by configure script */
+#define LHA_VERSION "lha for unix version " VERSION
+
/* Most of System V, define TM_IN_SYS_TIME */
#if TM_IN_SYS_TIME
#include <sys/time.h>
extern struct tm *localtime();
extern char *getenv();
-#ifndef _MINIX
-#ifndef __STDC__
-extern char *malloc();
-extern char *realloc();
-#endif
-#endif
+extern char *xmalloc();
+extern char *xrealloc();
+extern char *xstrdup();
/* external variables */
extern int errno;
#define FILENAME_LENGTH 1024
+#if defined __MINGW32__
+# define getuid() 0
+# define chown(file, uid, gid) 0
+# define kill(pid, sig) 0
+# define link(from, to) 0
+#endif
+
/* ------------------------------------------------------------------------ */
/* YOUR CUSTOMIZIES */
/* ------------------------------------------------------------------------ */
(((unsigned char)(c) >= 0x40) && \
((unsigned char)(c) < 0xfd) && \
((unsigned char)(c) != 0x7f))
+
#define X0201_KANA_P(c)\
(0xa0 < (unsigned char)(c) && (unsigned char)(c) < 0xe0)
#define LZHUFF4_METHOD "-lh4-"
#define LZHUFF5_METHOD "-lh5-"
#define LZHUFF6_METHOD "-lh6-"
+#define LZHUFF7_METHOD "-lh7-"
#define LARC_METHOD "-lzs-"
#define LARC5_METHOD "-lz5-"
#define LARC4_METHOD "-lz4-"
#define LZHUFF4_METHOD_NUM 4
#define LZHUFF5_METHOD_NUM 5
#define LZHUFF6_METHOD_NUM 6
-#define LARC_METHOD_NUM 7
-#define LARC5_METHOD_NUM 8
-#define LARC4_METHOD_NUM 9
-#define LZHDIRS_METHOD_NUM 10
+#define LZHUFF7_METHOD_NUM 7
+#define LARC_METHOD_NUM 8
+#define LARC5_METHOD_NUM 9
+#define LARC4_METHOD_NUM 10
+#define LZHDIRS_METHOD_NUM 11
/* Added N.Watazaki ..^ */
#define I_HEADER_SIZE 0
/* ------------------------------------------------------------------------ */
/* Slide relation */
/* ------------------------------------------------------------------------ */
-#if defined(__STDC__) || defined(AIX)
+#if HAVE_LIMITS_H
#include <limits.h>
#define LONG_MIN (LONG_MAX-ULONG_MAX)
#endif
-#endif /* not __STDC__ */
+#endif
/* ------------------------------------------------------------------------ */
/* FILE Attribute */
/* ------------------------------------------------------------------------ */
#if STDC_HEADERS
# include <string.h>
+# define bcmp(a,b,n) memcmp((a),(b),(n))
+# define bzero(d,n) memset((d),0,(n))
+# define bcopy(s,d,n) memmove((d),(s),(n))
#else
# ifndef HAVE_STRCHR
# define strchr index
# endif
char *strchr (), *strrchr ();
# ifdef HAVE_MEMCPY
-# define bcmp(a,b,n) memcmp((a),(b),(n))
-# define bzero(d,n) memset((d),0,(n))
-# define bcopy(s,d,n) memmove((d),(s),(n))
+# define bcmp(a,b,n) memcmp((a),(b),(n))
+# define bzero(d,n) memset((d),0,(n))
+# define bcopy(s,d,n) memmove((d),(s),(n))
# endif
#endif
*/
/* slide.c */
+#ifdef SUPPORT_LH7
+#define MAX_DICBIT 16 /* lh7 use 16bits */
+#endif
+
+#ifndef SUPPORT_LH7
#define MAX_DICBIT 15 /* lh6 use 15bits */
+#endif
+
#define MAX_DICSIZ (1 << MAX_DICBIT)
#define MATCHBIT 8 /* bits for MAXMATCH - THRESHOLD */
#define MAXMATCH 256 /* formerly F (not more than UCHAR_MAX + 1) */
/* alphabet = {0, 1, 2, ..., NC - 1} */
#define CBIT 9 /* $\lfloor \log_2 NC \rfloor + 1$ */
#define USHRT_BIT 16 /* (CHAR_BIT * sizeof(ushort)) */
+
/* Local Variables: */
-/* tab-width : 4 */
+/* mode:c */
+/* tab-width:4 */
/* End: */