2001-08-30  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* Version 3.1.

	* configure.ac (AC_INIT): Don't pass unique file as an argument.
	Use AC_CONFIG_SRCDIR instead.
	* configure.ac (AC_PREREQ): Set to 2.52.

2001-08-29  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1.

	* eb/zio.c (zio_open_plain): Set `slice_size'.
	* eb/zio.c (zio_unzip_slice_sebxa): If copy offset is out of range,
	fill 0x00.

	* po-ebutils/Makefile.am (POTFILES): Add `ebzip/sebxa.c'.
	* ebzip/Makefile.am (ebzip_SOURCES): Add `sebxa.c'.
	* ebzip/sebxa.c: New file.
	
	* ebzip/copyfile.c: Include "eb.h", "error.h" and "build-post.h".
	* ebzip/unzipbook.c (ebzip_unzip_book_eb): Fix START file after
	compression.

	* ebzip/unzipfile.c (ebzip_unzip_file): Splited into 
	ebzip_unzip_file() ebzip_unzip_start_file() and 
	ebzip_unzip_file_internal().
	* ebzip/zipfile.c (ebzip_zip_file): Splited into 
	ebzip_zip_file() ebzip_zip_start_file() and 
	ebzip_zip_file_internal().
	* ebzip/zipinfofile.c (ebzip_zipinfo_file): Splited into 
	ebzip_zipinfo_file() ebzip_zipinfo_start_file() and 
	ebzip_zipinfo_file_internal().

	* ebzip/zipinfobook.c (ebzip_zipinfo_book_eb):
	Call ebzip_zipinfo_start_file() rather than ebzip_zipinfo_file() to
	inspect START file.
	* ebzip/zipbook.c (ebzip_zip_book_eb): 
	Call ebzip_zip_start_file() rather than ebzip_zip_file() to
	compress START file.
	* ebzip/unzipbook.c (ebzip_unzip_book_eb): 
	Call ebzip_unzip_start_file() rather than ebzip_unzip_file() 
	to uncompress START file.

2001-08-28  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/zio.c (zio_unzip_slice_sebxa): Fix a critical bug that any
	uncompression requests cannot be performed correctly.

2001-08-14  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/match.c (eb_match_word_latin, eb_exact_match_word_latin):
	The function names ware exchanged by mistake, reported by
	HASEGAWA Masafumi.  Fixed.
	* eb/appendix.h (eb_load_all_appendix_subbooks): Add missing
	function declaration, reported by HASEGAWA Masafumi.
	* eb/defs.h (EB_VERSION_MINOR): Set the macro to `1', reported
	by HASEGAWA Masafumi.

	* configure.ac (AC_ARG_ENABLE, AC_ARG_WITH): Use AC_HELP_STRING.
	* m4/gettext.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Likewise.
	* m4/eb3.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Likewise.
	* configure.ac (AC_OUTPUT): Use AC_CONFIG_FILES to specify
	configuration file names.  Call AC_OUTPUT with no argument.

	* configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1beta2.

2001-08-13  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/configure.ac (AC_ARG_ENABLE): Disable `--enable-debug' by
	default, reported by Kazu TAKAGI.

2001-08-07  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* Version 3.1beta1.

	* eb/configure.ac (LIBEB_VERSION_INFO): Set the varaible to 5:0:0.

	* eb/ebconfig.h: Renamed to `eb/build-pre.h'.
	* eb/internal.h.in: Renamed to `eb/build-post.h'.

	* ebrefile/ebrefile.c: Include "*.h" not "eb/*.h".
	* ebrefile/Makefile.am (INCLUDES): Delete `-I$(top_srcdir)' and
	add `-I../eb -I$(top_srcdir)/eb' instead.

2001-08-06  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* missing: Import from Automake 1.4j.

	* eb/defs.h (EB_Lock_Struct, EB_Lock): Define the types
	if ENABLE_PTHREAD or EBCONF_ENABLE_PTHREAD is defined.

2001-08-04  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* ebzip/common.c, ebzip/copyfile.c, ebzip/ebzip.c,
	ebzip/unzipbook.c, ebzip/unzipfile.c, ebzip/zipbook.c,
	ebzip/zipfile.c, ebzip/zipinfobook.c, ebzip/zipinfofile.c,
	ebzip/ebzip.h: Inclusions of header files and definitions of missing
	macros in *.c are moved to `ebzip/ebzip.h'.

	* configure.ac (AC_CHECK_HEADERS): Add `pthread.h'.

2001-08-03  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

        * eb/ebconfig.h, eb/memmove.c, eb/zio.c, libebutils/memset.c:
        lib/memset.c: Don't define VOID if it has been defined.
        * eb/ebconfig.h, eb/defs.h: Don't define EB_P if WIN32 is defined.
        * configure.ac (AC_CHECK_HEADERS): Add `sys/utime.h'.
        * win32/config.h, win32/dirent.h, win32/dirent.c, win32/funcname.h,
        win32/unistd.h, win32/zconfig.h: Add new directory `win32' and put
        new files on the directory.

        * eb/ebconfig.h (F_): Delete the macro.
        * eb/filename.c (eb_canonicalize_path_name): In DOS version, replace
        all '/' in the given path with `\\'.
        * eb/filename.c (eb_canonicalize_path_name): Use strchr() to check
        if the given path name represents root.
        * eb/filename.c (eb_compose_path_name, eb_compose_path_name2,
        eb_compose_path_name3): Revised.

