This is eb.info, produced by makeinfo version 4.0 from eb.texi.

INFO-DIR-SECTION CD-ROM Book Utilities
START-INFO-DIR-ENTRY
* eb: (eb).                     C library for accessing CD-ROM book.
END-INFO-DIR-ENTRY

   EB Library: C library for accessing CD-ROM book, by Motoyuki
Kasahara.

   Copyright (C) 1998, 1999  Motoyuki Kasahara

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by Free Software Foundation, Inc.


File: eb.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)

   This is edition 2.3.8, for EB Library version 2.3.8.  This document
is not completed.

* Menu:

* Introduction::                Introduction.
* Link::                        Link EB Library to Your Program.
* Initialization::              Initialization.
* Error Handling::              Error Handling.
* Subbook::                     Subbook.
* Search Basics::               Search Basics.
* Word Search::                 Word, End-word, Exact-word Search.

* Index::                       Index.

 --- The Detailed Node Listing ---

Link EB Library to Your Program

* Compilation::                 Compilation.
* Configuration::               Configuration.
* Character Code::              Character Code Issue.

Initialization

* Compressed Book::
* Initialization Sample::       Sample Program.
* Initialization Data Types::   Data Types.
* Initialization Functions::    Functions.

Error Handling

* Tolerance to Error::          Tolerance to Error.
* Error Data Types::            Data Types.
* Error Variables::             Global Variables.
* Error Functions::             Functions.
* Error Codes::                 Error Codes.

Subbook

* Current Subbook::             Current Subbook.
* Subbook Sample::              Sample Program.
* Subbook Data Types::          Data Types.
* Subbook Functions::           Functions.

Word, End-Word, Exact-Word Searches

* Get Remained Entries::        Get Remained Entries.
* Word Search Data Types::      Data Types.
* Word Search Functions::       Functions.

Index

* Data Type Index::             Data Type Index.
* Function Index::              Function Index.
* Variable Index::              Variable and Constant Index.
* Program Index::               Sample Program Index.


File: eb.info,  Node: Introduction,  Next: Link,  Prev: Top,  Up: Top

Introduction
************

   EB Library is a C library for accessing CD-ROM books.  It can be
built on UNIX derived systems.  EB Library supports to access CD-ROM
books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats.  CD-ROM
books of those formats are popular in Japan.  Since CD-ROM books
themseves are stands on the ISO 9660 format, you can mount the discs by
the same way as other ISO 9660 discs.

   EB Library 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, or (at your option) any
later version.

   EB Library 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.

   This edition corresponds to version 2.3.8 of EB Library.  This
document is not completed.


File: eb.info,  Node: Link,  Next: Initialization,  Prev: Introduction,  Up: Top

Link EB Library to Your Program
*******************************

   This chapter describes how to link EB Library to your program.

* Menu:

* Compilation::                 Compilation.
* Configuration::               Configuration.
* Character Code::              Character Code Issue.


File: eb.info,  Node: Compilation,  Next: Configuration,  Prev: Link,  Up: Link

Compilation
===========

   EB Library consits of some header and library files.  The header