2001-08-01  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/search.c (eb_initialize_search, eb_finalize_search): 
	Delete the first argument `EB_Book *'.

	* eb/bitmap.c, eb/narwalt.c, eb/font.c. eb/narwfont.c, eb/setword.c,
	eb/subbook.c, eb/text.c:
	Add debug codese.

	* eb/book.c (eb_bind): Assign a book code at first.
	* eb/appendix (eb_bind_appendix): Likewise.

	* eb/multi.c (eb_finalie_multi_searches): Revised.

	* eb/narwfont.c (eb_narrow_font_size2): Fix a bug.  Add missing
	`return' statement.
	
	* eb/log.c (log_mutex): New variable.
	* eb/log.c (eb_log): Lock `log_mutex' at invoking log function.

	* eb/text.c (eb_invalidate_text_context): New function.
	* eb/text.c (eb_read_text, eb_read_heading, eb_read_rawtext,
	eb_forward_text, eb_forward_heading): Call eb_invalidate_text_context()
	upon failure return.
	
2001-07-31  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/binary.c (eb_set_binary_mpeg): Fix a critical bug in file name
	composition.

	* eb/book.c (eb_finalize_book): Revised.

	* eb/binary.c, eb/book.c, eb/copyright.c, eb/eb.c eb/endword.c,
	eb/exactword.c, eb/hook.c, eb/keyword.c, eb/menu.c, eb/multi.c,
	eb/stopcode.c, eb/subbook.c, eb/word.c: Add debug codes.

	* eb/subbook.c: Include "binary.h".

	* eb/zio.c (ZIO_ID_NONE): Defined.
	* eb/zio.c (cache_file): Renamed to `cache_zio_id'.
	* eb/zio.c (cache_mutex): Renamed to `zio_mutex'.
	* eb/zio.c (zio_open): Initialize `zio' again if file descriptor
	the given `zio' holds is active.
	* eb/zio.c (zio_open_plain, zio_open_ebzip, zio_open_epwing,
	zio_open_epwing6): Assign ID to `zio'.

2001-07-30  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/appendix.c (eb_initialize_appendix_catalog): Renamed to
	eb_load_appendix_catalog().
	* eb/appendix.c (eb_initialize_alt_cache): Renamed to
	eb_initialize_alt_caches().
	* eb/appendix.c (eb_initialize_appendix): Initialize all members
	in EB_Appendix.
	* eb/appendix.c (eb_finalize_appendix): Revised.

	* eb/appendix.h (eb_initialize_all_appendix_subbooks): Define the
	macro for backward compatibility.

	* eb/appsub.c (eb_initialize_appendix_subbook): Renamed to
	eb_load_appendix_subbook().
	* eb/appsub.c (eb_finalize_appendix_subbooks): New function.
	* eb/appsub.c (eb_initialize_appendix_subbooks): New function.
	* eb/appsub.c (eb_load_all_appendix_subbooks): New function.

	* eb/binary.c (eb_initialize_binary): Renamed to 
	eb_initialize_binary_context().  Initialize all members in
	EB_Binary_Context.
	* eb/binary.c (eb_finalize_binary_context): New function.
	* eb/binary.c (eb_reset_binary_context): New function.

	* eb/book.c (eb_initialize_catalog): Renamed to eb_load_catalog().
	* eb/book.c (eb_initialize_language): Renamed to eb_load_language().
	* eb/book.c (eb_initialize_book): Initialize all members to EB_Book.
	* eb/book.c (eb_finalize_book): Revised.

	* eb/book.h (eb_initialize_all_subbooks): Define the macro for
	backward compatibility.
	
	* eb/font.c (eb_initialize_fonts): New function.
	* eb/font.c (eb_finalize_fonts): New function.

	* eb/hook.c (eb_finalize_hookset): Reset all the hooks.

	* eb/internal.h.in (EB_ARRANGE_INVALID): New macro.

	* eb/multi.c (eb_initialize_multi_searches): New function.
	* eb/multi.c (eb_finalize_multi_searches): New function.
	* eb/multi.c (eb_initialize_multi_search): Renamed to 
	eb_load_multi_search().

	* eb/narwfont.c (eb_initialize_narrow_font): Renamed to
	eb_load_narrow_font().

	* eb/search.c (eb_initialize_search): Renamed to
	eb_initialize_search_contexts().  Initialize all members in
	EB_Search_Context.
	* eb/search.c (eb_finalize_search_contexts): New function.
	* eb/search.c (eb_reset_search_contexts): New function.
	* eb/search.c (eb_initialize_search): New function.
	* eb/search.c (eb_finalize_search): New function.
	* eb/search.c (eb_initialize_searches): New function.
	* eb/search.c (eb_finalize_searches): New function.

	* eb/subbook.c (eb_initialize_subbook): Renamed to eb_load_subbook().
	* eb/subbook.c (eb_initialize_indexes): Renamed to 
	eb_load_subbook_indexes().
	* eb/subbook.c (eb_load_subbook_indexes): Call eb_initialize_search()
	to initialize EB_Search.

	* eb/text.c (eb_initialize_text): Renamed to
	eb_initialize_text_context().  Initialize all members in
	EB_Text_Context.
	* eb/text.c (eb_finalize_text_context): New function.
	* eb/text.c (eb_reset_text_context): New function.

	* eb/appendix.c, eb/appsub.c: Add debug codes.
	* eb/defs.h (EB_Appendix_Struct): Add member `code'.
	* eb/appendix.c (appendix_counter): New static variable.

	* eb/log.c: Include "internal.h".

2001-07-25  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/search.c (eb_presearch_word): Don't set `context->entry_length'
	to 0 at successful return.

2001-07-24  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/zio.h (Zio_Struct): Add `id'.
	* eb/zio.c (zio_counter): New static variable.
	* eb/zio.c (zio_initialize): manage zio_counter, and assign the
	counter value to `zio->id'.
	* eb/zio.c (LOG): Defile this macro if ENABLE_DEBUG.

	* eb/log.c (eb_quoted_string): Prepare multiple static buffers.
	* eb/log.c (eb_quoted_string): Accept NULL pattern.
	* eb/log.c (eb_quoted_string): Encode '=' character as `=3D'.

2001-07-22  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/Makefile.am (libeb_la_SOURCES): Add `log.c'.
	* eb/eb.h: Include <stdarg.h> if __STDC__ is defined.
	* eb/error.c (error_strings): New static variable.
	* eb/error.c (eb_error_string): New function.
	* eb/error.c (unknown): Deleted.
	* eb/internal.h.in (LOG): New macro.
	* eb/match.c, eb/search.c: Output log messages.

2001-07-18  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* ebzip/zipfile.c (ebzip_zip_file): Don't call utime() if 
	HAVE_STRUCT_UTIMBUF is not defined.
	* ebzip/unzipfile.c (ebzip_unzip_file): Ditto.
	* ebzip/copyfile.c (ebzip_copy_file): Ditto.
	* ebzip/ebzip.c (parse_skip_content_argument): Defined as `static'
	function.
	* ebzip/copyfile.c (ebzip_copy_files_in_directory): Fix a bug that
	the function always returns -1.

2001-07-17  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* Version 3.1beta0.

	* eb/text.c (eb_read_text_internal): Suppose that area of user
	defined characters in EPWING and EB* is 0xa121 ... 0xfe7f.

	* eb/configure.ac (LIBEB_VERSION_INFO): Set the varaible to 4:2:0.
	* eb/configure.ac (AM_INIT_AUTOMAKE): Set version to 3.1.0beta0.

	* Makefile.am (EXTRA_DIST): Add `ChangeLog.1'.

2001-07-16  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/filename.c (eb_canonicalize_font_file_name): Renamed to
	eb_canonicalize_file_name().

	* eb/zio.h (ZIO_NONE): Renamed to ZIO_PLAIN.
	* eb/zio.c (zio_open_none): Renamed to zio_open_plain().