files are installed at `/usr/local/include/eb', if you have installed
EB Library under `/usr/local', and if you have not change a directory
for header files (`includedir') at the installation.

   Adding lines like the following at the beginning of your C program,
the header files are included.

     #include <eb/eb.h>
     #include <eb/error.h>

We recommend you to include `eb/eb.h' rather than `eb.h'.

   At compliation, you may have to give the `-I' option to the C
compiler, in order to specify the location of the header files.

     cc -I/usr/local/include -c sample.c

   At linkage, you have to add the `-leb' and `-lz' options (`-lz'
links zlib library) to the C compiler.  You may also have to give the
`-L' opions to the C compiler, in order to specify the location of EB
Library and zlib.  The library files are installed at `/usr/local/lib',
if you have installed EB Library under `/usr/local', and if you have
not change a directory for library files (`libdir') at the installation.

   Suppose that you have installed both EB Library and zlib library
files at `/usr/local/lib', the command line at linkage is like as this:

     cc sample.o -L/usr/local/lib -leb -lz

For more details, please read the manuals for your C preprocessor, C
compiler and linker.


File: eb.info,  Node: Configuration,  Next: Character Code,  Prev: Compilation,  Up: Link

Configuration
=============

   The header files in EB Library have some OS and site dependent
features listed as below.  You may have to configure your program about
the features.

`const'
     If the C compiler does not fully support the keyword `const',
     define `const' to be empty, like this:

          #define const

     If you are using Autoconf, add `AC_C_CONST' to your `configure.in'.

`off_t'
     If `off_t' is not defined, define `off_t' to be `long', like this:

          #define off_t long

     If you are using Autoconf, add `AC_TYPE_OFF_T' to your
     `configure.in'.

`size_t'
     If `size_t' is not defined, define `size_t' to be `unsigned', like
     this:

          #define size_t unsigned

     If you are using Autoconf, add `AC_TYPE_SIZE_T' to your
     `configure.in'.

`ssize_t'
     If `ssize_t' is not defined, define `ssize_t' to be `int', like
     this:

          #define ssize_t int

     If you are using Autoconf, add `AC_CHECK_TYPE(ssize_t, int)' to
     `configure.in'.  If your `configure.in' contains
     `AC_CONFIG_HEADER' or `AM_CONFIG_HEADER', also add the following
     lines to `acconfig.h':

          /* Define to `int' if <sys/types.h> doesn't define.  */
          #undef ssize_t


File: eb.info,  Node: Character Code,  Prev: Configuration,  Up: Link

Character Code Issue
====================

   In CD-ROM books, books of the EBG format are written in ISO 8859-1,
and others are written in JIS X 0208.  EB Library API (Application
Program Interface) uses ISO 8859-1 for EBG, but uses EUC-JP for other
books, not JIS X 0208.  When you give a Japanese string to an EB
Library funftion as an argument, the string must be written in EUC-JP,
and when you receive a Japanese string from an EB Library function, the
string is written in EUC-JP.

   However, the function `eb_rawtext()' doesn't follow the character
code rule.  It returns a string without any conversion.


File: eb.info,  Node: Initialization,  Next: Error Handling,  Prev: Link,  Up: Top

Initialization
**************

   In EB Library, all accesses to a CD-ROM book are done through a data
object of the `EB_Book' type.

     EB_Book book;

Of course, the space of the data object may be allocated by `malloc()':

     EB_Book *book_pointer;
     
     book_pointer = (EB_Book *) malloc(sizeof(EB_Book));

   Since contents of the `EB_Book' object (i.e. the contents of the
`book' variable, and the space refered by `book_pointer') have not
initialized yet, we initialize the object by the following way:

     eb_initialize(&book);
     eb_initialize(book_pointer);

Please note that an argument passed to `eb_initialize()' is a pointer
to a `EB_Book' object, not a `EB_Book' object itself.  Many functions
in EB Library take a pointer to `EB_Book' object as the first argument.

   Then, we bind the `EB_Book' object to a CD-ROM book entity.  It is
done by the function `eb_bind()'.

     (EB_Book object)            (CD-ROM book)
       +-------+             +-------------------+
       |       |  eb_bind()  |                   |
       |       |=============|    /mnt/cdrom     |
       +-------+             |                   |
                             +-------------------+

This is the sample source code of `eb_bind()':

     if (eb_bind(&book, "/mnt/cdrom") == -1) {
         fprintf(stderr, "failed to bind the book\n");
         exit(1);
     }

The path `/mnt/cdrom' is the top directory of the book where the file
`CATALOG' or `CATALOGS' resides.  When `eb_bind()' is failed, it
returns -1.  However, meaning of the return value are not important at
this point.  Details about error handling are described at *Note Error
Handling::.

   Contrary to `eb_bind()', `eb_clear()' undoes the binding.  When you
close a book, you must invoke `eb_clear()' to the `EB_Book' object
bound to the book.  A bound object opens some files and allocates
memories internally.  `eb_clear()' closes all opened files and release
all allocated memories.

     (EB_Book object)            (CD-ROM book)
       +-------+             +-------------------+
       |       |  eb_clear() |                   |
       |       |=           =|    /mnt/cdrom     |
       +-------+             |                   |
                             +-------------------+

This is the sample source code of `eb_clear()':

     eb_clear(&book);

A `EB_Book' object whose memories are allocated by `malloc()' can be
released by `free()' safely when the object is unbound.

* Menu:

* Compressed Book::             Compressed Book.
* Initialization Sample::       Sample Program.
* Initialization Data Types::   Data Types.
* Initialization Functions::    Functions.


File: eb.info,  Node: Compressed Book,  Next: Initialization Sample,  Prev: Initialization,  Up: Initialization

Compressed Book
===============

   EB Library can access a book compressed by the `ebzip' command.
Since the library automatically uncompress data, you don't have to be
aware of whether the bound book is compressed or not.

   (see *note Compression: (ebzip)Compression., for more details about
compression).


File: eb.info,  Node: Initialization Sample,  Next: Initialization Data Types,  Prev: Compressed Book,  Up: Initialization

Sample Program
==============

     /*
      * Filename:
      *     disctype.c
      *
      * Usage:
      *     disctype book-path
      *
      * Example:
      *     disctype /cdrom
      *
      * Description:
      *     This program shows disc type (EB/EBG/EBXA/EBXA-C/S-EBXA or
      *     EPWING) of a CD-ROM book.  `book-path' points to the top
      *     directory of the CD-ROM book where the file CATALOG or CATALOGS
      *     resides.
      */
     
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
     
     #include <stdio.h>
     
     #ifdef HAVE_STDLIB_H
     #include <stdlib.h>
     #endif
     
     #include <eb/eb.h>
     #include <eb/error.h>
     
     int
     main(argc, argv)
         int argc;
         char *argv[];
     {
         EB_Book book;
         EB_Disc_Code disc_code;
     
         /*
          * Check for command line arguments.
          */
         if (argc != 2) {
     	fprintf(stderr, "Usage: %s book-path\n", argv[0]);
     	exit(1);
         }
     
         /*
          * Initialize `book'.
          */
         eb_initialize(&book);
     
         /*
          * Bind a book.  Exit if it fails.
          */
         if (eb_bind(&book, argv[1]) == -1) {
     	fprintf(stderr, "%s: failed to bind the book: %s\n",
     	    argv[0], argv[1]);
     	exit(1);
         }
     
         /*
          * Show disc type.
          */
         disc_code = eb_disc_type(&book);
         fputs("disc type: ", stdout);
         if (disc_code == EB_DISC_EB) {
     	fputs("EB/EBG/EBXA", stdout);
         } else if (disc_code == EB_DISC_EPWING) {
     	fputs("WPING", stdout);
         } else {
     	fputs("unknown", stdout);
         }
         fputc('\n', stdout);
     
         /*
          * Clear the book.
          */
         eb_clear(&book);
     
         exit(0);
     }


File: eb.info,  Node: Initialization Data Types,  Next: Initialization Functions,  Prev: Initialization Sample,  Up: Initialization

Data Types
==========

   Please include `eb/eb.h' to use the data types described in this
section:

     #include <eb/eb.h>

 - Data type: EB_Book
     The data type `EB_Book' represents a CD-ROM book.  In EB Library,
     all accesses to the CD-ROM book are done through an object of this
     type.

 - Data type: EB_Disc_Code
     The data type `EB_Disc_Code' represents a format code of CD-ROM
     book.  `EB_DISC_EB' and `EB_DISC_EPWING' are currently defined as
     the format codes.  This type is defined from a signed integral
     type, so that you can compare two codes by the `==' and `!='
     binomial operators.

 - Data type: EB_Character_Code
     The `EB_Character_Code' type represents a character code used in a
     CD-ROM book.  `EB_CHARCODE_ISO8859_1' and `EB_CHARCODE_JISX0208'
     are currently defined as the character codes.  This type is
     defined from a signed integral type, so that you can compare two
     codes by the `==' and `!=' binomial operators.


File: eb.info,  Node: Initialization Functions,  Prev: Initialization Data Types,  Up: Initialization

Functions
=========

   Please include `eb/eb.h' to use the functions described in this
section:

     #include <eb/eb.h>

   (*note Error Handling:: for more details about error codes and the
global variable `eb_error').

 - Function: void eb_initialize (EB_Book *BOOK)
     The function `eb_initialize()' initializes an `EB_Book' object
     pointed by BOOK.  Each object must be initialized just once,
     before any other EB Library function is called to the object.

     Don't call another EB Library function to an uninitialized object.
     Don't call `eb_initialize()' twice to an object.  They may cause
     memory leak.

 - Function: int eb_bind (EB_Book *BOOK, const char *PATH)
     The function `eb_bind()' binds an `EB_Book' object pointed by BOOK
     to a CD-ROM book on PATH.  The path must points to the top
     directory of the book where the file `CATALOG' or `CATALOGS'
     resides.  If the path may not be started with slash (`/'), it is
     assumed that the path is relative to the current directory.  The
     empty path is assumed to be the current directory (`.').  If BOOK
     has already bound a book, this function unbinds it, and then binds
     the object to the book on PATH.

     If it succeeds to bind the object, it returns 0.  Otherwise, it
     returns -1, and sets `eb_errno'.  In this case, the object becomes
     unbound.

 - Function: void eb_suspend (EB_Book *BOOK)
     The function `eb_suspend()' unsets all "current" status in an
     `EB_Book' object; unsets the current subbook, current language,
     and current font height.  If the `EB_Book' object is unbound, or
     has already been suspended, this function does nothing.

 - Function: void eb_clear (EB_Book *BOOK)
     The function `eb_clear()' unbinds an `EB_Book' object pointed by
     BOOK.  All alocated memories kept in the object are released, and
     all file descriptors managed by the object are closed.  The
     function does nothing to an object which has already been unbound.
     To use the object again, you must call `eb_bind()' for it.

 - Function: int eb_is_bound (EB_Book *BOOK)
     The function `eb_is_bound()' examines whether BOOK is bound or not.
     If it is bound, this function returns 1.  Otherwise it returns 0,
     and it sets `eb_error' to `EB_ERR_UNBOUND_BOOK'.

 - Function: const char * eb_path (EB_Book *BOOK)
     The function `eb_path()' returns the path of the book bound to
     BOOK.  BOOK must have been bound beforehand.

     The returned path may be different from that specified at
     `eb_bind()', since the function always returns the path as
     "canonicalized" form.  The term "canonicalized" means:

        * If the relative path has specified at `eb_bind()', it is
          converted to the absolute path.

        * All the `/..' in the path specified at `eb_bind()' are
          converted to straight forms.

        * All the `/.' in the path specified at `eb_bind()' are deleted.

        * All successive slashes (e.g. `//') are unified.

        * One or more slashes at the tail of the path are removed.

     If succeeds, this function returns the path.  Otherwise, it
     returns -1 and sets `eb_error'.

 - Function: EB_Disc_Code eb_disc_type (EB_Book *BOOK)
     The function `eb_disc_type()' inspects the format type of BOOK.
     BOOK must have been bound beforehand.

     If the book is EB/EBG/EBXA/EBXA-C/S-EBXA, it returns `EB_DISC_EB'.
     If the book is EPWING, it returns `EB_DISC_EPWING'.  If this
     function fails, it returns -1 and sets `eb_error'.

 - Function: EB_Character_Code eb_character_code (EB_Book *BOOK)
     The function `eb_character_code()' inspects the character code in
     which BOOK is written.  BOOK must have been bound beforehand.

     If the book is written in ISO 8859-1, it returns
     `EB_CHARCODE_ISO8859_1'.  If the book is written in JIS X 0208, it
     returns `EB_CHARCODE_JISX0208'.  If this function fails, it
     returns -1 and sets `eb_error'.


File: eb.info,  Node: Error Handling,  Next: Subbook,  Prev: Initialization,  Up: Top

Error Handling
**************

   The functions in EB Library set the global variable `eb_error', when
they fail to accomplish a job.  The variable `eb_error' stores an error
code of the last error raised in EB Library functions.

   EB Library has error messages for all error codes.
`eb_error_message()' returns the error messages according to the
current value of `eb_error'.

     fprintf(stderr, "failed to bind a book, %s\n", eb_error_message());

   If `eb_error' has been set to `EB_ERR_TOO_LONG_FILENAME', it outputs
the following error message.

     failed to bind a book, too long filename.

* Menu:

* Tolerance to Error::          Tolerance to Error.
* Error Data Types::            Data Types.
* Error Variables::             Global Variables.
* Error Functions::             Functions.
* Error Codes::                 Error Codes.


File: eb.info,  Node: Tolerance to Error,  Next: Error Data Types,  Prev: Error Handling,  Up: Error Handling

Tolerance to Error
==================

   An `EB_Book' object has some state parameters.  Also whether the
object is "bound" to a CD-ROM book or not is one of the paramters.
Some of the functions which take a pointer to an `EB_Book' object as an
argument expect that a certain parameter of the referred object has
been set beforehand.  For example, `eb_path()' expects that the object
is "bound".

   What's happen if do you give the unbound object to `eb_path()'?

     EB_Book book;
     
     eb_initialize(&book);
     eb_path(&book);        /* What's happen? */

In this case, `eb_path()' returns `NULL' and sets `eb_error' to
`EB_ERR_UNBOUND_BOOK'.  Thus, EB library functions precisely reject
objects whose required parameter  is not set.

   However, the follwoing action makes your program abort.

     eb_path(NULL);    /* abort! */

EB Library functions doesn't inspect whether a pointer given as an
argument is `NULL', unless the function description says that it
accepts `NULL'.


File: eb.info,  Node: Error Data Types,  Next: Error Variables,  Prev: Tolerance to Error,  Up: Error Handling

Data Types
==========

   Please include `eb/error.h' to use the data types described in this
section:

     #include <eb/error.h>

 - Data type: EB_Error_Code
     The `EB_Error_Code' type represents an error code defined in EB
     Library.  EB Library defines `EB_NUM_ERRORS' error types.  This
     type is defined from a signed integral type, so that you can
     compare two codes by the `==' and `!=' binomial operators.


File: eb.info,  Node: Error Variables,  Next: Error Functions,  Prev: Error Data Types,  Up: Error Handling

Global Variables
================

   Please include `eb/error.h' to set and/or refer the variables
described in this section:

     #include <eb/error.h>

 - Variable: EB_Error_Code eb_error
     The functions in EB Library set the global variable `eb_error',
     when the function fails to accomplish a job.  The variable
     `eb_error' stores an error code of the last error raised in EB
     Library functions.

     The library functions never clears this variable, even when a job
     is accomplished without an error.  `eb_error' stores the latest
     error only.  When another error occurs, the library functions
     ovewrite this variable.  Also you may overwrite the variable in
     your program.


File: eb.info,  Node: Error Functions,  Next: Error Codes,  Prev: Error Variables,  Up: Error Handling

Functions
=========

   Please include `eb/error.h' to use the functions described in this
section:

     #include <eb/error.h>

 - Function: const char * eb_error_message (void)
     The function `eb_error_message()' returns the error message
     according to the current value of `eb_error'.  If `eb_error' is
     set to a valid error-code, it returns the corresponding error
     message.  Otherwise, it returns the string "unknown error".  The
     maximum length of the message is `EB_MAXLEN_ERROR_MESSAGE'.  This
     function never changes the value of `eb_error'.

 - Function: const char * eb_error_message2 (EB_Error_Code CODE)
     The function `eb_error_message2()' returns the error message
     according to the error code CODE.  If CODE represents a valid
     error-code, it returns the corresponding error message.
     Otherwise, it returns the string "unknown error".  The maximum
     length of the message is `EB_MAXLEN_ERROR_MESSAGE'.  This function
     never changes the value of `eb_error'.


File: eb.info,  Node: Error Codes,  Prev: Error Functions,  Up: Error Handling

Error Codes
===========

   EB Library defines the following error codes.  Please include
`eb/error.h' to use the error codes.

     #include <eb/error.h>

 - Constant: EB_NO_ERR
     No error occured.

 - Constant: EB_ERR_MEMORY_EXHAUSTED
     EB Library invoked `malloc()', but `NULL' was returned.

 - Constant: EB_ERR_EMPTY_FILENAME
     This error code is obsoleted.

 - Constant: EB_ERR_TOO_LONG_FILENAME
     `eb_bind()' or `eb_bind_appendix()' failed because the given
     filename was too long.

 - Constant: EB_ERR_TOO_LONG_WORD
     `eb_search_word()', `eb_search_endword()' or
     `eb_search_exactword()' failed because the given word was too long.

 - Constant: EB_ERR_BAD_WORD
     `eb_search_word()', `eb_search_endword()' or
     `eb_search_exactword()' failed because the given word had an
     invalid character.

 - Constant: EB_ERR_EMPTY_WORD
     `eb_search_word()', `eb_search_endword()' or
     `eb_search_exactword()' failed because the given word was empty.

 - Constant: EB_ERR_FAIL_GETCWD
     `getcwd()' or `getwd()' failed.

 - Constant: EB_ERR_FAIL_OPEN_CAT
     EB Library failed to open a `CATALOG' or `CATALOGS' file in a book.

 - Constant: EB_ERR_FAIL_OPEN_CATAPP
     EB Library failed to open a `CATALOG' or `CATALOGS' file in an
     appendix.

 - Constant: EB_ERR_FAIL_OPEN_LANG
     EB Library failed to open a `LANGUAGE' file in a book.

 - Constant: EB_ERR_FAIL_OPEN_START
     EB Library failed to open a `START' or `HONMON' file in a book.

 - Constant: EB_ERR_FAIL_OPEN_FONT
     EB Library failed to open a font file (files at `GAIJI' directory)
     in a book.

 - Constant: EB_ERR_FAIL_OPEN_APP
     EB Library failed to open an `APPENDIX' or `FUROKU' file in an
     appendix.

 - Constant: EB_ERR_FAIL_READ_CAT
     EB Library failed to read a `CATALOG' or `CATALOGS' file in an
     book.

 - Constant: EB_ERR_FAIL_READ_CATAPP
     EB Library failed to read a `CATALOG' or `CATALOGS' file in an
     appendix.

 - Constant: EB_ERR_FAIL_READ_LANG
     EB Library failed to read a `LANGUAGE' file in a book.

 - Constant: EB_ERR_FAIL_READ_START
     EB Library failed to read a `START' or `HONMON' file in a book.

 - Constant: EB_ERR_FAIL_READ_FONT
     EB Library failed to read a font file (files at `GAIJI' directory)
     in a book.

 - Constant: EB_ERR_FAIL_READ_APP
     EB Library failed to read an `APPENDIX' or `FUROKU' file in an
     appendix.

 - Constant: EB_ERR_FAIL_SEEK_CAT
     EB Library failed to seek a `CATALOG' or `CATALOGS' file in an
     book.

 - Constant: EB_ERR_FAIL_SEEK_CATAPP
     EB Library failed to seek a `CATALOG' or `CATALOGS' file in an
     appendix.

 - Constant: EB_ERR_FAIL_SEEK_LANG
     EB Library failed to seek a `LANGUAGE' file in a book.

 - Constant: EB_ERR_FAIL_SEEK_START
     EB Library failed to seek a `START' or `HONMON' file in a book.

 - Constant: EB_ERR_FAIL_SEEK_FONT
     EB Library failed to seek a font file (files at `GAIJI' directory)
     in a book.

 - Constant: EB_ERR_FAIL_SEEK_APP
     EB Library failed to seek an `APPENDIX' or `FUROKU' file in an
     appendix.

 - Constant: EB_ERR_UNEXP_CAT
     EB Library happened to meet an unexpected data in a `CATALOG' or
     `CATALOGS' file in a book.

 - Constant: EB_ERR_UNEXP_CATAPP
     EB Library happened to meet an unexpected data in a `CATALOG' or
     `CATALOGS' file in an appendix.

 - Constant: EB_ERR_UNEXP_LANG
     EB Library happened to meet an unexpected data in a `LANGUAGE'
     file in a book.

 - Constant: EB_ERR_UNEXP_START
     EB Library happened to meet an unexpected data in a `START' or
     `HONMON' file in a book.

 - Constant: EB_ERR_UNEXP_FONT
     EB Library happened to meet an unexpected data in a font file
     (files at `GAIJI' directory) in a book.

 - Constant: EB_ERR_UNEXP_APP
     EB Library happened to meet an unexpected data in an `APPENDIX' or
     `FUROKU' file in an appendix.

 - Constant: EB_ERR_UNBOUND_BOOK
     The invoked EB Library function requires a bound `EB_Book' object
     as an argument, but the given object was not bound.

 - Constant: EB_ERR_UNBOUND_APP
     The invoked EB Library function requires a bound `EB_Appendix'
     object as an argument,but the given object was not bound.

 - Constant: EB_ERR_NO_LANG
     The book had no language data.

 - Constant: EB_ERR_NO_SUB
     The book had no subbook.

 - Constant: EB_ERR_NO_APPSUB
     The appendix had no subbook.

 - Constant: EB_ERR_NO_MSG
     The current language in a book had no message.

 - Constant: EB_ERR_NO_FONT
     The current subbook in a book had no font.

 - Constant: EB_ERR_NO_START
     The current subbook in a book didn't have a `START' nor `HONMON'
     file.

 - Constant: EB_ERR_NO_CUR_LANG
     The invoked function requires that an `EB_Book' object given as an
     argument had set the current language, but the given book didn't
     not set it.

 - Constant: EB_ERR_NO_CUR_SUB
     The invoked function requires that an `EB_Book' object given as an
     argument had set the current subbook, but the given book didn't
     set it.

 - Constant: EB_ERR_NO_CUR_APPSUB
     The invoked function requires that an appendix given as an
     argument had set the current subbook, but the given appendix
     didn't set it.

 - Constant: EB_ERR_NO_CUR_FONT
     The invoked function requires that an `EB_Book' object given as an
     argument had set the current font height, but the given book
     didn't set it.

 - Constant: EB_ERR_NO_SUCH_LANG
     An `EB_Book' object and a language code were given to a function,
     but the bound book didn't have the language with the code.

 - Constant: EB_ERR_NO_SUCH_SUB
     An `EB_Book' object and a subbook code were given to a function,
     but the bound book didn't have the subbook with the code.

 - Constant: EB_ERR_NO_SUCH_APPSUB
     An `EB_Appendix' object and a subbook code were given to a
     function, but the bound appendix didn't have the subbook with the
     code.

 - Constant: EB_ERR_NO_SUCH_MSG
     An `EB_Book' object and a message code were given to a function,
     but the currnet language of the bound book the object didn't have
     the message with the code.

 - Constant: EB_ERR_NO_SUCH_FONT
     An `EB_Book' object and a font ehgiht were given to a function,
     but the currnet subbook of the bound book didn't have the font
     with the height.

 - Constant: EB_ERR_NO_SUCH_CHAR_BMP
     An `EB_Book' object and a character number was given to a function,
     but the current subbook of the bound book didn't have bitmap data
     of the character number.

 - Constant: EB_ERR_NO_SUCH_CHAR_TEXT
     An `EB_Appendix' object and a character number was given to a
     function, but the current subbook of the bound appendix didn't have
     an alternation string of the character number.

 - Constant: EB_ERR_NO_SUCH_SEARCH
     `eb_search_word()', `eb_search_endword()' or
     `eb_search_exactword()' failed because the book didn't support the
     search method.

 - Constant: EB_ERR_NO_SUCH_HOOK
     An invalid hook code was given to a function.

 - Constant: EB_ERR_HOOK_WORKSPACE
     An hook function returned -1.

 - Constant: EB_ERR_DIFF_CONTENT
     A continuation of getting text contetns was requested, but the
     content type was different from that given at the previous call.

 - Constant: EB_ERR_DIFF_SUBBOOK
     The `EB_Book' object was given to `eb_hit_list()', `eb_heading()',
     `eb_rawtext()' or `eb_text()', but the current subbook was
     different from that given at the previous call.

 - Constant: EB_ERR_DIFF_BOOK
     The `EB_Book' object was given to `eb_hit_list()', `eb_heading()',
     `eb_rawtext()' or `eb_text()', but the object was different from
     that given at the previous call.

 - Constant: EB_ERR_NO_PREV_SEARCH
     You invoked `eb_hit_list()', but you had not invoked
     `eb_search_word()', `eb_search_endword()' nor
     `eb_search_exactword()' beforehand.

 - Constant: EB_ERR_NO_PREV_CONTENT
     You invoked `eb_text()', `eb_heading()' or `eb_rawtext()' but you
     had not invoked `eb_seek()' beforehand.

 - Constant: EB_ERR_NO_SUCH_MULTI_ID
     An `EB_Book' object and a multi search code was given to a
     function, but the current subbook of the bound book didn't have a
     multi search with the code.

 - Constant: EB_ERR_NO_SUCH_ENTRY_ID
     An `EB_Book' object and a mulit search entry code was given to a
     function, but the current subbook of the bound book didn't have a
     multi search entry with the code.


File: eb.info,  Node: Subbook,  Next: Search Basics,  Prev: Error Handling,  Up: Top

Subbook
*******

   A CD-ROM book usually has some "subbooks".  For example, a certain
CD-ROM book has three subbooks; Japanese dictionary, English dictinary
and Encyclopedia.  Each subbook itself is an independent "book".

                (CD-ROM book)
     +---------------------------------+
     | [Japanese Dicctionary](subbook) |
     |                                 |
     | [English Dicctionary] (subbook) |
     |                                 |
     | [Encyclopedia]        (subbook) |
     +---------------------------------+

EB Library assigns a "subbook code" to each subbook.  EB Library uses
the code to identify a subbook, so that each subbook code is unique in
a book.  The type `EB_Subbook_Code' represents the subbook code.
`eb_subbook_list()' returns a list of subbook codes of all subbooks in
a book.  The following source code is an example of `eb_subbook_list()'.

     /* It assumes that `book' is a variable of `EB_Book' and */
     /* it has already been bound to a book.                  */
     EB_Subbook_Code subbook_codes[EB_MAX_SUBBOOKS];
     int count, i;
     
     count = eb_subbook_list(&book, subbook_codes);
     if (count == -1) {
         fprintf(stderr, "failed to get a subbook list, %s\n",
             eb_error_message());
     }

   If `eb_subbook_list()' succeeds, the subbook list is stored into
`subbook_codes'.  The subbook code of the first subbook in the list is
represented as `subbook_codes[0]', the next code is represented as
`subbook_codes[1]', and so on.  The last code is represented as
`subbook_codes[count -1]', because `eb_subbook_list()' returns the
number of subbooks in the book.  For example, you can get the title of
the first subbook by the following way.

     title = eb_subbook_title2(&book, subbook_codes[0]);

* Menu:

* Current Subbook::             Current Subbook.
* Subbook Sample::              Sample Program.
* Subbook Data Types::          Data Types.
* Subbook Functions::           Functions.


File: eb.info,  Node: Current Subbook,  Next: Subbook Sample,  Prev: Subbook,  Up: Subbook

Current Subbook
===============

   Only one subbook may becomes the "current subbook" in a book at the
same time.  Most operations, such as searching a word and getting text,
are permitted to the current subbook only.  The function
`eb_set_subbook()' sets the current subbook to the specified subbook.

     (EB_Book object)                        (CD-ROM book)
       +-------+                  +---------------------------------+
       |current|                  | [Japanese Dicctionary](subbook) |
       |subbook| eb_set_subbook() |                                 |
       |   *----------------------->[English Dicctionary] (subbook) |
       |       |                  |                                 |
       +-------+                  | [Encyclopedia]        (subbook) |
                                  +---------------------------------+

At the initial state, no subbok is selected as the current subbook.

   `eb_set_subbook()' takes a subbook code as an argument.  If the
function succeeds, the subbook of the code is set to the current
subbook.  The following source code is an example of `eb_set_subbook()'.

     /* It assumes that `book' is a variable of `EB_Book' and */
     /* it has already been bound to a book.                  */
     EB_Subbook_Code subbook_codes[EB_MAX_SUBBOOKS];
     int count, i;
     
     count = eb_subbook_list(&book, subbook_codes);
     if (count == -1) {
         /* eb_subbook_list() is failed */
     }
     
     for (i = 0; i < count; i++) {
         if (eb_set_subbook(&book, subbook_codes[i]) == -1) {
             /* eb_set_subbook() is failed */
         }
     }


File: eb.info,  Node: Subbook Sample,  Next: Subbook Data Types,  Prev: Current Subbook,  Up: Subbook

Sample Program
==============

     /*
      * Filename:
      *     subbook.c
      *
      * Usage:
      *     subbook book-path
      *
      * Example:
      *     subbook /cdrom
      *
      * Description:
      *     This program shows titles of subbooks in a book.
      *     `book-path' points to the top directory of the CD-ROM book
      *     where the file CATALOG or CATALOGS resides.
      */
     
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
     
     #include <stdio.h>
     
     #ifdef HAVE_STDLIB_H
     #include <stdlib.h>
     #endif
     
     #include <eb/eb.h>
     #include <eb/error.h>
     
     int
     main(argc, argv)
         int argc;
         char *argv[];
     {
         EB_Book book;
         EB_Subbook_Code sublist[EB_MAX_SUBBOOKS];
         int subcount;
         const char *title;
         int i;
     
         /*
          * Check for command line arguments.
          */
         if (argc != 2) {
     	fprintf(stderr, "Usage: %s book-path\n", argv[0]);
     	exit(1);
         }
     
         /*
          * Initialize `book'.
          */
         eb_initialize(&book);
     
         /*
          * Bind a book to `book'.
          */
         if (eb_bind(&book, argv[1]) == -1) {
     	fprintf(stderr, "%s: failed to bind the book, %s: %s\n",
     	    argv[0], eb_error_message(), argv[1]);
     	exit(1);
         }
     
         /*
          * Get the subbook list.
          */
         subcount = eb_subbook_list(&book, sublist);
         if (subcount < 0) {
     	fprintf(stderr, "%s: failed to get the subbbook list, %s\n",
     	    argv[0], eb_error_message());
     	eb_clear(&book);
     	exit(1);
         }
     
         /*
          * Output titles of subbooks in the book.
          */
         for (i = 0; i < subcount; i++) {
     	title = eb_subbook_title2(&book, sublist[i]);
     	if (title == NULL) {
     	    fprintf(stderr, "%s: failed to get the title, %s\n",
     		argv[0], eb_error_message());
     	    continue;
     	}
     	printf("%d: %s\n", i, title);
         }
     
         /*
          * Clear the book.
          */
         eb_clear(&book);
     
         exit(0);
     }


File: eb.info,  Node: Subbook Data Types,  Next: Subbook Functions,  Prev: Subbook Sample,  Up: Subbook

Data Types
==========

   Please include `eb/eb.h' to use the data types described in this
section:

     #include <eb/eb.h>

 - Data type: EB_Subbook_Code
     The `EB_Subbook_Code' data type represents a subbook code.  Each
     subbook in a book has an unique subbook code.  This type is
     defined from a signed integral type, so that you can compare two
     codes by the `==' and `!=' binomial operators.


File: eb.info,  Node: Subbook Functions,  Prev: Subbook Data Types,  Up: Subbook

Functions
=========

   Please include `eb/eb.h' to use the functions described in this
section:

     #include <eb/eb.h>

 - Function: int eb_initialize_all_subbooks (EB_Book *BOOK)
     The function `eb_initialize_all_subbooks()' initializes all
     subbooks in BOOK.  BOOK must have been bound beforehand.

     Usually, initialization of a subbook is done at the first time the
     subbook is set as the current subbook.  The function does the
     initialization in advance.  This function is usuful for standalone
     server applications.  Call `eb_initialize_all_subbooks()' before
     accepting connections from clients.  When a connected client
     requests to set a subbook, the server can respond to the request
     faster than usual because the initialization of the subbook has
     already been done.

     If succeeds, it returns the number of subbooks in BOOK.
     Otherwise, it returns -1 and sets `eb_error'.  This function never
     changes the current subbook of BOOK.

 - Function: int eb_subbook_count (EB_Book *BOOK)
     The function `eb_subbook_count()' gets the number of subbooks in
     BOOK.  BOOK must have been bound beforehand.

     If succeeds, it returns the number of subbooks.  Otherwise, it
     returns -1 and sets `eb_error'.

 - Function: int eb_subbook_list (EB_Book *BOOK, EB_Subbook_Code *LIST)
     The function `eb_subbook_list()' makes a list of the subbook codes
     of the subbooks in BOOK.  BOOK must have been bound beforehand.
     This function puts the generated list into LIST as an array of
     `EB_Subbook_Code'.  The array contains `EB_MAX_SUBBOOKS' elements
     maximum.

     If succeeds, it returns the number of subbooks in BOOK.
     Otherwise, it returns -1 and sets `eb_error'.

 - Function: EB_Subbook_Code eb_subbook (EB_Book *BOOK)
     The function `eb_subbook()' gets the subbook code of the current
     subbook of BOOK.  The current subbook of BOOK must have been set
     beforehand.

     If succeeds, it returns the number of subbooks in BOOK.
     Otherwise, it returns -1 and sets `eb_error'.

 - Function: const char * eb_subbook_title (EB_Book *BOOK)
     The function `eb_subbook_title()' gets the title of the current
     subbook of BOOK.  The current subbook of BOOK must have been set
     beforehand.  The length of the title string is `EB_MAXLEN_TITLE'
     maximum.  The length doesn't count the terminating NUL character.
     The title is written in EUC-JP or ISO 8859-1.

     If succeeds, it returns the title (e.g. "English Japanese
     Dictionary").  Otherwise, it returns `NULL' and sets `eb_error'.

     Please note that the title returned from this function is a
     constant string kept in BOOK.  When BOOK becomes unbound (i.e.
     call `eb_clear' for BOOK), also the title string is destroyed.
     Accordingly, you must not refer to the title in the unbound book.

 - Function: const char * eb_subbook_title2 (EB_Book *BOOK,
          EB_Subbook_Code CODE)
     The function `eb_subbook_title2()' is the same as
     `eb_subbook_title()', except that it returns the title of the
     subbook specified at the argument CODE.  The current subbook of
     BOOK may be unset, but BOOK must have been bound beforehand.

 - Function: const char * eb_subbook_directory (EB_Book *BOOK)
     The function `eb_subbook_directory()' gets the directory name of
     the current subbook of BOOK.  The current subbook of BOOK must
     have been set beforehand.  All files which belong to the current
     subbook are resides under the directory relative to the top
     directory of the CD-ROM book.  The length of the directory name is
     `EB_MAXLEN_BASENAME' maximum.  The length doesn't count the
     terminating NUL character.  The directory name consists of `d'
     characters (space, digit, upper case letter, and underscore)
     defined in ISO 9660.

     If succeeds, it returns the directory name (e.g. "JPDICT").
     Otherwise, it returns `NULL' and sets `eb_error'.

     Please note that the directory name returned from this function is
     a constant string kept in BOOK.  When BOOK becomes unbound (i.e.
     call `eb_clear' for BOOK), also the directory name is destroyed.
     Accordingly, you must not refer to the directory name in the
     unbound book.

 - Function: const char * eb_subbook_directory2 (EB_Book *BOOK,
          EB_Subbook_Code CODE)
     The function `eb_subbook_directory2()' is the same as
     `eb_subbook_directory()', except that it returns the directory name
     of the subbook specified at the argument CODE.  The current
     subbook of BOOK may be unset, but BOOK must have been bound
     beforehand.

 - Function: int eb_set_subbook (EB_Book *BOOK, EB_Subbook_Code CODE)
     The function `eb_set_subbook()' sets the current subbook of BOOK
     to CODE.  BOOK must have been bound beforehand.  When the current
     subbook has already been set to the specified subbook, this
     function unsets the current subbook, and then it sets the current
     subbook to CODE.

     If succeeds, it returns 0.  Otherwise, it returns -1, sets
     `eb_error', and unsets the current subbook.

 - Function: void eb_unset_subbook (EB_Book *BOOK)
     The function `eb_unset_subbook()' unsets the current subbook of
     BOOK.  If BOOK is unbound, or if the current subbook has not been
     set, this function does nothing.


File: eb.info,  Node: Search Basics,  Next: Word Search,  Prev: Subbook,  Up: Top

Search Basics
*************

   Search is most significant function in CD-ROM book.  The following
search methos are currently defined:

word search
     Search for entires whose heads are matched to the given word.

end-word search
     Search for entires whose tails are matched to the given word.

exact-word search
     Search for entires that matches exactly to the given word.

keyword search
multi search
     Search for entires related to the given keywords.  (EB Library
     doesn't support these methods yet.)

graphic search
     Clickable image map.  (EB Library doesn't support this method yet.)

menu search
     Menu.


File: eb.info,  Node: Word Search,  Next: Index,  Prev: Search Basics,  Up: Top

Word, End-Word, Exact-Word Searches
***********************************

   Word search, end-word search, and exact-word search are search
methods to search the current subbook for entires matched to the given
word.  Word search looks for entires whose heads are matched to the
given word.  End-word search looks for entires whose tails are matched
to the given word.  Exact-word search looks for entires that matches
exactly to the given word.

   The following is an example of word search.  It searches for entries
beginning with `librar'.

     #define MAX_HITS    50
     
     /* It assumes that `book' is a variable of `EB_Book' and */
     /* it has already set the current subbook.               */
     EB_Hit hits[MAX_HITS];
     int hitcount;
     
     if (eb_search_word(&book, "librar") == -1) {
         fprintf(stderr, "an error occurs.\n");
         exit(1);
     }
     hitcount = eb_hit_list(&book, hits, MAX_HITS);
     if (hitcount == -1) {
         fprintf(stderr, "an error occurs.\n");
         exit(1);
     }

The function `eb_search_word()' requests a word search.  But, the
function doesn't return a hit entry.  It is done by `eb_hit_list()'.
`eb_hit_list()' records hit entries onto `hits', and it returns the
number of hit entries recorded onto `hits'.  In this example,
`eb_hit_list()' gets `MAX_HITS' (= 50) entries maximum.

   If the current subbook is English dictionary, we will get at least
two entries; `library' and `librarian'.

     +-------------+-------------+---
     | (librarian) |  (library)  |
     +-------------+-------------+---
         hits[0]       hits[1]

(The order of the `library' and `librarian' entries may be different
from the above picture.)

   Each element in `hits' holds positions of "heading" and "text" of
the hit entry.

                          heading
                        +-----------+
                   +--->| librarian |
     +----------+  |    +-----------+
     | heading ----+      text
     |          |       +-------------------------------------+
     |    text -------->| librarian                           |
     +----------+       | n. (1) A person who is a specialist |
        hits[0]         | in library work. (2) ...            |
                        +-------------------------------------+

In other words, the element doesn't have heading and text themselves.
This chapter doesn't explain how to get heading and text.

* Menu:

* Get Remained Entries::        Get Remained Entries.
* Word Search Data Types::      Data Types.
* Word Search Functions::       Functions.


File: eb.info,  Node: Get Remained Entries,  Next: Word Search Data Types,  Prev: Word Search,  Up: Word Search

Get Remained Entries
====================

   As mentioned before, the second argument to `eb_hit_list()' is the
maximum number of hit entries to be gotten.  In the following example,
we get only `MAX_HITS' entries maximum, even if more entries are
matched:

     hitcount = eb_hit_list(&book, hits, MAX_HITS);

To get the remained entries, please invoke `eb_hit_list()' repeatedly
until it returns 0:

     for (;;) {
         hitcount = eb_hit_list(&book, hits, MAX_HITS);
         if (hitcount == 0) {
             break;
         } else if (hitcount == -1) {
             fprintf(stderr, "an error occurs.\n");
             exit(1);
         }
         /* show headings of hit entires */
     }

   However, the actions described below reset internal repetition status
of `eb_hit_list()'.  After the reset, you cannot get the remained
entires any longer.

   * Call one of the following functions for the `EB_Book' object.
        - `eb_set_subbook()'

        - `eb_unset_subbook()'

        - `eb_set_all_subbooks()'

        - `eb_bind()'

        - `eb_clear()'

        - `eb_suspend()'

   * Call one of the following functions for _any_ `EB_Book' object.
        - `eb_search_word()'

        - `eb_search_endword()'

        - `eb_search_exactword()'

        - Call one of the following functions for another `EB_Book'
          object.

        - `eb_hit_list()' (see below)

If you invoke `eb_hit_list()' for an `EB_Book' object different from
that specified at the previous call, an error occurs.  In this case,
the function returns -1 and it sets `eb_error'.

   The internal repetition status is also reset when `eb_hit_list()'
fails (i.e. it returns -1).


File: eb.info,  Node: Word Search Data Types,  Next: Word Search Functions,  Prev: Get Remained Entries,  Up: Word Search

Data Types
==========

   Please include `eb/eb.h' to use the data types described in this
section:

     #include <eb/eb.h>

 - Data type: EB_Hit
     The data type `EB_Hit' represents a hit entry of the search.  This
     data type is defined as:

          typedef struct {
              EB_Position heading;
              EB_Position text;
          } EB_Hit;

     You may access and set the members in this type directly.

 - Data type: EB_Position
     The data type `EB_Position' represents a position in subbook
     contents.  This data type is defined as:

          typedef struct {
              int page;
              int offset;
          } EB_Position;

     You may access and set the members in this type directly.


File: eb.info,  Node: Word Search Functions,  Prev: Word Search Data Types,  Up: Word Search

Functions
=========

   Please include `eb/eb.h' to use the functions described in this
section:

     #include <eb/eb.h>

 - Function: int eb_have_exactword_search (EB_Book *BOOK)
     The function `eb_have_exactword_search()' returns 1 if the current
     subbook of BOOK has the exact word search method.  It returns 0
     and sets `eb_error' to `EB_ERR_NO_SUCH_SEARCH' if the current
     subbook doesn't have the method, or if the current subbook is not
     set.

 - Function: int eb_search_exactword (EB_Book *BOOK, const char
          *INPUTWORD)
     The function `eb_search_exactword()' searches the current subbook
     of BOOK for entries matched exactly to INPUTWORD.  The current
     subbook must have been set beforehand.  The INPUTWORD must be
     written in EUC-JP or ISO 8859-1 according with the character code
     of BOOK.

     This function only sends a search request to EB Library.  It
     doesn't return a hit entires.  Hit entries are gotten by
     `eb_hit_list()'.

     If succeeds, it returns 0.  Otherwise, it returns -1, and sets
     `eb_error'.  subbook.

 - Function: int eb_have_word_search (EB_Book *BOOK)
     The function `eb_have_word_search()' returns 1 if the current
     subbook of BOOK has the word search method.  It returns 0 and sets
     `eb_error' to `EB_ERR_NO_SUCH_SEARCH' if the current subbook
     doesn't have the method, or if the current subbook is not set.

 - Function: int eb_search_word (EB_Book *BOOK, const char *INPUTWORD)
     The function `eb_search_word()' searches the current subbook of
     BOOK for entries whose heads are matched to INPUTWORD.  The
     current subbook must have been set beforehand.  The INPUTWORD may
     be written in EUC-JP or ISO 8859-1 according with the character
     code of BOOK.

     This function only sends a search request to EB Library.  It
     doesn't return a hit entires.  Hit entries are gotten by
     `eb_hit_list()'.

     If succeeds, it returns 0.  Otherwise, it returns -1, and sets
     `eb_error'.

 - Function: int eb_have_endword_search (EB_Book *BOOK)
     The function `eb_have_endword_search()' returns 1 if the current
     subbook of BOOK has the end word search method.  It returns 0 and
     sets `eb_error' to `EB_ERR_NO_SUCH_SEARCH' if the current subbook
     doesn't have the method, or if the current subbook is not set.

 - Function: int eb_search_endword (EB_Book *BOOK, const char
          *INPUTWORD)
     The function `eb_endsearch_word()' searches the current subbook of
     BOOK for entries whose tails are matched to INPUTWORD.  The
     INPUTWORD may be written in EUC-JP or ISO 8859-1 according with
     the character code of BOOK.

     This function only sends a search request to EB Library.  It
     doesn't return a hit entires.  Hit entries are gotten by
     `eb_hit_list()'.

     If succeeds, it returns 0.  Otherwise, it returns -1, and sets
     `eb_error'.  subbook.

 - Function: int eb_hit_list (EB_Book *BOOK, EB_Hit *HITS, int MAXHITS)
     The function `eb_hit_list()' gets hit entries of
     `eb_search_exactword()', `eb_search_word()', or
     `eb_search_endword()' that was called beforehand.  Accordingly,
     you must have call one of these function successfully before call
     this function.  Otherwise, this function fails.

     BOOK passed to `eb_hit_list()' and passed to
     `eb_search_exactword()' (or `eb_search_word()' or
     `eb_search_endword()') must be the same.  This function fails if
     you give a different `EB_Book' object to `eb_hit_list()'.

     `eb_hit_list()' puts MAXHITS hit entries maximum into HITS.  If
     `eb_hit_list()' finds more hit entries, it gets first MAXHITS
     entries.  You can get remained entries by invoking `eb_hit_list()'
     repeatedly until it returns 0 (*note Get Remained Entries::).

     If succeeds, this function returns the number of entries recorded
     onto HITS.  Otherwise, it returns -1, and sets `eb_error'.


File: eb.info,  Node: Index,  Prev: Word Search,  Up: Top

Index
*****

* Menu:

* Data Type Index::             Data Type Index.
* Function Index::              Function Index.
* Variable Index::              Variable and Constant Index.
* Program Index::               Sample Program Index.


File: eb.info,  Node: Data Type Index,  Next: Function Index,  Prev: Index,  Up: Index

Data Type Index
===============

* Menu:

* EB_Book:                               Initialization Data Types.
* EB_Character_Code:                     Initialization Data Types.
* EB_Disc_Code:                          Initialization Data Types.
* EB_Error_Code:                         Error Data Types.
* EB_Hit:                                Word Search Data Types.
* EB_Position:                           Word Search Data Types.
* EB_Subbook_Code:                       Subbook Data Types.


File: eb.info,  Node: Function Index,  Next: Variable Index,  Prev: Data Type Index,  Up: Index

Function Index
==============

* Menu:

* eb_bind:                               Initialization Functions.
* eb_character_code:                     Initialization Functions.
* eb_clear:                              Initialization Functions.
* eb_disc_type:                          Initialization Functions.
* eb_error_message:                      Error Functions.
* eb_error_message2:                     Error Functions.
* eb_have_endword_search:                Word Search Functions.
* eb_have_exactword_search:              Word Search Functions.
* eb_have_word_search:                   Word Search Functions.
* eb_hit_list:                           Word Search Functions.
* eb_initialize:                         Initialization Functions.
* eb_initialize_all_subbooks:            Subbook Functions.
* eb_is_bound:                           Initialization Functions.
* eb_path:                               Initialization Functions.
* eb_search_endword:                     Word Search Functions.
* eb_search_exactword:                   Word Search Functions.
* eb_search_word:                        Word Search Functions.
* eb_set_subbook:                        Subbook Functions.
* eb_subbook:                            Subbook Functions.
* eb_subbook_count:                      Subbook Functions.
* eb_subbook_directory:                  Subbook Functions.
* eb_subbook_directory2:                 Subbook Functions.
* eb_subbook_list:                       Subbook Functions.
* eb_subbook_title:                      Subbook Functions.
* eb_subbook_title2:                     Subbook Functions.
* eb_suspend:                            Initialization Functions.
* eb_unset_subbook:                      Subbook Functions.


File: eb.info,  Node: Variable Index,  Next: Program Index,  Prev: Function Index,  Up: Index

Variable and Constatnt Index
============================

* Menu:

* EB_CHARCODE_ISO8859_1:                 Initialization Data Types.
* EB_CHARCODE_JISX0208:                  Initialization Data Types.
* EB_DISC_EB:                            Initialization Data Types.
* EB_DISC_EPWING:                        Initialization Data Types.
* EB_ERR_BAD_WORD:                       Error Codes.
* EB_ERR_DIFF_BOOK:                      Error Codes.
* EB_ERR_DIFF_CONTENT:                   Error Codes.
* EB_ERR_DIFF_SUBBOOK:                   Error Codes.
* EB_ERR_EMPTY_FILENAME:                 Error Codes.
* EB_ERR_EMPTY_WORD:                     Error Codes.
* EB_ERR_FAIL_GETCWD:                    Error Codes.
* EB_ERR_FAIL_OPEN_APP:                  Error Codes.
* EB_ERR_FAIL_OPEN_CAT:                  Error Codes.
* EB_ERR_FAIL_OPEN_CATAPP:               Error Codes.
* EB_ERR_FAIL_OPEN_FONT:                 Error Codes.
* EB_ERR_FAIL_OPEN_LANG:                 Error Codes.
* EB_ERR_FAIL_OPEN_START:                Error Codes.
* EB_ERR_FAIL_READ_APP:                  Error Codes.
* EB_ERR_FAIL_READ_CAT:                  Error Codes.
* EB_ERR_FAIL_READ_CATAPP:               Error Codes.
* EB_ERR_FAIL_READ_FONT:                 Error Codes.
* EB_ERR_FAIL_READ_LANG:                 Error Codes.
* EB_ERR_FAIL_READ_START:                Error Codes.
* EB_ERR_FAIL_SEEK_APP:                  Error Codes.
* EB_ERR_FAIL_SEEK_CAT:                  Error Codes.
* EB_ERR_FAIL_SEEK_CATAPP:               Error Codes.
* EB_ERR_FAIL_SEEK_FONT:                 Error Codes.
* EB_ERR_FAIL_SEEK_LANG:                 Error Codes.
* EB_ERR_FAIL_SEEK_START:                Error Codes.
* EB_ERR_HOOK_WORKSPACE:                 Error Codes.
* EB_ERR_MEMORY_EXHAUSTED:               Error Codes.
* EB_ERR_NO_APPSUB:                      Error Codes.
* EB_ERR_NO_CUR_APPSUB:                  Error Codes.
* EB_ERR_NO_CUR_FONT:                    Error Codes.
* EB_ERR_NO_CUR_LANG:                    Error Codes.
* EB_ERR_NO_CUR_SUB:                     Error Codes.
* EB_ERR_NO_FONT:                        Error Codes.
* EB_ERR_NO_LANG:                        Error Codes.
* EB_ERR_NO_MSG:                         Error Codes.
* EB_ERR_NO_PREV_CONTENT:                Error Codes.
* EB_ERR_NO_PREV_SEARCH:                 Error Codes.
* EB_ERR_NO_START:                       Error Codes.
* EB_ERR_NO_SUB:                         Error Codes.
* EB_ERR_NO_SUCH_APPSUB:                 Error Codes.
* EB_ERR_NO_SUCH_CHAR_BMP:               Error Codes.
* EB_ERR_NO_SUCH_CHAR_TEXT:              Error Codes.
* EB_ERR_NO_SUCH_ENTRY_ID:               Error Codes.
* EB_ERR_NO_SUCH_FONT:                   Error Codes.
* EB_ERR_NO_SUCH_HOOK:                   Error Codes.
* EB_ERR_NO_SUCH_LANG:                   Error Codes.
* EB_ERR_NO_SUCH_MSG:                    Error Codes.
* EB_ERR_NO_SUCH_MULTI_ID:               Error Codes.
* EB_ERR_NO_SUCH_SEARCH:                 Error Codes.
* EB_ERR_NO_SUCH_SUB:                    Error Codes.
* EB_ERR_TOO_LONG_FILENAME:              Error Codes.
* EB_ERR_TOO_LONG_WORD:                  Error Codes.
* EB_ERR_UNBOUND_APP:                    Error Codes.
* EB_ERR_UNBOUND_BOOK:                   Error Codes.
* EB_ERR_UNEXP_APP:                      Error Codes.
* EB_ERR_UNEXP_CAT:                      Error Codes.
* EB_ERR_UNEXP_CATAPP:                   Error Codes.
* EB_ERR_UNEXP_FONT:                     Error Codes.
* EB_ERR_UNEXP_LANG:                     Error Codes.
* EB_ERR_UNEXP_START:                    Error Codes.
* eb_error:                              Error Variables.
* EB_MAX_SUBBOOKS:                       Subbook Functions.
* EB_MAXLEN_BASENAME:                    Subbook Functions.
* EB_MAXLEN_ERROR_MESSAGE:               Error Functions.
* EB_MAXLEN_TITLE:                       Subbook Functions.
* EB_NO_ERR:                             Error Codes.
* EB_NUM_ERRORS:                         Error Data Types.


File: eb.info,  Node: Program Index,  Prev: Variable Index,  Up: Index

Sample Program Index
====================

* Menu:

* disctype.c:                            Initialization Sample.
* subbook.c:                             Subbook Sample.



Tag Table:
Node: Top1012
Node: Introduction2822
Node: Link3861
Node: Compilation4233
Node: Configuration5687
Node: Character Code7021
Node: Initialization7709
Node: Compressed Book10458
Node: Initialization Sample10884
Node: Initialization Data Types12858
Node: Initialization Functions13985
Node: Error Handling18077
Node: Tolerance to Error19014
Node: Error Data Types20120
Node: Error Variables20663
Node: Error Functions21488
Node: Error Codes22613
Node: Subbook31188
Node: Current Subbook33259
Node: Subbook Sample34984
Node: Subbook Data Types37278
Node: Subbook Functions37799
Node: Search Basics43256
Node: Word Search43976
Node: Get Remained Entries46632
Node: Word Search Data Types48422
Node: Word Search Functions49282
Node: Index53335
Node: Data Type Index53631
Node: Function Index54218
Node: Variable Index56058
Node: Program Index60145

End Tag Table