2001-07-13  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/match.c (eb_match_word, eb_match_exactword):
	Renamed to eb_match_canonicalized_word() and 
	eb_exact_match_canonicalized_word().
	* eb/match.c (eb_match_word_latin, eb_match_word_jis, 
	eb_exact_match_word_latin, eb_exact_match_word_jis): New functions.
	* eb/defs.h (EB_Search_Context_Struct): split `compare' into
	`compare_pre' and `compare_hit'.
	* eb/word.c (eb_search_word): Change policy of choosing search
	function.
	* eb/exactword.c (eb_search_exactword): Ditto.
	* eb/endword.c (eb_search_endword): Ditto.
	* eb/keyword.c (eb_search_keyword): Ditto.
	* eb/multi.c (eb_search_multi): Ditto.

2001-07-12  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/defs.h (EB_Subbook_Struct): Add the member `text'.
	* eb/subbook.c (eb_initialize_indexes): Revise S-EBXA compression
	support code.
	* eb/zio.c (zio_set_sebxa_mode): New function.
	* eb/zio.c (zio_read_sebxa, zio_unzip_slice_sebxa): Revised and
	Enabled.
	* eb/zio.c (zio_read): Enable S-EBXA support code.

2001-07-09  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/filename.c (eb_find_file_name, eb_find_file_name2,
	eb_find_file_name3): Change API of the internal functions.
	* eb/filename.c (eb_path_name_zio_code): New function.

	* eb/appendix.c (EB_HINT_INDEX_CATALOG, EB_HINT_INDEX_CATALOGS,
	catalog_hint_list): Deleted.
	* eb/appsub.c (EB_HINT_INDEX_APPENDIX, EB_HINT_INDEX_APPENDIX_EBZ,
	appendix_hint_list, EB_HINT_INDEX_FUROKU, EB_HINT_INDEX_FUROKU_EBZ,
	furoku_hint_list): Deleted.
	* eb/book.c (EB_HINT_INDEX_CATALOG, EB_HINT_INDEX_CATALOGS, 
	catalog_hint_list, EB_HINT_INDEX_LANGUAGE, EB_HINT_INDEX_LANGUAGE_EBZ,
	language_hint_list): Deleted.
	* eb/subbook.c (EB_HINT_INDEX_START, EB_HINT_INDEX_START_EBZ,
	start_hint_list): Deleted.
	* eb/subbook.c (EB_HINT_INDEX_HONMON_EBZ, EB_HINT_INDEX_HONMON2,
	EB_HINT_INDEX_HONMON2_EBZ, EB_HINT_INDEX_HONMON2_ORG,
	honmon_hint_list, EB_HINT_INDEX_HONMONG, EB_HINT_INDEX_HONMONG_EBZ,
	EB_HINT_INDEX_HONMONG_ORG, honmong_hint_list, EB_HINT_INDEX_HONMONS,
	EB_HINT_INDEX_HONMONS_EBZ, EB_HINT_INDEX_HONMONS_ORG, 
	honmons_hint_list): Deleted.

	* ebrefile/ebrefile.c (HINT_INDEX_CATALOG, HINT_INDEX_CATALOGS,
	catalog_hint_list): Deleted.

	* ebzip/unzipbook.c (catalog_hint_list, language_hint_list,
	catalogs_hint_list): Deleted.
	* ebzip/zipbook.c (catalog_hint_list, language_hint_list,
	catalogs_hint_list): Deleted.
	* ebzip/zipinfobook.c (catalog_hint_list, language_hint_list,
	catalogs_hint_list): Deleted.
	
2001-06-25  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* Version 3.0.1.

	* configure.ac (LIBEB_VERSION_INFO): Set version to 4:1:0.

2001-06-22  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* configure.ac (AM_INIT_AUTOMAKE): Set version to 3.0.1.

	* eb/text.c (eb_read_text_internal): Fix a bug of handling BG 2312
	character.
	* eb/text.c (eb_read_text_internal): Add code to process escape
	sequence 0x1f53.

2001-06-12  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* eb/book.c (eb_initialize_language): Don't return a value, since
	this is `void' function.

	* ebrefile/ebrefile.c: Don't include <zlib.h>.
	* ebrefile/ebrefile.c: Fix definition of `_' and `N_' macros.

2001-06-11  Motoyuki Kasahara  <m-kasahr@sra.co.jp>

	* libebutils/memset.c: Internally convert the 2nd argument (copy
	value) to unsigned char, as ISO/IEC 9899:1990 says.
