+
+ B*n *\lceil (d + 7)/8 \rceil if d>1
+
+ \right.
+
+
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+
+
+This function initiates aquisition of an image from the device
+represented by handle h.
+
+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_DEVICE_BUSY:
- The device is busy. The
+ operation should be retried later.
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_INVAL:
- The scan cannot be started with the current
+ set of options. The frontend should reload the option descriptors, as if
+ SANE_INFO_RELOAD_OPTIONS had been returned from a call to
+ sane_control_option(), since the device's capabilities may have
+ changed.
+
+
+
+
+
+This function is used to read image data from the device represented
+by handle h. Argument buf is a pointer to a memory area
+that is at least maxlen bytes long. The number of bytes
+returned is stored in *len. A backend must set this to zero
+when a status other than SANE_STATUS_GOOD is returned.
+When the call succeeds, the number of bytes returned can be anywhere in
+the range from 0 to maxlen bytes.
+
+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+
+
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle h.
+
+- If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+
- If the device is in non-blocking I/O mode, the call returns
+ immediately with status SANE_STATUS_GOOD and with
+ *len set to zero.
+
+The I/O mode of handle h can be set via a call to
+sane_set_io_mode().
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_EOF:
- No more data is available for the
+ current frame.
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the device has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+h.
+
+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does not imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been initiated. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of SANE_STATUS_CANCELLED). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must not call any other operation until the
+cancelled operation has returned.
+
+
+
+This function is used to set the I/O mode of handle h. The I/O mode
+can be either blocking or non-blocking. If argument m is
+SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to
+blocking mode. This function can be called only after a call to
+sane_start() has been performed.
+
+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value SANE_STATUS_UNSUPPORTED is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument m set to SANE_FALSE is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+ the requested I/O mode.
+
+
+
+
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle h that is readable if and only if image data is
+available (i.e., when a call to sane_read() will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in *fd.
+
+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start()
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until sane_cancel() or sane_start() get called again
+or until sane_read() returns with status
+SANE_STATUS_EOF). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+sane_read() call would return SANE_STATUS_EOF.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call sane_read().
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+SANE_STATUS_UNSUPPORTED.
+
+ Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using select()
+or poll() under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to sane_read() is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+ This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+ this operation.
+
+
+
+
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return NULL.
+The returned pointer is valid at least until the next call to this
+function is performed.
+
+
+const SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/doc013.html b/html/doc013.html
new file mode 100644
index 00000000..3e6ad5dd
--- /dev/null
+++ b/html/doc013.html
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+Code Flow
+
+
+The code flow for the SANE API is illustrated in
+Figure 4. Functions sane_init() and
+sane_exit() initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+
+
+
+
+ Figure 4: Code flow
+
+
+
+
+ Function sane_get_devices() can be called any time after
+sane_init() has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+ Once a device has been chosen, it is opened using a call to
+sane_open(). Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+ An opened device can be setup through the corresponding device handle
+using functions sane_get_option_descriptor() and
+sane_control_option(). While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle. However, as options are set, other options
+may become active or inactive. Thus, after setting an option, it
+maybe necessary to re-read some or all option descriptors. While
+setting up the device, it is also admissible to call
+sane_get_parameters() to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+ The device handle can be put in blocking or non-blocking mode by a
+call to sane_set_io_mode(). Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+ After the device is setup properly, image acquisition can be started
+by a call to sane_start(). The backend calculates the exact
+image parameters at this point. So future calls to
+sane_get_parameters() will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to sane_read() is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+sane_set_io_mode() and/or sane_get_select_fd() at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+ Image data is collected by repeatedly calling sane_read().
+Eventually, this function will return an end-of-file status
+(SANE_STATUS_EOF). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels in of a red/green/blue image or multiple images),
+it can call sane_start() again. Once all desired frames have
+been acquired, function sane_cancel() must be called. This
+operation can also be called at any other time to cancel a pending
+operation. Note that sane_cancel() must be called even if the
+last read operation returned SANE_STATUS_EOF.
+
+ When done using the device, the handle should be closed by a call to
+sane_close(). Finally, before exiting the application,
+function sane_exit() must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+
+
+
+
+
+
+
+
diff --git a/html/doc014.html b/html/doc014.html
new file mode 100644
index 00000000..8e4f4159
--- /dev/null
+++ b/html/doc014.html
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+Well-Known Options
+
+
+While most backend options are completely self-describing, there are a
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan) of the scanner surface and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+
+
+Option number 0 has an empty string as its name. The value of this
+option is of type SANE_TYPE_INT and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+sane_get_option_descriptor() returns NULL, or a
+frontend can directly read out the value of option number 0.
+
+
+
+Option resolution is used to select the resolution at which an
+image should be acquired. The type of this option is either
+SANE_TYPE_INT or SANE_TYPE_FIXED. The unit is
+SANE_UNIT_DPI (dots/inch).
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+The boolean option preview is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to SANE_TRUE,
+preview mode is in effect, when set to SANE_FALSE image
+acquisition should proceed in normal quality mode. The setting of
+this option must not affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option resolution). A backend is free to override the
+resolution value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure 5. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the smallest and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the largest. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+
+
+
+
+ Figure 5: Scan area options
+
+
+
+
+ The names of the four options that define the scan area are given in
+the table below:
+
+
+
+
+Name |
+ Description |
+
+
+tl-x |
+ Top-left x coordinate value |
+
+
+tl-y |
+ Top-left y coordinate value |
+
+
+br-x |
+ Bottom-right x coordinate value |
+
+
+br-y |
+ Bottom-right y coordinate value |
+
+
+ |
+
+
+There are several rules that should be followed by front and backends
+regarding these options:
+
+
+- Backends must attach a unit of either pixels
+ (SANE_UNIT_PIXEL) or millimeters (SANE_UNIT_MM) to
+ these options. The unit of all four options must be identical.
+
+
- Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+
- A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+
- A frontend must work properly with any or all of these options
+ missing.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/doc015.html b/html/doc015.html
new file mode 100644
index 00000000..9f831204
--- /dev/null
+++ b/html/doc015.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+Network Protocol
+
+
+The SANE interface has been designed to facilitate network access to
+image acquisition devices. In particular, most SANE implementations
+are expected to support a network backend (net client) and a
+corresponding network daemon (net server) that allows accessing image
+acquisition devices through a network connection. Network access is
+useful in several situations:
+
+
+- To provide controlled access to resources that are inaccessible
+ to a regular user. For example, a user may want to access a device
+ on a host where she has no account on. With the network protocol,
+ it is possible to allow certain users to access scanners without
+ giving them full access to the system.
+
+
Controlling access through the network daemon can be useful even in
+ the local case: for example, certain backends may require root
+ privileges to access a device. Rather than installing each frontend
+ as setuid-root, a system administrator could instead install the
+ SANE network daemon as setuid-root. This enables regular users to
+ access the privileged device through the SANE daemon (which,
+ presumably, supports a more fine-grained access control mechanism
+ than the simple setuid approach). This has the added benefit that
+ the system administrator only needs to trust the SANE daemon, not
+ each and every frontend that may need access to the privileged
+ device.
+
+ - Network access provides a sense of ubiquity of the available
+ image acquisition devices. For example, in a local area network
+ environment, this allows a user to log onto any machine and have
+ convenient access to any resource available to any machine on the
+ network (subject to permission constraints).
+
+
- For devices that do not require physical access when used (e.g.,
+ video cameras), network access allows a user to control and use
+ these devices without being in physical proximity. Indeed, if such
+ devices are connected to the Internet, access from any place in the
+ world is possible.
+
+
+
+The network protocol described in this chapter has been design with
+the following goals in mind:
+
+
+- Image transmission should be efficient (have low encoding
+ overhead).
+
+
- Accessing option descriptors on the client side must be
+ efficient (since this is a very common operation).
+
+
- Other operations, such as setting or inquiring the value of an
+ option are less performance critical since they typically require
+ explicit user action.
+
+
- The network protocol should be simple and easy to implement on
+ any host architecture and any programming language.
+
+
+The SANE protocol can be run across any transport protocol that
+provides reliable data delivery. While SANE does not specify a
+specific transport protocol, it is expected that TCP/IP will be among
+the most commonly used protocols.
+
+
+
+
+
+
+
+
+
diff --git a/html/doc016.html b/html/doc016.html
new file mode 100644
index 00000000..2479d6dd
--- /dev/null
+++ b/html/doc016.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+Data Type Encoding
+
+
+
+
+The four primitive types of the SANE standard are encoded as follows:
+
+
+- SANE_Byte:
- A byte is encoded as an 8 bit value.
+ Since the transport protocol is assumed to be byte-orientd, the bit
+ order is irrelevant.
+
+
- SANE_Word:
- A word is encoded as 4 bytes (32
+ bits). The bytes are ordered from most-significant to
+ least-significant byte (big-endian byte-order).
+
+
- SANE_Char:
- A character is currently encoded as an 8-bit
+ ISO LATIN-1 value. An extension to support wider character sets (16 or 32
+ bits) is planned for the future, but not supported at this point.
+
+
- SANE_String:
- A string pointer is encoded as a
+ SANE_Char array. The trailing NUL byte is considered part
+ of the array and a NULL pointer is encoded as a zero-length
+ array.
+
+
- SANE_Handle:
- A handle is encoded like a word.
+ The network backend needs to take care of converting these integer
+ values to the opaque pointer values that are presented to the user
+ of the network backend. Similarly, the SANE daemon needs to take
+ care of converting the opaque pointer values it receives from its
+ backends into 32-bit integers suitable for use for network encoding.
+
+
- enumeration types:
- Enumeration types are encoded
+ like words.
+
+
+
+
+
+Closely following the type constructors of the C language, the SANE network
+protocol supports the following four constructors:
+
+
+- pointer:
- A pointer is encoded by a word that indicates
+ whether the pointer is a NULL-pointer which is then followed by the
+ value that the pointer points to (in the case of a non-NULL pointer;
+ in the case of a NULL pointer, no bytes are encoded for the pointer
+ value).
+
+
- array:
- An array is encoded by a word that indicates
+ the length of the array followed by the values of the elements in
+ the array. The length may be zero in which case no bytes are
+ encoded for the element values.
+
+
- structure:
- A structure is encoded by simply encoding the
+ structure members in the order in which they appear in the
+ corresponding C type declaration.
+
+
- union:
- A union must always be accompanied by a tag
+ value that indicates which of the union members is the currently the
+ active one. For this reason, the union itself is encoded simply by
+ encoding the value of the currently active member.
+
+
+
+Note that for type constructors, the pointer, element, or member
+values themselves may have a constructed type. Thus, the above rules
+should be applied recursively until a sequence of primitive types has
+been found.
+
+ Also SANE had no need for encoding of circular structures. This
+greatly simplifies the network protocol.
+
+
+
+
+
+
+
+
+
diff --git a/html/doc017.html b/html/doc017.html
new file mode 100644
index 00000000..208007ac
--- /dev/null
+++ b/html/doc017.html
@@ -0,0 +1,460 @@
+
+
+
+
+
+
+
+
+Remote Procedure Call Requests
+
+
+The SANE network protocol is a client/server-style remote procedure
+call (RPC) protocol. This means that all activity is initiated by the
+client side (the network backend)---a server is restricted to
+answering request by the client.
+
+
+
+This RPC establishes a connection to a particular SANE network daemon.
+It must be the first call in a SANE network session. The parameter
+and reply arguments for this call are shown in the table below:
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word version_code |
+ SANE_Word status |
+
+
+ SANE_String user_name |
+ SANE_Word version_code |
+
+
+ |
+
+
+The version_code argument in the request is the SANE
+version-code of the network backend that is contacting the network
+daemon (see Section 4.1). The
+``build-revision'' in the version code is used to hold the network
+protocol version. The SANE network daemon receiving such a request
+must make sure that the network protocol version corresponds to a
+supported version since otherwise the encoding of the network stream
+may be incompatible (even though the SANE interface itself may be
+compatible). The user_name argument is the name of the user
+on whose behalf this call is being performed. If the network backend
+cannot determine a user-name, it passes a NULL pointer for this
+argument. No trust should be placed in the authenticity of this
+user-name. The intent of this string is to provide more convenience
+to the user. E.g., it could be used as the default-user name in
+subsequent authentication calls.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values.2 The version_code argument returns the
+SANE version-code that the network daemon supports. See the comments
+in the previous paragraph on the meaning of the build-revision in this
+version code.
+
+
+
+This RPC is used to obtain the list of devices accessible by the SANE
+daemon.
+
+
+
+
+ request: |
+ reply: |
+
+
+ void |
+ SANE_Word status |
+
+
+ |
+ SANE_Device ***device_list |
+
+
+ |
+
+
+There are no arguments in the request for this call.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The device_list
+argument is a pointer to a NULL-terminated array of
+SANE_Device pointers.
+
+
+
+This RPC is used to open a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String device_name |
+ SANE_Word status |
+
+
+ |
+ SANE_Word handle |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The device_name argument specifies the name of the device to
+open.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The handle
+argument specifies the device handle that uniquely identifies the
+connection. The resource argument is used to request
+authentication. If it has a non-NULL value, the network
+backend should authenticate the specified resource and then retry this
+operation (see Section 5.2.10 for details on how to
+authorize a resource).
+
+
+
+This RPC is used to close a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection that should be
+closed.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+This RPC is used to obtain all the option descriptors for a
+remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ Option_Descriptor_Array odesc |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+descriptors should be obtained.
+
+In the reply, the odesc argument is used to return the array of
+option descriptors. The option descriptor array has the following
+structure:
+
+
+struct Option_Descriptor_Array
+ {
+ SANE_Word num_options;
+ SANE_Option_Descriptor **desc;
+ };
+
+
+
+
+
+This RPC is used to control (inquire, set, or set to automatic) a
+specific option of a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ SANE_Word option |
+ SANE_Word info |
+
+
+ SANE_Word action |
+ SANE_Word value_type |
+
+
+ SANE_Word value_type |
+ SANE_Word value_size |
+
+
+ SANE_Word value_size |
+ void *value |
+
+
+ void *value |
+ SANE_String *resource |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+should be controlled. Argument option is the number (index) of
+the option that should be controlled. Argument action
+specifies what action should be taken (get, set, or set automatic).
+Argument value_type specifies the type of the option value
+(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT,
+SANE_TYPE_FIXED, SANE_TYPE_STRING,
+SANE_TYPE_BUTTON). Argument value_size specifies
+the size of the option value in number of bytes (see
+Section 4.2.9.6 for the precise meaning of this value).
+Finally, argument value is a pointer to the option value. It
+must be a writeable area that is at least value_size bytes
+large. (Note that this area must be writable even if the action is to
+set the option value. This is because the backend may not be able to
+set the exact option value, in which case the option value is used to
+return the next best value that the backend has chosen.)
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has undefined
+values. The info argument returns the information on how well
+the backend was able to satisfy the request. For details, see the
+description of the corresponding argument in
+Section 4.3.7. Arguments value_type and
+value_size have the same values as the arguments by the same
+name in corresponding request. The values are repeated here to ensure
+that both the request and the reply are self-contained (i.e., they can
+be encoded and decoded independently). Argument value is holds
+the value of the option that has become effective as a result of this
+RPC.
+
+
+
+This RPC is used to obtain the scan parameters of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Parameters params |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device whose scan parameters should be returned.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The argument
+params is used to return the scan parameters.
+
+
+
+This RPC is used to start image acquisition (scanning).
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Word port |
+
+
+ |
+ SANE_Word byte_order |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device from which the image should be acquired.
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument, status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has
+undefined values. The argument port returns the port number
+from which the image data will be available. To read the image data,
+a network client must connect to the remote host at the indicated port
+number. Through this port, the image data is transmitted as a
+sequence of data records. Each record starts with the data length in
+bytes. The data length is transmitted as a sequence of four bytes.
+These bytes should be interpreted as an unsigned integer in big-endian
+format. The four length bytes are followed by the number of data
+bytes indicated by the length. Except for byte-order, the data is in
+the same format as defined for sane_read(). Since some
+records may contain no data at all, a length value of zero is
+perfectly valid. The special length value of 0xffffffff is
+used to indicate the end of the data stream. That is, after receiving
+a record length of 0xffffffff, the network client should close
+the data connection and stop reading data.
+
+ Argument byte_order specifies the byte-order of the image
+data. A value of 0x1234 indicates little-endian format, a value of
+0x4321 indicates big-endian format. All other values are presently
+undefined and reserved for future enhancements of this protocol. The
+intent is that a network server sends data in its own byte-order and
+the client is responsible for adjusting the byte-order, if necessary.
+This approach causes no unnecessary overheads in the case where the
+server and client byte-order match and puts the extra burden on the
+client side when there is a byte-order mismatch. Putting the burden
+on the client-side improves the scalability properties of this
+protocol.
+
+
+
+This RPC is used to cancel the current operation of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection whose operation
+should be cancelled.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+
+This RPC is used to pass authorization data from the net client to the
+net server.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String resource |
+ SANE_Word dummy |
+
+
+ SANE_String username |
+ |
+
+
+ SANE_String password |
+ |
+
+
+ |
+
+
+The resource argument specifies the name of the resource to be
+authorized. This argument should be set to the string returned in the
+resource argument of the RPC reply that required this
+authorization call. The username and password are the
+name of the user that is accessing the resource and the password for
+the specified resource/user pair.
+
+Since the password is not encrypted during network transmission, it is
+recommended to use the following extension:
+
+ If the server adds the string `$MD5$' to the resource-name followed
+by a random string not longer then 128 bytes, the client may answer with the
+MD5 digest of the concatenation of the password and the random string. To
+differentiate between the MD5 digest and a strange password the client prepends
+the MD5 digest with the string `$MD5$'.
+
+ In the reply, dummy is completely unused. Note that there is
+no direct failure indication. This is unnecessary since a net client
+will retry the RPC that resulted in the authorization request until
+that call succeeds (or until the request is cancelled). The RPC that resulted
+in the authorization request continues after the reply from the client and may
+fail with SANE_STATUS_ACCESS_DENIED.
+
+
+
+This RPC is used to disconnect a net client from a net server. There
+are no request or reply arguments in this call. As a result of this
+call, the connection between the client and the server that was
+established by the SANE_NET_INIT call will be closed.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/doc018.html b/html/doc018.html
new file mode 100644
index 00000000..5dcf753a
--- /dev/null
+++ b/html/doc018.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+Contact Information
+
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+
+
+sane-devel-request@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``help'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+
+http://www.mostang.com/sane/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/doc019.html b/html/doc019.html
new file mode 100644
index 00000000..76b598fb
--- /dev/null
+++ b/html/doc019.html
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+Index
+
+
+
+array
+
+ br-x
+br-y
+
+ code flow
+
+ device-name
+domain
+
+ enumeration types
+
+ image data format
+
+ mailing list
+
+ network authorization
+NUL
+
+ option count
+Option_Descriptor_Array
+
+ password
+pointer
+preview mode
+
+ resolution option
+
+ SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+structure
+
+ tl-x
+tl-y
+Type Strings
+
+ union
+username
+
+ Vendor Strings
+
+ well-known options
+
+
+
+
+
+
+
+
diff --git a/html/footnotes.html b/html/footnotes.html
new file mode 100644
index 00000000..6478c6a8
--- /dev/null
+++ b/html/footnotes.html
@@ -0,0 +1,7 @@
+FootnotesFootnotes
+
+
1 This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.
+
2 The sane network
+ daemon should be careful not to leak information in the undefined
+ portion of the reply.
diff --git a/html/img000.gif b/html/img000.gif
new file mode 100644
index 00000000..e69de29b
diff --git a/html/img001.gif b/html/img001.gif
new file mode 100644
index 00000000..e69de29b
diff --git a/html/img002.gif b/html/img002.gif
new file mode 100644
index 00000000..e69de29b
diff --git a/html/img003.gif b/html/img003.gif
new file mode 100644
index 00000000..e69de29b
diff --git a/html/img004.gif b/html/img004.gif
new file mode 100644
index 00000000..e69de29b
diff --git a/html/index.html b/html/index.html
new file mode 100644
index 00000000..fbae5a87
--- /dev/null
+++ b/html/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+./sane
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SANE Standard Version 1.03
+
+2003-02-22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane.ps b/sane.ps
new file mode 100644
index 00000000..30c5a11f
--- /dev/null
+++ b/sane.ps
@@ -0,0 +1,4845 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.92b Copyright 2002 Radical Eye Software
+%%Title: sane.dvi
+%%Pages: 48
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic CMSY10
+%%+ CMR10 CMR8 CMMI10 CMTT10 CMEX10 Times-BoldItalic
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: /usr/bin/dvips sane.dvi -o sane.ps
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2003.09.23:1836
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% File 8r.enc as of 2002-03-12 for PSNFSS 9
+%
+% This is the encoding vector for Type1 and TrueType fonts to be used
+% with TeX. This file is part of the PSNFSS bundle, version 9
+%
+% Authors: S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry, W. Schmidt
+%
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida + Euro.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+%
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+%
+% (5) hyphen appears twice for compatibility with both ASCII and Windows.
+%
+% (6) /Euro is assigned to 128, as in Windows ANSI
+%
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef
+ /breve /minus /.notdef
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+ /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there down to here.
+ /grave /quotesingle
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /Euro /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: bbad153f.enc
+% Thomas Esser, Dec 2002. public domain
+%
+% Encoding for:
+% cmsy10 cmsy5 cmsy6 cmsy7 cmsy8 cmsy9
+%
+/TeXbbad153fEncoding [
+/minus /periodcentered /multiply /asteriskmath /divide /diamondmath
+/plusminus /minusplus /circleplus /circleminus /circlemultiply
+/circledivide /circledot /circlecopyrt /openbullet /bullet
+/equivasymptotic /equivalence /reflexsubset /reflexsuperset /lessequal
+/greaterequal /precedesequal /followsequal /similar /approxequal
+/propersubset /propersuperset /lessmuch /greatermuch /precedes /follows
+/arrowleft /arrowright /arrowup /arrowdown /arrowboth /arrownortheast
+/arrowsoutheast /similarequal /arrowdblleft /arrowdblright /arrowdblup
+/arrowdbldown /arrowdblboth /arrownorthwest /arrowsouthwest /proportional
+/prime /infinity /element /owner /triangle /triangleinv /negationslash
+/mapsto /universal /existential /logicalnot /emptyset /Rfractur /Ifractur
+/latticetop /perpendicular /aleph /A /B /C /D /E /F /G /H /I /J /K
+/L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /union /intersection
+/unionmulti /logicaland /logicalor /turnstileleft /turnstileright
+/floorleft /floorright /ceilingleft /ceilingright /braceleft /braceright
+/angbracketleft /angbracketright /bar /bardbl /arrowbothv /arrowdblbothv
+/backslash /wreathproduct /radical /coproduct /nabla /integral
+/unionsq /intersectionsq /subsetsqequal /supersetsqequal /section
+/dagger /daggerdbl /paragraph /club /diamond /heart /spade /arrowleft
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/minus /periodcentered /multiply /asteriskmath /divide /diamondmath
+/plusminus /minusplus /circleplus /circleminus /.notdef /.notdef
+/circlemultiply /circledivide /circledot /circlecopyrt /openbullet
+/bullet /equivasymptotic /equivalence /reflexsubset /reflexsuperset
+/lessequal /greaterequal /precedesequal /followsequal /similar
+/approxequal /propersubset /propersuperset /lessmuch /greatermuch
+/precedes /follows /arrowleft /spade /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+] def
+
+%%EndProcSet
+%%BeginProcSet: f7b6d320.enc
+% Thomas Esser, Dec 2002. public domain
+%
+% Encoding for:
+% cmb10 cmbx10 cmbx12 cmbx5 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10
+% cmdunh10 cmr10 cmr12 cmr17cmr6 cmr7 cmr8 cmr9 cmsl10 cmsl12 cmsl8
+% cmsl9 cmss10cmss12 cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10
+% cmssi12 cmssi17 cmssi8cmssi9 cmssq8 cmssqi8 cmvtt10
+%
+/TeXf7b6d320Encoding [
+/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega
+/ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve
+/macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash
+/suppress /exclam /quotedblright /numbersign /dollar /percent /ampersand
+/quoteright /parenleft /parenright /asterisk /plus /comma /hyphen
+/period /slash /zero /one /two /three /four /five /six /seven /eight
+/nine /colon /semicolon /exclamdown /equal /questiondown /question /at
+/A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X
+/Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent
+/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u
+/v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space
+/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /.notdef
+/.notdef /Omega /ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute
+/caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE
+/OE /Oslash /suppress /dieresis /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+] def
+
+%%EndProcSet
+%%BeginProcSet: aae443f0.enc
+% Thomas Esser, Dec 2002. public domain
+%
+% Encoding for:
+% cmmi10 cmmi12 cmmi5 cmmi6 cmmi7 cmmi8 cmmi9 cmmib10
+%
+/TeXaae443f0Encoding [
+/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega
+/alpha /beta /gamma /delta /epsilon1 /zeta /eta /theta /iota /kappa
+/lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon /phi /chi /psi
+/omega /epsilon /theta1 /pi1 /rho1 /sigma1 /phi1 /arrowlefttophalf
+/arrowleftbothalf /arrowrighttophalf /arrowrightbothalf /arrowhookleft
+/arrowhookright /triangleright /triangleleft /zerooldstyle /oneoldstyle
+/twooldstyle /threeoldstyle /fouroldstyle /fiveoldstyle /sixoldstyle
+/sevenoldstyle /eightoldstyle /nineoldstyle /period /comma /less /slash
+/greater /star /partialdiff /A /B /C /D /E /F /G /H /I /J /K /L /M /N
+/O /P /Q /R /S /T /U /V /W /X /Y /Z /flat /natural /sharp /slurbelow
+/slurabove /lscript /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p
+/q /r /s /t /u /v /w /x /y /z /dotlessi /dotlessj /weierstrass /vector
+/tie /psi /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/space /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi
+/.notdef /.notdef /Omega /alpha /beta /gamma /delta /epsilon1 /zeta /eta
+/theta /iota /kappa /lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon
+/phi /chi /psi /tie /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef
+] def
+
+%%EndProcSet
+%%BeginProcSet: 09fbbfac.enc
+% Thomas Esser, Dec 2002. public domain
+%
+% Encoding for:
+% cmsltt10 cmtt10 cmtt12 cmtt8 cmtt9
+/TeX09fbbfacEncoding [
+/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi
+/Omega /arrowup /arrowdown /quotesingle /exclamdown /questiondown
+/dotlessi /dotlessj /grave /acute /caron /breve /macron /ring /cedilla
+/germandbls /ae /oe /oslash /AE /OE /Oslash /visiblespace /exclam
+/quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft
+/parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
+/two /three /four /five /six /seven /eight /nine /colon /semicolon /less
+/equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N
+/O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright
+/asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l
+/m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright
+/asciitilde /dieresis /visiblespace /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /space /Gamma /Delta /Theta /Lambda /Xi /Pi
+/Sigma /Upsilon /Phi /Psi /.notdef /.notdef /Omega /arrowup /arrowdown
+/quotesingle /exclamdown /questiondown /dotlessi /dotlessj /grave /acute
+/caron /breve /macron /ring /cedilla /germandbls /ae /oe /oslash /AE
+/OE /Oslash /visiblespace /dieresis /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0
+ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{
+pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get
+div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type
+/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end
+definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup
+sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll
+mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[
+exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}
+forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def
+end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def
+@MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll
+newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto
+closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N
+/@beginspecial{SDict begin/SpecialSave save N gsave normalscale
+currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}
+N/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs
+neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate
+rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse
+scale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg
+lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx
+ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N
+/setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{
+pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave
+restore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B
+/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1
+setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY
+moveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix
+matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc
+savematrix setmatrix}N end
+
+%%EndProcSet
+%%BeginFont: CMEX10
+%!PS-AdobeFont-1.1: CMEX10 1.00
+%%CreationDate: 1992 Jul 23 21:22:48
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMEX10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMEX10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 40 /braceleftBigg put
+readonly def
+/FontBBox{-24 -2960 1454 772}readonly def
+/UniqueID 5000774 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF5B8CAC6A7BEB5D02276E511FFAF2AE11910
+DE076F24311D94D07CACC323F360887F1EA11BDDA7927FF3325986FDB0ABDFC8
+8E4B40E7988921D551EC0867EBCA44C05657F0DC913E7B3004A5F3E1337B6987
+FEBC45F989C8DC6DC0AD577E903F05D0D54208A0AE7F28C734F130C133B48422
+BED48639A2B74E4C08F2E710E24A99F347E0F4394CE64EACB549576E89044E52
+EABE595BC964156D9D8C2BAB0F49664E951D7C1A3D1789C47F03C7051A63D5E8
+DF04FAAC47351E82CAE0794AA9692C6452688A74A7A6A7AD09B8A9783C235EC1
+EA2156261B8FB331827145DE315B6EC1B3D8B67B3323F761EAF4C223BB214C4C
+6B062D1B281F5041D068319F4911058376D8EFBA59884BA3318C5BC95684F281
+E0591BC0D1B2A4592A137FF301610019B8AC46AE6E48BC091E888E4487688350
+E9AD5074EE4848271CE4ACC38D8CBC8F3DB32813DDD5B341AF9A6601281ABA38
+4A978B98483A63FCC458D0E3BCE6FD830E7E09B0DB987A6B63B74638FC9F21A5
+8C68479E1A85225670D79CDDE5AC0B77F5A994CA700B5F0FF1F97FC63EFDE023
+8135F04A9D20C31998B12AE06676C362141AAAA395CDEF0A49E0141D335965F2
+FB4198499799CECCC8AA5D255264784CD30A3E8295888EFBC2060ADDD7BAC45A
+EEEECDFF7A47A88E69D84C9E572616C1AC69A34B5F0D0DE8EE4EDF9F4ADE0387
+680924D8D5B73EF04EAD7F45977CA8AD73D4DD45DE1966A3B8251C0386164C35
+5880DD2609C80E96D1AB861C9259748E98F6711D4E241A269ED51FF328344664
+3AF9F18DCE671611DB2F5D3EA77EE734D2BED623F973E6840B8DAD1E2C3C2666
+DD4DD1C1C8384F906A7BAACDF441BB0AAEA2A697E453C9A10A119BBE236F5B3D
+E6C27A9B608666E509C8F9B09DB3D41BDE7375D769F4C62F1CDAB748731734B1
+06284A7C45142D0FE4E88F9584D88AD8ED3FEE113073589A471C3DEE38E16CAA
+77CF129F6D9B781161AA1D888FF06C9188B9C6F0A4F98986C26D4DEDA2AFA61F
+6F664EBDB011C6FE6AD2F2075C7A2A8FBAF29D58A293AF049F8718E212B55168
+FCFD0930E6C4C7CC6B7C807DF99AC0BDE168E9F3DF08AC5C032F159F444CFA6D
+67E568DB3C1748FB2EF61B2DC6E616597A8195BFD494F6458895406B4D208114
+AF3CC231C2C44E194CAA5F54BD608FFA26B603DF675E83D485D03D4F8B579783
+E65BEA1B95BCACAE3E7261C3A4729B611ADB6553FC8A8F01FD6BC09D56D7BEF0
+41E9E20CBB4234035CA11D909E765A9368127350185F8698246E6B1700AE3D18
+CCEC2F8BA4D05106619FC814218CD877612BFFCE37E85EFF6DCFE78AB2A45900
+2E1345FDA0AC100EF081E1C9E7A867E580D9B7E75C103C230C35A5
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMTT10
+%!PS-AdobeFont-1.1: CMTT10 1.00B
+%%CreationDate: 1992 Apr 26 10:42:42
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMTT10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+end readonly def
+/FontName /CMTT10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /.notdef put
+readonly def
+/FontBBox{-4 -235 731 800}readonly def
+/UniqueID 5000832 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D19
+38DD5C4467F9DD8C5D1A2000B3A6BF2F25629BAEC199AE8BD4BA6ED9BBF7DABF
+D0E153BAB1C17900D4FCE209622ACD19E7C74C2807D0397357ED07AB460D5204
+EB3A45B7AC4D106B7303AD8348853032A745F417943F9B4FED652B835AA49727
+A8B4117AFF1D4BCE831EB510B6851796D0BE6982B76620CB3CE0C22CACDD4593
+F244C14EEC0E5A7C4AC42392F81C01BC4257FE12AF33F4BFEA9108FF11CF9714
+4DD6EC70A2C4C1E4F328A1EB25E43525FB1E16C07E28CC359DF61F426B7D41EA
+6A0C84DD63275395A503AAE908E1C82D389FD12A21E86999799E7F24A994472E
+A10EAE77096709BE0D11AAD24A30D96E15A51D720AFB3B10D2E0AC8DC1A1204B
+E8725E00D7E3A96F9978BC19377034D93D080C4391E579C34FF9FC2379CB119F
+1E5BBEA91AE20F343C6420BE1E2BD0636B04FCCC0BEE0DC2D56D66F06DB22438
+452822CBEAF03EE9EAA8398F276EC0D92A7FB978C17805DB2F4A7DFBA56FD6AF
+8670EB364F01DE8FCAFBAF657D68C3A03112915736CEABAA8BA5C0AC25288369
+5D49BD891FABEFE8699A0AE3ED85B48ACB22229E15623399C93DE7D935734ADA
+DA7A1462C111D44AD53EA35B57E5D0B5FC0B481820E43222DB8EFCD5D30E15F9
+BA304FA879392EE0BCC1A6ADAB001EDF5C9D6FE45735098A304A8BD4A0AC9980
+7FFE62FEAD3843EF8C45E1203E303D028897CFE1D4D0AB8BBA74CE279275A67E
+81AEA417A3E49397386B7304DC9247290A5CE2408114441EDD82F9B3A8E49C4D
+D9745142652BE8B82C2A9610B26EA1A71212CE97781A06B58C3DDD9179016AB6
+740166FF986AE856AFDD2D8955D95B2D0C57BC179F1D9136BEFBB6F17E8DE96E
+921502FB19F0C21F0A491F951D83972DECD70AA8987112F05C939A6FB073A5EA
+495069A1DDF11DC589D2E91C1514C2799C5B954EB8B347918C4920C7142A2AC6
+8231DD2AF57E9540C46BDA6AAC09689487F5E0EB021CADA860FD25B2E5230259
+7BFF0F12D7DF5CE219716715073177028CE276FC313D6A101898D1A6BB0AD8D5
+662A85EE6B921A72E46589CC08EA87EECFDF36B819B07306C44AC3FBCD134930
+4B2F9EC4D5C57518E8210FC2C61DA3FD185CFA65DF3DB858BCF75E95321A7131
+547E0C85406F70D2C3C67E142BC0642344A5806FBE012868A76DBB9CB27CF878
+38A11705B857FC5F7F3EFA1DBEB4DA5200E2F29D25BC8614D6C29F336C5E9F60
+656D2F7CC463146790A6C4DAB137A9984258F46F0921600AB525BA1C03CCA30D
+F03D2BAF5E8AA0939FF8849E760494BBF70003BA53516615023DBDE205E27F0A
+8DCFDD26F25590CEC8C64834FCCD3AF3A93AA02760B216ECA422F349638C74C4
+B9060C46ABAE3789FADE86D20E3A3AB5940616A6AF8EAED5A70BF2A4A8E40860
+4369101BD16DB8A70A7E46F92001D56CDD56837C68BD8E2AA43147DD078E42DB
+FE638E4AC8D58BDA2FFD457D760BACFA908B124958C2606F28C3998D7F565D5F
+5539EA278477BC1D0056FAF929178B7AACAE1D371228606B58787EBCCA903E99
+F7EB4E1D1C5ECFA2D925E13BD7D67620B5D4DD42D1BD888D966E97636661BA71
+EB2229A1B1EED0B0F39968A21A816466ACC0B1B80386D9FA7970D092CB8D261A
+08A4EE6F0A5DF57CE8A20F5A518D532C2829A4DF057618B1B3ABD12B44977D0A
+45D5D799C2CEE1F006E108E9D493DA658215649657E1D04C0D52C33C846333B7
+38A93BC3635C7C4233B252DE7360E1485BAE136546289E9300C16AEF9A9F13D6
+D8CD9861AA42A0EC2E291033F02CC4D153CBDE0DDB6879529AE65F474C3EBAB3
+7CB10ECFFC019A71FF5228E89C9159F985A557B731F1716A740B96869D6E4332
+AB4BED696A5FF5E1CA4ECAB1FD7C8F0BD0B13D23F0FC2C04EB267B4F376714C9
+B7A2BE94F4E64A2754B6A2082E4217FE9991FA062B1BEF6EEC058D788BE4565F
+53424C0169FCF47EF1D2031F68B0433F8C6973271461336683C1D4650487C050
+EA3FE882B6D45D2B6A19469B277674757EAFE42F9BD4AE651FD7580BB7FF1BA0
+AFE6267C71CA2EDC659EADDE85DBAC70294C32BE53C9D3D8A82092261521D7DA
+66CEAECD2E107B00BD9E3B95A284D4B434AC709D26AD58F4310E78553FC9E5F4
+661A2A464C9B18A9F48A2F48C6938F55F9F8DE798AB043E5FA5FAADE31395514
+69C51D56BFBDC4E47FA113854CB511559C50626CC9FBF3203E5C51E70A5D8C88
+ABBB15A8C70F711184054EB6B0F8C81758BA1CFC0C8D771A7C5A432F6382C85C
+09B27F5DD4E6A27B06C503F28AF19CC7E9A39DC18279A1C9CA59B8B90D5180FB
+A57D571FAAEBCF488FE0C3ED878CC3E7C5CF863549629823B20EA58063871676
+B1478F98A9C9A43E962DBCA3E98F0F48B0CAE07569C48EA60C65FFC06A2008B4
+8481AB4D1205ED42C458FF6261883A307859897056F44E5424443C7F9FF2599E
+F0EBEE2442F377311F535A7C559908377357A9D2FAA892373B452C526572F384
+FBC25E19B04A17DE99415FCAE984DE9C0CB9F7136CA1529FEC2FD92BAE245245
+377765E7AB0CBEAD3D9071B59CAF313360646AB3F51AB95B5C01867C3452917F
+F019F4C63ABA866AAC859E209E13E795E0411C82B56741DA73B760B629ED2070
+19BB41EA91222B7358DC32EF21725AD41C4045BB95FABD52841C24DD38DC9DF4
+6A54F1E76043B1F54F69D94099981125B4C667EDF08A600E15CCBAA75E5D6EF2
+3A3759C58FF22D03C578C2BD0DA60A479BA24D85E39FDCE1CC129CF36B54589C
+226E8B3575449AC9CFA594A9EFC99EFFAEEABB371AA21EFD25A0FFC9F46300AA
+7773885F58B7F023248B164E7350AAE0092800B2B3F422BD580BAA94D6F99337
+F72BF2930E59E751F3D23389D1A63521E0FE5273F0FB122B007AF92D5C024912
+E957D98242D76635079970DECDFC99A7D6B907FA2667E7826A5297CC65FE6DBA
+E739CD3E99FCBC4EA1A0A94287D7B59B0AAD320305B2736E8FD4C7AFB99B856C
+0FA3004F441B03421E58DFFDDD68415E2AFC89F2D9BCF23B587FD4FCF8F0105D
+EA44437C3A13D3A1235A37669CC8EB3FBF094EA6F70897E60EE1CAD8772592DF
+D63629700526B0FC9B40A3ED89A3718DDF61A554FAC06F4722CBCC8FAABD7960
+DD7D733A73E820787F5AE1F5B0526A76FE49057AFAA7D42654C95B39C9294B74
+983083CD7A7D8AA14EA3C3B0EE3C61427320CF1C1DED864394E58BC4C164458E
+E8EE940B097B87549325C0A516E5C48D58B3549729820AB04EBDD2AB83B9DDCD
+528B0CEBE9D30B730EFA6B5D22888B79F81105A03FAD20C43893828CC3BD2C8A
+A3F4072DAEC5B203AF56F9FC4301402461F3D8E543A63F2AAA8C6F786C2AEF88
+665514BEBF2689CC1A67E5F3FEA8B15B41AA1D18EA7F363F973FEB0D7094A827
+81A8369D7D2A6117A599CB645D2C9C9A9B6AD1851B810680D01CE32BDEC953A7
+4826775E5C09BEEAB08AA9045525A852DA144E7056E21C3A6477238F4CE58FDD
+85ECB106B52DDC04F68CCCF74A404F1F56FAFF361548DC56D5D3833599B8E6D6
+C7F156BAFBF3B08FC3880E9892345825120DB09F8DAF82E59E1A3B769CAEE723
+A36CF49FF311F1C692ABFE67041F072A10CFC1A12E2DB98EAD86C64B8A4D50D3
+65BA77D198E520F65CCC0AC232551996583C744AC31C191FD42AC8BBA8BC30D2
+7724A124C584539247965052325EB87505298A7D5134B8D35B4F32FA9CD5DCBF
+EE5DA08E635E572D47D3FECD53D7811BB69165F4C9413F03226F0A0BAFB89932
+314C52A1ADF5C1600D81D61839F59D57A65137761920CEF4ECEA8C18F839057A
+8AA55C366BEB30F28961BC26FDCCBACDB5ED9FD063424C45F7E0FB23741C910E
+D7183368EA7F75E49A9DCD9B92370F0AD9D550451F548F8E1912BB7C40166E9E
+366D787806A3026F818B724562A8A4E2934FBE61AAA9D7996AA389E2CAC71599
+AC5A6FCAAD3891A414E91A045D93E483C76E34A16B6808AC96FF86882DB095BE
+919C19446D6AB96B0FCF1B4CB9C5D3719F42CA8E5C70322A529243F69D0D48F9
+BCB792CC42ABCC47BBE841B1AFE81D302817D5DD890D5B3B70858192FF501786
+1A7A267EA26AAC220309F1FE53E467243C11347D4FBE18B20063FEAD45C45501
+01EA152F828FDE560E5DF6229F0C218B996EA170B1F59CEFC2B7960B590CF0CA
+62992CA032FB00F69CF6A950A9378FCE196EEA3FBD7531369025A0B85CB7005E
+39422CEEC16EB07CB064693122E82B54A9490FEF8B37AA1A25F1B3B62F998E21
+C3D834E4C13B710748DDABFA0A1025AD5E32850C1FC4F51EB73898578270207C
+66D0DF36A91905AEEEC2257EE68790935FDC79104F0FFEE3E6350E728F71B786
+24EC38258E5B108CC1DF7ECB0A956F46CAEF065AC6F7288F3B500A96B33ACD39
+0C11BD46F5BCFC579C777E7682C225DBDC510CA40C4E54FBF976DA72E19C99B1
+18DD05128C2ACC386B6C238C54501A252A6E52E41BD4E5114E0E1B2162F68371
+D3C491183074664D549C5392897D177C21422B062593495E1687C1AAB01A47BA
+DA8743150B533325E3A4A15B29C82989A02B1F4DE99CBCFE6575CB04FBD89E26
+850F4BC9BAC4AAE384A4E7FFA6D73BA02CD0171E5F80EF13D6800D99E2EB26B3
+C098E7BA5D93CFBF3B0A5E13072DD81B6A
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMMI10
+%!PS-AdobeFont-1.1: CMMI10 1.100
+%%CreationDate: 1996 Jul 23 07:53:57
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.100) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMMI10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.04 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMMI10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /.notdef put
+readonly def
+/FontBBox{-32 -250 1048 750}readonly def
+/UniqueID 5087385 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
+9E394A533A081C36D456A09920001A3D2199583EB9B84B4DEE08E3D12939E321
+990CD249827D9648574955F61BAAA11263A91B6C3D47A5190165B0C25ABF6D3E
+6EC187E4B05182126BB0D0323D943170B795255260F9FD25F2248D04F45DFBFB
+DEF7FF8B19BFEF637B210018AE02572B389B3F76282BEB29CC301905D388C721
+59616893E774413F48DE0B408BC66DCE3FE17CB9F84D205839D58014D6A88823
+D9320AE93AF96D97A02C4D5A2BB2B8C7925C4578003959C46E3CE1A2F0EAC4BF
+8B9B325E46435BDE60BC54D72BC8ACB5C0A34413AC87045DC7B84646A324B808
+6FD8E34217213E131C3B1510415CE45420688ED9C1D27890EC68BD7C1235FAF9
+1DAB3A369DD2FC3BE5CF9655C7B7EDA7361D7E05E5831B6B8E2EEC542A7B38EE
+03BE4BAC6079D038ACB3C7C916279764547C2D51976BABA94BA9866D79F13909
+95AA39B0F03103A07CBDF441B8C5669F729020AF284B7FF52A29C6255FCAACF1
+74109050FBA2602E72593FBCBFC26E726EE4AEF97B7632BC4F5F353B5C67FED2
+3EA752A4A57B8F7FEFF1D7341D895F0A3A0BE1D8E3391970457A967EFF84F6D8
+47750B1145B8CC5BD96EE7AA99DDC9E06939E383BDA41175233D58AD263EBF19
+AFC0E2F840512D321166547B306C592B8A01E1FA2564B9A26DAC14256414E4C8
+42616728D918C74D13C349F4186EC7B9708B86467425A6FDB3A396562F7EE4D8
+40B43621744CF8A23A6E532649B66C2A0002DD04F8F39618E4F572819DD34837
+B5A08E643FDCA1505AF6A1FA3DDFD1FA758013CAED8ACDDBBB334D664DFF5B53
+95601766758B4BB6C93DDBF4C7D28729C5FE8E8BB90DEC3D366F135DF1E57A19
+0F82F65A402A24CC845CF40775123553166A2A4DBE5A17993512368E3C1B3F07
+124CA10145B331F17E08A78A7D9EB3A2A0742C69476396B81AE64F6C3AFC2EBF
+9DD021433A67C1647047ACCC7B7B920DFC21E55ED2F1CDE349CDF13E757B0E2B
+41B9A056D6BA82CA51CFC765DAD7FE7690A212EF317B41DFFA3392B78489F70B
+D54F28DC74544444918FAE218E46B6D162100F5AA09B1819DBC8B0B6468E79D4
+58D6FC6A14AD7960A8CF1E22547189356A45B5867A6C3BC85931CE0077EF207D
+95213DD37F34468DEEDEF53EAC9D779FA2C596B2CE616B5FFBEFB8A6EF1066AA
+564EC0473AC29BF25310CBC4E4364FC4B25893AC349D72616A057F873CC56AF9
+83084F39F8633F5105627C6C9CB0ED340FA0CEAD31457BEC2B07CA95D05E2AC8
+7815D73004C44A8B2496FEA1D6C55ED66C25D03D7CF04D6E360FED58CF0BE921
+CC0B9D72E28FC5D9E25ED6AD8465F4AA6F06824FAE07B1B6C438080E4A2CA5AA
+D957964A9714A6382D4FE8B7D598C9707DB21A2CFF4D61E16FCC52F086FF5D24
+37570913D1B602D083250DE2C4EA968742D0B886BD023A45A4F6DD569D15CEFC
+9EF399A3A12CD3CA4153F45A5B66FF2FB2C3C8AD7A1EB91FE48DFB7ABEF3F820
+FDADC134563C19C691B853BE60780BF940AB74C6053FCF10E5B77C9127F0F13F
+85A1D99BC8B89BEF55464A59B6007EF7F4083B75B38035FF4D48F799B6E2C00C
+D4DF079D1E3F65AEF99F3CCA54C0BCBAEF0A4BD7FCFBCB0C13E7A85AF872A0A2
+652F8276FF3FCE12075A6B6DD56410D6C248D2FD4E84BEE0D33F59CC18D25138
+CF2E20AECA187B9588485B328AC83971370CB58F6B4062B0D59571A52D34DA07
+4B393C26B5F2483A4CCFECCA828F5693BC9F51AA549D2A1F0FF3EEE1A987DB99
+ED347030DCED7C5BD1CD9D0817FA6C5E7A6D1535AD5D9411014422C5213D1E33
+E44F5302FBD2F697865F1747A85813784D0A560E5C2100E101771CE6CA772B4C
+30DC71583A54E619952C37578DFE8345D0BCA72B216C34EF3FFA6D9ED045FB2E
+F263934A07D71DBDEEEC42623E589AE52415F1794E01AD37EEF1B00C7AA99D52
+8BB0D503AF49E92AED350DE1B184399F2E75B1EAE1EC2EC225C8A9937651C164
+B70F50D31E7770B65A9816252530025647C14111F32B178D81879D028D0132C0
+33BB6A96E93989A6BB4596DD8EEC3BEDEABD9C3F00B3BF8ACC76FD4FA8AD108C
+FE65ADA2574F3FD636554BAA61C71131A0B5ADD3684BEC448EBDC9A0E906BCF2
+1FEB83D188E3C32FC9F4A25D9C722C6F4D0F2E8BA6B0062AA735CD21D342C453
+1C409ADA3EBF1D0A28686832EC90CEE239284E4027ADAA03277DB02D79074DF0
+2062F85F88DC7AC696A46016AAE455E73C1D65EBB5CC09065E3FE208FEDB16B4
+2A0DD94DA33A6688517AFD09AB7C2BCA26B1B4A75C25816A9AA4D0314D81340F
+3D990FEAB9203EBD127C1B4924295C57FB68A9EE331A35EEACACA3EE091A72C4
+77DA3A234A3B57A361021E8943EDBD018D7F944381D7966E7BD8747A79486AE1
+5D31204DD9C6E84AD44E16CF318D803D507800D21613EDDE13332630BACDDDDE
+677D147E3F21CDA81E5A1FCD98DAB1DE6636CA8513E7C2F592D6CC8629327D27
+BFF2C2EEAC75BB2231CC47BBD609884094DEC9BF94B67338FB3116C4CF8142CD
+D053F0C77BFBC8ECAE6C029B1AE56AD5BF50B70C6989724F1460055713F8720A
+9D1C8789D52BE842D68C591F527721751BE7A2D06CECA1C22F9929C2F6F83B57
+C11863DED295C49A184B78505702918E8829C9CD1DB7E0441DEB20A874E11386
+17972933ED59309CBB5BBB3120C80E619FE8D2339C739EAD96E5FCC2B0855CA5
+0628F84B897BB822DD435E3DC74B727371E01B2A9AE927D4C36865945DE99778
+67748A99B47413842FFC9522C514CD9A880FCB9A88654133D37B56762EAA0BFE
+0B748AE9B4499AD422D7DF7E24AD2CAEECD8A5BD5CD7CCAAAB82BA97F88AF281
+259D500F5F1AAC85AE3D8B97E8EB0E90440F69C9A3A1E984656456F9615FB198
+42FC82DF7F1021A969266DCB1001DEFEF0BFB148952863F378689504FD2D69DD
+7257BBEB28A3D3DD0CFAEB2349E0974F1156781445ECC6CC8EACE8C65D6C0C90
+5D9625D7FB4A5471323F79E71104A987D3D682283384F3453C20D66D07240B2F
+B64394F9801774AA7070167089B4F561B6B899F58AFF41BBA05E960826635BB5
+1133BD7568D3C1B8AF131B9A0DBD04168D1D9698D11BCEA897F10486C7635365
+865CED6C6F82DEEC6F742B08367C3AA1128CFE3B2EC60A4C84CB2EF820F121B7
+0074DAD54AA80D947E21F5925FDE3CE7B9E77A2AD7C887F375ADC5FA71AC814E
+215003DCF571C289D429A45FAA9B05C70C62690A5C7E1BC8BC6B047CFCC86440
+BCCB101BE5F6580C3682BED0E5D716EE5A5F3BC198BDC7F628738861DDB95E1D
+DE01C33EC06ED492A789C7049CAA95E9B1117B37FD288B6D534325538EFC332B
+91EFF15DD0F28879A99246F8573F970400FBF483ADA6468C07E23F6B24ABBEA6
+57FB3EA5A2CCE3C5C9BE566C66007F0025F661A3FD2CD2581AFCC6959F23377F
+81672FD02717679EE0773F736F77F06415A32AC9C5701259DD281EF7286F595D
+D22F1B40B0AD54830795626E1342FFC7BCE1CEC1A628D98E9BA949E1F8C21154
+92637E040A1308779D878D7A564165B33AA62F88A9BD479BCCD12D8B052BB7F9
+6BA72EB33AA683FB031930677CE35C57F64846E29DA8104267B1177FC9DB5D71
+F4F4964CA95CEA8B542AF79DF9C38D21D24184F363F1FF22BAABFEB5948AE0DA
+15D3EC2032A2F82A1C897B48B66C54DC4A2A7A9282E40817F8C8BB6BFBBF0D8B
+3F7D7C5121CC336A75DFBE33844A8AB6ABCDD2C295FC6C855CE939288A801795
+A8305C2AF094C0933C3F94AD9379A37D87561BA7B1CACC2B387D06A4AFD84DC5
+625187C5E25FD88B62BF178629B79C0BF2936BD373C4BBFFA6DC50A6B063991F
+5FD89C70B52FDE24927C794160101AFA1568D2F60BB5BDA1300F7EA9A4D1EDA1
+33356E41B115D393B185935D1EA8B37205D6DE54439DB22993154366697F5E91
+9C1799E8F0E2F6641800F63BC459F014D075A30A34E86728AF728E57C7697E3E
+ACD1AD83F48402B71D6223B2B2209AD07B4614AD653B5F2DCC3D85A7CD83F8EB
+C8B0B85249C6CEEA5E26D952E0EA012C563D31D5CFCB3392180313CEEFD6737D
+6234019CE223AEAF05A42AB2C702A83E11318432032D352D098970A078C72781
+D2A6E7866B3865C9F536CD6E3B15040F55A71F636F8682AF424050CB0F816A02
+0F8BA60E45F357DA2A0B9653D67488FAC680DC5914617DBB08EE2E209B59146B
+170CB772CC5E38BCC1B1EC293D79190D43C157EC7B09BEAB9A0FCB7A2366C546
+AE9BD47A1B0720E52C14AE9A495AA02BD34A6EE6FF7FB7442E53AE19A722F7DE
+63DBD90269D9F71D5642B1D28385C906B747352C50809DC239548D3945888A46
+68F6873AF2CEC26470A178897ADE6DF5807AC0CEEC38A35652BCE5B5FAF02B76
+622ABDF63F01D7A2886952B3ADF12A1C8418C2F54FFA1966A91AE20C2EC5D75A
+ECC5D75E9D6ACB4F729B304E48BC47AA8A45F5BA860AEEC233F47D227D299AE4
+C0E2197B65647D3EC64EC04CA5050F25F1C81745A047AAD9BEEB076A5F68F91F
+783B584F1971AFD4AC5FA26E85387C9C212A8A837EE475DD68E670A1A1BF34AF
+8A9D40EBFDC816C8EACA57F48222F41780D708AC6A925B2EEC8402779597A25E
+47C8C74150B307E03C72AC90D49ED3943E79628DDCAEF83E67C38923690221F2
+409FC5BF32F2D4F1F3E5916108D453E887CEA29698C3E260DAC5947174B962F9
+A64B377472D1DC3ACD4E5B2C80C99AF5E009DB0013EB04FDB05DEFD25BB21896
+2AD64CC273C7379FB8CF4AE2C4C9A100E0AB792D29632185F8636D00608EFF3D
+342BBB96BC844F829F27DE6EF8652F381BDA9945281D94C2B7F6CA1F0CA7D75A
+09E4E658A930A08C561375DDFEEF2A1D97EFB1BD53D63CE66198F5AE6D84C6E6
+680B6982E7C3A86C4972B7C95C75C645C3859887884074CC425D69A6A5B3255E
+7CA15B406382FA1537227CA5E481B690C9234AAA82B89F5F34B3DCA8CA1AABA4
+7AEB28D742507799273DFB3178055F8E6419711E0AF44A8F24404FABC6779BDD
+C0780FAEFE5CC4582CCC115A8ACE2986AB00BB1F10B509B94765548F4069BE65
+E811F857A95DB42F3AF7FE7FC1258036FB60110CABF7B5E91550946C640814CC
+19B31E74D3A5
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMR8
+%!PS-AdobeFont-1.1: CMR8 1.0
+%%CreationDate: 1991 Aug 20 16:39:40
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMR8) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMR8 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /.notdef put
+readonly def
+/FontBBox{-36 -250 1070 750}readonly def
+/UniqueID 5000791 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF4E9D2405B169CD5365D6ECED5D768D66D6C
+68618B8C482B341F8CA38E9BB9BAFCFAAD9C2F3FD033B62690986ED43D9C9361
+3645B82392D5CAE11A7CB49D7E2E82DCD485CBA1772CE422BB1D7283AD675B65
+48A7EA0069A883EC1DAA3E1F9ECE7586D6CF0A128CD557C7E5D7AA3EA97EBAD3
+9619D1BFCF4A6D64768741EDEA0A5B0EFBBF347CDCBE2E03D756967A16B613DB
+0FC45FA2A3312E0C46A5FD0466AB097C58FFEEC40601B8395E52775D0AFCD7DB
+8AB317333110531E5C44A4CB4B5ACD571A1A60960B15E450948A5EEA14DD330F
+EA209265DB8E1A1FC80DCD3860323FD26C113B041A88C88A21655878680A4466
+FA10403D24BB97152A49B842C180E4D258C9D48F21D057782D90623116830BA3
+9902B3C5F2F2DD01433B0D7099C07DBDE268D0FFED5169BCD03D48B2F058AD62
+D8678C626DC7A3F352152C99BA963EF95F8AD11DB8B0D351210A17E4C2C55AD8
+9EB64172935D3C20A398F3EEEEC31551966A7438EF3FEE422C6D4E05337620D5
+ACC7B52BED984BFAAD36EF9D20748B05D07BE4414A63975125D272FAD83F76E6
+10FFF8363014BE526D580873C5A42B70FA911EC7B86905F13AFE55EB0273F582
+83158793B8CC296B8DE1DCCF1250FD57CB0E035C7EDA3B0092ED940D37A05493
+2EC54E09B984FCA4AB7D2EA182BCF1263AA244B07EC0EA901C077A059F709F30
+4384CB5FA748F2054FAD9A7A43D4EA427918BD414F766531136B60C3477C6632
+BEFE3897B58C19276A301926C2AEF2756B367319772C9B201C49B4D935A8267B
+041D6F1783B6AEA4DAC4F5B3507D7032AA640AAB12E343A4E9BDCF419C04A721
+3888B25AF4E293AACED9A6BDC78E61DA1C424C6503CC1885F762BFD4563ABA4F
+D926227FAD2B2D4975835541EA88A9122250DB8FDF8A059573591995D990EF3C
+DF93C316B57159DEB0ED1D04345E185A3A6ED52BD68CDC5B105DCA99684ABF7A
+C22FE9E198559B40BDB4FE42C80ED82E9274A4B67B948166DC9D69C85A7F2F91
+3B17ED4242F63E8949C311BBFE38172B1628644258DFE06C72D757395C5BD42E
+C03780E517B3D633E4D30C9B8DDFB317ED5A12DE941021AA3A542114136269CE
+423340BC28EF54C35CD0E77E5C8756AAF31FA952D3DC541129D186B292C0D489
+E6BC46239545682818A8BAEC3AD95397EC58BA75CBA2170C6E4AF7C069AB9B67
+E0A2D12C75000E1A2D17B92107E62FE9990D6F83A3582A4779749CF62F50CD77
+818DCDA3AA9487774E56ECE703CDCE72932E157453971A588FE7F4522AC23422
+DE1E11AF28FE2AB0B29CDC9EB8C76D2CB1F11271BD997DF00A422C7C43E5825C
+0074A3AC6FA9219DE81ED9087D02B5DC4BD6E7ABB70E7B859345959DF8BF685A
+203607BF2AF44CB538762B0A76EC09C4CA3D58BB289CB37D613913B6040FF739
+D3DA2F07B9B811CB393904FFEA743D9E1AA85A155FD757FE19CF9BDC00130779
+A3A28B22CED4D4DECDA1982D966101B5F06588D45981BA84C8B07CF11D0F581D
+AEDEAE38E212689E5AE0DD8F66891563D6FDF4FEA880B95A2F7783F9E74E6012
+285A4E8E4DF0423C7FC5D030AC918B0EB3B9AE6318EC0F7FC5E69E4A09A62D06
+64119684BEA344B0E775C681F6F78E10A40C9C06BB8F1F45FF60686D4E6164BC
+AB289CEE800D560C8CDDA2C86B98975B56CC066A10DD3A4EF3D6161699F9F7C5
+083CA1EE40C9EC4DA8EBE39EB3E941
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMR10
+%!PS-AdobeFont-1.1: CMR10 1.00B
+%%CreationDate: 1992 Feb 19 19:54:52
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMR10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMR10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /.notdef put
+readonly def
+/FontBBox{-251 -250 1009 969}readonly def
+/UniqueID 5000793 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4
+87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F
+D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0
+92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C
+295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75
+409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C
+4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF
+2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E
+0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E
+B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008
+24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B
+43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF
+D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575
+5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC
+96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3
+7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3A38ED682C65299D6C
+67201AC4BEC92930ED59A43AFA43F24F6ACBEA592A03841835D631F03C2C1A78
+D554F14F748CFE52EE1255995118829A77F388B119B21C90975F74DE5E4A6DA9
+C531C14FDA14B4AA1EC720F6CE0342AD2CFE20771E4F80ECEB0ACA2CF89E2280
+6BA7F408F14F24DEEFB988141457533E4822D51A43231D49BE8B184483530CDF
+6B37AE44174A99A2367CDFA06D801B1588A55CD8FBC5B1A6903110F1BC42EC5F
+FCCE6840E8ADC084E63A7C5C45FE6953D18AD1C2573314AF568A69608A9B3825
+8DDD825D7E8041DCDA231DFB8E6ABD97BCDCA95500E72B2A64F2F989A6D7AD7C
+875D0E0E051ACBD893E30EA56145D44F2DC60EA9D0F7D62021E05D2624B00B93
+92171DBF9964BBEC03013F324BD4B1E3053CEED520CD0E02D3BD8695B3C1D422
+9FD5F78A6F1810C4440110E7CF77EF9E89E7CFD5C7E6C184E7BB76320ACD3E59
+118F1F7381C2FBB0DFC4B2D7805435133C2526B1EBFC75F605FC422B56D69EB9
+6663FECF5BD529D9E7C7EBD598A6CF8E5755258959D93624FFE199D39A3DA75E
+B091FC3CE77584E9FB3C5D5D4B045BB5270B6DA4F8750D81480FF4FA476CF794
+F45503B19EB32BD540B24672F7383ED0AC2FE4D6AB77570225D4900DC856DA39
+76ABF6931AD5B3270E553E45AD618EEB77BDFE4480A36CD4F92D20F442A410D6
+F9F7AF27DD7EB863F35EBD0252A06BF0DAF5142E7656064CEEC693C16B00486C
+D2A81696E0E285BDCE9D146DB188BCC895FC2C608649FBEC19D6EDC9915FAB9D
+588C34864F3D19B617B1C83F76B2CD6CFB51276675A46A0EFDCDBB57526BCE54
+4990806785A2B9A86A2076B0D1FF159D3A54359FE8E3FE8BBDEC164416411F33
+F45F4173C51E84A8BFD121BA9E9F251DFDD09572EF428D6B1343FA1D3582EA9F
+A6CB5E534596F15A9EBEB77FFAF00FDF0D9E2B312A81D04B38A5CDED9EE7A31B
+D92C3145C1C1C8FE8D006373F9ED95CBEAE966F4D7F6FBEFD2C5A36FA4773DCB
+66DE0F21073C0795744567041F02861EAEDD054459F9804867C9AB81EF68D0B8
+75E13145AFBF57176CA5CD5CADADBE9DAA2C52D973C9AC1B00E601AD6F855B61
+5CEF71A4999B7A9ACCC66A0728D283CE5E91DD4022FA126169830AD6BB981E1B
+DB796680E9FE0FD4EE146EF8D0B6B652A6E3A57FDF2047F19A9D0FA5CFED185A
+0E94174FE775B753003E4AF70C2208E751DC07AC979B2179437B9382501F4240
+BADA84A464DA04ED1154D254A664F7F896E10916C64E4C73C9EC34249CFE782D
+14BD6190E6B32853F1D23680389CCF3A81FA1496E9CCE6CD21775DF4E92A2623
+EE88DFE79B81F386F0431EDD5195B2964700488D7EEE24BD4613A2BDB6BDD270
+86EABF50C25AE21F14B84E51024CD103B49AB5CDCA5A30D293D3F779932DC989
+5E75A93F72880066BA35AD56C70323E294E8444F55B18A2A849CF0A1F4FBB86B
+6DF37BAADC1D51475504ED97051DB01DE0CDB7807FC6529B8A1A7E2AF37863E9
+7E213C8EBD5587826EC1A6748A4312134C7B8942302041C252BD8BB534070050
+70268EB528A57BBE39B406DD3FFE55691A243B3713B9C4DB8593186BD8F3E17B
+FA647C8C549B4D354F0EA5BBFEFD3E831648E6228DD00B89CEA7F6DF83CC1CFC
+CB8B7738E2F2738B179A253ED22E0D4F4C63AFBB22F7BA2598DC87ED04FF9FC4
+9DB734B5AB8D475DDCE37247D8DD123AA777654F3739CB71EA758D07B67A95F2
+A32FF46437C058BF36158E48A34A730D3D92EB44C1E486C249D023921F466711
+ECE40CDBFAF8CE4B0AC46D29D09CF268AD8F2741A27F13D62CA83C674C32BC39
+BBFD7DD42BAD2B9DDD6BCB6A5BD9FA1C0CF0774965903FE3312EE0F959752768
+C00E81F4F28BD7E773A47C5755AE5075F6457435B63E21A90DB0425A046095C9
+EC283ABD6D9BE1E668FA1465BDFBF8BF6BEBA17B964FD60B6BD7EEE28E079839
+55D8CD7F0D668480E7CBA2C6A47C73787083D47443E16C06AB96BDF35C9476A3
+D356AAE101F9DE2341A34555B23B565B74814BE7FE83B75E06CB8C8B2190E82C
+FBA8D0AAD2A9C4E6D7D6A83989878BDDE27F73AADAF87CB573C74761ACDF5AB4
+5B9735E84882282127929357E9CF4B6499B576C8A79F9230E9528FA2F3A703B6
+5FC71B95433958A67F2F08D286E2B3A0E5691930D2DCB7C97CAD3733C7D8C5F6
+114CDB7895FB51E2B9D730007747673B8BA83614C7AE9A3103E8C7760EFD2887
+3FED8D79A876CAA55F9EC99D33AAA7B62E1A3322EB8E6A67B79946CFCC3C8BF6
+463B07C454165A5863008D67BF073F9E1BD0507C4512A0F8E557B08F35640998
+A261DAE743A146A525248A3518F8824E952E2EDCFA845FF75879E613837A1AFD
+6251CD6188C92845D67E00BE2D4D69C8DC14D17696B8246A64A49DC5F61B330F
+1A7B5FE881DF896A0A69580E3299A66E23880FD0A7FDDB1B8E734898AD3373B0
+B2D9482A837C7C745044793A961CCA98829790107173AD41ECF54706520B5206
+D41464BD1421CB99C10FAFB1DC52D0C40C21C830C658CDFCC0DEB1E54BED772A
+1FEE615D345B80DB798BC93ED0C231DE4332E2D7D2FFF85E97804A1E02375D8A
+20F678B5A1FAF53C0877C901FFE8A5B56AACD1A3334FACD5965BE02123DC0525
+2E6A88DC469B4FCB37FBE84FD31CC090FB6B98C5DB4AE554C784B4F6BA7E39DD
+5274B6F7E905C555ADED6D8B3DB81B7B0B62F6C20E309D17ECA8AC378E1BBC01
+E9AAC46C5AD4147A498AD99F170BA2063AFA07989FD0AE9DE929077887DCCEA0
+0E0BDE07FA0A86C536C7B2420CD9E7562CCA5B7AC5988CCE53C3F68E53061A22
+9622FF2A9595AF39F5CB8CB487A7159725D573450174038964F577A871853D3C
+C6FB09D701E760B4171BC26CBF6C7524AE0CE1F3C1889597C21F8648F93B5FCF
+710A9F5C6A5FC1CAB3D53CF85015086CEB41BCB1D4F6CEC7113AD867EF5FA534
+67FD7DD0C47B09B9F8C30B61BD51BE497AEBD4B74E2A9C82E01ADE32A66DFF6F
+F042EC8DA702164F26C4B789B2E9788E6E09C440089010C43190E114D9F5EA85
+D4BA7DFC22F011DC5E1B6C7CBAC13D6D929C3E0673F4A9F4E2A970B93352A076
+74D1444C61507D9505134586E5036E6772EE503C7F00B71AA345927B3A2CD7A4
+9F5575C3085250C3383C0AD33300A2C087B41E66AECE3B8DB8A77B8AA6D97CF2
+CA23F0DBF4485A1C0DBCECE287D95F8D70DF80B11473D70E527C1F6804950A9F
+5B19411285FB45775EC9AFB05F9AADFBFD98A87C2FF38C314BA9CE41B7C4E664
+E480838DD4299004329DB3E665AAC2FE5A53E295D627ED896D56876268C55981
+FF3F19DFA5E6ED355B3020F9615F64273670A8EA36B0A106D37CC1051580EA3F
+694DA991C9DF54A51D596A491827E6B53790343D7DF81E652ABC7D3DA38B58DE
+EAE0DA56A20312F8C2803D904EE2B4389B5A680C55BB564B5C203539B5F7B445
+8ED9D8CA51B789F5BE09152D1B44FBDD9594B628BEF543BDF9BB9EA182C4F4FB
+98213E82636CA16D377A483023D13A3B9C658D4B9F1BE08808A67004A5EFF944
+B9FEE34F193F055256BCB7CEDA4BFC3FF4668FAF9B175DD926F9774EBFE9F487
+E91B8D332BEFCE996F6F1B800F3F
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMSY10
+%!PS-AdobeFont-1.1: CMSY10 1.0
+%%CreationDate: 1991 Aug 15 07:20:57
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMSY10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.035 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMSY10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /.notdef put
+readonly def
+/FontBBox{-29 -960 1116 775}readonly def
+/UniqueID 5000820 def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964
+7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4
+A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85
+E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A
+221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A
+27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF
+5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09
+0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730
+DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A
+71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09
+4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C
+515DB70A8D4F6146FE068DC1E5DE8BC57033D79919697C81395D5B94C3AAAB11
+52D73937B8F82D3E2E764DA1B3BE273CBB84E4B1919CC1D5586C21F6FC23BF1D
+82DE5A8DFA3E8F5C25622AAB9F7A588532D13C663079C8FB84DA6BD4D2DEDB2F
+84CE30D0F188EEA2785B492B7704AF51ECE436B1B191B22DFEB7894DD5457E4C
+D14787B5F8630B42B3FC9C15A1B7B887063D92009BE4A5A9F8416CD9187851B8
+CF244E087740953A1639BAFFB86CA7C99FBD401FB9C556F330F1E4E987E715F8
+59A751BA88003F808F85A690E55812D8FBAE945A5AD24FF79D59C9876B3CCEAD
+7F3CA53A1A9E2696392C43162DA3750DABE6FDDA7AC795F26D8A97BEFFAB870C
+A2F1A91C4AA767BAC502771ED346363D1ADE899BF289BDA5D464EB55F45ABC7D
+CD481A68994B08EA0F71EB252A8BA0E238A1B854104D33C7693AD4E84F480E11
+B7558EDF834C57C2EB5F9134967B76364DE2ABC32D7AD30C9ABF8FD4CF82E560
+451ACF5403739ACFFE084E9645FBAD30A0C61C3F90143A69984C48633CB9F4F7
+AF76B78A156952CB66DDE425E27364B626C2E070A8DCF80A0B7B632802E7492F
+2C5856A6DF0DCDA3ADBDF4992770E3ECF0C8E849A8563F229C2B8BB3F572F9EF
+EC47B8C28F21D51803A8891CC5C2159FB49B4DF8A263F4BF3855443583D1509F
+EA11E69BE2380DC77C68315BF451A396D0D90A86CA41D1FBF83CB5B8FC9EE68C
+E63976571F1F2E8F47D9B4FF9773E8E4055165D8DDD62A304EC10834BA4BF747
+F41CAC
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+TeXDict begin 39158280 55380996 1000 600 600 (sane.dvi)
+@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40
+1[40 1[45 97[{ TeXBase1Encoding ReEncodeFont }13 90.9091
+/Times-BoldItalic rf /Fb 215[67 40[{}1 83.022 /CMEX10
+rf /Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60
+1[60 60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60
+60 60 60 60 2[60 60 60 1[60 60 60 1[60 65[{
+ TeXBase1Encoding ReEncodeFont }37 99.6264 /Courier rf
+/Fd 133[48 6[48 48 2[48 5[48 2[48 48 48 12[48 3[48 4[48
+8[48 3[48 65[{ TeX09fbbfacEncoding ReEncodeFont }13 90.9091
+/CMTT10 rf /Fe 133[33 37 1[54 37 37 21 29 25 1[37 37
+37 58 21 37 1[21 37 37 25 33 37 33 37 33 11[54 46 42
+50 3[54 4[25 3[46 1[50 1[54 18[19 25 42[42 2[{
+ TeXBase1Encoding ReEncodeFont }35 74.7198 /Times-Roman
+rf /Ff 206[25 49[{ TeXBase1Encoding ReEncodeFont }1 49.8132
+/Times-Roman rf /Fg 206[33 49[{ TeXBase1Encoding ReEncodeFont }1
+66.4176 /Times-Roman rf /Fh 134[45 52 1[44 52 3[41 2[55
+1[27 47 6[47 39 32[69 3[71 45 71 1[25 35[55 22[{
+ TeXaae443f0Encoding ReEncodeFont }16 90.9091 /CMMI10
+rf /Fi 204[35 35 35 49[{ TeXf7b6d320Encoding ReEncodeFont }3
+66.4176 /CMR8 rf /Fj 194[71 3[45 45 45 45 45 1[45 45
+45 5[71 1[35 35 40[{ TeXf7b6d320Encoding ReEncodeFont }12
+90.9091 /CMR10 rf /Fk 154[40 40 84[45 13[25 71{
+ TeXbbad153fEncoding ReEncodeFont }5 90.9091 /CMSY10
+rf /Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40
+25 25 45 45 25 40 45 40 45 45 51[30 45[{ TeXBase1Encoding ReEncodeFont }
+24 90.9091 /Times-Italic rf /Fm 134[50 50 72 50 55 33
+39 44 1[55 50 55 83 28 2[28 55 50 1[44 55 44 55 50 12[66
+55 72 1[61 78 72 94 3[39 78 1[61 1[72 72 66 72 7[50 50
+50 50 50 50 50 50 50 50 1[25 33 45[{ TeXBase1Encoding ReEncodeFont }47
+99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53
+66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120
+86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86
+11[60 60 60 60 60 2[30 40 45[{ TeXBase1Encoding ReEncodeFont }43
+119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76
+3[86 29[124 12[86 86 86 86 86 86 49[{ TeXBase1Encoding ReEncodeFont }13
+172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 1[55 55 2[55 55 55 55 55 55 55 1[55
+55 55 55 2[55 55 35[{ TeXBase1Encoding ReEncodeFont }80
+90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 30 5[56 66 66 86 66 66 56 51 61 1[51 66
+66 81 56 66 35 30 66 66 51 56 66 61 61 66 5[25 25 45
+45 45 45 45 45 45 45 45 45 25 23 30 23 2[30 30 30 35[51
+51 2[{ TeXBase1Encoding ReEncodeFont }77 90.9091 /Times-Roman
+rf /Fr 133[40 45 1[66 45 51 30 35 40 51 51 45 51 76 25
+51 1[25 51 45 30 40 51 40 51 45 10[66 66 61 51 2[56 71
+66 4[35 3[61 66 66 61 66 6[30 1[45 45 45 45 45 45 45
+45 4[23 2[30 30 40[{ TeXBase1Encoding ReEncodeFont }49
+90.9091 /Times-Bold rf /Fs 135[103 149 103 115 69 80
+92 1[115 103 115 172 57 115 1[57 115 103 69 92 115 92
+115 103 12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149
+1[149 23[69 69 40[{ TeXBase1Encoding ReEncodeFont }34
+206.559 /Times-Bold rf /Ft 204[50 50 1[50 2[33 45[{
+ TeXBase1Encoding ReEncodeFont }4 99.6264 /Times-Roman
+rf /Fu 139[48 67 57 2[86 86 4[48 3[76 86 2[76 10[124
+2[96 4[124 8[105 3[124 13[86 1[86 86 1[43 46[{
+ TeXBase1Encoding ReEncodeFont }18 172.188 /Times-Roman
+rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+ end
+%%EndSetup
+%%Page: 1 1
+TeXDict begin 1 0 bop 941 1939 a Fu(SANE)44 b(Standard)g(V)-19
+b(ersion)44 b(1.03)1718 2698 y Ft(2003-02-22)p eop end
+%%Page: 1 2
+TeXDict begin 1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91
+b(Pr)n(eface)3430 b(6)136 1610 y Fq(1.1)96 b(About)24
+b(This)g(Document)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(6)345 1781 y(1.1.1)110
+b(T)-7 b(ypographic)26 b(Con)l(v)o(entions)92 b(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227 b(7)136 2214
+y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(7)0 2476 y Fr(3)91 b(The)23 b(SANE)e(En)l(vir)n(onment)2770
+b(8)136 2647 y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Image)24
+b(T)m(ransmission)85 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(10)0 3251 y Fr(4)91 b(The)23
+b(SANE)e(A)n(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639
+b(13)136 3422 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3593 y(4.2)96
+b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(14)345 3764 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(14)345 3935 y(4.2.2)110 b(Boolean)25
+b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345 4106 y(4.2.3)110
+b(Inte)o(ger)25 b(T)-7 b(ype)88 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345
+4277 y(4.2.4)110 b(Fix)o(ed-point)26 b(T)-7 b(ype)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(15)345 4448 y(4.2.5)110 b(T)-6 b(e)o(xt)46
+b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345 4619 y(4.2.6)110
+b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4790
+y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)345 4961 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7
+b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(17)345 5132 y(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7
+b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(19)1927 5381 y(1)p eop end
+%%Page: 2 3
+TeXDict begin 2 2 bop 136 123 a Fq(4.3)96 b(Operations)32
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)345 292
+y(4.3.1)110 b Fp(sane)p 861 292 28 4 v 31 w(init)75 b
+Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(24)345 462 y(4.3.2)110 b Fp(sane)p
+861 462 V 31 w(exit)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)345 632
+y(4.3.3)110 b Fp(sane)p 861 632 V 31 w(get)p 1057 632
+V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(25)345 801 y(4.3.4)110 b Fp(sane)p
+861 801 V 31 w(open)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)345 971
+y(4.3.5)110 b Fp(sane)p 861 971 V 31 w(close)88 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(26)345 1140 y(4.3.6)110 b Fp(sane)p 861 1140
+V 31 w(get)p 1057 1140 V 32 w(option)p 1419 1140 V 30
+w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(26)345 1310 y(4.3.7)110 b Fp(sane)p 861 1310 V 31 w(control)p
+1277 1310 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(26)345 1479 y(4.3.8)110 b Fp(sane)p
+861 1479 V 31 w(get)p 1057 1479 V 32 w(parameters)25
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(27)345 1649 y(4.3.9)110 b Fp(sane)p 861 1649 V 31 w(start)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(30)345 1819 y(4.3.10)65 b Fp(sane)p
+861 1819 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)345 1988
+y(4.3.11)65 b Fp(sane)p 861 1988 V 31 w(cancel)33 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(31)345 2158 y(4.3.12)65 b Fp(sane)p 861 2158
+V 31 w(set)p 1057 2158 V 32 w(io)p 1199 2158 V 31 w(mode)78
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(31)345 2327 y(4.3.13)65 b Fp(sane)p 861 2327 V 31 w(get)p
+1057 2327 V 32 w(select)p 1419 2327 V 30 w(fd)37 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(32)345 2497 y(4.3.14)65 b Fp(sane)p 861 2497 V 31 w(strstatus)73
+b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(32)136 2667 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(32)136 2836 y(4.5)96
+b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(34)345 3006 y(4.5.1)110 b(Option)25 b(Number)e(Count)70
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(34)345 3175 y(4.5.2)110 b(Scan)24 b(Resolution)i(Option)87
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(35)345 3345 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(35)345 3514 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(35)0 3775 y Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989
+b(37)136 3944 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(38)345 4114 y(5.1.1)110 b(Primiti)n(v)o(e)24
+b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(38)345 4284 y(5.1.2)110 b(T)-7
+b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 4453 y(5.2)96
+b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(39)345 4623 y(5.2.1)110
+b Fp(SANE)p 861 4623 V 31 w(NET)p 1057 4623 V 32 w(INIT)82
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(39)345 4792 y(5.2.2)110 b Fp(SANE)p 861 4792
+V 31 w(NET)p 1057 4792 V 32 w(GET)p 1254 4792 V 31 w(DEVICES)62
+b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(40)345 4962 y(5.2.3)110 b Fp(SANE)p 861 4962 V 31 w(NET)p
+1057 4962 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(40)345 5132 y(5.2.4)110
+b Fp(SANE)p 861 5132 V 31 w(NET)p 1057 5132 V 32 w(CLOSE)27
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(40)1927 5381 y(2)p eop end
+%%Page: 3 4
+TeXDict begin 3 3 bop 345 123 a Fq(5.2.5)110 b Fp(SANE)p
+861 123 28 4 v 31 w(NET)p 1057 123 V 32 w(GET)p 1254
+123 V 31 w(OPTION)p 1615 123 V 30 w(DESCRIPTORS)28 b
+Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(41)345 294 y(5.2.6)110 b
+Fp(SANE)p 861 294 V 31 w(NET)p 1057 294 V 32 w(CONTROL)p
+1474 294 V 29 w(OPTION)36 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(41)345 466 y(5.2.7)110 b Fp(SANE)p 861 466 V
+31 w(NET)p 1057 466 V 32 w(GET)p 1254 466 V 31 w(PARAMETERS)34
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(42)345
+638 y(5.2.8)110 b Fp(SANE)p 861 638 V 31 w(NET)p 1057
+638 V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(42)345 809 y(5.2.9)110 b
+Fp(SANE)p 861 809 V 31 w(NET)p 1057 809 V 32 w(CANCEL)41
+b Fq(.)k(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(43)345 981 y(5.2.10)65 b Fp(SANE)p 861 981 V 31 w(NET)p
+1057 981 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(43)345 1153 y(5.2.11)65 b Fp(SANE)p
+861 1153 V 31 w(NET)p 1057 1153 V 32 w(EXIT)82 b Fq(.)46
+b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(44)0 1415 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871
+b(45)1927 5381 y Fq(3)p eop end
+%%Page: 4 5
+TeXDict begin 4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136
+1349 y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45
+b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data)
+g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(or)g(image)g
+(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(11)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(33)136 2119 y(4.2)96
+b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)1927 5381 y(4)p eop end
+%%Page: 5 6
+TeXDict begin 5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19
+b(ables)136 1349 y Fq(4.1)96 b(Status)24 b(Codes)h(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)136 1521 y(4.2)96
+b(Prede\002ned)25 b(De)n(vice)f(Information)i(Strings)47
+b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(18)136
+1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23 b(T)-7 b(ypes)24
+b(\()p Fp(SANE)p 1343 1693 28 4 v 31 w(Value)p 1649 1693
+V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(20)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p Fp(SANE)p
+1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036 y(4.5)96
+b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(22)136
+2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23 b(Constraints)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(23)136 2379 y(4.7)96 b(Action)25 b(V)-10
+b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p
+Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(27)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f
+(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)136 2722
+y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139
+2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(29)1927 5381 y(5)p eop end
+%%Page: 6 7
+TeXDict begin 6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278
+y Fs(Pr)l(eface)0 1782 y Fq(The)25 b(SANE)e(standard)28
+b(is)e(being)h(de)n(v)o(eloped)g(by)f(a)f(group)i(of)f(free-softw)o
+(are)i(de)n(v)o(elopers.)38 b(The)25 b(process)i(is)f(open)g(to)g(the)0
+1895 y(public)e(and)e(comments)h(as)f(well)g(as)g(suggestions)k(for)c
+(impro)o(v)o(ements)i(are)e(welcome.)29 b(Information)24
+b(on)f(ho)n(w)e(to)h(join)h(the)0 2008 y(SANE)e(de)n(v)o(elopment)26
+b(process)f(can)f(be)g(found)g(in)g(Chapter)g(6.)0 2179
+y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d(streamline)j(softw)o
+(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c(standard)j
+(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f(access)h
+(raster)g(scanner)g(hardw)o(are.)30 b(This)22 b(should)i(reduce)g(the)f
+(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0 2405 y(implementations,)i
+(thereby)e(reducing)h(the)e(need)g(for)g(reimplementing)i(similar)e
+(code.)0 2756 y Fn(1.1)119 b(About)31 b(This)f(Document)0
+3022 y Fq(This)35 b(document)j(is)d(intended)j(for)d(de)n(v)o(elopers)j
+(who)e(are)f(creating)j(either)f(an)e(application)k(that)d(requires)h
+(access)g(to)0 3135 y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g
+(de)n(v)o(elopers)j(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)
+-5 b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0
+3248 y(implementations)35 b(of)c(SANE)f(components.)55
+b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g
+(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o
+(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c
+(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0
+3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as)
+d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i
+(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l
+(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29
+b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26
+b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i
+(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement)
+i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o
+(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h
+(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o
+(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7
+b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g
+(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o
+(e)d(this:)1927 5381 y(6)p eop end
+%%Page: 7 8
+TeXDict begin 7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278
+y Fs(Intr)l(oduction)0 1782 y Fq(SANE)22 b(is)i(an)g(application)k
+(programming)e(interf)o(ace)h(\(API\))c(that)i(pro)o(vides)h
+(standardized)i(access)e(to)e(an)o(y)g(raster)i(image)0
+1895 y(scanner)e(hardw)o(are.)30 b(The)22 b(standardized)27
+b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)g(dri)n(v)o(er)g
+(for)g(each)g(scanner)i(de)n(vice)e(instead)0 2008 y(of)30
+b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e(application.)52
+b(The)30 b(reduction)i(in)e(the)h(number)g(of)f(required)i(dri)n(v)o
+(ers)f(pro)o(vides)0 2120 y(signi\002cant)24 b(sa)n(vings)h(in)d(de)n
+(v)o(elopment)j(time.)j(More)23 b(importantly)-6 b(,)25
+b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f(which)h(applications)j
+(can)0 2233 y(w)o(ork.)i(As)21 b(such,)h(it)g(will)f(enable)i
+(applications)i(that)d(were)g(pre)n(viously)i(unheard)f(of)f(in)f(the)h
+(UNIX)e(w)o(orld.)29 b(While)22 b(SANE)0 2346 y(is)27
+b(primarily)i(tar)n(geted)h(at)d(a)g(UNIX)e(en)l(vironment,)31
+b(the)d(standard)h(has)f(been)g(carefully)i(designed)f(to)f(mak)o(e)f
+(it)g(possible)0 2459 y(to)c(implement)i(the)f(API)e(on)i(virtually)i
+(an)o(y)d(hardw)o(are)i(or)f(operating)i(system.)0 2631
+y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h(Access)f(No)n(w)
+f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f(that)g(SANE)e
+(is)h(sane)i(in)f(the)g(sense)h(that)0 2744 y(it)g(will)f(allo)n(w)h
+(easy)h(implementation)i(of)d(the)g(API)e(while)j(accommodating)i(all)d
+(features)h(required)i(by)d(today')-5 b(s)25 b(scanner)0
+2857 y(hardw)o(are)31 b(and)f(applications.)51 b(Speci\002cally)-6
+b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g(to)f(accommodate)i
+(de)n(vices)f(such)f(as)0 2970 y(scanners,)25 b(digital)h(still)e(and)g
+(video)g(cameras,)h(as)e(well)g(as)h(virtual)h(de)n(vices)g(lik)o(e)f
+(image)g(\002le)f(\002lters.)0 3321 y Fn(2.1)119 b(T)-11
+b(erminology)0 3587 y Fq(An)21 b(application)j(that)e(uses)g(the)g
+(SANE)d(interf)o(ace)k(is)f(called)g(a)f(SANE)e Fl(fr)l(ontend)p
+Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g(implements)h(the)f(SANE)0
+3700 y(interf)o(ace)31 b(is)d(called)i(a)f(SANE)d Fl(bac)n(k)o(end)p
+Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k Fq(pro)o(vides)e(some)d
+(means)i(to)e(manage)i(one)f(or)f(more)h(other)0 3812
+y(back)o(ends.)1927 5381 y(7)p eop end
+%%Page: 8 9
+TeXDict begin 8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278
+y Fs(The)51 b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27
+b(is)j(de\002ned)g(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50
+b(Accessing)32 b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h
+(consists)g(of)0 1894 y(tw)o(o)c(phases:)39 b(\002rst,)29
+b(v)n(arious)g(controls)h(of)e(the)h(scanner)g(need)g(to)f(be)g(setup)h
+(or)f(queried.)44 b(In)28 b(the)g(second)i(phase,)g(one)e(or)0
+2007 y(more)c(images)g(are)g(acquired.)0 2178 y(Since)33
+b(the)f(de)n(vice)i(controls)g(are)f(widely)g(dif)n(ferent)h(from)e(de)
+n(vice)i(to)e(de)n(vice,)k(SANE)30 b(pro)o(vides)k(a)e(generic)i
+(interf)o(ace)0 2291 y(that)25 b(mak)o(es)g(it)f(easy)h(for)g(a)f
+(frontend)j(to)d(gi)n(v)o(e)h(a)f(user)h(access)g(to)g(all)f(controls)j
+(without)e(ha)n(ving)i(to)d(understand)k(each)d(and)0
+2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34 b(The)24
+b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h(each)g(de)n
+(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p Fq(.)0
+2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n(alue)e
+(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j(control)
+e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)h(option)
+h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g(an)f(inte)o
+(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0 2801
+y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f(not)f
+(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30
+b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f
+(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h
+(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g
+(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22
+b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h
+Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e
+(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f
+(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back)
+o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e
+(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h
+(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o
+(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31
+b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h
+(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227
+4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h
+(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n
+(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g
+(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o
+(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227
+4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e
+(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227
+4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k
+(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d
+(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n
+(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f
+(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29
+b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o
+(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f
+(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4
+v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro)
+o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h
+(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f
+(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n
+(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i
+(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927
+5381 y(8)p eop end
+%%Page: 9 10
+TeXDict begin 9 9 bop 427 123 a Fp(#define)52 b(sane_read)e
+(be_sane_read)227 310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g
+(kind,)i(back)o(end)g Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d
+Fp(be)p 2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p
+Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i
+(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n
+(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227
+536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time)
+f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136
+724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27
+b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i
+(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227
+837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41
+b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e
+(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d
+(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o
+(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30
+b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g
+Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f
+(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha)
+n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got)
+e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227
+1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f
+(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6
+b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i
+(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e
+(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p
+Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e
+(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227
+1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d
+(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30
+b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g
+(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to)
+227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.)
+43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f
+(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g
+(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g
+(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h
+(that)f(scanner)-5 b(.)0 2479 y
+ currentpoint currentpoint translate 0.64821 0.64821 scale neg exch
+neg exch translate
+ 0 2479 a 0 2479 a
+ gsave currentpoint currentpoint translate 270 neg rotate neg exch
+neg exch translate
+ 0 2479
+a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550
+@rwi @setspecial
+%%BeginDocument: figs/hierarchy.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hierarchy.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 2
+%%CreationDate: Thu Jan 30 22:02:12 1997
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%Magnification: 1.00
+%%Orientation: Landscape
+%%BoundingBox: 0 0 355 722
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-17.0 -17.0 translate
+ 90 rotate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n 0 612 m 0 0 l 792 0 l 792 612 l cp clip
+ 0.06000 0.06000 sc
+% Polyline
+n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr
+% Polyline
+n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr
+15.000 slw
+% Polyline
+n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+11399 5182 m
+gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+8099 5182 m
+gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr
+% Polyline
+n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr
+% Polyline
+n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr
+% Polyline
+n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr
+% Polyline
+n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 2700 1800 m 1200 3000 l gs col-1 s gr
+% Polyline
+n 3000 1800 m 3000 3000 l gs col-1 s gr
+% Polyline
+n 3300 1800 m 4800 3000 l gs col-1 s gr
+% Polyline
+n 9600 1800 m 9600 2100 l gs col-1 s gr
+% Polyline
+n 9450 2700 m 8100 4800 l gs col-1 s gr
+% Polyline
+n 11400 4200 m 11400 4800 l gs col-1 s gr
+% Polyline
+n 1200 3600 m 1200 4200 l gs col-1 s gr
+% Polyline
+n 3000 3600 m 3000 4125 l gs col-1 s gr
+% Polyline
+n 7875 5400 m 7350 5850 l gs col-1 s gr
+% Polyline
+n 8250 5400 m 8775 5850 l gs col-1 s gr
+% Polyline
+n 11475 5400 m 11475 5850 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr
+% Polyline
+n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 9750 2700 m 11400 3600 l gs col-1 s gr
+% Interp Spline
+gs n 4800 3600 m
+ 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto
+ 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto
+ 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto
+ 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto
+ 7224.0 624.7 8573.7 446.9 9450 900 curveto
+ 9524.5 938.5 9562.0 1013.5 9600 1200 curveto
+ gs col-1 s gr
+ gr
+
+/Helvetica ff 270.00 scf sf
+1199 3382 m
+gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 3382 m
+gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+1200 4425 m
+gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 4380 m
+gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+7350 6165 m
+gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+8925 6165 m
+gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+11475 6135 m
+gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 600 m
+gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+9600 630 m
+gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+4725 5850 m
+gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 1582 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+4799 3382 m
+gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 1582 m
+gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 2482 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+11399 3982 m
+gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial 2958 2479 a
+ currentpoint grestore moveto
+ 2958 2479 a 0 2479 a
+ currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale
+neg exch neg exch translate
+ 0 2479
+a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0
+4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h
+(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44
+b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g
+(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f
+(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0
+5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h
+(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i
+(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop end
+%%Page: 10 11
+TeXDict begin 10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j
+(called)e Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p
+Fq(.)36 b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i
+(whereas)d(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f
+(pro)o(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h
+(scanners.)51 b(In)30 b(the)g(\002gure,)i(machine)f(B)0
+349 y(pro)o(vides)h(non-local)h(access)f(to)e(its)g(scanners)i(through)
+h(the)d(SANE)e(frontend)k(called)g Fp(saned)p Fq(.)45
+b(The)30 b Fp(saned)d Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h
+Fp(hp)e Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)
+f(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22
+b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f
+(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f
+(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i
+(called)f Fp(qcam)p Fq(.)0 849 y(Note)f(that)g(a)g(meta)g(back)o(end)i
+(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g
+(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0
+962 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h
+(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g
+(frontends)i(that)f(access)g(it.)0 1075 y(The)j(name)g(\223meta)h(back)
+o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e
+(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0
+1188 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0
+1526 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1782
+y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h
+(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f
+(represented.)57 b(The)0 1895 y(SANE)34 b(approach)39
+b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation)
+j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0
+2008 y(applications)f(and)c(de)n(vices.)59 b(While)34
+b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has)
+f(been)g(de\002ned)g(carefully)h(to)0 2121 y(allo)n(w)h(e)o(xtending)i
+(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g
+(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0
+2234 y(accommodate)26 b(future)e(applications)k(or)23
+b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g
+(this)g(standard)h(w)o(as)f(created.)0 2396 y(A)19 b(SANE)f(image)j(is)
+f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n
+(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0
+2509 y(At)30 b(the)h(intersection)i(of)e(each)g(ro)n(w)f(and)h(column)h
+(is)e(a)g(quadratic)j(pix)o(el.)51 b(A)29 b(pix)o(el)i(consists)i(of)d
+(one)h(or)g(more)f(sample)0 2621 y(v)n(alues.)40 b(Each)26
+b(sample)i(v)n(alue)g(represents)h(one)e(channel)i(\(e.g.,)e(the)g(red)
+g(channel\).)41 b(Each)27 b(sample)g(v)n(alue)h(has)f(a)g(certain)0
+2734 y(bit)f(depth.)38 b(The)26 b(bit)h(depth)g(is)f(\002x)o(ed)g(for)g
+(the)h(entire)g(image)g(and)g(can)f(be)g(as)h(small)f(as)g(one)h(bit.)
+37 b(V)-10 b(alid)26 b(bit)h(depths)g(are)g(1,)0 2847
+y(8,)h(or)f(16)g(bits)h(per)g(sample.)41 b(If)27 b(a)g(de)n(vice')-5
+b(s)29 b(natural)g(bit)f(depth)g(is)g(something)h(else,)g(it)e(is)g(up)
+g(to)h(the)f(dri)n(v)o(er)h(to)g(scale)g(the)0 2960 y(sample)h(v)n
+(alues)g(appropriately)j(\(e.g.,)c(a)g(4)g(bit)g(sample)h(could)g(be)f
+(scaled)h(by)f(a)g(f)o(actor)h(of)f(four)h(to)f(represent)i(a)d(sample)
+0 3073 y(v)n(alue)d(of)g(depth)h(8\).)0 3367 y Fm(3.2.1)99
+b(Image)24 b(T)-7 b(ransmission)0 3591 y Fq(The)26 b(SANE)f(API)g
+(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39
+b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0
+3704 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f
+(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67
+b(F)o(or)35 b(e)o(xample,)40 b(a)0 3817 y(red/green/blue)34
+b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f
+(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0
+3929 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g
+(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g
+(containing)j(the)e(red)0 4042 y(channel,)25 b(the)f(second)h(the)f
+(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0
+4204 y(Conceptually)-6 b(,)34 b(each)d(frame)f(is)g(transmitted)i(a)e
+(byte)h(at)f(a)f(time.)48 b(Each)30 b(byte)h(may)e(contain)j(8)e
+(sample)h(v)n(alues)g(\(for)f(an)0 4317 y(image)c(bit)h(depth)g(of)f
+(1\),)g(one)h(full)f(sample)h(v)n(alue)g(\(for)g(an)f(image)g(bit)g
+(depth)i(of)e(8\),)g(or)g(a)f(partial)j(sample)f(v)n(alue)g(\(for)f(an)
+0 4430 y(image)k(bit)g(depth)h(of)f(16)g(or)g(bigger\).)49
+b(In)30 b(the)g(latter)h(case,)g(the)g(bytes)g(of)e(each)i(sample)f(v)n
+(alue)h(are)f(transmitted)i(in)e(the)0 4543 y(machine')-5
+b(s)33 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)54 b(F)o(or)31
+b(depth)i(1,)g(the)f(leftmost)h(pix)o(el)f(is)f(stored)i(in)f(the)g
+(most)g(signi\002cant)h(bit,)h(and)e(the)0 4656 y(rightmost)25
+b(pix)o(el)f(in)g(the)g(least)g(signi\002cant)i(bit.)1357
+4872 y Fr(Back)o(end)c(Implementation)i(Note)227 5019
+y Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h
+(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f
+(adjusted)227 5132 y(appropriately)32 b(if)c(necessary)-6
+b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i
+(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)1905
+5381 y(10)p eop end
+%%Page: 11 12
+TeXDict begin 11 11 bop 227 123 a Fq(the)28 b(proxy)g(may)f(inform)g
+(the)h(back)o(end)h(of)e(the)g(serv)o(er')-5 b(s)29 b(byte)e(order)-5
+b(.)41 b(The)26 b(back)o(end)j(can)f(then)f(apply)i(the)227
+236 y(adjustment)d(if)d(necessary)-6 b(.)32 b(In)23 b(essence,)i(this)f
+(implements)h(a)e(\223recei)n(v)o(er)n(-mak)o(es-right)q(\224)29
+b(approach.)975 1410 y @beginspecial 0 @llx 0 @lly 362
+@urx 182 @ury 2340 @rwi @setspecial
+%%BeginDocument: figs/xfer.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfer.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:30 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 362 182
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-134.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+15.000 slw
+% Polyline
+n 2400 3300 m 8100 3300 l gs col-1 s gr
+n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3375 m 2400 3675 l gs col-1 s gr
+15.000 slw
+n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 3750 m 8100 3750 l gs col-1 s gr
+n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3825 m 2400 4125 l gs col-1 s gr
+15.000 slw
+n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr
+15.000 slw
+% Polyline
+n 2400 4200 m 8100 4200 l gs col-1 s gr
+n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 4275 m 2400 4575 l gs col-1 s gr
+15.000 slw
+n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 4650 m 8100 4650 l gs col-1 s gr
+n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1111 1606 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24
+b(order)h(of)e(image)h(data)g(bytes)0 1918 y(The)f(order)i(in)f(which)g
+(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e
+(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0
+2031 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g
+(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e
+(right-most)i(column.)30 b(The)0 2144 y(left-to-right,)35
+b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h
+(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 2257
+y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g
+(e)o(xample\).)0 2429 y(If)d(a)g(frame)h(contains)h(multiple)g
+(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f
+(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0
+2542 y(illustrates)31 b(this)e(for)g(the)f(case)h(where)g(a)f(frame)h
+(contains)h(a)e(complete)i(red/green/blue)j(image)28
+b(with)h(a)f(bit-depth)j(of)d(8.)0 2654 y(F)o(or)f(a)g(bit)h(depth)g
+(of)g(1,)g(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g
+Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h
+(depth)h(1)0 2767 y(frame)24 b(is)f(transmitted)j(in)d(a)g(byte)i
+(interlea)n(v)o(ed)h(f)o(ashion.)390 3444 y @beginspecial
+0 @llx 0 @lly 521 @urx 93 @ury 3744 @rwi @setspecial
+%%BeginDocument: figs/image-data.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: image-data.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:36 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 521 93
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-88.0 120.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+1875 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3225 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+4575 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l
+ 5850 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 600 m
+gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+5925 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+7275 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+8625 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l
+ 9900 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 600 m
+gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1950 m
+gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1950 m
+gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1950 m
+gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1950 m
+gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1950 m
+gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1950 m
+gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+10050 1275 m
+gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1125 m
+gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1148 3640 a(Figure)e(3.3:)29 b(Bit)23 b(and)h(byte)g
+(order)h(or)e(image)h(data)0 3952 y(When)30 b(transmitting)i(an)e
+(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h
+(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 4065 y(represents)e
+(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31
+b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f
+(frame)g(with)0 4178 y(a)f(type.)30 b(This)23 b(v)o(ersion)i(of)e(the)h
+(SANE)d(standard)26 b(supports)g(the)e(follo)n(wing)h(frame)e(types:)
+227 4424 y Fp(SANE)p 452 4424 28 4 v 31 w(FRAME)p 758
+4424 V 31 w(GRAY)p Fr(:)44 b Fq(The)24 b(frame)i(contains)h(a)e(single)
+i(channel)g(of)f(data)g(that)f(represents)k(sample)d(v)n(al-)427
+4537 y(ues)i(from)g(a)f(spectral)j(band)f(that)f(co)o(v)o(ers)g(the)g
+(human)h(visual)g(range.)42 b(The)28 b(image)g(consists)i(of)d(this)427
+4650 y(frame)d(only)-6 b(.)227 4796 y Fp(SANE)p 452 4796
+V 31 w(FRAME)p 758 4796 V 31 w(RGB)p Fr(:)44 b Fq(The)31
+b(frame)h(contains)i(three)f(channels)h(of)d(data)i(that)f(represent)i
+(sample)f(v)n(alues)427 4909 y(from)f(the)h(red,)h(green,)h(and)e(blue)
+g(spectral)h(bands.)56 b(The)32 b(sample)h(v)n(alues)g(are)f(interlea)n
+(v)o(ed)k(in)c(the)427 5022 y(order)25 b(red,)e(green,)i(and)f(blue.)29
+b(The)23 b(image)h(consists)i(of)d(this)h(frame)g(only)-6
+b(.)1905 5381 y(11)p eop end
+%%Page: 12 13
+TeXDict begin 12 12 bop 227 123 a Fp(SANE)p 452 123 28
+4 v 31 w(FRAME)p 758 123 V 31 w(RED)p Fr(:)44 b Fq(The)36
+b(frame)h(contains)i(one)f(channel)g(of)f(data)g(that)h(represents)h
+(sample)f(v)n(alues)427 236 y(from)j(the)g(red)f(spectral)j(band.)81
+b(The)40 b(complete)i(image)f(consists)h(of)f(three)g(frames:)64
+b Fp(SANE)p 3592 236 V 31 w(-)427 349 y(FRAME)p 707 349
+V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 349 V 31 w(FRAME)p
+1480 349 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p 2216 349
+V 31 w(FRAME)p 2522 349 V 30 w(BLUE)p Fq(.)d(The)h(order)j(in)e(which)h
+(the)427 462 y(frames)24 b(are)g(transmitted)i(chosen)f(by)f(the)g
+(back)o(end.)227 608 y Fp(SANE)p 452 608 V 31 w(FRAME)p
+758 608 V 31 w(GREEN)p Fr(:)43 b Fq(The)26 b(frame)g(contains)i(one)e
+(channel)i(of)e(data)g(that)h(represents)h(sample)f(v)n(alues)427
+721 y(from)35 b(the)g(green)h(spectral)h(band.)63 b(The)35
+b(complete)h(image)f(consists)i(of)e(three)h(frames:)52
+b Fp(SANE)p 3592 721 V 31 w(-)427 834 y(FRAME)p 707 834
+V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 834 V 31 w(FRAME)p
+1480 834 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p 2216 834
+V 31 w(FRAME)p 2522 834 V 30 w(BLUE)p Fq(.)d(The)h(order)j(in)e(which)h
+(the)427 946 y(frames)24 b(are)g(transmitted)i(chosen)f(by)f(the)g
+(back)o(end.)227 1093 y Fp(SANE)p 452 1093 V 31 w(FRAME)p
+758 1093 V 31 w(BLUE)p Fr(:)44 b Fq(The)30 b(frame)i(contains)h(one)f
+(channel)i(of)d(data)h(that)g(represents)i(sample)e(v)n(alues)427
+1205 y(from)38 b(the)g(blue)h(spectral)h(band.)72 b(The)38
+b(complete)h(image)f(consists)i(of)e(three)h(frames:)58
+b Fp(SANE)p 3592 1205 V 31 w(-)427 1318 y(FRAME)p 707
+1318 V 31 w(RED)p Fq(,)28 b Fp(SANE)p 1174 1318 V 31
+w(FRAME)p 1480 1318 V 30 w(GREEN)p Fq(,)f(and)k Fp(SANE)p
+2216 1318 V 31 w(FRAME)p 2522 1318 V 30 w(BLUE)p Fq(.)d(The)h(order)j
+(in)e(which)h(the)427 1431 y(frames)24 b(are)g(transmitted)i(chosen)f
+(by)f(the)g(back)o(end.)0 1678 y(In)i(frames)i(of)e(type)h
+Fp(SANE)p 883 1678 V 31 w(FRAME)p 1189 1678 V 31 w(GRAY)p
+Fq(,)c(when)k(the)g(bit)f(depth)i(is)e(1)h(there)g(are)g(only)g(tw)o(o)
+f(sample)i(v)n(alues)f(possible,)0 1791 y(1)c(represents)k(minimum)c
+(intensity)j(\(black\))g(and)e(0)f(represents)j(maximum)e(intensity)i
+(\(white\).)k(F)o(or)23 b(all)g(other)i(bit)f(depth)0
+1903 y(and)g(frame)f(type)h(combinations,)h(a)e(sample)h(v)n(alue)g(of)
+f(0)f(represents)k(minimum)d(intensity)i(and)f(lar)n(ger)h(v)n(alues)f
+(represent)0 2016 y(increasing)i(intensity)-6 b(.)0 2188
+y(The)34 b(combination)j(of)d(bit)g(depth)h(1)f(and)h
+Fp(SANE)p 1605 2188 V 30 w(FRAME)p 1910 2188 V 31 w(RGB)d
+Fq(\(or)i Fp(SANE)p 2497 2188 V 31 w(FRAME)p 2803 2188
+V 31 w(RED)p Fq(,)d Fp(SANE)p 3273 2188 V 31 w(FRAME)p
+3579 2188 V 31 w(GREEN)p Fq(,)0 2301 y Fp(SANE)p 225
+2301 V 31 w(FRAME)p 531 2301 V 30 w(BLUE)p Fq(\))22 b(is)h(rarely)i
+(used)f(and)g(may)f(not)h(be)g(supported)i(by)e(e)n(v)o(ery)g
+(frontend.)1905 5381 y(12)p eop end
+%%Page: 13 14
+TeXDict begin 13 13 bop 0 801 a Fo(Chapter)44 b(4)0 1271
+y Fs(The)51 b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0
+1520 y(Interface)e(\(API\))0 2021 y Fq(This)27 b(Section)h(de\002nes)h
+(v)o(ersion)f(1)f(of)h(the)f(SANE)e(application)31 b(programmer)e
+(interf)o(ace)g(\(API\).)d(An)o(y)h(SANE)e(frontend)0
+2134 y(must)e(depend)h(on)f(the)g(interf)o(ace)i(de\002ned)f(in)f(this)
+g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o(y)-6
+b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0
+2247 y(its)31 b(functionality)k(in)c(accordance)j(with)d(this)h
+(speci\002cation.)54 b(The)31 b(interf)o(ace)i(as)e(documented)j(here)d
+(is)g(declared)j(as)d(a)0 2359 y(C)h(callable)i(interf)o(ace)h(in)e(a)f
+(\002le)g(called)i Fp(sane/sane.h)p Fq(.)51 b(This)32
+b(\002le)g(should)j(normally)f(be)f(included)i(via)e(a)f(C)g(pre-)0
+2472 y(processor)26 b(directi)n(v)o(e)f(of)f(the)g(form:)109
+2708 y Fp(#include)51 b()0 3055 y Fn(4.1)119
+b(V)-12 b(ersion)30 b(Contr)n(ol)0 3317 y Fq(The)22 b(SANE)d(standard)
+25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28
+b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e
+(made)h(that)0 3430 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d
+(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e
+(major)g(v)o(ersion)h(number)0 3543 y(must)k(be)g(increased.)51
+b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30
+b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g
+(of)0 3656 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g
+(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h
+(compatiblity)h(by)0 3769 y(allo)n(wing)26 b(major)f(numbers)h(that)g
+(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o
+(vided)h(the)e(frontend)i(really)f(can)0 3882 y(cope)i(with)f(the)g
+(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o
+(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o
+(ersion)0 3995 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i
+(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o
+(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4108
+y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f
+(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n
+(ferent)g(names.)0 4276 y(SANE)i(v)o(ersion)k(control)g(also)f
+(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n
+(vision.)48 b(While)30 b(control)h(of)e(these)0 4389
+y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o
+(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28
+b(The)20 b(minor)h(v)o(ersion)0 4502 y(is)26 b(incremented)i(with)e
+(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38
+b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n
+(uild)g(of)f(a)0 4615 y(back)o(end.)0 4783 y(The)d(SANE)e(API)h(pro)o
+(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o
+(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4
+v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29
+b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d
+(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905
+5381 y(13)p eop end
+%%Page: 14 15
+TeXDict begin 14 14 bop 227 123 a Fp(SANE)p 452 123 28
+4 v 31 w(VERSION)p 868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p
+Fl(min)p Fp(,)p Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37
+b(macro)g(can)h(be)f(used)g(to)g(b)n(uild)i(a)d(monotonically)427
+236 y(increasing)i(v)o(ersion)e(code.)64 b(A)34 b(SANE)f(v)o(ersion)j
+(code)g(consists)h(of)e(the)g(SANE)d(standard)38 b(major)427
+349 y(v)o(ersion)25 b(number)f(\()p Fl(maj)p Fq(\),)f(the)h(minor)f(v)o
+(ersion)i(number)f Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g
+(of)e(a)g(back)o(end)427 462 y(\()p Fl(bld)p Fq(\).)39
+b(The)27 b(major)g(and)g(minor)g(v)o(ersion)h(numbers)g(must)f(be)f(in)
+h(the)g(range)h(0.)14 b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427
+574 y(re)n(vision)f(must)d(be)h(in)f(the)h(range)h(0.)14
+b(.)g(.)g(65535.)427 704 y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)
+i(in)e(the)h(sense)g(that)f(it)g(is)g(possible)i(to)e(apply)i
+(relational)g(operators)427 817 y(\(e.g.,)21 b(equality)j(or)d
+(less-than)j(test\))e(directly)h(on)e(the)h(v)o(ersion)h(code)f(rather)
+g(than)h(indi)n(vidually)h(on)e(the)427 930 y(three)j(components)h(of)d
+(the)h(v)o(ersion)h(code.)427 1059 y(Note)34 b(that)g(the)g(major)f(v)o
+(ersion)i(number)g(alone)f(determines)i(whether)e(a)f(frontend/back)o
+(end)39 b(pair)427 1172 y(is)31 b(compatible.)51 b(The)30
+b(minor)h(v)o(ersion)h(and)f(the)g(b)n(uild)h(re)n(vision)g(are)f(used)
+g(for)g(informational)i(and)427 1285 y(b)n(ug-\002xing)26
+b(purposes)g(only)-6 b(.)227 1431 y Fp(SANE)p 452 1431
+V 31 w(VERSION)p 868 1431 V 30 w(MAJOR\()p Fl(vc)p Fp(\))p
+Fr(:)43 b Fq(This)32 b(macro)h(returns)h(the)f(major)g(v)o(ersion)h
+(number)f(component)i(of)427 1544 y(the)24 b(v)o(ersion)h(code)f
+(passed)i(in)d(ar)n(gument)i Fl(vc)p Fq(.)227 1690 y
+Fp(SANE)p 452 1690 V 31 w(VERSION)p 868 1690 V 30 w(MINOR\()p
+Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)g(returns)h(the)g(minor)f
+(v)o(ersion)h(number)g(component)h(of)427 1803 y(the)24
+b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i Fl(vc)p
+Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p 868
+1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18
+b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d
+(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j
+Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0
+2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23
+b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f
+(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o
+(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59
+b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52
+b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31
+w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g
+(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f
+(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c
+Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n
+(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f
+Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068
+y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g
+Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15
+b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j
+Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in)
+e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j
+Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d
+Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24
+b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e
+(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i
+Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33
+b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i
+(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25
+b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p
+Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o
+(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j
+(mapping.)1905 5381 y(14)p eop end
+%%Page: 15 16
+TeXDict begin 15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25
+b(T)-7 b(ype)0 356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20
+b Fq(is)j(used)h(for)g(v)n(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g
+(the)h(tw)o(o)e(truth)i(v)n(alues)h Fp(SANE)p 2934 356
+V 31 w(FALSE)20 b Fq(and)j Fp(SANE)p 3633 356 V 31 w(TRUE)p
+Fq(.)0 469 y(The)d(former)h(v)n(alue)g(is)g(de\002ned)g(to)f(be)h(0,)f
+(whereas)i(the)e(latter)i(is)e(1.)2097 436 y Fg(1)2162
+469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)h(are)e(gi)n(v)o
+(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52 b(SANE_FALSE)322
+b(0)227 828 y(#define)52 b(SANE_TRUE)377 b(1)227 941
+y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187 y Fq(Note)34
+b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)g(of)g
+Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e(le)o
+(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26 b(in)g(place)g(of)g
+(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25 b(for)h(clarity)-6
+b(,)27 b(it)e(is)h(recommended)h(to)f(use)g Fp(SANE_Bool)20
+b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0 1413 y(v)n(ariable)g(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(boolean)h(object.)0 1721 y Fm(4.2.3)99
+b(Integer)26 b(T)-7 b(ype)0 1954 y Fp(SANE)p 225 1954
+V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h(that)f(can)g(tak)o
+(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h Fk(\000)p
+Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e Fj(2)3011
+1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30 b(Its)25
+b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0
+2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f
+(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays)
+f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672
+y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27
+b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f
+Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0
+2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0
+3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326
+y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n
+(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in)
+f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p
+Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e
+Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27
+b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6
+b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103
+b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0
+4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p
+940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22
+b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29
+b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f
+(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p
+Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26
+b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p
+Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g
+(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5
+b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24
+b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17
+b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36
+b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros)
+h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g
+(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p
+0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19
+b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g
+(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905
+5381 y Fq(15)p eop end
+%%Page: 16 17
+TeXDict begin 16 16 bop 227 123 a Fp(SANE)p 452 123 28
+4 v 31 w(FIX\()p Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34
+b(the)g(lar)n(gest)h(SANE)c(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f
+(smaller)h(than)g(the)f(double)427 236 y(v)n(alue)d Fl(d)p
+Fq(.)45 b(No)28 b(range)i(checking)h(is)e(performed.)47
+b(If)29 b(the)g(v)n(alue)h(of)f Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)
+d(result)h(is)427 349 y(unde\002ned.)227 495 y Fp(SANE)p
+452 495 V 31 w(UNFIX\()p Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g
+(nearest)g(double)h(machine)f(number)g(that)g(corresponds)i(to)d(\002x)
+o(ed-)427 608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854
+y(SANE)j(does)j Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o
+(o)e(e)o(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n
+(alues)g(of)g Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967
+y(range\):)227 1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48
+b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48
+b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i
+(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6
+b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0
+1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw)
+o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0
+2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29
+b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o
+(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g
+(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d
+Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48
+b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x)
+o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27
+b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f
+(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0
+2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50
+b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to)
+f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o
+(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227
+3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23
+b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695
+V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f
+(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27
+b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f
+Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52
+b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e
+(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h
+Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d
+Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f
+(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23
+b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773
+y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26
+b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i
+(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905
+5381 y(16)p eop end
+%%Page: 17 18
+TeXDict begin 17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26
+b(Handle)f(T)-7 b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e
+(pro)o(vided)i(through)g(an)e(opaque)i(type)f(called)h
+Fp(SANE)p 2560 356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27
+b(C)g(declaration)32 b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g
+(belo)n(w)-6 b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0
+961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n
+(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e
+(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p
+Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f
+(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n
+(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0
+1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f
+(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether)
+f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57
+b(If)31 b(an)h(operation)j(completes)e(successfully)-6
+b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56
+b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f
+(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30
+b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0
+1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23
+b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p
+2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f
+(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385
+2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p
+1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p
+3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113
+v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p
+1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p
+2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6
+b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660
+2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p
+1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25
+b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435
+2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627
+V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083
+2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661
+V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31
+w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p
+1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n
+(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V
+435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021
+2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083
+2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p
+3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966
+28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000
+4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n
+(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113
+V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p
+1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p
+2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514
+3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4
+v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31
+w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100
+w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226
+V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31
+w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p
+1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er)
+e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p
+660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161
+3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083
+3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514
+3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4
+v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31
+w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100
+w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435
+3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643
+V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4
+113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f
+(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519
+3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0
+4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7
+b(ype)0 4497 y Fq(Each)27 b(SANE)d(de)n(vice)k(is)f(represented)j(by)c
+(a)h(structure)i(of)e(type)g Fp(SANE)p 2300 4497 28 4
+v 31 w(Device)p Fq(.)35 b(The)26 b(C)g(declaration)k(of)d(this)g(type)g
+(is)0 4610 y(gi)n(v)o(en)d(belo)n(w)-6 b(.)227 4856 y
+Fp(typedef)52 b(struct)336 4969 y({)445 5082 y(SANE_String_Cons)o(t)c
+(name;)1905 5381 y Fq(17)p eop end
+%%Page: 18 19
+TeXDict begin 18 18 bop 445 123 a Fp(SANE_String_Cons)o(t)48
+b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445
+349 y(SANE_String_Cons)o(t)g(type;)336 462 y(})227 574
+y(SANE_Device;)0 821 y Fq(The)24 b(structure)i(pro)o(vides)g(the)f
+(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p
+Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0
+934 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019
+934 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h
+(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39
+b(The)25 b(only)0 1047 y(constraints)30 b(are)d(that)g(the)h(name)e(is)
+h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o
+(end)i(and)e(that)h(the)f(name)g(is)g(a)0 1160 y(le)o(gal)c(SANE)d(te)o
+(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique)
+j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30
+b(It)22 b(is)0 1272 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k)
+o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32
+b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0
+1385 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g
+(names.)0 1557 y(The)e(remaining)i(members)f(in)g(the)g(de)n(vice)g
+(structure)i(pro)o(vide)f(additional)i(information)f(on)d(the)h(de)n
+(vice)h(corresponding)0 1670 y(to)31 b(the)g(unique)i(name.)52
+b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f
+Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e
+(that)g(gi)n(v)o(e)0 1783 y(information)g(on)e(the)g(v)o(endor)h
+(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n
+(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0
+1896 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g
+(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g
+(arises\):)p 284 2018 1563 4 v 282 2131 4 113 v 773 2097
+a Fr(V)-9 b(endor)23 b(Strings)p 1845 2131 V 284 2135
+1563 4 v 284 2151 V 282 2264 4 113 v 334 2230 a Fp(AGFA)697
+b(Minolta)p 1845 2264 V 282 2377 V 334 2343 a(Abaton)587
+b(Mitsubishi)p 1845 2377 V 282 2490 V 334 2456 a(Acer)697
+b(Mustek)p 1845 2490 V 282 2603 V 334 2569 a(Apple)642
+b(NEC)p 1845 2603 V 282 2716 V 334 2682 a(Artec)g(Nikon)p
+1845 2716 V 282 2829 V 334 2795 a(Avision)532 b(Plustek)p
+1845 2829 V 282 2942 V 334 2908 a(CANON)642 b(Polaroid)p
+1845 2942 V 282 3054 V 334 3021 a(Connectix)422 b(Relisys)p
+1845 3054 V 282 3167 V 334 3134 a(Epson)642 b(Ricoh)p
+1845 3167 V 282 3280 V 334 3246 a(Fujitsu)532 b(Sharp)p
+1845 3280 V 282 3393 V 334 3359 a(Hewlett-Packar)o(d)93
+b(Siemens)p 1845 3393 V 282 3506 V 334 3472 a(IBM)752
+b(Tamarack)p 1845 3506 V 282 3619 V 334 3585 a(Kodak)642
+b(UMAX)p 1845 3619 V 282 3732 V 334 3698 a(Logitech)477
+b(Noname)p 1845 3732 V 282 3845 V 334 3811 a(Microtek)p
+282 3958 V 1845 3958 V 284 3961 1563 4 v 2153 2018 1464
+4 v 2151 2131 4 113 v 2639 2097 a Fr(T)-7 b(ype)23 b(Strings)p
+3615 2131 V 2153 2135 1464 4 v 2153 2151 V 2151 2264
+4 113 v 2203 2230 a Fp(film)53 b(scanner)p 3615 2264
+V 2151 2377 V 2203 2343 a(flatbed)e(scanner)p 3615 2377
+V 2151 2490 V 2203 2456 a(frame)h(grabber)p 3615 2490
+V 2151 2603 V 2203 2569 a(handheld)f(scanner)p 3615 2603
+V 2151 2716 V 2203 2682 a(multi-function)d(peripheral)p
+3615 2716 V 2151 2829 V 2203 2795 a(sheetfed)j(scanner)p
+3615 2829 V 2151 2942 V 2203 2908 a(still)h(camera)p
+3615 2942 V 2151 3054 V 2203 3021 a(video)g(camera)p
+3615 3054 V 2151 3167 V 2203 3134 a(virtual)f(device)p
+3615 3167 V 2153 3171 1464 4 v 1053 4114 a Fq(T)-7 b(able)24
+b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0
+4427 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26
+b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f
+(no)g(physical)i(v)o(endor)f(associated.)0 4539 y(Also,)c(there)h(are)f
+(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o
+(endor)h(speci\002c)g(and)f(therefore)i(completely)0
+4652 y(under)c(control)g(of)e(the)h(respecti)n(v)o(e)i(back)o(ends.)
+1905 5381 y(18)p eop end
+%%Page: 19 20
+TeXDict begin 19 19 bop 0 123 a Fm(4.2.9)99 b(Option)25
+b(Descriptor)g(T)-7 b(ype)0 356 y Fq(Option)23 b(descriptors)j(are)d
+(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h(and)f(po)n(werful)h
+(type)f(in)g(the)f(SANE)f(standard.)30 b(Options)0 469
+y(are)h(used)g(to)f(control)j(virtually)g(all)d(aspects)i(of)f(de)n
+(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n(wer)f(of)h(the)g
+(SANE)d(API)h(stems)0 582 y(from)22 b(the)h(f)o(act)g(that)g(most)g(de)
+n(vice)h(controls)g(are)f(completely)i(described)g(by)d(their)i
+(respecti)n(v)o(e)g(option)g(descriptor)-5 b(.)31 b(Thus,)0
+695 y(a)21 b(frontend)i(can)e(control)i(a)e(scanner)i(abstractly)-6
+b(,)24 b(without)e(requiring)i(kno)n(wledge)f(as)e(to)g(what)g(the)g
+(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0 807 y(option)27
+b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28 b(a)d(scanner)i(can)f(describe)h
+(its)e(controls)j(without)e(requiring)i(kno)n(wledge)f(of)e(ho)n(w)f
+(the)i(frontend)0 920 y(operates.)31 b(The)23 b(C)f(declaration)27
+b(of)c(the)h Fp(SANE)p 1485 920 28 4 v 31 w(Option)p
+1846 920 V 30 w(Descriptor)18 b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n
+(w)-6 b(.)227 1167 y Fp(typedef)52 b(struct)336 1280
+y({)445 1393 y(SANE_String_Cons)o(t)c(name;)445 1505
+y(SANE_String_Cons)o(t)g(title;)445 1618 y(SANE_String_Cons)o(t)g
+(desc;)445 1731 y(SANE_Value_Type)g(type;)445 1844 y(SANE_Unit)j(unit;)
+445 1957 y(SANE_Int)g(size;)445 2070 y(SANE_Int)g(cap;)445
+2183 y(SANE_Constraint_)o(Ty)o(pe)d(constraint_type)o(;)445
+2296 y(union)555 2409 y({)664 2522 y(const)k(SANE_String_Con)o(st)c
+(*string_list;)664 2635 y(const)k(SANE_Word)e(*word_list;)664
+2747 y(const)i(SANE_Range)e(*range;)555 2860 y(})445
+2973 y(constraint;)336 3086 y(})227 3199 y(SANE_Option_Des)o(cri)o(pt)o
+(or)o(;)0 3504 y Fr(Option)23 b(Name)0 3737 y Fq(Member)k
+Fp(name)e Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e
+(option.)40 b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o
+(en)i(de)n(vice)0 3850 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h
+(dif)n(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g
+(unique\).)55 b(The)31 b(option)i(name)f(must)0 3962
+y(consist)e(of)d(lo)n(wer)n(-case)j(ASCII)c(letters)k(\()p
+Fp(a)p Fq(\226)p Fp(z)p Fq(\),)e(digits)h(\()p Fp(0)p
+Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i(dash)f(character)i(\()p
+Fp(-)p Fq(\))d(only)-6 b(.)43 b(The)27 b(\002rst)h(character)0
+4075 y(must)c(be)f(a)g(lo)n(wer)n(-case)j(ASCII)c(character)j(\(i.e.,)e
+(not)h(a)f(digit)i(or)e(a)g(dash\).)0 4380 y Fr(Option)g(T)n(itle)0
+4613 y Fq(Member)e Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g
+(can)g(be)f(used)h(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29
+b(This)21 b(should)i(typically)0 4726 y(be)h(a)f(short)h(\(one)g(or)g
+(tw)o(o-w)o(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h
+(function)i(of)d(the)h(option.)1905 5381 y(19)p eop end
+%%Page: 20 21
+TeXDict begin 20 20 bop 0 123 a Fr(Option)23 b(Description)0
+356 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e
+(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to)
+g(describe)i(the)e(option.)35 b(It)24 b(is)0 469 y(the)g
+(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h
+(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e
+(this)0 582 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i
+(breaks.)0 886 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0
+1119 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the)
+g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h
+Fp(SANE)p 3217 1119 28 4 v 31 w(Value)p 3523 1119 V 31
+w(Type)c Fq(are)0 1232 y(described)26 b(in)e(T)-7 b(able)23
+b(4.3.)p 115 1336 3670 4 v 113 1449 4 113 v 433 1415
+a Fr(Symbol)p 1042 1449 V 368 w(Code)p 1344 1449 V 1044
+w(Description)p 3783 1449 V 115 1453 3670 4 v 115 1469
+V 113 1582 4 113 v 165 1548 a Fp(SANE)p 390 1548 28 4
+v 31 w(TYPE)p 641 1548 V 31 w(BOOL)p 1042 1582 4 113
+v 207 w Fq(0)p 1344 1582 V 256 w(Option)h(v)n(alue)h(is)e(of)h(type)g
+Fp(SANE_Bool)p Fq(.)p 3783 1582 V 113 1695 V 165 1661
+a Fp(SANE)p 390 1661 28 4 v 31 w(TYPE)p 641 1661 V 31
+w(INT)p 1042 1695 4 113 v 262 w Fq(1)p 1344 1695 V 256
+w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Int)p
+Fq(.)p 3783 1695 V 113 1808 V 165 1774 a Fp(SANE)p 390
+1774 28 4 v 31 w(TYPE)p 641 1774 V 31 w(FIXED)p 1042
+1808 4 113 v 152 w Fq(2)p 1344 1808 V 256 w(Option)g(v)n(alue)h(is)e
+(of)h(type)g Fp(SANE_Fixed)p Fq(.)p 3783 1808 V 113 1921
+V 165 1887 a Fp(SANE)p 390 1887 28 4 v 31 w(TYPE)p 641
+1887 V 31 w(STRING)p 1042 1921 4 113 v 97 w Fq(3)p 1344
+1921 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p
+Fq(.)p 3783 1921 V 113 2485 4 565 v 165 2000 a Fp(SANE)p
+390 2000 28 4 v 31 w(TYPE)p 641 2000 V 31 w(BUTTON)p
+1042 2485 4 565 v 97 w Fq(4)p 1344 2485 V 256 w(An)31
+b(option)h(of)g(this)f(type)h(has)g(no)f(v)n(alue.)53
+b(Instead,)35 b(setting)e(an)e(option)1395 2113 y(of)j(this)h(type)g
+(has)g(an)f(option-speci\002c)k(side-ef)n(fect.)63 b(F)o(or)33
+b(e)o(xample,)38 b(a)1395 2226 y(b)n(utton-typed)k(option)d(could)g(be)
+f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j(a)1395
+2339 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g(to)f(the)
+h(tell)f(an)h(automatic)h(doc-)1395 2451 y(ument)24 b(feeder)h(to)e
+(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5
+b(.)p 3783 2485 V 113 3163 4 678 v 165 2564 a Fp(SANE)p
+390 2564 28 4 v 31 w(TYPE)p 641 2564 V 31 w(GROUP)p 1042
+3163 4 678 v 152 w Fq(5)p 1344 3163 V 256 w(An)28 b(option)i(of)e(this)
+h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e
+(group)1395 2677 y(logically)35 b(related)e(options.)56
+b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395
+2790 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j
+(\(or)d(up)g(to)g(the)1395 2903 y(end)d(of)f(the)g(option)i(list,)g(if)
+e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395
+3016 y(group)27 b(options,)h(only)e(members)g Fp(title)d
+Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395
+3129 y(option)g(descriptor)-5 b(.)p 3783 3163 V 115 3166
+3670 4 v 966 3319 a(T)e(able)24 b(4.3:)29 b(Option)24
+b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354
+3319 28 4 v 31 w(Value)p 2660 3319 V 30 w(Type)p Fq(\))0
+3783 y Fr(Option)f(V)-8 b(alue)22 b(Unit)0 4016 y Fq(Member)f
+Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h(unit)f(of)f(the)h
+(option)h(v)n(alue)f(is.)27 b(The)20 b(possible)j(v)n(alues)e(for)g
+(type)g Fp(SANE)p 3765 4016 V 31 w(U-)0 4129 y(nit)e
+Fq(are)j(described)i(in)d(T)-7 b(able)22 b(4.4.)27 b(Note)22
+b(that)g(the)g(speci\002ed)g(unit)g(is)g(what)f(the)h(SANE)d(back)o
+(end)k(e)o(xpects.)30 b(It)21 b(is)g(entirely)0 4242
+y(up)26 b(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f
+(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h
+(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 4355 y(millimeters.)37
+b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j
+(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i
+(can)0 4468 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f
+(\(e.g.,)f(inches)i(or)f(centimeters\).)0 4772 y Fr(Option)f(V)-8
+b(alue)22 b(Size)0 5005 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j
+(the)g(size)g(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39
+b(This)26 b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0
+5118 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v)
+n(alue:)1905 5381 y(20)p eop end
+%%Page: 21 22
+TeXDict begin 21 21 bop 499 35 2903 4 v 497 148 4 113
+v 953 114 a Fr(Symbol)p 1698 148 V 1698 148 V 504 w(Code)p
+2000 148 V 2000 148 V 525 w(Description)p 3400 148 V
+499 151 2903 4 v 499 168 V 497 281 4 113 v 548 247 a
+Fp(SANE)p 773 247 28 4 v 31 w(UNIT)p 1024 247 V 31 w(NONE)p
+1698 281 4 113 v 480 w Fq(0)p 2000 281 V 256 w(V)-10
+b(alue)24 b(is)f(unit-less)j(\(e.g.,)d(page)i(count\).)p
+3400 281 V 497 394 V 548 360 a Fp(SANE)p 773 360 28 4
+v 31 w(UNIT)p 1024 360 V 31 w(PIXEL)p 1698 394 4 113
+v 425 w Fq(1)p 2000 394 V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g
+(of)g(pix)o(els.)p 3400 394 V 497 506 V 548 473 a Fp(SANE)p
+773 473 28 4 v 31 w(UNIT)p 1024 473 V 31 w(BIT)p 1698
+506 4 113 v 535 w Fq(2)p 2000 506 V 256 w(V)-10 b(alue)24
+b(is)f(in)h(number)g(of)g(bits.)p 3400 506 V 497 619
+V 548 585 a Fp(SANE)p 773 585 28 4 v 31 w(UNIT)p 1024
+585 V 31 w(MM)p 1698 619 4 113 v 590 w Fq(3)p 2000 619
+V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p 3400
+619 V 497 732 V 548 698 a Fp(SANE)p 773 698 28 4 v 31
+w(UNIT)p 1024 698 V 31 w(DPI)p 1698 732 4 113 v 535 w
+Fq(4)p 2000 732 V 256 w(V)-10 b(alue)24 b(is)f(a)h(resolution)i(in)d
+(dots/inch.)p 3400 732 V 497 845 V 548 811 a Fp(SANE)p
+773 811 28 4 v 31 w(UNIT)p 1024 811 V 31 w(PERCENT)p
+1698 845 4 113 v 315 w Fq(5)p 2000 845 V 256 w(V)-10
+b(alue)24 b(is)f(a)h(percentage.)p 3400 845 V 497 958
+V 548 924 a Fp(SANE)p 773 924 28 4 v 31 w(UNIT)p 1024
+924 V 31 w(MICROSECOND)p 1698 958 4 113 v 95 w Fq(6)p
+2000 958 V 256 w(V)-10 b(alue)24 b(is)f(time)h(in)f Fh(\026)p
+Fq(-seconds.)p 3400 958 V 499 961 2903 4 v 1215 1115
+a(T)-7 b(able)24 b(4.4:)29 b(Physical)24 b(Units)g(\()p
+Fp(SANE)p 2410 1115 28 4 v 31 w(Unit)p Fq(\))227 1491
+y Fp(SANE)p 452 1491 V 31 w(TYPE)p 703 1491 V 31 w(STRING)p
+Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g(size)h(of)f(the)g
+(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e(string)427
+1604 y(size)c(calcuations,)i(the)d(terminating)i Fp(NUL)19
+b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g(the)g
+(string.)29 b(Note)427 1717 y(that)24 b(the)g(terminating)i
+Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e
+(string)i(option)g(v)n(alues.)227 1863 y Fp(SANE)p 452
+1863 V 31 w(TYPE)p 703 1863 V 31 w(INT)p Fr(,)c Fp(SANE)p
+1163 1863 V 31 w(TYPE)p 1414 1863 V 31 w(FIXED)p Fr(:)43
+b Fq(The)31 b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f
+(multiple)h(of)e(the)427 1976 y(size)24 b(of)g(a)f Fp(SANE_Word)p
+Fq(.)h(The)f(option)i(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533
+2180 y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p
+2289 2180 V 31 w(Word)p Fj(\))o Fh(:)227 2401 y Fp(SANE)p
+452 2401 V 31 w(TYPE)p 703 2401 V 31 w(BOOL)p Fr(:)44
+b Fq(The)23 b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p
+2486 2401 V 28 w(Word\))p Fq(.)227 2547 y Fp(SANE)p 452
+2547 V 31 w(TYPE)p 703 2547 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p
+1327 2547 V 31 w(TYPE)p 1578 2547 V 31 w(GROUP)p Fr(:)43
+b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 2852 y
+Fr(Option)f(Capabilities)0 3085 y Fq(Member)h Fp(cap)d
+Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31
+b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n
+(v)o(e)0 3198 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f
+(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i
+(the)f(follo)n(wing)h(to)e(macros)h(to)0 3311 y(test)c(certain)h
+(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227
+3557 y Fp(SANE)p 452 3557 V 31 w(OPTION)p 813 3557 V
+30 w(IS)p 953 3557 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p
+Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553
+3557 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427
+3670 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i
+(acti)n(v)o(e.)227 3816 y Fp(SANE)p 452 3816 V 31 w(OPTION)p
+813 3816 V 30 w(IS)p 953 3816 V 32 w(SETTABLE\()p Fl(cap)p
+Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p
+2663 3816 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427
+3929 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g
+Fq(is)f(softw)o(are)i(settable.)0 4308 y Fr(Option)e(V)-8
+b(alue)22 b(Constraints)0 4541 y Fq(It)k(is)g(often)h(useful)g(to)f
+(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37
+b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0
+4654 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n
+(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921
+4654 V 28 w(type)e Fq(indicates)k(what)e(con-)0 4767
+y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30
+b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h
+(the)f(option)i(are)e(described)j(by)d(one)0 4880 y(of)i(the)g(union)h
+(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n
+(alues)f(of)f(type)h Fp(SANE)p 3078 4880 V 31 w(Constraint)p
+3659 4880 V 28 w(Type)0 4993 y Fq(and)f(the)g(interpretation)j(of)d
+(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7
+b(able)23 b(4.6.)1905 5381 y(21)p eop end
+%%Page: 22 23
+TeXDict begin 22 22 bop 36 572 3828 4 v 34 685 4 113
+v 452 651 a Fr(Symbol)p 1160 685 V 466 w(Code)p 1461
+685 V 1026 w(Description)p 3862 685 V 36 688 3828 4 v
+36 705 V 34 931 4 226 v 86 784 a Fp(SANE)p 311 784 28
+4 v 31 w(CAP)p 507 784 V 31 w(SOFT)p 758 784 V 31 w(SELECT)p
+1160 931 4 226 v 254 w Fq(1)p 1461 931 V 100 w(The)20
+b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(a)g(call)g(to)g
+Fp(sane)p 3155 784 28 4 v 31 w(control)p 3571 784 V 30
+w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862 931 4 226 v 34
+1495 4 565 v 86 1010 a Fp(SANE)p 311 1010 28 4 v 31 w(CAP)p
+507 1010 V 31 w(HARD)p 758 1010 V 31 w(SELECT)p 1160
+1495 4 565 v 254 w Fq(2)p 1461 1495 V 100 w(The)28 b(option)j(v)n(alue)
+f(can)f(be)h(set)f(by)g(user)n(-interv)o(ention)34 b(\(e.g.,)c(by)f
+(\003ip-)1513 1123 y(ping)35 b(a)f(switch\).)63 b(The)34
+b(user)n(-interf)o(ace)39 b(should)e(prompt)e(the)g(user)g(to)1513
+1236 y(e)o(x)o(ecute)25 b(the)g(appropriate)i(action)f(to)e(set)g(such)
+h(an)g(option.)32 b(This)24 b(capa-)1513 1349 y(bility)33
+b(is)f(mutually)i(e)o(xclusi)n(v)o(e)g(with)e(SANE)p
+2990 1349 28 4 v 31 w(CAP)p 3199 1349 V 31 w(SOFT)p 3454
+1349 V 31 w(SELECT)1513 1462 y(\(either)25 b(one)f(of)f(them)h(can)g
+(be)f(set,)h(b)n(ut)g(not)g(both)g(simultaneously\).)p
+3862 1495 4 565 v 34 2286 4 791 v 86 1574 a Fp(SANE)p
+311 1574 28 4 v 31 w(CAP)p 507 1574 V 31 w(SOFT)p 758
+1574 V 31 w(DETECT)p 1160 2286 4 791 v 254 w Fq(4)p 1461
+2286 V 100 w(The)43 b(option)h(v)n(alue)g(can)g(be)f(detected)i(by)f
+(softw)o(are.)88 b(If)43 b Fp(SANE)p 3733 1574 28 4 v
+31 w(-)1513 1687 y(CAP)p 1683 1687 V 31 w(SOFT)p 1934
+1687 V 31 w(SELECT)f Fq(is)j(set,)50 b(this)c(capability)i
+Fl(must)e Fq(be)g(set.)93 b(If)1513 1800 y Fp(SANE)p
+1738 1800 V 31 w(CAP)p 1934 1800 V 31 w(HARD)p 2185 1800
+V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)j(may)c(or)h(may)
+1513 1913 y(not)d(be)g(set.)42 b(If)28 b(this)g(capability)j(is)d(set)g
+(b)n(ut)g(neither)i Fp(SANE)p 3428 1913 V 31 w(CAP)p
+3624 1913 V 31 w(SO-)1513 2026 y(FT)p 1628 2026 V 32
+w(SELECT)22 b Fq(nor)27 b Fp(SANE)p 2379 2026 V 31 w(CAP)p
+2575 2026 V 31 w(HARD)p 2826 2026 V 31 w(SELECT)c Fq(are,)j(then)h
+(there)g(is)1513 2139 y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34
+b(That)25 b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513
+2252 y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6
+b(.)p 3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p
+311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p
+1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22
+b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not)
+h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g
+(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513
+2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g
+(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f
+(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34
+3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p
+507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p
+1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d
+(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929
+y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f
+(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d
+(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513
+3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p
+2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of)
+1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099
+3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862
+3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311
+3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160
+3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e
+(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently)
+1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5
+b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513
+3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V
+34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31
+w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v
+349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h
+(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513
+3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6
+b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946
+y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d
+(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g
+(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513
+4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n
+(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f
+(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828
+4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24
+b(Capabilities)1905 5381 y(22)p eop end
+%%Page: 23 24
+TeXDict begin 23 23 bop 21 102 3859 4 v 19 215 4 113
+v 628 181 a Fr(Symbol)p 1526 215 V 1526 215 V 657 w(Code)p
+1828 215 V 1828 215 V 850 w(Description)p 3877 215 V
+21 219 3859 4 v 21 235 V 19 461 4 226 v 71 314 a Fp(SANE)p
+296 314 28 4 v 31 w(CONSTRAINT)p 877 314 V 28 w(NONE)p
+1526 461 4 226 v 614 w Fq(0)p 1828 461 V 100 w(The)29
+b(v)n(alue)g(is)g(unconstrained.)49 b(The)28 b(option)j(can)e(tak)o(e)g
+(an)o(y)1879 427 y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g
+(option')-5 b(s)25 b(type.)p 3877 461 V 19 3094 4 2634
+v 71 540 a Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p
+877 540 V 28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p
+1828 3094 V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o
+(ger)h(and)f(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6
+b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879
+766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30
+b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o
+(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h
+Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25
+b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107
+1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518
+y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325
+1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879
+2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e
+(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n
+(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41
+b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e
+Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g
+(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6
+b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d
+(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51
+b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h
+Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g
+Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879
+2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e
+Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27
+b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n
+(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d
+Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71
+3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877
+3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224
+4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d
+(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879
+3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28
+b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399
+y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35
+b(descriptor)h(member)1879 3512 y Fp(constraint.word)p
+2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o
+(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40
+b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33
+b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28
+b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g
+(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879
+3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j
+(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n
+(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o
+(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303
+a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303
+V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565
+v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e
+(applicable)i(to)e(string-v)n(alued)k(options)1879 4415
+y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e
+(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i
+(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641
+28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e
+Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the)
+e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p
+3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23
+b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905
+5381 y(23)p eop end
+%%Page: 24 25
+TeXDict begin 24 24 bop 0 123 a Fn(4.3)119 b(Operations)0
+392 y Fm(4.3.1)99 b Fc(sane)p 545 392 30 4 v 35 w(init)0
+625 y Fq(This)35 b(function)h(must)f(be)g(called)h(before)g(an)o(y)f
+(other)g(SANE)d(function)37 b(can)e(be)g(called.)63 b(The)35
+b(beha)n(vior)i(of)d(a)h(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j
+(if)d(this)h(function)i(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g
+(status)h(code)f(returned)i(by)d Fp(sane)p 3561 738 28
+4 v 31 w(init)e Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p
+767 851 V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion)
+h(code)g(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h
+(pointed)h(to)0 964 y(by)24 b Fp(version)p 504 964 V
+29 w(code)p Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p
+Fq(,)e(no)j(v)o(ersion)i(code)e(is)g(returned.)31 b(Ar)n(gument)25
+b Fp(authorize)19 b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a)
+g(function)i(that)e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i
+(requires)g(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0
+1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h
+(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int)
+h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o
+(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28
+b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i
+(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041
+y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967
+2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f
+Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i
+(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f
+(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0
+2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h
+(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d
+(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37
+b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40
+b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64
+b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j
+(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0
+2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g
+(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911
+y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing)
+h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o
+(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN)
+157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o
+(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,)
+500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE)
+o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o
+(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed)
+h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26
+b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0
+4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35
+b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d
+(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g
+(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b
+Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g
+(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p
+421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i
+Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p
+2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6
+b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f
+(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38
+b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0
+4646 y(NUL)c(terminated.)1905 5381 y(24)p eop end
+%%Page: 25 26
+TeXDict begin 25 25 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p
+545 123 30 4 v 35 w(exit)0 355 y Fq(This)26 b(function)i(must)e(be)g
+(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38
+b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h
+(handles)0 468 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f
+(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g
+(through)g(a)d(call)h(to)g Fp(sane)p 3656 468 28 4 v
+31 w(clo-)0 581 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d
+(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f
+(this)g(function\).)48 b(After)29 b(this)h(function)0
+694 y(returns,)36 b(no)c(function)i(other)f(than)g Fp(sane)p
+1396 694 V 31 w(init\(\))28 b Fq(may)k(be)g(called)h(\(re)o(gardless)h
+(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0 807 y
+Fp(sane)p 225 807 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f
+(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e
+(being)g(released)i(properly)-6 b(.)227 1052 y Fp(void)53
+b(sane_exit)d(\(void\);)0 1359 y Fm(4.3.3)99 b Fc(sane)p
+545 1359 30 4 v 35 w(get)p 760 1359 V 35 w(devices)0
+1592 y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g
+(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30
+b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6
+b(,)0 1705 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h
+Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f
+Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p
+3635 1705 28 4 v 29 w(list)p Fq(.)0 1818 y(The)27 b(returned)i(list)f
+(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g
+(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0
+1931 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p
+1056 1931 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25
+b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0
+2044 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41
+b(If)27 b(ar)n(gument)h Fp(local)p 1899 2044 V 31 w(only)c
+Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n
+(vices)0 2156 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE)
+d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n
+(vice)g(list)g(includes)i(all)e(remote)0 2269 y(de)n(vices)e(that)f
+(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227
+2514 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device)
+d(***)54 b(device_list,)1864 2627 y(SANE_Bool)c(local_only\);)0
+2872 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g
+Fp(SANE)p 1242 2872 V 31 w(STATUS)p 1603 2872 V 30 w(NO)p
+1743 2872 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)1357 3142 y Fr(Back)o(end)f
+(Implementation)i(Note)227 3292 y Fq(SANE)h(does)k(not)f(require)h
+(that)f(this)h(function)g(is)f(called)h(before)g(a)e
+Fp(sane)p 2646 3292 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227
+3405 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o
+(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f
+(unnecessary)j(and)227 3518 y(undesirable)27 b(to)d(call)g(this)g
+(function)h(\002rst.)0 3825 y Fm(4.3.4)99 b Fc(sane)p
+545 3825 30 4 v 35 w(open)0 4058 y Fq(This)26 b(function)h(is)f(used)h
+(to)e(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36
+b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0
+4171 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40
+b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33
+b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e
+Fp(*h)p Fq(.)0 4284 y(As)22 b(a)h(special)h(case,)g(specifying)i(a)c
+(zero-length)k(string)f(as)d(the)i(de)n(vice)g(requests)h(opening)g
+(the)e(\002rst)g(a)n(v)n(ailable)i(de)n(vice)f(\(if)0
+4397 y(there)g(is)g(such)g(a)f(de)n(vice\).)227 4642
+y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k
+(SANE_Handle)d(*)55 b(h\);)0 4887 y Fq(This)23 b(function)j(may)d(f)o
+(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+5132 y Fp(SANE)p 452 5132 28 4 v 31 w(STATUS)p 813 5132
+V 30 w(DEVICE)p 1173 5132 V 30 w(BUSY)p Fr(:)44 b Fq(The)23
+b(de)n(vice)i(is)e(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i
+(else\).)1905 5381 y(25)p eop end
+%%Page: 26 27
+TeXDict begin 26 26 bop 227 123 a Fp(SANE)p 452 123 28
+4 v 31 w(STATUS)p 813 123 V 30 w(INVAL)p Fr(:)44 b Fq(The)23
+b(de)n(vice)h(name)g(is)f(not)h(v)n(alid.)227 269 y Fp(SANE)p
+452 269 V 31 w(STATUS)p 813 269 V 30 w(IO)p 953 269 V
+32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occured)g(while)f
+(communicating)i(with)e(the)f(de)n(vice.)227 415 y Fp(SANE)p
+452 415 V 31 w(STATUS)p 813 415 V 30 w(NO)p 953 415 V
+32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 561 y Fp(SANE)p 452
+561 V 31 w(STATUS)p 813 561 V 30 w(ACCESS)p 1173 561
+V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h(has)f
+(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427 674
+y(or)24 b(in)l(v)n(alid)h(authentication.)0 982 y Fm(4.3.5)99
+b Fc(sane)p 545 982 30 4 v 35 w(close)0 1215 y Fq(This)32
+b(function)h(terminates)h(the)e(association)j(between)e(the)f(de)n
+(vice)h(handle)g(passed)g(in)f(ar)n(gument)h Fp(h)e Fq(and)h(the)g(de)n
+(vice)0 1328 y(it)h(represents.)59 b(If)33 b(the)g(de)n(vice)h(is)f
+(presently)j(acti)n(v)o(e,)f(a)e(call)g(to)g Fp(sane)p
+2326 1328 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j(\002rst.)57
+b(After)33 b(this)0 1441 y(function)26 b(returns,)f(handle)g
+Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227 1712
+y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0 2020
+y Fm(4.3.6)99 b Fc(sane)p 545 2020 30 4 v 35 w(get)p
+760 2020 V 35 w(option)p 1155 2020 V 35 w(descriptor)0
+2253 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f
+(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h
+(descriptor)g(for)f(option)0 2366 y(number)i Fp(n)e Fq(of)h(the)h(de)n
+(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36
+b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0
+2479 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g
+(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de)
+n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2592 y(includes)22
+b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i
+(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p
+Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 2705
+y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h
+(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227
+2976 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48
+b(*)445 3089 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3397 y Fm(4.3.7)99
+b Fc(sane)p 545 3397 V 35 w(control)p 1000 3397 V 34
+w(option)0 3630 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g
+(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e
+Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 3743
+y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f
+(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h
+Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 3855
+y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6
+b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through)
+g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 3968 y(is)21 b(a)f(pointer)j(to)e
+(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29
+b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f
+Fq(must)h(be)g(big)g(enough)0 4081 y(to)26 b(hold)g(the)g(entire)h
+(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d
+Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39
+b(The)0 4194 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h
+(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e
+(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4307 y Fp(v)33
+b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h
+(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d
+(\002rst)f Fp(NUL)0 4420 y Fq(terminator)c(in)e(the)g(string.)44
+b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p
+Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o
+(vide)i(details)g(on)e(ho)n(w)0 4533 y(well)23 b(the)h(request)h(has)f
+(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d
+(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227
+4779 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h
+(h,)k(SANE_Int)e(n,)2027 4892 y(SANE_Action)f(a,)j(void)g(*v,)2027
+5005 y(SANE_Int)e(*)j(i\);)1905 5381 y Fq(26)p eop end
+%%Page: 27 28
+TeXDict begin 27 27 bop 185 35 3531 4 v 183 148 4 113
+v 628 114 a Fr(Symbol)p 1363 148 V 1363 148 V 493 w(Code)p
+1664 148 V 1664 148 V 850 w(Description)p 3714 148 V
+185 151 3531 4 v 185 168 V 183 281 4 113 v 234 247 a
+Fp(SANE)p 459 247 28 4 v 31 w(ACTION)p 820 247 V 30 w(GET)p
+1015 247 V 32 w(VALUE)p 1363 281 4 113 v 254 w Fq(0)p
+1664 281 V 100 w(Get)23 b(current)i(option)g(v)n(alue.)p
+3714 281 V 183 619 4 339 v 234 360 a Fp(SANE)p 459 360
+28 4 v 31 w(ACTION)p 820 360 V 30 w(SET)p 1015 360 V
+32 w(VALUE)p 1363 619 4 339 v 254 w Fq(1)p 1664 619 V
+100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g
+(passed)h(through)g(ar)n(-)1716 473 y(gument)21 b Fp(v)d
+Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue)
+1716 585 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p
+3714 619 V 183 1184 4 565 v 234 698 a Fp(SANE)p 459 698
+28 4 v 31 w(ACTION)p 820 698 V 30 w(SET)p 1015 698 V
+32 w(AUTO)p 1363 1184 4 565 v 309 w Fq(2)p 1664 1184
+V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28
+b(or)f(de)n(vice)g(will)g(au-)1716 811 y(tomatically)39
+b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38
+b(mode)1716 924 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o
+(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1037 y(v)n(alue)22
+b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h
+Fp(v)e Fq(is)h(completely)1716 1150 y(ignored)j(in)f(this)g(case)g(and)
+g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1184 V 185 1187 3531
+4 v 1168 1341 a(T)-7 b(able)24 b(4.7:)29 b(Action)24
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 1341 28 4 v
+31 w(Action)p Fq(\))0 1714 y(The)d(w)o(ay)h(the)f(option)j(is)d(af)n
+(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d(controlled)k(by)c
+(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0
+1827 y Fp(SANE)p 225 1827 V 31 w(Action)p Fq(.)k(The)e(possible)j(v)n
+(alues)f(and)f(their)g(meaning)h(is)e(described)j(in)e(T)-7
+b(able)23 b(4.7.)0 1998 y(After)k(setting)h(a)e(v)n(alue)h(via)g(an)g
+(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o
+Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0
+2111 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e
+Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h
+(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0
+2224 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g
+(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2396 y(This)g(function)j(may)
+d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+2642 y Fp(SANE)p 452 2642 V 31 w(STATUS)p 813 2642 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h
+(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427
+2755 y(option)e(number)-5 b(.)227 2901 y Fp(SANE)p 452
+2901 V 31 w(STATUS)p 813 2901 V 30 w(INVAL)p Fr(:)44
+b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227
+3047 y Fp(SANE)p 452 3047 V 31 w(STATUS)p 813 3047 V
+30 w(IO)p 953 3047 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+3193 y Fp(SANE)p 452 3193 V 31 w(STATUS)p 813 3193 V
+30 w(NO)p 953 3193 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3339
+y Fp(SANE)p 452 3339 V 31 w(STATUS)p 813 3339 V 30 w(ACCESS)p
+1173 3339 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h
+(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427
+3452 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3760
+y Fm(4.3.8)99 b Fc(sane)p 545 3760 30 4 v 35 w(get)p
+760 3760 V 35 w(parameters)0 3993 y Fq(This)28 b(function)i(is)e(used)h
+(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44
+b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0
+4106 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h
+(started)h(\()p Fp(sane)p 2070 4106 28 4 v 31 w(start\(\))19
+b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0
+4219 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6
+b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates)
+e(of)g(what)f(the)g(parameters)0 4332 y(will)23 b(be)g(when)g
+Fp(sane)p 716 4332 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32
+b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i
+(started)g(allo)n(ws,)0 4445 y(for)c(e)o(xample,)h(to)e(get)h(an)g
+(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27
+b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0
+4558 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f
+(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer)
+j Fp(p)c Fq(to)i(a)g(parameter)0 4671 y(structure.)k(The)23
+b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n
+(w)-6 b(.)227 4942 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e
+(\(SANE_Handle)h(h,)2027 5055 y(SANE_Parameters)f(*)54
+b(p\);)1905 5381 y Fq(27)p eop end
+%%Page: 28 29
+TeXDict begin 28 28 bop 103 967 3695 4 v 101 1080 4 113
+v 628 1046 a Fr(Symbol)p 1444 1080 V 1444 1080 V 575
+w(Code)p 1746 1080 V 1746 1080 V 850 w(Description)p
+3796 1080 V 103 1084 3695 4 v 103 1100 V 101 2455 4 1355
+v 153 1179 a Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628
+1179 V 31 w(INEXACT)p 1444 2455 4 1355 v 613 w Fq(1)p
+1746 2455 V 100 w(This)21 b(v)n(alue)g(is)f(returned)j(when)e(setting)h
+(an)e(option)i(v)n(alue)g(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n
+(alue)g(being)h(selected)h(that)e(does)h(not)f(e)o(xactly)1797
+1405 y(match)f(the)f(requested)j(v)n(alue.)40 b(F)o(or)26
+b(e)o(xample,)i(if)f(a)g(scanner)1797 1518 y(can)g(adjust)g(the)f
+(resolution)j(in)d(increments)i(of)e(30dpi)h(only)-6
+b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i(may)e
+(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d(300dpi.)47
+b(When)30 b(this)f(happens,)j(the)d(bitset)1797 1857
+y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49
+b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f
+(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797
+2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32
+b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31
+b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28
+b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e
+(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h
+(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455
+V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4
+v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30
+w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133
+V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n
+(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f
+(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797
+2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g
+Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j
+(should)e(reload)g(all)f(options.)1797 2986 y(This)36
+b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one)
+1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923
+4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p
+628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444
+3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g
+(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797
+3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p
+2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797
+3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f
+(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26
+b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if)
+1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30
+b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33
+b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797
+3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4
+791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29
+b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option)
+1905 5381 y(28)p eop end
+%%Page: 29 30
+TeXDict begin 29 29 bop 0 123 a Fq(The)32 b(scan)g(parameters)i(are)f
+(returned)h(in)e(a)f(structure)k(of)d(type)g Fp(SANE)p
+2314 123 28 4 v 31 w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k
+(of)d(this)0 236 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 423 y Fp(typedef)52 b(struct)336 536 y({)445
+649 y(SANE_Frame)e(format;)445 762 y(SANE_Bool)h(last_frame;)445
+874 y(SANE_Int)g(lines;)445 987 y(SANE_Int)g(depth;)445
+1100 y(SANE_Int)g(pixels_per_line;)445 1213 y(SANE_Int)g
+(bytes_per_line;)336 1326 y(})227 1439 y(SANE_Parameters)o(;)0
+1626 y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f
+(the)g(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38
+b(possible)i(v)n(alues)f(for)f(type)0 1739 y Fp(SANE)p
+225 1739 V 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7
+b(able)28 b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e
+(described)i(in)f(more)f(detail)h(in)f(Sec-)0 1852 y(tion)d(3.2.)p
+574 1940 2752 4 v 572 2053 4 113 v 892 2019 a Fr(Symbol)p
+1501 2053 V 1501 2053 V 368 w(Code)p 1803 2053 V 1803
+2053 V 585 w(Description)p 3324 2053 V 574 2056 2752
+4 v 574 2073 V 572 2186 4 113 v 624 2152 a Fp(SANE)p
+849 2152 28 4 v 31 w(FRAME)p 1155 2152 V 30 w(GRAY)p
+1501 2186 4 113 v 309 w Fq(0)p 1803 2186 V 100 w(Band)g(co)o(v)o(ering)
+h(human)f(visual)h(range.)p 3324 2186 V 572 2299 V 624
+2265 a Fp(SANE)p 849 2265 28 4 v 31 w(FRAME)p 1155 2265
+V 30 w(RGB)p 1501 2299 4 113 v 364 w Fq(1)p 1803 2299
+V 100 w(Pix)o(el-interlea)n(v)o(ed)i(red/green/blue)h(bands.)p
+3324 2299 V 572 2412 V 624 2378 a Fp(SANE)p 849 2378
+28 4 v 31 w(FRAME)p 1155 2378 V 30 w(RED)p 1501 2412
+4 113 v 364 w Fq(2)p 1803 2412 V 100 w(Red)23 b(band)i(of)e(a)g
+(red/green/blue)28 b(image.)p 3324 2412 V 572 2524 V
+624 2491 a Fp(SANE)p 849 2491 28 4 v 31 w(FRAME)p 1155
+2491 V 30 w(GREEN)p 1501 2524 4 113 v 254 w Fq(3)p 1803
+2524 V 100 w(Green)c(band)g(of)g(a)f(red/green/blue)28
+b(image.)p 3324 2524 V 572 2637 V 624 2604 a Fp(SANE)p
+849 2604 28 4 v 31 w(FRAME)p 1155 2604 V 30 w(BLUE)p
+1501 2637 4 113 v 309 w Fq(4)p 1803 2637 V 100 w(Blue)c(band)g(of)g(a)f
+(red/green/blue)k(image.)p 3324 2637 V 574 2641 2752
+4 v 1194 2794 a(T)-7 b(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p
+Fp(SANE)p 2377 2794 28 4 v 31 w(Frame)p Fq(\))0 3145
+y(Member)f Fp(last)p 554 3145 V 31 w(frame)d Fq(is)j(set)g(to)g
+Fp(SANE)p 1395 3145 V 31 w(TRUE)e Fq(if)h(and)i(only)g(if)f(the)g
+(frame)g(that)h(is)f(currently)i(being)f(acquired)i(\(or)d(the)0
+3258 y(frame)k(that)h(will)f(be)g(acquired)i(ne)o(xt)f(if)e(there)i(is)
+f(no)h(current)g(frame\))g(is)f(the)g(last)h(frame)f(of)g(a)g(multi)g
+(frame)g(image)h(\(e.g.,)0 3370 y(the)d(current)h(frame)f(is)f(the)h
+(blue)g(component)i(of)d(a)g(red,)h(green,)g(blue)h(image\).)0
+3523 y(Member)33 b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h
+(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)57
+b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 3636
+y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)h
+(frontend)h(should)g(call)f Fp(sane)p 2572 3636 V 31
+w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0
+3749 y Fp(SANE)p 225 3749 V 31 w(STATUS)p 586 3749 V
+30 w(EOF)p Fq(.)0 3902 y(Member)24 b Fp(bytes)p 611 3902
+V 30 w(per)p 806 3902 V 32 w(line)c Fq(speci\002es)25
+b(the)f(number)h(of)e(bytes)i(that)f(comprise)h(one)f(scan)g(line.)0
+4054 y(Member)g Fp(depth)c Fq(speci\002es)25 b(the)f(number)g(of)g
+(bits)g(per)g(sample.)0 4207 y(Member)g Fp(pixels)p 666
+4207 V 30 w(per)p 861 4207 V 31 w(line)d Fq(speci\002es)k(the)f(number)
+g(of)g(pix)o(els)g(that)g(comprise)h(one)f(scan)g(line.)0
+4359 y(Assume)k Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)
+h(frame,)g(then)h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g
+(by)g(member)f Fp(depth)p Fq(\))e(and)0 4472 y(the)e(number)i(of)e(pix)
+o(els)h(per)f(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)
+h Fp(pixels)p 2416 4472 V 30 w(per)p 2611 4472 V 31 w(line)p
+Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0
+4585 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h
+Fp(bytes)p 1675 4585 V 31 w(per)p 1871 4585 V 31 w(line)p
+Fq(\))d(as)j(follo)n(ws:)1214 4804 y Fh(c)i(>)p Fj(=)1445
+4660 y Fb(\()1554 4747 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p
+Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 4860
+y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h
+Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g
+Fj(1)0 5019 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g
+(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by)
+f(the)g(right)g(side)g(of)0 5132 y(this)c(equation.)31
+b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f
+(such)i(\223padded\224)h(image)e(formats.)1905 5381 y(29)p
+eop end
+%%Page: 30 31
+TeXDict begin 30 30 bop 0 123 a Fm(4.3.9)99 b Fc(sane)p
+545 123 30 4 v 35 w(start)0 356 y Fq(This)23 b(function)j(initiates)g
+(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i
+(by)c(handle)i Fp(h)p Fq(.)227 602 y Fp(SANE_Status)50
+b(sane_start)g(\(SANE_Handle)f(h\);)0 848 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h
+(status)g(codes.)227 1095 y Fp(SANE)p 452 1095 28 4 v
+31 w(STATUS)p 813 1095 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22
+b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g
+Fp(sane)p 3297 1095 V 31 w(cancel)p Fq(.)227 1241 y Fp(SANE)p
+452 1241 V 31 w(STATUS)p 813 1241 V 30 w(DEVICE)p 1173
+1241 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6
+b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5
+b(.)227 1387 y Fp(SANE)p 452 1387 V 31 w(STATUS)p 813
+1387 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g
+(jammed.)227 1533 y Fp(SANE)p 452 1533 V 31 w(STATUS)p
+813 1533 V 30 w(NO)p 953 1533 V 32 w(DOCS)p Fr(:)44 b
+Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+1679 y Fp(SANE)p 452 1679 V 31 w(STATUS)p 813 1679 V
+30 w(COVER)p 1118 1679 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 1825 y Fp(SANE)p
+452 1825 V 31 w(STATUS)p 813 1825 V 30 w(IO)p 953 1825
+V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 1971 y Fp(SANE)p
+452 1971 V 31 w(STATUS)p 813 1971 V 30 w(NO)p 953 1971
+V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 2117 y Fp(SANE)p
+452 2117 V 31 w(STATUS)p 813 2117 V 30 w(INVAL)p Fr(:)44
+b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with)e(the)h(current)h
+(set)f(of)f(options.)34 b(The)24 b(fron-)427 2230 y(tend)19
+b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c(if)g
+Fp(SANE)p 2316 2230 V 31 w(INFO)p 2567 2230 V 31 w(RELOAD)p
+2928 2230 V 30 w(OPTIONS)c Fq(had)19 b(been)427 2343
+y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p 1492
+2343 V 30 w(control)p 1907 2343 V 30 w(option\(\))p Fq(,)20
+b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may)427
+2456 y(ha)n(v)o(e)d(changed.)0 2764 y Fm(4.3.10)99 b
+Fc(sane)p 595 2764 30 4 v 35 w(read)0 2997 y Fq(This)19
+b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n
+(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20
+b Fp(buf)e Fq(is)h(a)g(pointer)0 3110 y(to)27 b(a)g(memory)g(area)h
+(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41
+b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f
+Fp(*len)p Fq(.)37 b(A)0 3223 y(back)o(end)c(must)e(set)g(this)g(to)g
+(zero)g(when)g(a)f(status)i(other)g(than)g Fp(SANE)p
+2281 3223 28 4 v 30 w(STATUS)p 2641 3223 V 30 w(GOOD)d
+Fq(is)h(returned.)53 b(When)31 b(the)g(call)0 3336 y(succeeds,)26
+b(the)d(number)i(of)e(bytes)i(returned)h(can)d(be)h(an)o(ywhere)h(in)e
+(the)h(range)h(from)e(0)g(to)h Fp(maxlen)c Fq(bytes.)227
+3582 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f(h,)54
+b(SANE_Byte)c(*)55 b(buf,)1482 3695 y(SANE_Int)c(maxlen,)g(SANE_Int)g
+(*)j(len\);)0 3941 y Fq(If)30 b(this)i(function)h(is)d(called)i(when)f
+(no)g(data)g(is)g(a)n(v)n(ailable,)j(one)e(of)e(tw)o(o)h(things)h(may)e
+(happen,)k(depending)g(on)d(the)g(I/O)0 4054 y(mode)24
+b(that)g(is)f(in)h(ef)n(fect)g(for)g(handle)h Fp(h)p
+Fq(.)114 4300 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i
+(I/O)e(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i
+(until)f(at)f(least)h(one)g(data)f(byte)h(is)227 4413
+y(a)n(v)n(ailable)h(\(or)e(until)g(some)g(error)g(occurs\).)114
+4601 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c
+(mode,)k(the)d(call)g(returns)h(immediately)g(with)e(status)i
+Fp(SANE)p 3656 4601 V 31 w(STA-)227 4714 y(TUS)p 397
+4714 V 32 w(GOOD)21 b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0
+4960 y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via)
+g(a)f(call)h(to)f Fp(sane)p 2024 4960 V 31 w(set)p 2220
+4960 V 31 w(io)p 2361 4960 V 32 w(mode\(\))p Fq(.)0 5132
+y(This)g(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n
+(wing)h(status)g(codes.)1905 5381 y(30)p eop end
+%%Page: 31 32
+TeXDict begin 31 31 bop 227 123 a Fp(SANE)p 452 123 28
+4 v 31 w(STATUS)p 813 123 V 30 w(CANCELLED)p Fr(:)42
+b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)
+g Fp(sane)p 3297 123 V 31 w(cancel)p Fq(.)227 265 y Fp(SANE)p
+452 265 V 31 w(STATUS)p 813 265 V 30 w(EOF)p Fr(:)45
+b Fq(No)22 b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h
+(frame.)227 407 y Fp(SANE)p 452 407 V 31 w(STATUS)p 813
+407 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g
+(jammed.)227 549 y Fp(SANE)p 452 549 V 31 w(STATUS)p
+813 549 V 30 w(NO)p 953 549 V 32 w(DOCS)p Fr(:)44 b Fq(The)23
+b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+691 y Fp(SANE)p 452 691 V 31 w(STATUS)p 813 691 V 30
+w(COVER)p 1118 691 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 833 y Fp(SANE)p
+452 833 V 31 w(STATUS)p 813 833 V 30 w(IO)p 953 833 V
+32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 976 y Fp(SANE)p
+452 976 V 31 w(STATUS)p 813 976 V 30 w(NO)p 953 976 V
+32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 1118 y Fp(SANE)p
+452 1118 V 31 w(STATUS)p 813 1118 V 30 w(ACCESS)p 1173
+1118 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h
+(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427
+1231 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1532
+y Fm(4.3.11)99 b Fc(sane)p 595 1532 30 4 v 35 w(cancel)0
+1760 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f
+(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g
+(operation)g(of)e(the)0 1873 y(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)227 2105 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);)
+0 2336 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h
+(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i
+(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 2449
+y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f
+(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j
+(asynchronously)i(\(e.g.,)0 2562 y(from)37 b(within)g(a)f(signal)j
+(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f
+(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h
+Fq(imply)0 2675 y(that)g(the)f(currently)i(pending)g(operation)h(has)d
+(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e
+(cancellation)i(has)d(been)0 2788 y Fl(initiated)p Fq(.)68
+b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d
+(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0
+2901 y Fp(SANE)p 225 2901 28 4 v 31 w(STATUS)p 586 2901
+V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j
+(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0
+3014 y(this)i(implies)h(that)f(a)f(frontend)i(must)f
+Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g
+(cancelled)i(operation)g(has)e(returned.)0 3315 y Fm(4.3.12)99
+b Fc(sane)p 595 3315 30 4 v 35 w(set)p 810 3315 V 35
+w(io)p 965 3315 V 35 w(mode)0 3543 y Fq(This)21 b(function)j(is)e(used)
+g(to)f(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p
+Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d
+(non-blocking.)0 3656 y(If)27 b(ar)n(gument)j Fp(m)c
+Fq(is)i Fp(SANE)p 850 3656 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g(is)f
+(set)h(to)g(non-blocking)j(mode,)e(otherwise)g(it')-5
+b(s)28 b(set)g(to)f(blocking)j(mode.)0 3769 y(This)23
+b(function)j(can)e(be)g(called)g(only)h(after)f(a)f(call)h(to)g
+Fp(sane)p 1917 3769 V 30 w(start\(\))c Fq(has)k(been)g(performed.)227
+4001 y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54
+b(SANE_Bool)c(m\);)0 4232 y Fq(By)33 b(def)o(ault,)38
+b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60
+b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0
+4345 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f
+(status)i(v)n(alue)f Fp(SANE)p 2107 4345 V 31 w(STATUS)p
+2468 4345 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39
+b(Blocking)0 4458 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o
+(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i
+Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 4458 V 31 w(FALSE)d
+Fq(is)0 4571 y(guaranteed)e(to)c(complete)i(successfully)-6
+b(.)0 4738 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f
+(the)h(follo)n(wing)h(status)g(codes:)227 4970 y Fp(SANE)p
+452 4970 V 31 w(STATUS)p 813 4970 V 30 w(INVAL)p Fr(:)44
+b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227
+5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(the)f(requested)i(I/O)d(mode.)1905 5381 y(31)p
+eop end
+%%Page: 32 33
+TeXDict begin 32 32 bop 0 123 a Fm(4.3.13)99 b Fc(sane)p
+595 123 30 4 v 35 w(get)p 810 123 V 35 w(select)p 1205
+123 V 34 w(fd)0 353 y Fq(This)25 b(function)j(is)e(used)g(to)g(obtain)h
+(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d(handle)h
+Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0 466
+y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h(a)f
+(call)h(to)f Fp(sane)p 1850 466 28 4 v 31 w(read\(\))d
+Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29
+b(If)21 b(the)h(call)0 579 y(completes)j(successfully)-6
+b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d
+Fp(*fd)p Fq(.)227 817 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 1054 y Fq(This)37
+b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g
+Fp(sane)p 2056 1054 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed)
+h(and)f(the)g(returned)0 1167 y(\002le-descriptor)j(is)c(guaranteed)k
+(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h
+(image)f(acquisition)j(\(i.e.,)g(un-)0 1280 y(til)e Fp(sane)p
+339 1280 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 1280
+V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h
+Fp(sane)p 2810 1280 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0
+1393 y Fp(SANE)p 225 1393 V 31 w(STATUS)p 586 1393 V
+30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i
+(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the)
+0 1506 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p
+962 1506 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h
+Fp(SANE)p 2202 1506 V 31 w(STATUS)p 2563 1506 V 30 w(EOF)p
+Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 1619
+y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f
+(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p
+3167 1619 V 31 w(read\(\))p Fq(.)0 1788 y(A)30 b(back)o(end)k(may)e
+(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31
+b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0
+1901 y Fp(SANE)p 225 1901 V 31 w(STATUS)p 586 1901 V
+30 w(UNSUPPORTED)p Fq(.)0 2070 y(Note)25 b(that)h(the)g(only)g
+(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c
+(a)g(host)i(operating-system)i(dependent)0 2183 y(test)23
+b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h
+(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18
+b Fq(or)23 b Fp(poll\(\))0 2295 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f
+(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l
+(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0
+2408 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)
+f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g
+(until)g(a)f(call)g(to)0 2521 y Fp(sane)p 225 2521 V
+31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i
+(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this)
+g(operation)i(is)d(strongly)0 2634 y(encouraged)27 b(as)c(it)g(permits)
+i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g
+(acquisition)j(is)c(in)h(progress.)0 2803 y(This)f(function)j(may)d(f)o
+(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227
+3041 y Fp(SANE)p 452 3041 V 31 w(STATUS)p 813 3041 V
+30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)
+227 3185 y Fp(SANE)p 452 3185 V 31 w(STATUS)p 813 3185
+V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)0 3489 y Fm(4.3.14)99 b
+Fc(sane)p 595 3489 30 4 v 35 w(strstatus)0 3719 y Fq(This)28
+b(function)i(can)f(be)f(used)h(to)f(translate)i(a)e(SANE)e(status)j
+(code)g(into)g(a)f(printable)i(string.)44 b(The)28 b(returned)i(string)
+g(is)e(a)0 3832 y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g
+(complete)h(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f
+(\(full-stop\).)32 b(The)22 b(function)j(is)0 3945 y(guaranteed)k(to)c
+(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g
+(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this)
+g(function)h(is)0 4058 y(performed.)227 4295 y Fp(const)53
+b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g
+(status\);)0 4643 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0
+4906 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i
+(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b
+Fp(sane)p 2797 4906 28 4 v 31 w(init\(\))17 b Fq(and)22
+b Fp(sane)p 3547 4906 V 31 w(exit\(\))0 5019 y Fq(initialize)j(and)d(e)
+o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31
+b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f
+(initialization)j(and)d(before)0 5132 y(e)o(xiting)i(the)f(back)o(end.)
+1905 5381 y(32)p eop end
+%%Page: 33 34
+TeXDict begin 33 33 bop 536 2582 a @beginspecial 0 @llx
+0 @lly 601 @urx 542 @ury 3060 @rhi @setspecial
+%%BeginDocument: figs/flow.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: flow.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Tue Dec 3 22:09:10 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 601 542
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-161.0 577.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr
+% Polyline
+n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr
+% Polyline
+n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 6600 m
+gs 1 -1 sc (image acquisition) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 3825 m
+gs 1 -1 sc (device setup) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 7515 m
+gs 1 -1 sc (- go back to) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5775 7515 m
+gs 1 -1 sc (sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+7275 7515 m
+gs 1 -1 sc (if more frames desired) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 3300 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 5100 m
+gs 1 -1 sc (- sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 4500 m
+gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 4080 m
+gs 1 -1 sc (sane_control_option\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 3600 m
+gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 5700 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 6900 m
+gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6000 m
+gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6450 m
+gs 1 -1 sc (sane_read\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 8100 m
+gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (- sane_init\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 9300 m
+gs 1 -1 sc (- sane_exit\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+3600 1800 m
+gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 2700 m
+gs 1 -1 sc (- sane_open\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 8700 m
+gs 1 -1 sc (- sane_close\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4800 2175 m
+gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23
+b(\003o)n(w)0 3154 y(Function)k Fp(sane)p 573 3154 28
+4 v 31 w(get)p 769 3154 V 31 w(devices\(\))21 b Fq(can)26
+b(be)g(called)h(an)o(y)e(time)h(after)g Fp(sane)p 2572
+3154 V 31 w(init\(\))c Fq(has)k(been)h(called.)36 b(It)26
+b(returns)0 3267 y(the)32 b(list)f(of)h(the)f(de)n(vices)i(that)f(are)g
+(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53 b(This)31
+b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0
+3380 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f
+(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n
+(ferent)h(calls.)30 b(It)21 b(should)j(be)0 3493 y(noted)i(that)f(this)
+g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g
+(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of)
+0 3606 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36
+b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f
+(ability)h(for)f(a)f(user)i(to)e(directly)0 3719 y(select)g(a)e
+(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g
+(function.)0 3890 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e
+(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352
+3890 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h
+(at)0 4003 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o
+(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e
+(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 4116 y(at)e(an)o(y)h(gi)n(v)o
+(en)g(time.)0 4288 y(An)f(opened)i(de)n(vice)g(can)f(be)f(setup)i
+(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f
+(functions)j Fp(sane)p 3460 4288 V 30 w(get)p 3655 4288
+V 32 w(opt-)0 4401 y(ion)p 170 4401 V 31 w(descriptor\(\))k
+Fq(and)38 b Fp(sane)p 1280 4401 V 31 w(control)p 1696
+4401 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n
+(vice,)42 b(obtaining)e(option)0 4514 y(descriptors)d(and)e(setting)h
+(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f
+(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0
+4626 y(read)g(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o
+(ginning)h(and)f(then)g(b)n(uild)h(a)d(dialog)j(\(either)g(graphical)g
+(or)e(a)g(command-)0 4739 y(line)27 b(oriented)i(option)g(list\))e
+(that)g(allo)n(ws)g(to)g(control)i(the)e(a)n(v)n(ailable)i(options.)40
+b(It)27 b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0
+4852 y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29
+b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f
+(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0
+4965 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary)
+h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34
+b(While)24 b(setting)i(up)0 5078 y(the)i(de)n(vice,)h(it)e(is)g(also)h
+(admissible)h(to)e(call)h Fp(sane)p 1655 5078 V 31 w(get)p
+1851 5078 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i
+(of)e(what)g(the)h(image)1905 5381 y(33)p eop end
+%%Page: 34 35
+TeXDict begin 34 34 bop 0 123 a Fq(parameters)26 b(will)d(look)h(lik)o
+(e)g(once)h(image)f(acquisition)i(be)o(gins.)0 294 y(The)36
+b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e
+(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p
+3186 294 28 4 v 31 w(set)p 3382 294 V 31 w(io)p 3523
+294 V 32 w(mode\(\))p Fq(.)0 407 y(De)n(vices)30 b(are)f(required)i(to)
+e(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g
+(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0 520
+y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d
+(such)h(as)e(UNIX.)0 692 y(After)g(the)g(de)n(vice)g(is)g(setup)h
+(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f
+(a)f(call)h(to)g Fp(sane)p 3077 692 V 30 w(start\(\))p
+Fq(.)i(The)d(back-)0 805 y(end)33 b(calculates)h(the)f(e)o(xact)f
+(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g
+(to)f Fp(sane)p 3023 805 V 31 w(get)p 3219 805 V 31 w(parameters\(\))0
+918 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h
+(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i
+(starts)f(at)f(this)0 1031 y(point)41 b(or)e(during)i(the)e(\002rst)h
+(call)f(to)h Fp(sane)p 1450 1031 V 31 w(read\(\))35 b
+Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking)
+44 b(I/O)0 1144 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e
+(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h
+Fp(sane)p 2949 1144 V 31 w(set)p 3145 1144 V 31 w(io)p
+3286 1144 V 32 w(mode\(\))c Fq(and/or)0 1256 y Fp(sane)p
+225 1256 V 31 w(get)p 421 1256 V 31 w(select)p 782 1256
+V 30 w(fd\(\))c Fq(at)i(this)h(point.)30 b(Either)24
+b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f(the)h(back)o(end)h
+(does)g(not)e(support)0 1369 y(the)h(requested)i(operation.)0
+1541 y(Image)g(data)h(is)f(collected)j(by)d(repeatedly)j(calling)e
+Fp(sane)p 1886 1541 V 31 w(read\(\))p Fq(.)33 b(Ev)o(entually)-6
+b(,)28 b(this)f(function)h(will)e(return)h(an)f(end-)0
+1654 y(of-\002le)32 b(status)h(\()p Fp(SANE)p 746 1654
+V 31 w(STATUS)p 1107 1654 V 30 w(EOF)p Fq(\).)d(This)i(indicates)i(the)
+e(end)g(of)g(the)g(current)h(frame.)54 b(If)32 b(the)g(frontend)i(e)o
+(xpects)0 1767 y(additional)j(frames)e(\(e.g.,)i(the)d(indi)n(vidual)j
+(channels)g(in)d(of)h(a)f(red/green/blue)k(image)d(or)f(multiple)i
+(images\),)i(it)c(can)0 1880 y(call)24 b Fp(sane)p 379
+1880 V 31 w(start\(\))c Fq(again.)30 b(Once)24 b(all)g(desired)h
+(frames)f(ha)n(v)o(e)h(been)f(acquired,)i(function)g
+Fp(sane)p 3238 1880 V 31 w(cancel\(\))19 b Fq(must)0
+1993 y(be)33 b(called.)60 b(This)33 b(operation)i(can)f(also)g(be)f
+(called)i(at)e(an)o(y)g(other)i(time)e(to)g(cancel)i(a)e(pending)i
+(operation.)60 b(Note)34 b(that)0 2106 y Fp(sane)p 225
+2106 V 31 w(cancel\(\))19 b Fq(must)24 b(be)f(called)i(e)n(v)o(en)f(if)
+f(the)h(last)g(read)g(operation)i(returned)g Fp(SANE)p
+2906 2106 V 31 w(STATUS)p 3267 2106 V 30 w(EOF)p Fq(.)0
+2277 y(When)33 b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h
+(should)g(be)e(closed)i(by)e(a)g(call)h(to)f Fp(sane)p
+2875 2277 V 31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35
+b(before)0 2390 y(e)o(xiting)e(the)f(application,)37
+b(function)d Fp(sane)p 1443 2390 V 31 w(exit\(\))29 b
+Fq(must)j(be)g(called.)55 b(It)31 b(is)h(important)i(not)e(to)g(for)n
+(get)h(to)f(call)h(this)0 2503 y(function)26 b(since)e(otherwise)h
+(some)f(resources)i(\(e.g.,)d(temporary)i(\002les)f(or)f(locks\))i(may)
+e(remain)i(unclaimed.)0 2854 y Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31
+b(Options)0 3120 y Fq(While)c(most)f(back)o(end)j(options)f(are)f
+(completely)i(self-describing,)i(there)c(are)g(a)f(cases)h(where)g(a)f
+(user)h(interf)o(ace)i(might)0 3233 y(w)o(ant)24 b(to)g(special-case)k
+(the)c(handling)j(of)d(certain)i(options.)32 b(F)o(or)24
+b(e)o(xample,)h(the)f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g
+(four)0 3346 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e
+(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33
+b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 3459 y(w)o(ould)25
+b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g
+(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will)
+d(w)o(ant)h(to)0 3572 y(present)g(to)f(the)g(user)g(a)f(pre)n(vie)n(w)i
+(\(lo)n(w-resolution)i(scan\))d(of)g(the)g(scanner)h(surf)o(ace)h(and)e
+(let)g(the)g(user)g(pick)g(the)g(scan)h(area)0 3685 y(by)h(dragging)j
+(a)c(rectangle)k(into)e(the)f(desired)i(position.)39
+b(F)o(or)25 b(this)i(reason,)h(the)e(SANE)e(API)h(speci\002es)i(a)f
+(small)g(number)0 3797 y(of)d(option)j(names)e(that)g(ha)n(v)o(e)g
+(well-de\002ned)h(meanings.)0 4105 y Fm(4.5.1)99 b(Option)25
+b(Number)h(Count)0 4338 y Fq(Option)e(number)h(0)e(has)h(an)f(empty)h
+(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g(this)g(option)
+h(is)e(of)g(type)i Fp(SANE)p 3306 4338 V 30 w(TYPE)p
+3556 4338 V 31 w(INT)d Fq(and)0 4451 y(it)29 b(speci\002es)i(the)e
+(total)h(number)g(of)g(options)h(a)n(v)n(ailable)g(for)f(a)f(gi)n(v)o
+(en)g(de)n(vice)i(\(the)f(count)g(includes)i(option)e(number)h(0\).)0
+4564 y(This)23 b(means)h(that)f(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g
+(counting)j(the)d(number)h(of)f(options)i(a)n(v)n(ailable:)32
+b(a)22 b(frontend)k(can)d(either)i(c)o(ycle)0 4677 y(through)h(all)d
+(option)i(numbers)g(starting)h(at)d(one)h(until)h Fp(sane)p
+1963 4677 V 31 w(get)p 2159 4677 V 31 w(option)p 2520
+4677 V 30 w(descriptor\(\))17 b Fq(returns)25 b Fp(NULL)p
+Fq(,)c(or)j(a)0 4790 y(frontend)i(can)e(directly)h(read)f(out)g(the)g
+(v)n(alue)g(of)g(option)h(number)f(0.)1905 5381 y(34)p
+eop end
+%%Page: 35 36
+TeXDict begin 35 35 bop 0 123 a Fm(4.5.2)99 b(Scan)26
+b(Resolution)e(Option)0 354 y Fq(Option)29 b Fp(resolution)24
+b Fq(is)k(used)i(to)e(select)i(the)f(resolution)i(at)e(which)g(an)g
+(image)g(should)h(be)e(acquired.)47 b(The)28 b(type)h(of)0
+467 y(this)24 b(option)h(is)f(either)g Fp(SANE)p 947
+467 28 4 v 31 w(TYPE)p 1198 467 V 31 w(INT)d Fq(or)j
+Fp(SANE)p 1734 467 V 31 w(TYPE)p 1985 467 V 31 w(FIXED)p
+Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 2966 467 V 30 w(UNIT)p
+3216 467 V 31 w(DPI)e Fq(\(dots/inch\).)0 637 y(This)k(option)i(is)e
+(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 750 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+1056 y Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0
+1287 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f
+(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g
+(acquisition)j(should)0 1400 y(be)e(optimized)i(for)e(speed,)i(rather)g
+(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41
+b(When)27 b(set)g(to)g Fp(SANE)p 3003 1400 V 31 w(TRUE)p
+Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 1513 y(in)e(ef)n(fect,)g(when)g(set)
+g(to)g Fp(SANE)p 1012 1513 V 31 w(FALSE)d Fq(image)j(acquisition)j
+(should)f(proceed)f(in)f(normal)h(quality)g(mode.)33
+b(The)25 b(setting)0 1626 y(of)c(this)h(option)h Fl(must)f(not)h
+Fq(af)n(fect)g(an)o(y)e(other)i(option.)29 b(That)22
+b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f(concerned,)i
+(the)e(pre)n(vie)n(w)0 1739 y(mode)i(is)g(completely)i(side)e(ef)n
+(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g
+(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0
+1852 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f
+(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e
+(free)h(to)f(o)o(v)o(erride)0 1964 y(the)j Fp(resolution)21
+b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h
+(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)
+g(to)f(the)0 2077 y(frontend)g(where)n(v)o(er)e(possible.)0
+2247 y(This)i(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2360
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2666 y Fm(4.5.4)99
+b(Scan)26 b(Ar)n(ea)f(Options)0 2897 y Fq(The)d(four)i(most)e
+(important)j(well-kno)n(wn)f(options)g(are)f(the)g(ones)h(that)f
+(de\002ne)g(the)g(scan)h(area.)29 b(The)22 b(scan)i(area)f(is)f
+(de\002ned)0 3010 y(by)h(tw)o(o)f(points)j(\(x/y)e(coordinate)j
+(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e(the)g(bottom-right)j
+(corners.)k(This)23 b(is)f(illustrated)0 3123 y(in)28
+b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e(the)h
+(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e(the)h
+(scan)g(surf)o(ace)h(as)0 3236 y(seen)25 b(by)g(the)g(sensor)h(\(which)
+f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i(surf)o(ace)g
+(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 b(this)h(reason,)0
+3349 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i(for)e(which)g(the)
+g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f(simultaneously)k(the)c
+Fl(smallest)0 3462 y Fq(and)f(the)f(bottom-right)k(corner)d(is)g(the)f
+(corner)i(for)f(which)f(the)h(abscissa)h(and)f(ordinate)i(v)n(alues)e
+(are)g(simulatenously)j(the)0 3575 y Fl(lar)m(g)o(est)p
+Fq(.)h(If)22 b(this)i(coordinate)h(system)f(is)f(not)g(natural)h(for)f
+(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g(the)g(job)g(of)f(the)h(back)o
+(end)i(to)e(perform)h(the)0 3688 y(necessary)i(con)l(v)o(ersions.)0
+3858 y(The)d(names)h(of)g(the)f(four)i(options)g(that)f(de\002ne)g(the)
+g(scan)g(area)g(are)g(gi)n(v)o(en)g(in)f(the)h(table)h(belo)n(w:)1200
+4093 y Fr(Name)100 b(Description)1200 4206 y Fp(tl-x)107
+b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue)1200
+4319 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n
+(alue)1200 4432 y Fp(br-x)107 b Fq(Bottom-right)25 b
+Fh(x)e Fq(coordinate)j(v)n(alue)1200 4545 y Fp(br-y)107
+b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0
+4777 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e
+(follo)n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g
+(options:)136 5019 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h
+(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p
+2091 5019 V 31 w(UNIT)p 2342 5019 V 31 w(PIXEL)p Fq(\))20
+b(or)k(millimeters)h(\()p Fp(SANE)p 3484 5019 V 31 w(UNIT)p
+3735 5019 V 31 w(MM)p Fq(\))227 5132 y(to)f(these)g(options.)31
+b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h(identical.)
+1905 5381 y(35)p eop end
+%%Page: 36 37
+TeXDict begin 36 36 bop 1125 1562 a @beginspecial 0 @llx
+0 @lly 221 @urx 205 @ury 1836 @rhi @setspecial
+%%BeginDocument: figs/area.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: area.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Wed Dec 4 19:19:37 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 221 205
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-59.0 231.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr
+/Helvetica findfont 180.00 scalefont setfont
+2550 2302 m
+gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+7.500 slw
+% Polyline
+n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3375 3150 m
+gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1500 m
+gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2700 1050 m
+gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1050 3600 m
+gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+4425 525 m
+gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1080 585 m
+gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 1725 1650 m 1725 1800 l gs col-1 s gr
+% Polyline
+n 1650 1725 m 1800 1725 l gs col-1 s gr
+% Polyline
+n 3375 2700 m 3375 2850 l gs col-1 s gr
+% Polyline
+n 3300 2775 m 3450 2775 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23
+b(area)h(options)136 2134 y Fk(\017)46 b Fq(Whene)n(v)o(er)25
+b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h
+(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136
+2322 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g
+(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h
+(options)h(ha)n(v)o(e)f(range)227 2435 y(constraints)i(associated.)51
+b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f
+(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 2548
+y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f
+(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o
+(ace)g(size.)136 2735 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o
+(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i
+(missing.)1905 5381 y(36)p eop end
+%%Page: 37 38
+TeXDict begin 37 37 bop 0 804 a Fo(Chapter)44 b(5)0 1278
+y Fs(Netw)n(ork)51 b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o
+(ace)k(has)f(been)g(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f
+(access)f(to)f(image)h(acquisition)i(de)n(vices.)30 b(In)22
+b(particu-)0 1895 y(lar)l(,)f(most)e(SANE)f(implementations)23
+b(are)c(e)o(xpected)j(to)e(support)h(a)e(netw)o(ork)i(back)o(end)h
+(\(net)e(client\))i(and)e(a)f(corresponding)0 2008 y(netw)o(ork)k
+(daemon)f(\(net)g(serv)o(er\))h(that)f(allo)n(ws)g(accessing)i(image)e
+(acquisition)j(de)n(vices)e(through)h(a)d(netw)o(ork)h(connection.)0
+2120 y(Netw)o(ork)i(access)h(is)e(useful)i(in)f(se)n(v)o(eral)g
+(situations:)136 2367 y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j
+(controlled)h(access)f(to)e(resources)j(that)e(are)f(inaccessible)k(to)
+c(a)g(re)o(gular)h(user)-5 b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)
+227 2480 y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)
+h(where)g(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26
+b(the)f(netw)o(ork)i(protocol,)h(it)d(is)227 2593 y(possible)h(to)d
+(allo)n(w)h(certain)h(users)g(to)e(access)i(scanners)h(without)e(gi)n
+(ving)h(them)f(full)g(access)g(to)g(the)g(system.)227
+2743 y(Controlling)34 b(access)e(through)h(the)e(netw)o(ork)h(daemon)g
+(can)g(be)e(useful)j(e)n(v)o(en)e(in)g(the)g(local)h(case:)45
+b(for)31 b(e)o(xample,)227 2856 y(certain)d(back)o(ends)g(may)d
+(require)j(root)e(pri)n(vile)o(ges)i(to)e(access)h(a)e(de)n(vice.)37
+b(Rather)27 b(than)f(installing)i(each)f(frontend)227
+2969 y(as)36 b(setuid-root,)43 b(a)36 b(system)h(administrator)i(could)
+e(instead)h(install)g(the)f(SANE)d(netw)o(ork)j(daemon)g(as)g(setuid-)
+227 3082 y(root.)47 b(This)30 b(enables)h(re)o(gular)g(users)f(to)f
+(access)i(the)f(pri)n(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e
+(daemon)k(\(which,)227 3195 y(presumably)-6 b(,)24 b(supports)f(a)d
+(more)h(\002ne-grained)i(access)f(control)h(mechanism)f(than)f(the)g
+(simple)h(setuid)g(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h
+(bene\002t)g(that)g(the)f(system)h(administrator)i(only)e(needs)g(to)f
+(trust)h(the)f(SANE)e(daemon,)k(not)227 3420 y(each)25
+b(and)f(e)n(v)o(ery)g(frontend)h(that)f(may)g(need)g(access)h(to)e(the)
+h(pri)n(vile)o(ged)i(de)n(vice.)136 3608 y Fk(\017)46
+b Fq(Netw)o(ork)24 b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j
+(of)c(the)i(a)n(v)n(ailable)h(image)e(acquisition)j(de)n(vices.)31
+b(F)o(or)22 b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o
+(ork)h(en)l(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)
+g(an)o(y)f(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227
+3834 y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)
+h(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h
+(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19
+b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e
+(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws)
+227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices)
+h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44
+b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24
+b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g
+(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i
+(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g
+(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740
+y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i
+(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114
+4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client)
+h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o
+(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(37)p
+eop end
+%%Page: 38 39
+TeXDict begin 38 38 bop 114 123 a Fq(3.)45 b(Other)22
+b(operations,)i(such)e(as)f(setting)h(or)f(inquiring)j(the)d(v)n(alue)h
+(of)f(an)g(option)i(are)e(less)h(performance)h(critical)g(since)227
+236 y(the)o(y)h(typically)i(require)f(e)o(xplicit)g(user)g(action.)114
+423 y(4.)45 b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h
+(and)f(easy)h(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)
+e(an)o(y)227 536 y(programming)26 b(language.)0 783 y(The)32
+b(SANE)e(protocol)k(can)f(be)f(run)h(across)h(an)o(y)e(transport)j
+(protocol)g(that)e(pro)o(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6
+b(.)57 b(While)0 896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)
+i(transport)h(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d
+(will)h(be)h(among)g(the)g(most)0 1008 y(commonly)25
+b(used)f(protocols.)0 1360 y Fn(5.1)119 b(Data)30 b(T)-9
+b(ype)30 b(Encoding)0 1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24
+b(Data)h(T)-7 b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h
+(types)f(of)g(the)g(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)
+0 2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44
+b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28
+b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h
+(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n
+(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44
+b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30
+b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c
+(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).)
+0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29
+b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10
+b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227
+2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g
+(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h
+(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43
+b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g
+Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37
+b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227
+3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e
+Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6
+b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43
+b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40
+b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f
+(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g
+(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d
+(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227
+3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o
+(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues)
+g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f
+(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g
+(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47
+b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0
+4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378
+y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C)
+e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e
+(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737
+y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w)
+o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g
+(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28
+b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g
+(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f
+(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h
+(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(38)p eop
+end
+%%Page: 39 40
+TeXDict begin 39 39 bop 0 123 a Fa(array)p Fr(:)48 b
+Fq(An)28 b(array)i(is)e(encoded)j(by)e(a)g(w)o(ord)f(that)i(indicates)h
+(the)e(length)h(of)f(the)g(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h
+(of)f(the)227 236 y(elements)j(in)e(the)g(array)-6 b(.)50
+b(The)29 b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h
+(are)f(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0
+525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by)
+e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g
+(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j
+(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b
+Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e
+(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i
+(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30
+b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j
+(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g
+(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25
+b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e
+(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f
+(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g
+(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of)
+d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518
+y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h
+(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h
+(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h
+(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g
+(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\))
+f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h
+(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back)
+o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0
+2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p
+545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838
+y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e
+(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20
+b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0
+2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g
+(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g
+(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744
+3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p
+1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52
+b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p
+1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52
+b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32
+b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35
+b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36
+b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687
+y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39
+b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i
+(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v)
+o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h
+(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0
+3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f
+(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e
+(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o
+(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g
+(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31
+w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h
+(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59
+b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26
+b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e
+Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h
+(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n
+(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o
+(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5
+b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o
+(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0
+4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g
+(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748
+y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28
+b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw)
+o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g
+(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n
+(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p
+0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19
+b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak)
+g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5
+b(.)1905 5381 y Fq(39)p eop end
+%%Page: 40 41
+TeXDict begin 40 40 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p
+545 123 30 4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123
+V 35 w(DEVICES)0 356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(list)g(of)f(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)
+1055 596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y
+Fp(void)196 b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471
+822 y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603
+822 V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d
+(the)h(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6
+b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344
+V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has)
+g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p
+2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0
+1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f
+Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765
+y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p
+760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open)
+i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760
+2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p
+985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V
+30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071
+2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577
+y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y
+Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k
+(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0
+2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099
+V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has)
+e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d
+Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23
+b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31
+b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j
+(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p
+Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g
+(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0
+3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g
+(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0
+3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p
+760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077
+4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p
+1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252
+4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d
+Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h
+(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905
+5381 y(40)p eop end
+%%Page: 41 42
+TeXDict begin 41 41 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p
+545 123 30 4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123
+V 35 w(OPTION)p 1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(obtain)i Fl(all)f Fq(the)g(option)h
+(descriptors)h(for)e(a)f(remote)h(SANE)e(de)n(vice.)706
+592 y Fr(r)n(equest:)635 b(r)n(eply:)706 705 y Fp(SANE)p
+931 705 28 4 v 31 w(Word)52 b(handle)97 b(Option)p 1991
+705 V 30 w(Descriptor)p 2571 705 V 28 w(Array)53 b(odesc)0
+940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26 b(identi\002es)f(the)e
+(remote)i(de)n(vice)f(whose)g(option)h(descriptors)i(should)e(be)f
+(obtained.)0 1110 y(In)29 b(the)h(reply)-6 b(,)32 b(the)d
+Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h(to)f(return)i(the)f(array)g(of)
+f(option)i(descriptors.)50 b(The)29 b(option)h(descriptor)0
+1223 y(array)24 b(has)g(the)g(follo)n(wing)h(structure:)227
+1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)o(rra)o(y)336
+1579 y({)445 1692 y(SANE_Word)f(num_options;)445 1805
+y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336 1918
+y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30 4 v
+35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V 34 w(OPTION)0
+2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i(\(inquire,)h(set,)
+d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i(option)g(of)e(a)g
+(remote)i(SANE)c(de)n(vice.)815 2694 y Fr(r)n(equest:)832
+b(r)n(eply:)815 2807 y Fp(SANE)p 1040 2807 28 4 v 31
+w(Word)52 b(handle)294 b(SANE)p 2187 2807 V 31 w(Status)51
+b(status)815 2920 y(SANE)p 1040 2920 V 31 w(Word)h(option)294
+b(SANE)p 2187 2920 V 31 w(Word)52 b(info)815 3033 y(SANE)p
+1040 3033 V 31 w(Word)g(action)294 b(SANE)p 2187 3033
+V 31 w(Word)52 b(value)p 2765 3033 V 31 w(type)815 3146
+y(SANE)p 1040 3146 V 31 w(Word)g(value)p 1618 3146 V
+31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52 b(value)p
+2765 3146 V 31 w(size)815 3259 y(SANE)p 1040 3259 V 31
+w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52 b(*value)815
+3371 y(void)g(*value)545 b(SANE)p 2187 3371 V 31 w(String)51
+b(*resource)0 3606 y Fq(The)21 b Fp(handle)e Fq(ar)n(gument)k
+(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f(option)i(should)f
+(be)f(controlled.)31 b(Ar)n(gument)23 b Fp(option)0 3719
+y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)g(option)h(that)g
+(should)h(be)e(controlled.)60 b(Ar)n(gument)34 b Fp(action)c
+Fq(speci\002es)k(what)f(action)0 3832 y(should)40 b(be)f(tak)o(en)g
+(\(get,)k(set,)f(or)d(set)g(automatic\).)75 b(Ar)n(gument)40
+b Fp(value)p 2430 3832 V 30 w(type)c Fq(speci\002es)k(the)f(type)g(of)g
+(the)g(option)0 3945 y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g
+Fp(SANE)p 1080 3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p
+Fq(,)d Fp(SANE)p 1855 3945 V 31 w(TYPE)p 2106 3945 V
+31 w(INT)p Fq(,)h Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826
+3945 V 31 w(FIXED)p Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p
+3656 3945 V 31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p
+437 4058 V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28
+b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g
+(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f
+(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n
+(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c
+Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31
+b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h
+Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32
+b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v)
+o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37
+b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g
+(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f
+(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o
+(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622
+y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24
+b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g
+(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call)
+0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p
+Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)
+h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f
+(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26
+b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36
+b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f
+Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p
+Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h
+(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(41)p
+eop end
+%%Page: 42 43
+TeXDict begin 42 42 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f
+(information)i(on)d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h
+(to)f(satisfy)i(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0
+236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f
+(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946
+236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V
+31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h
+(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28
+b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462
+y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply)
+i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i
+(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28
+b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that)
+f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0
+687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545
+995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V
+35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886
+1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p
+1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061
+1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061
+1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b
+Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e
+(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0
+2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40
+b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g
+(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j
+Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g
+(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750
+30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).)
+940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y
+Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p
+2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p
+2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116
+3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891
+3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913
+y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g
+(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h
+(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23
+b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19
+b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e
+(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33
+b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g
+(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section)
+g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d
+(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31
+b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0
+4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073
+4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28
+b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n
+(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27
+b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data)
+g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0
+4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g
+(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5
+b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g
+(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50
+b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.)
+0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence)
+j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted)
+j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j
+(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f
+(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905
+5381 y(42)p eop end
+%%Page: 43 44
+TeXDict begin 43 43 bop 0 123 a Fq(the)24 b(length.)31
+b(Except)25 b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)
+g(format)g(as)g(de\002ned)h(for)f Fp(sane)p 3078 123
+28 4 v 31 w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34
+b(may)d(contain)j(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e
+(zero)i(is)f(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n
+(alue)e(of)0 349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i
+(the)f(end)g(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f
+(recei)n(ving)i(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p
+Fq(,)18 b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g
+(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35
+b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36
+b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33
+b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742
+y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g
+(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j
+(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i
+(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o
+(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0
+968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31
+b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6
+b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v)
+o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i
+(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0
+1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j
+(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i
+(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h
+(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609
+30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f
+(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635
+b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30
+w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53
+b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f
+(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0
+2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p
+810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h
+(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854
+b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31
+w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53
+b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967
+3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006
+y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g
+(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31
+b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string)
+h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24
+b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j
+(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17
+b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j
+(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0
+4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512
+y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o
+(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n
+(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g
+(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo)
+n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0
+4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g
+(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i
+(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22
+b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e
+(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0
+5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905
+5381 y(43)p eop end
+%%Page: 44 45
+TeXDict begin 44 44 bop 0 123 a Fq(In)20 b(the)h(reply)-6
+b(,)22 b Fp(dummy)17 b Fq(is)k(completely)h(unused.)30
+b(Note)20 b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)
+30 b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h
+(will)f(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)
+j(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0
+349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26
+b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f
+(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f
+(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31
+w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p
+Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v
+35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g
+(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5
+b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i
+(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h
+(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o
+(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y
+Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e
+Fq(call)j(will)f(be)h(closed.)1905 5381 y(44)p eop end
+%%Page: 45 46
+TeXDict begin 45 45 bop 0 804 a Fo(Chapter)44 b(6)0 1278
+y Fs(Contact)51 b(Inf)-5 b(ormation)0 1782 y Fq(The)25
+b(SANE)e(standard)28 b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e
+(a)h(mailing)g(list.)35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e
+(the)h(Internet)0 1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o
+(e)g(the)g(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)
+n(wing)h(address.)227 2141 y Fp(sane-devel-requ)o(est)o(@m)o(os)o(ta)o
+(ng)o(.co)o(m)0 2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g
+(with)g(the)h(body)h(\223)p Fp(subscribe)51 b(sane-devel)p
+Fq(\224)18 b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559
+y(A)e(complete)j(list)e(of)g(commands)i(supported)h(can)d(be)h
+(obtained)h(by)e(sending)j(a)c(mail)i(with)f(a)f(subject)j(of)e(\223)p
+Fp(help)p Fq(\224)f(to)h(the)0 2672 y(abo)o(v)o(e)g(address.)31
+b(The)23 b(mailing)h(list)g(is)g(archi)n(v)o(ed)h(and)f(a)n(v)n
+(ailable)h(through)h(the)e(SANE)d(home)j(page)g(at)f(URL:)227
+2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o(an)o(e/)1905
+5381 y Fq(45)p eop end
+%%Page: 46 47
+TeXDict begin 46 46 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6
+b(,)24 b(37)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6
+b(,)24 b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0
+1713 y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021
+y(enumeration)i(types,)f(36)0 2217 y(image)f(data)g(format,)g(8)0
+2413 y(mailing)h(list,)e(43)0 2609 y(netw)o(ork)i(authorization,)i(41)0
+2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031
+y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031
+V 36 w(Array)-6 b(,)23 b(39)0 3227 y(passw)o(ord,)i(22)0
+3340 y(pointer)l(,)g(36)0 3453 y(pre)n(vie)n(w)f(mode,)f(33)0
+3649 y(resolution)j(option,)f(33)0 3845 y(SANE)p 244
+3845 V 31 w(Action,)f(25)0 3957 y(SANE)p 244 3957 V 31
+w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12
+b(ALUE,)20 b(25)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p
+616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21
+b(25)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616
+4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(25)0
+4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296
+V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0
+4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(36)0 4635
+y(sane)p 165 4635 V 34 w(cancel,)h(29)0 4748 y(SANE)p
+244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19
+b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V
+32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p
+244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19
+b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V
+32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095
+1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h
+(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125
+V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095
+1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p
+2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p
+2339 1351 V 31 w(Char)l(,)k(14,)f(36)2095 1463 y(sane)p
+2260 1463 V 35 w(close,)h(24)2095 1576 y(SANE)p 2339
+1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095
+1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689
+V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31
+w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V
+31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915
+V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095
+2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028
+V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095
+2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V
+35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p
+2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339
+2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480
+V 35 w(e)o(xit,)f(23)2095 2593 y(SANE)p 2339 2593 V 31
+w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V
+31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095
+2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32
+w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095
+3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(27)2095 3157
+y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(27)
+2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270
+V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(27)2095 3383 y(SANE)p
+2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(27)2095
+3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31
+w(RED,)f(10,)h(27)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p
+2685 3609 V 31 w(RGB,)f(9,)h(27)2095 3722 y(sane)p 2260
+3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095
+3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p
+2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p
+2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(25)2095
+4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p
+2643 4060 V 35 w(fd,)d(30)2095 4173 y(SANE)p 2339 4173
+V 31 w(Handle,)h(15,)g(36)2095 4286 y(SANE)p 2339 4286
+V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(26)2095
+4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32
+w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(26,)i(28)2095
+4512 y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32
+w(RELO)m(AD)p 2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(26)2095
+4625 y(sane)p 2260 4625 V 35 w(init,)j(22)2095 4738 y(SANE)p
+2339 4738 V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851
+V 31 w(NET)p 2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(41)2095
+4964 y(SANE)p 2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(41)2095
+5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(38)1905
+5381 y(46)p eop end
+%%Page: 47 48
+TeXDict begin 47 47 bop 0 123 a Fq(SANE)p 244 123 28
+4 v 31 w(NET)p 453 123 V 32 w(CONTR)l(OL)p 913 123 V
+30 w(OPTION,)21 b(39)0 236 y(SANE)p 244 236 V 31 w(NET)p
+453 236 V 32 w(EXIT)-7 b(,)21 b(42)0 349 y(SANE)p 244
+349 V 31 w(NET)p 453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(38)0
+462 y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p
+663 462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(39)0
+574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p
+663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(40)0 687 y(SANE)p
+244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(37)0
+800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(38)0
+913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8
+b(AR)j(T)e(,)19 b(40)0 1026 y(sane)p 165 1026 V 34 w(open,)24
+b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139
+V 34 w(Descriptor)l(,)i(17)0 1252 y(SANE)p 244 1252 V
+31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21
+b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365
+V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0
+1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(27)0
+1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p
+165 1704 V 34 w(read,)g(28)0 1817 y(sane)p 165 1817 V
+34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0
+1929 y(sane)p 165 1929 V 34 w(start,)g(28)0 2042 y(SANE)p
+244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155
+V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p
+975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268
+V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19
+b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p
+603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21
+b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p
+603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21
+b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p
+603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720
+V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15,)i(22)0
+2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833
+V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31
+w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32
+w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8
+b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171
+y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V
+30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p
+244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p
+765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397
+V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5
+b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24
+b(14,)f(36)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496
+3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34
+w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21
+b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962
+V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p
+504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244
+4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301
+y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10
+b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504
+4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526
+V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p
+244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V
+31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p
+493 4865 V 32 w(BIT)-7 b(,)22 b(19)0 4978 y(SANE)p 244
+4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(19)0 5091 y(SANE)p
+244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(19)2095
+123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(19)2095
+236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(19)2095
+349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7
+b(,)20 b(19)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p
+2588 462 V 32 w(PIXEL,)h(19)2095 574 y(SANE)p 2339 574
+V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(18)2095
+687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31
+w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p
+2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913
+V 31 w(W)-7 b(ord,)24 b(12,)f(36)2095 1026 y(scan)i(area)f(options,)h
+(33)2095 1139 y(scan)g(resolution,)h(33)2095 1252 y(structure,)g(37)
+2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095
+1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(37)2095
+1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095
+2374 y(well-kno)n(wn)h(options,)g(32)1905 5381 y(47)p
+eop end
+%%Trailer
+
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/sane2/0.05/sane2-0.05.dvi.gz b/sane2/0.05/sane2-0.05.dvi.gz
new file mode 100644
index 00000000..fb684eb3
Binary files /dev/null and b/sane2/0.05/sane2-0.05.dvi.gz differ
diff --git a/sane2/0.05/sane2-0.05.ps.gz b/sane2/0.05/sane2-0.05.ps.gz
new file mode 100644
index 00000000..d2138900
--- /dev/null
+++ b/sane2/0.05/sane2-0.05.ps.gz
@@ -0,0 +1,5722 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
+%%Title: sane2.dvi
+%%Pages: 60
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic
+%%+ Times-BoldItalic
+%%DocumentPaperSizes: a4
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips sane2.dvi
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2002.04.14:1425
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% @@psencodingfile@{
+% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
+% version = "0.6",
+% date = "1 July 1998",
+% filename = "8r.enc",
+% email = "tex-fonts@@tug.org",
+% docstring = "Encoding for TrueType or Type 1 fonts
+% to be used with TeX."
+% @}
+%
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+%
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+%
+% (5) hyphen appears twice for compatibility with both
+% ASCII and Windows.
+%
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef
+ /breve /minus /.notdef
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+ /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there to here.
+ /grave /quotesingle
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /.notdef /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
+exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
+dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
+ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
+end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
+dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
+roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
+dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
+if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
+def end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (sane2.dvi)
+@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40
+1[40 1[45 97[{TeXBase1Encoding ReEncodeFont}13 90.9091
+/Times-BoldItalic rf
+%DVIPSBitmapFont: Fb cmex10 10 1
+/Fb 1 41 df40 D E
+%EndDVIPSBitmapFont
+/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60
+60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60
+60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37
+99.6264 /Courier rf
+%DVIPSBitmapFont: Fd cmtt10 10.95 13
+/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F
+A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F
+A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65
+D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800
+A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69
+D78 D<90390FF803C0D97FFF13E048B512C74814
+F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C
+91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900
+3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F
+E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380
+253A7BB830>83 D
+87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813
+03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00
+3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7
+13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F
+90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712
+7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13
+07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0
+252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0
+91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339
+7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0
+4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C
+14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01
+FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111
+D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC
+4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F
+9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC
+03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48
+15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A
+5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A
+485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E
+%EndDVIPSBitmapFont
+/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37
+1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25
+3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35
+74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1
+49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1
+66.4176 /Times-Roman rf
+%DVIPSBitmapFont: Fh cmmi10 10.95 16
+/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA
+1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0
+EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC
+EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F
+F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED
+3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC
+17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F
+C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED
+01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F
+F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC
+07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB
+FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72
+7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F
+E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE
+4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D
+90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9
+FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0
+1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01
+1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8
+A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A
+D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0
+387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848
+14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13
+074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F
+5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0
+EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000
+157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0
+38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F
+FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807
+031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13
+1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2
+ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7
+2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F
+001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B
+137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E
+13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00
+1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0
+C648C9FC2A3B7EA72D>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fi cmr8 8 3
+/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23
+>49 DII E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fj cmr10 10.95 12
+/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201
+5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E
+123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB
+01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12
+007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6
+14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12
+1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9
+FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC
+EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713
+800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015
+C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F
+90C7FCEB07F8243F7CBC2D>53 DI<
+1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814
+1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301
+5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16
+7BA147>61 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fk cmsy10 10.95 5
+/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4
+EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100
+DI E
+%EndDVIPSBitmapFont
+/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25
+25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24
+90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33
+39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66
+55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50
+50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50
+99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53
+66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120
+86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86
+11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43
+119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76
+3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13
+172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 1[55 55 55 55 55 55 55 55
+1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}85
+90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61
+1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51
+1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45
+30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81
+90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45
+51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51
+40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61
+66 66 61 66 1[45 4[30 45 45 45 45 45 45 45 45 45 4[23
+2[30 30 40[{TeXBase1Encoding ReEncodeFont}56 90.9091
+/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115
+103 115 172 57 115 1[57 115 103 69 92 115 92 115 103
+12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149
+23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559
+/Times-Bold rf /Ft 134[50 23[44 19[89 24[50 1[50 50 50
+3[25 44[{TeXBase1Encoding ReEncodeFont}8 99.6264 /Times-Roman
+rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76
+86 76 86 76 10[124 2[96 4[124 8[105 3[124 11[86 2[86
+1[86 48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%BeginPaperSize: a4
+a4
+%%EndPaperSize
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44
+b(2.0)f(proposal)i(0.05)e(-)g(rauch/beck)1672 2698 y
+Ft(May)24 b(14,)h(2002)p eop
+%%Page: 1 2
+1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430
+b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26
+b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227
+b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91
+b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647
+y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Image)24
+b(T)m(ransmission)85 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(10)0 3251 y Fr(4)91 b(The)23
+b(SANE)e(A)n(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639
+b(14)136 3422 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(14)136 3593 y(4.2)96
+b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(15)345 3764 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(15)345 3935 y(4.2.2)110 b(Boolean)25
+b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345 4106 y(4.2.3)110
+b(Inte)o(ger)25 b(T)-7 b(ype)88 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345
+4277 y(4.2.4)110 b(Fix)o(ed-point)26 b(T)-7 b(ype)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(16)345 4448 y(4.2.5)110 b(T)-6 b(e)o(xt)46
+b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4619 y(4.2.6)110
+b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(18)345 4790
+y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(18)345 4961 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7
+b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(18)345 5132 y(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7
+b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(20)1927 5381 y(1)p eop
+%%Page: 2 3
+2 2 bop 345 123 a Fq(4.2.10)65 b(Internationlizatio)q(n)84
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(24)136 284 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(26)345 446 y(4.3.1)110 b Fp(sane)p 861
+446 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 608
+y(4.3.2)110 b Fp(sane)p 861 608 V 31 w(exit)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 769 y(4.3.3)110 b Fp(sane)p 861 769
+V 31 w(get)p 1057 769 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 931 y(4.3.4)110
+b Fp(sane)p 861 931 V 31 w(open)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(28)345 1092 y(4.3.5)110 b Fp(sane)p 861 1092 V 31 w(close)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(28)345 1254 y(4.3.6)110 b Fp(sane)p
+861 1254 V 31 w(get)p 1057 1254 V 32 w(option)p 1419
+1254 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(28)345 1415 y(4.3.7)110 b Fp(sane)p 861 1415 V 31 w(control)p
+1277 1415 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(29)345 1577 y(4.3.8)110 b Fp(sane)p
+861 1577 V 31 w(get)p 1057 1577 V 32 w(parameters)25
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(31)345 1739 y(4.3.9)110 b Fp(sane)p 861 1739 V 31 w(start)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(34)345 1900 y(4.3.10)65 b Fp(sane)p
+861 1900 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(35)345 2062
+y(4.3.11)65 b Fp(sane)p 861 2062 V 31 w(cancel)33 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(36)345 2223 y(4.3.12)65 b Fp(sane)p 861 2223
+V 31 w(set)p 1057 2223 V 32 w(io)p 1199 2223 V 31 w(mode)78
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2385 y(4.3.13)65 b Fp(sane)p 861 2385 V 31 w(get)p
+1057 2385 V 32 w(select)p 1419 2385 V 30 w(fd)37 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2546 y(4.3.14)65 b Fp(sane)p 861 2546 V 31 w(strstatus)73
+b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(37)136 2708 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2870 y(4.5)96
+b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3031 y(4.5.1)110 b(Option)25 b(Number)e(Count)70
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3193 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3354 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(42)345 3516 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(42)345 3677 y(4.5.5)110 b(Depth)24 b(option)71
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(43)345 3839 y(4.5.6)110 b(Gamma)23
+b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(43)345 4001 y(4.5.7)110 b(Scan)24
+b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4162 y(4.5.8)110 b(Scan)24
+b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4324 y(4.5.9)110 b(Threshold)43
+b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4485 y(4.5.10)65 b(Analog)25
+b(gamma)56 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(45)345 4647 y(4.5.11)65 b(Shado)n(w)51
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4808 y(4.5.12)65
+b(Highlight)e(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 4970 y(4.5.13)65
+b(T)l(urn)24 b(lamp)f(on)h(and)g(of)n(f)48 b(.)d(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 5132
+y(4.5.14)65 b(Scanner)25 b(b)n(uttons)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(46)1927 5381 y(2)p eop
+%%Page: 3 4
+3 3 bop 0 123 a Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989
+b(49)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(50)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24
+b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 638 y(5.1.2)110 b(T)-7
+b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)136 809 y(5.2)96
+b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 981 y(5.2.1)110
+b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(51)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153
+V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62
+b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(52)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p
+1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 1496 y(5.2.4)110
+b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(52)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667
+V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p
+1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(53)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p
+1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345
+2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057
+2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345 2182
+y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182
+V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(54)345 2354 y(5.2.9)110 b Fp(SANE)p
+861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(55)345
+2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057
+2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(55)345 2697 y(5.2.11)65 b Fp(SANE)p
+861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46
+b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(56)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871
+b(57)1927 5381 y Fq(3)p eop
+%%Page: 4 5
+4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349
+y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45
+b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data)
+g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g
+(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(11)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 2119 y(4.2)96
+b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(42)1927 5381 y(4)p eop
+%%Page: 5 6
+5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349
+y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(18)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i
+(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(19)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23
+b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31
+w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p
+Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(22)136 2036
+y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23
+b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(25)136 2379 y(4.7)96 b(Action)25
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p
+Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f
+(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722
+y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139
+2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(32)1927 5381 y(5)p eop
+%%Page: 6 7
+6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0
+1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g
+(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38
+b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e
+(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i
+(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0
+2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g
+(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d
+(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c
+(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f
+(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22
+b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0
+2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g
+(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119
+b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d
+(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f
+(an)e(application)k(that)d(requires)h(access)g(to)0 3135
+y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j
+(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5
+b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0
+3248 y(implementations)35 b(of)c(SANE)f(components.)55
+b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g
+(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o
+(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c
+(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0
+3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as)
+d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i
+(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l
+(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29
+b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26
+b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i
+(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement)
+i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o
+(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h
+(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o
+(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7
+b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g
+(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o
+(e)d(this:)1927 5381 y(6)p eop
+%%Page: 7 8
+7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0
+1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace)
+h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g
+(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22
+b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)
+g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0
+2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e
+(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f
+(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24
+b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23
+b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f
+(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21
+b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n
+(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29
+b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g
+(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i
+(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the)
+f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i
+(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h
+(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f
+(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0
+2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e
+(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5
+b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51
+b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g
+(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25
+b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h
+(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0
+3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21
+b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g
+(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g
+(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f
+(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k
+Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0
+3812 y(back)o(ends.)1927 5381 y(7)p eop
+%%Page: 8 9
+8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51
+b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g
+(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32
+b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0
+1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e
+(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44
+b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g
+(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f
+(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30
+b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25
+b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f
+(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d
+(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34
+b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h
+(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p
+Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n
+(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j
+(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)
+h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g
+(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0
+2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f
+(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30
+b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f
+(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h
+(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g
+(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22
+b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h
+Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e
+(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f
+(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back)
+o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e
+(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h
+(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o
+(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31
+b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h
+(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227
+4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h
+(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n
+(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g
+(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o
+(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227
+4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e
+(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227
+4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k
+(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d
+(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n
+(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f
+(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29
+b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o
+(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f
+(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4
+v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro)
+o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h
+(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f
+(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n
+(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i
+(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927
+5381 y(8)p eop
+%%Page: 9 10
+9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227
+310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g
+Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p
+2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p
+Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i
+(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n
+(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227
+536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time)
+f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136
+724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27
+b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i
+(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227
+837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41
+b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e
+(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d
+(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o
+(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30
+b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g
+Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f
+(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha)
+n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got)
+e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227
+1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f
+(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6
+b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i
+(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e
+(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p
+Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e
+(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227
+1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d
+(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30
+b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g
+(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to)
+227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.)
+43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f
+(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g
+(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g
+(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h
+(that)f(scanner)-5 b(.)0 2479 y
+ currentpoint currentpoint translate 0.64821 0.64821 scale neg exch
+neg exch translate
+ 0 2479 a 0 2479 a
+ gsave currentpoint currentpoint translate 270 neg rotate neg exch
+neg exch translate
+ 0 2479
+a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550
+@rwi @setspecial
+%%BeginDocument: figs/hierarchy.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hierarchy.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 2
+%%CreationDate: Thu Jan 30 22:02:12 1997
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%Magnification: 1.00
+%%Orientation: Landscape
+%%BoundingBox: 0 0 355 722
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-17.0 -17.0 translate
+ 90 rotate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n 0 612 m 0 0 l 792 0 l 792 612 l cp clip
+ 0.06000 0.06000 sc
+% Polyline
+n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr
+% Polyline
+n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr
+15.000 slw
+% Polyline
+n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+11399 5182 m
+gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+8099 5182 m
+gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr
+% Polyline
+n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr
+% Polyline
+n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr
+% Polyline
+n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr
+% Polyline
+n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 2700 1800 m 1200 3000 l gs col-1 s gr
+% Polyline
+n 3000 1800 m 3000 3000 l gs col-1 s gr
+% Polyline
+n 3300 1800 m 4800 3000 l gs col-1 s gr
+% Polyline
+n 9600 1800 m 9600 2100 l gs col-1 s gr
+% Polyline
+n 9450 2700 m 8100 4800 l gs col-1 s gr
+% Polyline
+n 11400 4200 m 11400 4800 l gs col-1 s gr
+% Polyline
+n 1200 3600 m 1200 4200 l gs col-1 s gr
+% Polyline
+n 3000 3600 m 3000 4125 l gs col-1 s gr
+% Polyline
+n 7875 5400 m 7350 5850 l gs col-1 s gr
+% Polyline
+n 8250 5400 m 8775 5850 l gs col-1 s gr
+% Polyline
+n 11475 5400 m 11475 5850 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr
+% Polyline
+n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 9750 2700 m 11400 3600 l gs col-1 s gr
+% Interp Spline
+gs n 4800 3600 m
+ 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto
+ 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto
+ 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto
+ 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto
+ 7224.0 624.7 8573.7 446.9 9450 900 curveto
+ 9524.5 938.5 9562.0 1013.5 9600 1200 curveto
+ gs col-1 s gr
+ gr
+
+/Helvetica ff 270.00 scf sf
+1199 3382 m
+gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 3382 m
+gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+1200 4425 m
+gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 4380 m
+gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+7350 6165 m
+gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+8925 6165 m
+gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+11475 6135 m
+gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 600 m
+gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+9600 630 m
+gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+4725 5850 m
+gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 1582 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+4799 3382 m
+gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 1582 m
+gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 2482 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+11399 3982 m
+gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial 2958 2479 a
+ currentpoint grestore moveto
+ 2958 2479 a 0 2479 a
+ currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale
+neg exch neg exch translate
+ 0 2479
+a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0
+4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h
+(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44
+b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g
+(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f
+(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0
+5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h
+(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i
+(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop
+%%Page: 10 11
+10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e
+Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36
+b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d
+(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o
+(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51
+b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h
+(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e
+(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d
+Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e
+Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f
+(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22
+b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f
+(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f
+(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i
+(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i
+(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g
+(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0
+972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h
+(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g
+(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back)
+o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e
+(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0
+1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0
+1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815
+y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h
+(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f
+(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39
+b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation)
+j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0
+2041 y(applications)f(and)c(de)n(vices.)59 b(While)34
+b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has)
+f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i
+(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g
+(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0
+2266 y(accommodate)26 b(future)e(applications)k(or)23
+b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g
+(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is)
+f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n
+(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0
+2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g
+(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21
+b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)27
+b(v)n(alues.)38 b(Each)26 b(sample)i(v)n(alue)f(represents)i(one)d
+(channel)j(\(e.g.,)d(the)h(red)f(channel\).)40 b(Each)26
+b(sample)h(v)n(alue)g(has)g(a)0 2777 y(certain)f(bit)f(depth.)33
+b(The)24 b(bit)h(depth)h(is)e(\002x)o(ed)g(for)h(the)g(entire)h(image)f
+(and)g(can)g(be)f(as)h(small)g(as)f(one)h(bit.)32 b(V)-10
+b(alid)25 b(bit)g(depths)0 2890 y(are)f(1,)f(8,)g(or)h(16)g(bits)g(per)
+h(sample.)30 b(If)23 b(a)h(de)n(vice')-5 b(s)25 b(natural)h(bit)e
+(depth)h(is)e(something)j(else,)e(it)g(is)f(up)h(to)g(the)g(dri)n(v)o
+(er)h(to)e(scale)0 3003 y(the)e(sample)h(v)n(alues)h(appropriately)i
+(\(e.g.,)c(a)f(4)h(bit)g(sample)h(could)h(be)e(scaled)h(by)f(a)g(f)o
+(actor)h(of)f(four)h(to)f(represent)j(a)c(sample)0 3116
+y(v)n(alue)k(of)g(depth)h(8\).)0 3423 y Fm(3.2.1)99 b(Image)24
+b(T)-7 b(ransmission)0 3656 y Fq(The)26 b(SANE)f(API)g(transmits)j(an)f
+(image)g(as)f(a)h(sequence)i(of)d(frames.)39 b(Each)27
+b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0
+3769 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f
+(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67
+b(F)o(or)35 b(e)o(xample,)40 b(a)0 3882 y(red/green/blue)34
+b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f
+(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0
+3995 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g
+(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g
+(containing)j(the)e(red)0 4108 y(channel,)25 b(the)f(second)h(the)f
+(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0
+4128 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0 4128 a 0 4128 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 4128 a 152 x Fq(There)g(are)f(tw)o(o)h(dif)n
+(ferent)h(types)g(of)e(transmission:)32 b(pix)o(el)24
+b(oriented)i(data)e(or)g(arbitary)h(data.)2991 4280 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+
+2991 4280 a 2991 4280 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 2991 4280 a 2991 4280 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 2991
+4280 a 0 4451 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h
+(oriented)i(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48
+b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 4564
+y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f
+(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f
+(8\),)h(or)f(a)g(partial)h(sam-)0 4677 y(ple)j(v)n(alue)g(\(for)f(an)h
+(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31
+b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g
+(are)0 4790 y(transmitted)26 b(in)d(the)h(machine')-5
+b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 5036
+y Fr(Back)o(end)22 b(Implementation)i(Note)1905 5381
+y Fq(10)p eop
+%%Page: 11 12
+11 11 bop 227 123 a Fq(A)21 b(netw)o(ork-based)26 b(meta)d(back)o(end)h
+(will)e(ha)n(v)o(e)h(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g
+(image)g(data)g(is)f(adjusted)227 236 y(appropriately)32
+b(if)c(necessary)-6 b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g
+(meta)g(back)o(end)i(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6
+b(,)227 349 y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e
+(the)g(serv)o(er')-5 b(s)29 b(byte)e(order)-5 b(.)41
+b(The)26 b(back)o(end)j(can)f(then)f(apply)i(the)227
+462 y(adjustment)d(if)d(necessary)-6 b(.)32 b(In)23 b(essence,)i(this)f
+(implements)h(a)e(\223recei)n(v)o(er)n(-mak)o(es-right)q(\224)29
+b(approach.)975 1614 y @beginspecial 0 @llx 0 @lly 362
+@urx 182 @ury 2340 @rwi @setspecial
+%%BeginDocument: figs/xfer.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfer.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:30 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 362 182
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-134.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+15.000 slw
+% Polyline
+n 2400 3300 m 8100 3300 l gs col-1 s gr
+n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3375 m 2400 3675 l gs col-1 s gr
+15.000 slw
+n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 3750 m 8100 3750 l gs col-1 s gr
+n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3825 m 2400 4125 l gs col-1 s gr
+15.000 slw
+n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr
+15.000 slw
+% Polyline
+n 2400 4200 m 8100 4200 l gs col-1 s gr
+n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 4275 m 2400 4575 l gs col-1 s gr
+15.000 slw
+n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 4650 m 8100 4650 l gs col-1 s gr
+n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1111 1810 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24
+b(order)h(of)e(image)h(data)g(bytes)0 2115 y(The)f(order)i(in)f(which)g
+(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e
+(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0
+2228 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g
+(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e
+(right-most)i(column.)30 b(The)0 2341 y(left-to-right,)35
+b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h
+(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 2454
+y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g
+(e)o(xample\).)0 2618 y(If)d(a)g(frame)h(contains)h(multiple)g
+(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f
+(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0
+2731 y(illustrates)31 b(this)e(for)g(the)f(case)h(where)g(a)f(frame)h
+(contains)h(a)e(complete)i(red/green/blue)j(image)28
+b(with)h(a)f(bit-depth)j(of)d(8.)0 2844 y(F)o(or)f(a)g(bit)h(depth)g
+(of)g(1,)g(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g
+Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h
+(depth)h(1)0 2957 y(frame)24 b(is)f(transmitted)j(in)d(a)g(byte)i
+(interlea)n(v)o(ed)h(f)o(ashion.)390 3627 y @beginspecial
+0 @llx 0 @lly 521 @urx 93 @ury 3744 @rwi @setspecial
+%%BeginDocument: figs/image-data.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: image-data.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:36 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 521 93
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-88.0 120.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+1875 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3225 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+4575 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l
+ 5850 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 600 m
+gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+5925 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+7275 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+8625 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l
+ 9900 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 600 m
+gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1950 m
+gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1950 m
+gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1950 m
+gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1950 m
+gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1950 m
+gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1950 m
+gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+10050 1275 m
+gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1125 m
+gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1148 3823 a(Figure)e(3.3:)29 b(Bit)23 b(and)h(byte)g
+(order)h(of)e(image)h(data)0 4129 y(When)30 b(transmitting)i(an)e
+(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h
+(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 4242 y(represents)e
+(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31
+b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f
+(frame)g(with)0 4355 y(a)f(type)h(and)g(a)f(format)i(descriptor)-5
+b(.)0 4519 y(It)23 b(also)h(is)f(possible)j(to)d(transmit)h(arbitary)i
+(\(not)e(necessaryly)i(pix)o(el)e(oriented\))i(data.)j(This)23
+b(e.g.)29 b(allo)n(ws)23 b(transmission)j(of)0 4632 y(compressed)g
+(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 4796
+y(This)g(v)o(ersion)i(of)f(the)g(SANE)d(standard)k(supports)h(the)e
+(follo)n(wing)h(frame)f(types:)0 4891 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 4891 a 0 4891
+a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 4891 a 227 5019 a Fp(SANE)p 452 5019 28 4 v 31 w(FRAME)p
+758 5019 V 31 w(RAW)p Fr(:)44 b Fq(The)21 b(frame)h(contains)i(one)e
+(or)g(more)f(channels)j(of)e(data)g(in)g(a)f(channel-interlea)n(v)o(ed)
+427 5132 y(format,)43 b(that)c(represents)j(sample)d(v)n(alues)h(from)f
+(a)f(property)j(of)e(the)g(indi)n(vidual)i(pix)o(els)f(that)f(is)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 5151 a 1905
+5381 a Fq(11)p eop
+%%Page: 12 13
+12 12 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 32 a 427 123 a Fq(subject)29
+b(to)d(further)i(description)i(in)c(the)h Fp(formatdesc)21
+b Fq(member)27 b(of)g(the)f Fp(SANE)p 3101 123 28 4 v
+31 w(Parameters)427 236 y Fq(structured)d(type.)28 b(The)20
+b(complete)i(image)e(may)g(consist)i(of)e(se)n(v)o(eral)h(channels,)i
+(the)e(number)g(of)f(chan-)427 349 y(nels)h(is)g(de\002ned)g(by)g
+(member)g Fp(channels)p 1835 349 V 29 w(per)p 2029 349
+V 31 w(image)d Fq(of)i Fp(SANE)p 2668 349 V 31 w(Parameters)p
+Fq(.)i(The)f(image)427 462 y(may)g(be)h(transmitted)h(in)f(an)f
+(arbitary)i(number)f(of)g(frames)g(which)f(can)h(be)f(determined)j(by)d
+(w)o(atching)427 574 y(the)27 b Fp(last)p 789 574 V 30
+w(frame)c Fq(\003ag)j(in)g(said)h(type)f(\(or)h(by)f(counting)i(the)e
+(channels\).)39 b(Note:)34 b(This)26 b(frame)g(type)427
+687 y(replaces)g(all)d(frame)h(types)h(of)e(the)h(SANE)d(standard)26
+b(v)o(ersion)f(1.)227 830 y Fp(SANE)p 452 830 V 31 w(FRAME)p
+758 830 V 31 w(MIME)p Fr(:)44 b Fq(The)30 b(frame)h(contains)j
+(arbitrary)f(data)f(of)f(the)g(MIME)f(\(see)h(RFC)f(1521/1522\))427
+943 y(type)h(that)g(is)f(gi)n(v)o(en)g(in)g(the)g Fp(formatdesc)25
+b Fq(member)30 b(of)g(the)h Fp(SANE)p 2709 943 V 30 w(Parameters)25
+b Fq(structured)427 1056 y(type.)44 b(As)27 b(such,)j(it)e(is)g
+(assumed)i(to)e(be)g(incomprehensible)33 b(to)28 b(the)h(frontend,)i(e)
+o(xcept)e(for)g(selected)427 1168 y(types)j(the)e(frontend)i(is)e
+(speci\002cally)j(capable)f(of)e(handling)j(internally)-6
+b(.)51 b(The)30 b(frontend)i(is)e(free)h(to)427 1281
+y(ignore)c(those)e(frames,)h(or)f(emplo)o(y)g(an)o(y)g(appropriate)j
+(means)e(to)e(otherwise)j(handle)f(this)g(data)f(\(lik)o(e)427
+1394 y(sa)n(ving)h(them)d(to)h(disk)g(or)f(spa)o(wning)i(an)f(e)o
+(xternal)h(vie)n(wer\).)273 1537 y(The)i(follo)n(wing)j(frame)e(types)h
+(are)f(part)h(of)f(the)g(SANE)e(standard)k(v)o(ersion)g(1.)41
+b(Back)o(ends)30 b(that)f(claim)f(to)427 1650 y(be)f(conform)h(to)f
+(the)g(SANE)e(standard)k(v)o(ersion)f(2)e(are)h(not)h(allo)n(wed)f(to)g
+(use)g(these)h(frame)f(types.)40 b(A)427 1762 y(frontend)27
+b(can)d(decide)i(to)e(support)i(v)o(ersion)g(1)e(back)o(ends)i(and)f(v)
+o(ersion)h(2)d(back)o(ends.)34 b(It)24 b(is)g(desirable)427
+1875 y(to)30 b(create)i(a)d(meta)i(back)o(end)h(with)e(a)g(frontend)i
+(part)f(conform)g(to)f(the)h(SANE)c(standard)33 b(v)o(ersion)e(1)427
+1988 y(and)f(a)f(back)o(end)i(part)f(conform)g(to)g(the)f(SANE)e
+(standard)k(v)o(ersion)g(2)e(\(so)g(all)h(v)o(ersion)g(2)f(frontends)
+427 2101 y(can)h(connect)i(to)e(v)o(ersion)h(1)e(back)o(ends\).)50
+b(A)29 b(v)o(ersion)i(1)e(back)o(end)j(does)f(use)f(the)g(follo)n(wing)
+h(frame)427 2214 y(types:)427 2363 y Fp(SANE)p 652 2363
+V 31 w(FRAME)p 958 2363 V 31 w(GRAY)p Fr(:)44 b Fq(This)19
+b(is)h(a)g(frame)g(type)h(from)e(SANE)f(standard)k(v)o(ersion)f(1.)28
+b(Back)o(ends)21 b(that)597 2476 y(claim)g(to)g(be)g(conform)h(to)f
+(the)g(SANE)e(standard)k(v)o(ersion)f(2)f(are)g(not)g(allo)n(wed)h(to)f
+(use)g(this)h(frame)597 2589 y(type.)30 b(The)23 b(frame)h(contains)i
+(a)d(single)i(channel)h(of)e(data)g(that)g(represents)j(sample)d(v)n
+(alues)h(from)597 2702 y(a)f(spectral)i(band)f(that)g(co)o(v)o(ers)g
+(the)f(human)h(visual)h(range.)31 b(The)24 b(image)h(consists)h(of)e
+(this)h(frame)597 2814 y(only)-6 b(.)427 2942 y Fp(SANE)p
+652 2942 V 31 w(FRAME)p 958 2942 V 31 w(RGB)p Fr(:)44
+b Fq(This)25 b(is)f(a)h(frame)g(type)h(from)e(SANE)f(standard)k(v)o
+(ersion)f(1.)33 b(Back)o(ends)26 b(that)597 3055 y(claim)21
+b(to)g(be)g(conform)h(to)f(the)g(SANE)e(standard)k(v)o(ersion)f(2)f
+(are)g(not)g(allo)n(wed)h(to)f(use)g(this)h(frame)597
+3168 y(type.)29 b(The)20 b(frame)h(contains)i(three)f(channels)h(of)e
+(data)h(that)f(represent)i(sample)f(v)n(alues)g(from)f(the)597
+3281 y(red,)31 b(green,)h(and)e(blue)g(spectral)h(bands.)48
+b(The)29 b(sample)h(v)n(alues)h(are)e(interlea)n(v)o(ed)k(in)c(the)h
+(order)597 3394 y(red,)24 b(green,)g(and)g(blue.)30 b(The)23
+b(image)h(consists)h(of)f(this)g(frame)g(only)-6 b(.)427
+3521 y Fp(SANE)p 652 3521 V 31 w(FRAME)p 958 3521 V 31
+w(RED)p Fr(:)44 b Fq(This)25 b(is)f(a)h(frame)g(type)h(from)e(SANE)f
+(standard)k(v)o(ersion)f(1.)33 b(Back)o(ends)26 b(that)597
+3634 y(claim)21 b(to)g(be)g(conform)h(to)f(the)g(SANE)e(standard)k(v)o
+(ersion)f(2)f(are)g(not)g(allo)n(wed)h(to)f(use)g(this)h(frame)597
+3747 y(type.)33 b(The)24 b(frame)h(contains)i(one)e(channel)i(of)e
+(data)g(that)g(represents)j(sample)d(v)n(alues)h(from)f(the)597
+3860 y(red)d(spectral)h(band.)29 b(The)21 b(complete)i(image)f
+(consists)i(of)d(three)h(frames:)29 b Fp(SANE)p 3155
+3860 V 31 w(FRAME)p 3461 3860 V 30 w(RED)p Fq(,)597 3973
+y Fp(SANE)p 822 3973 V 31 w(FRAME)p 1128 3973 V 31 w(GREEN)p
+Fq(,)19 b(and)24 b Fp(SANE)p 1850 3973 V 31 w(FRAME)p
+2156 3973 V 30 w(BLUE)p Fq(.)c(The)j(order)h(in)f(which)g(the)g(frames)
+h(are)597 4086 y(transmitted)i(chosen)f(by)f(the)g(back)o(end.)427
+4214 y Fp(SANE)p 652 4214 V 31 w(FRAME)p 958 4214 V 31
+w(GREEN)p Fr(:)43 b Fq(This)29 b(is)g(a)g(frame)g(type)h(from)f(SANE)e
+(standard)k(v)o(ersion)g(1.)45 b(Back)o(ends)597 4326
+y(that)29 b(claim)f(to)g(be)h(conform)g(to)f(the)h(SANE)c(standard)31
+b(v)o(ersion)e(2)f(should)i(not)e(use)h(this)g(frame)597
+4439 y(type.)62 b(The)34 b(frame)h(contains)h(one)f(channel)h(of)e
+(data)h(that)g(represents)i(sample)e(v)n(alues)h(from)597
+4552 y(the)i(green)h(spectral)h(band.)72 b(The)37 b(complete)j(image)e
+(consists)i(of)d(three)i(frames:)58 b Fp(SANE)p 3592
+4552 V 31 w(-)597 4665 y(FRAME)p 877 4665 V 31 w(RED)p
+Fq(,)23 b Fp(SANE)p 1339 4665 V 31 w(FRAME)p 1645 4665
+V 31 w(GREEN)p Fq(,)g(and)j Fp(SANE)p 2373 4665 V 31
+w(FRAME)p 2679 4665 V 30 w(BLUE)p Fq(.)e(The)h(order)j(in)e(which)597
+4778 y(the)e(frames)g(are)g(transmitted)i(chosen)f(by)f(the)f(back)o
+(end.)427 4906 y Fp(SANE)p 652 4906 V 31 w(FRAME)p 958
+4906 V 31 w(BLUE)p Fr(:)44 b Fq(This)19 b(is)h(a)g(frame)g(type)h(from)
+e(SANE)f(standard)k(v)o(ersion)f(1.)28 b(Back)o(ends)21
+b(that)597 5019 y(claim)26 b(to)f(be)g(conform)i(to)e(the)h(SANE)d
+(standard)k(v)o(ersion)g(2)e(should)i(not)e(use)h(this)g(frame)f(type.)
+597 5132 y(The)i(frame)g(contains)i(one)f(channel)h(of)e(data)g(that)h
+(represents)i(sample)e(v)n(alues)g(from)f(the)g(blue)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 5151 a 1905
+5381 a Fq(12)p eop
+%%Page: 13 14
+13 13 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 32 a 597 123 a Fq(spectral)36
+b(band.)59 b(The)34 b(complete)h(image)f(consists)h(of)f(three)g
+(frames:)50 b Fp(SANE)p 3155 123 28 4 v 31 w(FRAME)p
+3461 123 V 30 w(RED)p Fq(,)597 236 y Fp(SANE)p 822 236
+V 31 w(FRAME)p 1128 236 V 31 w(GREEN)p Fq(,)19 b(and)24
+b Fp(SANE)p 1850 236 V 31 w(FRAME)p 2156 236 V 30 w(BLUE)p
+Fq(.)c(The)j(order)h(in)f(which)g(the)g(frames)h(are)597
+349 y(transmitted)i(chosen)f(by)f(the)g(back)o(end.)0
+393 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 393 a 0 393 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 393 a 0 393 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 393 a 227 x Fq(When)i(the)h
+(bit)f(depth)i(is)e(1)f(there)i(are)g(only)g(tw)o(o)e(sample)i(v)n
+(alues)h(possible,)g(1)e(represents)j(minimum)d(intensity)j(\(black\))0
+733 y(and)19 b(0)g(represents)i(maximum)e(intensity)i(\(white\).)28
+b(F)o(or)18 b(all)h(other)h(bit)f(depths)i(a)d(sample)i(v)n(alue)f(of)g
+(0)g(represents)i(minimum)0 846 y(intensity)26 b(and)e(lar)n(ger)h(v)n
+(alues)g(represent)h(increasing)g(intensity)-6 b(.)1905
+5381 y(13)p eop
+%%Page: 14 15
+14 14 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51
+b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512
+y(Interface)e(\(API\))0 1879 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 1879 a 0 1879 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 1879
+a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f
+(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y)
+h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i
+(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o
+(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0
+2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h
+(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e
+(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d
+(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33
+b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0
+2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109
+2682 y Fp(#include)51 b()0 2748 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 2748
+a 0 2748 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 2748 a 0 2748 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 2748 a 333 x Fn(4.1)119
+b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard)
+25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28
+b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e
+(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d
+(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e
+(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51
+b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30
+b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g
+(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g
+(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h
+(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g
+(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o
+(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g
+(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o
+(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o
+(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i
+(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o
+(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129
+y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f
+(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n
+(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f
+(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n
+(vision.)48 b(While)30 b(control)h(of)e(these)0 4406
+y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o
+(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28
+b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e
+(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38
+b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n
+(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o
+(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o
+(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4
+v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29
+b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d
+(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905
+5381 y(14)p eop
+%%Page: 15 16
+15 15 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p
+868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p
+Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g
+(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e
+(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g
+(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p
+Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f
+Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o
+(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g
+(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14
+b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d
+(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704
+y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g
+(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427
+817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e
+(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the)
+427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427
+1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f
+(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427
+1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f
+(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and)
+427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227
+1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V
+30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h
+(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427
+1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p
+868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32
+b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of)
+427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p
+868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18
+b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d
+(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j
+Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0
+2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23
+b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f
+(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o
+(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59
+b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52
+b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31
+w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g
+(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f
+(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c
+Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n
+(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f
+Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068
+y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g
+Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15
+b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j
+Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in)
+e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j
+Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d
+Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24
+b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e
+(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i
+Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33
+b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i
+(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25
+b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p
+Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o
+(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j
+(mapping.)1905 5381 y(15)p eop
+%%Page: 16 17
+16 16 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0
+356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n
+(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v)
+n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j
+Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g
+(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097
+436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)
+h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52
+b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377
+b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187
+y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)
+g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e
+(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26
+b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25
+b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g
+Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0
+1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0
+1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y
+Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h
+(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h
+Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e
+Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30
+b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0
+2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f
+(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays)
+f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672
+y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27
+b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f
+Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0
+2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0
+3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326
+y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n
+(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in)
+f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p
+Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e
+Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27
+b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6
+b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103
+b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0
+4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p
+940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22
+b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29
+b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f
+(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p
+Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26
+b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p
+Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g
+(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5
+b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24
+b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17
+b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36
+b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros)
+h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g
+(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p
+0 4901 1560 4 v 105 4957 a Ff(1)134 4988 y Fe(This)19
+b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g
+(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905
+5381 y Fq(16)p eop
+%%Page: 17 18
+17 17 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p
+Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c
+(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f
+(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking)
+h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f
+Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427
+349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p
+Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine)
+f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427
+608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j
+Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o
+(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g
+Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227
+1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48
+b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48
+b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i
+(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6
+b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0
+1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw)
+o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0
+2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29
+b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o
+(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g
+(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d
+Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48
+b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x)
+o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27
+b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f
+(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0
+2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50
+b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to)
+f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o
+(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227
+3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23
+b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695
+V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f
+(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27
+b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f
+Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52
+b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e
+(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h
+Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d
+Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f
+(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23
+b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773
+y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26
+b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i
+(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905
+5381 y(17)p eop
+%%Page: 18 19
+18 18 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7
+b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i
+(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560
+356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32
+b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6
+b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0
+961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n
+(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e
+(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p
+Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f
+(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n
+(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0
+1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f
+(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether)
+f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57
+b(If)31 b(an)h(operation)j(completes)e(successfully)-6
+b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56
+b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f
+(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30
+b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0
+1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23
+b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p
+2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f
+(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385
+2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p
+1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p
+3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113
+v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p
+1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p
+2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6
+b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660
+2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p
+1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25
+b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435
+2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627
+V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083
+2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661
+V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31
+w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p
+1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n
+(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V
+435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021
+2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083
+2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p
+3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966
+28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000
+4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n
+(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113
+V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p
+1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p
+2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514
+3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4
+v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31
+w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100
+w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226
+V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31
+w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p
+1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er)
+e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p
+660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161
+3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083
+3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514
+3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4
+v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31
+w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100
+w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435
+3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643
+V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4
+113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f
+(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519
+3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0
+4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7
+b(ype)0 4346 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 4346 a 0 4346 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 4346 a 151 x Fq(Each)27
+b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type)
+g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26
+b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n
+(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969
+y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+
+0 5096 a 0 5096 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 5096 a 0 5096 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 5096 a 1905 5381
+a Fq(18)p eop
+%%Page: 19 20
+19 19 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 32 a 445 123 a Fp(SANE_String_Cons)o
+(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445
+349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g
+(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g
+(device_location)o(;)445 687 y(SANE_String_Cons)o(t)g(comment;)445
+800 y(SANE_String_Cons)o(t)g(reserved_string)o(;)445
+913 y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1026
+y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445
+1139 y(SANE_Int)g(reserved_int;)336 1252 y(})227 1365
+y(SANE_Device;)0 1420 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0 1420 a 0 1420 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 1420 a 0
+1420 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 1420 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f
+(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p
+Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0
+1678 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019
+1678 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h
+(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39
+b(The)25 b(only)0 1791 y(constraints)30 b(are)d(that)g(the)h(name)e(is)
+h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o
+(end)i(and)e(that)h(the)f(name)g(is)g(a)0 1904 y(le)o(gal)c(SANE)d(te)o
+(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique)
+j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30
+b(It)22 b(is)0 2017 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k)
+o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32
+b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0
+2130 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g
+(names.)0 2287 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n
+(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h
+(de)n(vice)g(corresponding)0 2400 y(to)31 b(the)g(unique)i(name.)52
+b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f
+Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e
+(that)g(gi)n(v)o(e)0 2513 y(information)g(on)e(the)g(v)o(endor)h
+(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n
+(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0
+2626 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g
+(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g
+(arises\):)p 320 2736 1454 4 v 318 2849 4 113 v 755 2815
+a Fr(V)-9 b(endor)22 b(Strings)p 1772 2849 V 320 2852
+1454 4 v 320 2869 V 318 2982 4 113 v 370 2948 a Fp(AGFA)698
+b(Microtek)p 1772 2982 V 318 3094 V 370 3061 a(Abaton)588
+b(Minolta)p 1772 3094 V 318 3207 V 370 3173 a(Acer)698
+b(Mustek)p 1772 3207 V 318 3320 V 370 3286 a(Apple)643
+b(NEC)p 1772 3320 V 318 3433 V 370 3399 a(Artec)g(Nikon)p
+1772 3433 V 318 3546 V 370 3512 a(Avision)533 b(Plustek)p
+1772 3546 V 318 3659 V 370 3625 a(CANON)643 b(Polaroid)p
+1772 3659 V 318 3772 V 370 3738 a(Connectix)423 b(Ricoh)p
+1772 3772 V 318 3885 V 370 3851 a(Epson)643 b(Sharp)p
+1772 3885 V 318 3998 V 370 3964 a(Fujitsu)533 b(Siemens)p
+1772 3998 V 318 4111 V 370 4077 a(Hewlett-Packard)93
+b(Tamarack)p 1772 4111 V 318 4224 V 370 4190 a(IBM)753
+b(UMAX)p 1772 4224 V 318 4336 V 370 4303 a(Kodak)643
+b(Noname)p 1772 4336 V 318 4449 V 370 4415 a(Logitech)p
+1772 4449 V 320 4453 1454 4 v 2117 2736 1464 4 v 2115
+2849 4 113 v 2603 2815 a Fr(T)-7 b(ype)23 b(Strings)p
+3578 2849 V 2117 2852 1464 4 v 2117 2869 V 2115 2982
+4 113 v 2166 2948 a Fp(film)53 b(scanner)p 3578 2982
+V 2115 3094 V 2166 3061 a(flatbed)f(scanner)p 3578 3094
+V 2115 3207 V 2166 3173 a(frame)h(grabber)p 3578 3207
+V 2115 3320 V 2166 3286 a(handheld)e(scanner)p 3578 3320
+V 2115 3433 V 2166 3399 a(multi-function)e(peripheral)p
+3578 3433 V 2115 3546 V 2166 3512 a(sheetfed)i(scanner)p
+3578 3546 V 2115 3659 V 2166 3625 a(still)i(camera)p
+3578 3659 V 2115 3772 V 2166 3738 a(video)g(camera)p
+3578 3772 V 2115 3885 V 2166 3851 a(virtual)f(device)p
+3578 3885 V 2117 3888 1464 4 v 1053 4606 a Fq(T)-7 b(able)24
+b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0
+4906 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26
+b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f
+(no)g(physical)i(v)o(endor)f(associated.)0 5019 y(Also,)c(there)h(are)f
+(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o
+(endor)h(speci\002c)g(and)f(therefore)i(completely)0
+5132 y(under)c(control)g(of)e(the)h(respecti)n(v)o(e)i(back)o(ends.)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 5151 a 0 5151 a
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 5151 a 0
+5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(19)p
+eop
+%%Page: 20 21
+20 20 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 32 a 91 x Fq(The)32
+b(back)o(end)i(has)f(to)f(set)g(up)h(the)f(string)i Fp(email)p
+1677 123 28 4 v 30 w(backend)p 2092 123 V 30 w(author)28
+b Fq(with)k(the)h(email)f(address)i(of)e(the)h(back)o(end)0
+236 y(author)25 b(or)e(a)h(contact)h(person.)0 399 y(The)d(back)o(end)j
+(should)g(\002ll)d(the)h(string)h Fp(device)p 1572 399
+V 30 w(location)18 b Fq(with)23 b(a)f(te)o(xt)h(that)h(describes)h
+(where)e(a)g(user)g(can)g(\002nd)g(this)0 512 y(de)n(vice,)h(the)g(te)o
+(xt)g(should)h(be)f(read)g(from)f(the)h(back)o(end)i(con\002g)e
+(\002le.)0 675 y(The)33 b(string)h Fp(comment)c Fq(can)j(be)g(used)h
+(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user)l(,)k(the)c(te)o(xt)
+h(should)h(be)e(read)h(from)f(the)0 788 y(back)o(end)26
+b(con\002g)e(\002le.)0 951 y(The)f(string)i Fp(reserved)p
+839 951 V 29 w(string)20 b Fq(is)j(planed)i(for)f(future)h(use,)f(the)f
+(back)o(end)j(has)e(to)g(set)f(this)h(string)h(to)f(\224\224.)0
+1115 y(W)l(ith)i(member)f Fp(backend)p 915 1115 V 30
+w(version)p 1330 1115 V 29 w(code)e Fq(a)i(frontend)j(can)e(\002nd)f
+(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is)g(connected)0
+1227 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0
+1391 y(The)30 b(member)h Fp(backend)p 889 1391 V 29 w(capability)p
+1468 1391 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g
+(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0
+1504 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f
+(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f
+(de\002ned)i(when)f(there)g(is)0 1617 y(the)f(need)g(for)g(it.)k(The)23
+b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g
+(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 1780 y(The)d(member)h
+Fp(reserved)p 926 1780 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g
+(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g
+(inte)o(ger)h(to)e(0.)3900 1780 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 3900 1780 a 3900 1780
+a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 3900 1780 a 3900 1780 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 3900 1780 a 0 2076 a Fm(4.2.9)99
+b(Option)25 b(Descriptor)g(T)-7 b(ype)0 2300 y Fq(Option)23
+b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h
+(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30
+b(Options)0 2413 y(are)h(used)g(to)f(control)j(virtually)g(all)d
+(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n
+(wer)f(of)h(the)g(SANE)d(API)h(stems)0 2526 y(from)22
+b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f
+(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g
+(descriptor)-5 b(.)31 b(Thus,)0 2639 y(a)21 b(frontend)i(can)e(control)
+i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n
+(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0
+2752 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28
+b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i
+(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 2865 y(operates.)31
+b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p
+1485 2865 28 4 v 31 w(Option)p 1846 2865 V 30 w(Descriptor)18
+b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227
+3085 y Fp(typedef)52 b(struct)336 3198 y({)445 3311 y(SANE_String_Cons)
+o(t)c(name;)445 3424 y(SANE_String_Cons)o(t)g(title;)445
+3537 y(SANE_String_Cons)o(t)g(desc;)445 3650 y(SANE_Value_Type)g(type;)
+445 3763 y(SANE_Unit)j(unit;)445 3876 y(SANE_Int)g(size;)445
+3988 y(SANE_Int)g(cap;)445 4101 y(SANE_Constraint_)o(Ty)o(pe)d
+(constraint_type)o(;)445 4214 y(union)555 4327 y({)664
+4440 y(const)k(SANE_String_Con)o(st)c(*string_list;)664
+4553 y(const)k(SANE_Word)e(*word_list;)664 4666 y(const)i(SANE_Range)e
+(*range;)555 4779 y(})445 4892 y(constraint;)336 5005
+y(})227 5118 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)1905
+5381 y Fq(20)p eop
+%%Page: 21 22
+21 21 bop 0 123 a Fr(Option)23 b(Name)0 356 y Fq(Member)k
+Fp(name)e Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e
+(option.)40 b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o
+(en)i(de)n(vice)0 469 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h
+(dif)n(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g
+(unique\).)55 b(The)31 b(option)i(name)f(must)0 582 y(consist)e(of)d
+(lo)n(wer)n(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p
+Fp(z)p Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p
+Fq(\),)f(or)f(the)i(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6
+b(.)43 b(The)27 b(\002rst)h(character)0 695 y(must)c(be)f(a)g(lo)n(wer)
+n(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g
+(dash\).)0 999 y Fr(Option)g(T)n(itle)0 1232 y Fq(Member)e
+Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h
+(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21
+b(should)i(typically)0 1345 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o
+(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i
+(of)d(the)h(option.)0 1650 y Fr(Option)f(Description)0
+1883 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e
+(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to)
+g(describe)i(the)e(option.)35 b(It)24 b(is)0 1996 y(the)g
+(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h
+(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e
+(this)0 2108 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i
+(breaks.)0 2413 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0
+2646 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the)
+g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h
+Fp(SANE)p 3217 2646 28 4 v 31 w(Value)p 3523 2646 V 31
+w(Type)c Fq(are)0 2759 y(described)26 b(in)e(T)-7 b(able)23
+b(4.3.)p 115 2863 3670 4 v 113 2976 4 113 v 433 2942
+a Fr(Symbol)p 1042 2976 V 368 w(Code)p 1344 2976 V 1044
+w(Description)p 3783 2976 V 115 2979 3670 4 v 115 2996
+V 113 3109 4 113 v 165 3075 a Fp(SANE)p 390 3075 28 4
+v 31 w(TYPE)p 641 3075 V 31 w(BOOL)p 1042 3109 4 113
+v 207 w Fq(0)p 1344 3109 V 256 w(Option)h(v)n(alue)h(is)e(of)h(type)g
+Fp(SANE_Bool)p Fq(.)p 3783 3109 V 113 3222 V 165 3188
+a Fp(SANE)p 390 3188 28 4 v 31 w(TYPE)p 641 3188 V 31
+w(INT)p 1042 3222 4 113 v 262 w Fq(1)p 1344 3222 V 256
+w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Int)p
+Fq(.)p 3783 3222 V 113 3335 V 165 3301 a Fp(SANE)p 390
+3301 28 4 v 31 w(TYPE)p 641 3301 V 31 w(FIXED)p 1042
+3335 4 113 v 152 w Fq(2)p 1344 3335 V 256 w(Option)g(v)n(alue)h(is)e
+(of)h(type)g Fp(SANE_Fixed)p Fq(.)p 3783 3335 V 113 3448
+V 165 3414 a Fp(SANE)p 390 3414 28 4 v 31 w(TYPE)p 641
+3414 V 31 w(STRING)p 1042 3448 4 113 v 97 w Fq(3)p 1344
+3448 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p
+Fq(.)p 3783 3448 V 113 4012 4 565 v 165 3527 a Fp(SANE)p
+390 3527 28 4 v 31 w(TYPE)p 641 3527 V 31 w(BUTTON)p
+1042 4012 4 565 v 97 w Fq(4)p 1344 4012 V 256 w(An)31
+b(option)h(of)g(this)f(type)h(has)g(no)f(v)n(alue.)53
+b(Instead,)35 b(setting)e(an)e(option)1395 3640 y(of)j(this)h(type)g
+(has)g(an)f(option-speci\002c)k(side-ef)n(fect.)63 b(F)o(or)33
+b(e)o(xample,)38 b(a)1395 3752 y(b)n(utton-typed)k(option)d(could)g(be)
+f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j(a)1395
+3865 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g(to)f(the)
+h(tell)f(an)h(automatic)h(doc-)1395 3978 y(ument)24 b(feeder)h(to)e
+(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5
+b(.)p 3783 4012 V 113 4690 4 678 v 165 4091 a Fp(SANE)p
+390 4091 28 4 v 31 w(TYPE)p 641 4091 V 31 w(GROUP)p 1042
+4690 4 678 v 152 w Fq(5)p 1344 4690 V 256 w(An)28 b(option)i(of)e(this)
+h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e
+(group)1395 4204 y(logically)35 b(related)e(options.)56
+b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395
+4317 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j
+(\(or)d(up)g(to)g(the)1395 4430 y(end)d(of)f(the)g(option)i(list,)g(if)
+e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395
+4543 y(group)27 b(options,)h(only)e(members)g Fp(title)d
+Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395
+4656 y(option)g(descriptor)-5 b(.)p 3783 4690 V 115 4693
+3670 4 v 966 4846 a(T)e(able)24 b(4.3:)29 b(Option)24
+b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354
+4846 28 4 v 31 w(Value)p 2660 4846 V 30 w(Type)p Fq(\))1905
+5381 y(21)p eop
+%%Page: 22 23
+22 22 bop 0 123 a Fr(Option)23 b(V)-8 b(alue)22 b(Unit)0
+336 y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h
+(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20
+b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765
+336 28 4 v 31 w(U-)0 449 y(nit)e Fq(are)j(described)i(in)d(T)-7
+b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g
+(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21
+b(is)g(entirely)0 562 y(up)26 b(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g
+(these)h(units)g(a)f(presented)j(to)e(the)f(user)-5 b(.)38
+b(F)o(or)26 b(e)o(xample,)h(SANE)d(e)o(xpresses)29 b(all)d(lengths)i
+(in)0 675 y(millimeters.)37 b(A)25 b(frontend)j(is)d(generally)k(e)o
+(xpected)f(to)d(pro)o(vide)j(appropriate)h(con)l(v)o(ersion)g(routines)
+f(so)e(that)g(a)f(user)i(can)0 788 y(e)o(xpress)e(quantities)h(in)e(a)f
+(customary)i(unit)f(\(e.g.,)f(inches)i(or)f(centimeters\).)p
+499 894 2903 4 v 497 1007 4 113 v 953 973 a Fr(Symbol)p
+1698 1007 V 1698 1007 V 504 w(Code)p 2000 1007 V 2000
+1007 V 525 w(Description)p 3400 1007 V 499 1010 2903
+4 v 499 1027 V 497 1140 4 113 v 548 1106 a Fp(SANE)p
+773 1106 28 4 v 31 w(UNIT)p 1024 1106 V 31 w(NONE)p 1698
+1140 4 113 v 480 w Fq(0)p 2000 1140 V 256 w(V)-10 b(alue)24
+b(is)f(unit-less)j(\(e.g.,)d(page)i(count\).)p 3400 1140
+V 497 1253 V 548 1219 a Fp(SANE)p 773 1219 28 4 v 31
+w(UNIT)p 1024 1219 V 31 w(PIXEL)p 1698 1253 4 113 v 425
+w Fq(1)p 2000 1253 V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g
+(pix)o(els.)p 3400 1253 V 497 1366 V 548 1332 a Fp(SANE)p
+773 1332 28 4 v 31 w(UNIT)p 1024 1332 V 31 w(BIT)p 1698
+1366 4 113 v 535 w Fq(2)p 2000 1366 V 256 w(V)-10 b(alue)24
+b(is)f(in)h(number)g(of)g(bits.)p 3400 1366 V 497 1479
+V 548 1445 a Fp(SANE)p 773 1445 28 4 v 31 w(UNIT)p 1024
+1445 V 31 w(MM)p 1698 1479 4 113 v 590 w Fq(3)p 2000
+1479 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p
+3400 1479 V 497 1591 V 548 1558 a Fp(SANE)p 773 1558
+28 4 v 31 w(UNIT)p 1024 1558 V 31 w(DPI)p 1698 1591 4
+113 v 535 w Fq(4)p 2000 1591 V 256 w(V)-10 b(alue)24
+b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 1591 V
+497 1704 V 548 1670 a Fp(SANE)p 773 1670 28 4 v 31 w(UNIT)p
+1024 1670 V 31 w(PERCENT)p 1698 1704 4 113 v 315 w Fq(5)p
+2000 1704 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p
+3400 1704 V 497 1817 V 548 1783 a Fp(SANE)p 773 1783
+28 4 v 31 w(UNIT)p 1024 1783 V 31 w(MICROSECOND)p 1698
+1817 4 113 v 95 w Fq(6)p 2000 1817 V 256 w(V)-10 b(alue)24
+b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 1817
+V 499 1821 2903 4 v 1215 1974 a(T)-7 b(able)24 b(4.4:)29
+b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 1974 28 4
+v 31 w(Unit)p Fq(\))0 2394 y Fr(Option)f(V)-8 b(alue)22
+b(Size)0 2608 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g
+(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26
+b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0
+2721 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v)
+n(alue:)227 2906 y Fp(SANE)p 452 2906 V 31 w(TYPE)p 703
+2906 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g
+(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e
+(string)427 3019 y(size)c(calcuations,)i(the)d(terminating)i
+Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g
+(the)g(string.)29 b(Note)427 3132 y(that)24 b(the)g(terminating)i
+Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e
+(string)i(option)g(v)n(alues.)227 3262 y Fp(SANE)p 452
+3262 V 31 w(TYPE)p 703 3262 V 31 w(INT)p Fr(,)c Fp(SANE)p
+1163 3262 V 31 w(TYPE)p 1414 3262 V 31 w(FIXED)p Fr(:)43
+b Fq(The)31 b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f
+(multiple)h(of)e(the)427 3374 y(size)24 b(of)g(a)f Fp(SANE_Word)p
+Fq(.)h(The)f(option)i(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533
+3529 y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p
+2289 3529 V 31 w(Word)p Fj(\))o Fh(:)227 3692 y Fp(SANE)p
+452 3692 V 31 w(TYPE)p 703 3692 V 31 w(BOOL)p Fr(:)44
+b Fq(The)23 b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p
+2486 3692 V 28 w(Word\))p Fq(.)227 3821 y Fp(SANE)p 452
+3821 V 31 w(TYPE)p 703 3821 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p
+1327 3821 V 31 w(TYPE)p 1578 3821 V 31 w(GROUP)p Fr(:)43
+b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 4098 y
+Fr(Option)f(Capabilities)0 4312 y Fq(Member)h Fp(cap)d
+Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31
+b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n
+(v)o(e)0 4425 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f
+(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i
+(the)f(follo)n(wing)h(to)e(macros)h(to)0 4538 y(test)c(certain)h
+(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227
+4723 y Fp(SANE)p 452 4723 V 31 w(OPTION)p 813 4723 V
+30 w(IS)p 953 4723 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p
+Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553
+4723 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427
+4836 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i
+(acti)n(v)o(e.)227 4966 y Fp(SANE)p 452 4966 V 31 w(OPTION)p
+813 4966 V 30 w(IS)p 953 4966 V 32 w(SETTABLE\()p Fl(cap)p
+Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p
+2663 4966 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427
+5079 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g
+Fq(is)f(softw)o(are)i(settable.)1905 5381 y(22)p eop
+%%Page: 23 24
+23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p
+1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p
+3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86
+784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31
+w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254
+w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f
+(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p
+3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862
+931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010
+28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31
+w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V
+100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n
+(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123
+y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39
+b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25
+b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32
+b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n
+(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199
+1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462
+y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g
+(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286
+4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p
+507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160
+2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue)
+g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43
+b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p
+1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50
+b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513
+1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31
+w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)
+j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28
+b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p
+3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026
+y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p
+2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026
+V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139
+y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25
+b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252
+y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p
+3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p
+311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p
+1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22
+b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not)
+h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g
+(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513
+2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g
+(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f
+(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34
+3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p
+507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p
+1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d
+(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929
+y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f
+(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d
+(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513
+3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p
+2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of)
+1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099
+3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862
+3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311
+3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160
+3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e
+(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently)
+1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5
+b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513
+3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V
+34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31
+w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v
+349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h
+(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513
+3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6
+b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946
+y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d
+(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g
+(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513
+4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n
+(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f
+(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828
+4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24
+b(Capabilities)1905 5381 y(23)p eop
+%%Page: 24 25
+24 24 bop 0 123 a Fr(Option)23 b(V)-8 b(alue)22 b(Constraints)0
+340 y Fq(It)k(is)g(often)h(useful)g(to)f(constrain)j(the)d(v)n(alues)i
+(that)e(an)h(option)g(can)g(tak)o(e.)37 b(F)o(or)25 b(e)o(xample,)j
+(constraints)h(can)d(be)g(used)h(by)g(a)0 453 y(frontend)h(to)e
+(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n(v)o(en)h(option.)38
+b(Member)26 b Fp(constraint)p 2921 453 28 4 v 28 w(type)e
+Fq(indicates)k(what)e(con-)0 566 y(straint)e(is)d(in)h(ef)n(fect)h(for)
+g(the)f(option.)30 b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h
+(allo)n(wed)f(for)h(the)f(option)i(are)e(described)j(by)d(one)0
+679 y(of)i(the)g(union)h(members)f(of)g(member)g Fp(constraint)p
+Fq(.)g(The)f(possible)j(v)n(alues)f(of)f(type)h Fp(SANE)p
+3078 679 V 31 w(Constraint)p 3659 679 V 28 w(Type)0 792
+y Fq(and)f(the)g(interpretation)j(of)d(the)g Fp(constraint)18
+b Fq(union)25 b(is)e(described)j(in)e(T)-7 b(able)23
+b(4.6.)0 1077 y Fm(4.2.10)99 b(Inter)o(nationlization)0
+1140 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 1140 a 0 1140 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 1140 a 154 x Fq(All)24 b(back)o(end)j(te)o
+(xts)e(should)h(preferable)h(be)d(written)h(in)g(english.)33
+b(Localization)27 b(\(translation)h(of)c(back)o(end)j(te)o(xts\))e(has)
+g(to)0 1407 y(be)g(done)h(in)f(the)g(frontend.)36 b(T)-7
+b(o)24 b(automatically)k(prepare)f(translation)h(tables)e(\(e.g.)34
+b(english)27 b(to)e(german\))h(it)f(is)g(necessary)0
+1520 y(to)e(mark)h(the)g(te)o(xts)g(that)g(shall)g(be)g(translated.)0
+1802 y Fr(Ho)o(w)f(is)g(a)g(text)h(mark)o(ed)f(f)n(or)h(translation)0
+2019 y Fq(The)e(k)o(e)o(yw)o(ord)h Fp(SANE)p 724 2019
+28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f(te)o(xt)g(for)h
+(translation.)31 b Fp(SANE)p 2566 2019 V 31 w(I18N)20
+b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0 2132
+y(prototype:)227 2347 y Fp(#ifndef)52 b(SANE_I18N)227
+2460 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227
+2573 y(#endif)0 2788 y Fq(Y)-10 b(ou)33 b(should)i(not)f(mark)f
+(prototypes)k(or)c(v)n(ariables)i(with)e Fp(SANE)p 2124
+2788 V 31 w(I18N)e Fq(because)k(it)e(is)h(not)f(possible)j(\(or)d(v)o
+(ery)h(hard\))0 2901 y(to)c(\002nd)f(out)h(the)g(te)o(xts)g(that)h(are)
+f(co)o(v)o(ered)h(by)e(prototypes)k(\()p Fp(SANE_I18N\(START_)o(SC)o
+(AN)o(_TE)o(XT)o(\))p Fq(\))23 b(and)30 b(v)n(ariables)0
+3014 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o(na)o(me)o(\))p
+Fq(\).)0 3170 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f(can)g(look)g
+(lik)o(e)g(this:)0 3283 y Fp(snprintf\(buf,)49 b(sizeof\(buf\),)g
+(SANE_I18N\("Sta)o(rt)f(scan"\))0 3396 y Fq(or)0 3509
+y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g(scan"\))p
+Fq(.)0 3621 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f(te)o(xts)h
+(in)g(structs)h(because)g(the)f(prototype)i Fp(SANE)p
+2529 3621 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the)h
+(compiler)-5 b(.)0 3904 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o(ed)
+g(f)n(or)g(translation?)0 4121 y Fq(All)g(option)i(te)o(xts)f(that)g
+(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g
+(translation.)31 b(This)24 b(is:)136 4318 y Fk(\017)46
+b Fq(member)24 b Fp(title)136 4492 y Fk(\017)46 b Fq(member)24
+b Fp(desc)136 4666 y Fk(\017)46 b Fq(member)24 b Fp(string)p
+883 4666 V 30 w(list)0 4863 y Fq(of)f Fp(SANE)p 323 4863
+V 31 w(Option)p 684 4863 V 30 w(Descriptor)p Fq(.)0 5019
+y(It)29 b(is)f(not)i(allo)n(wed)f(to)g(mark/translate)j(memeber)e
+Fp(name)p Fq(.)42 b(Please)29 b(also)h(do)f(not)g(mark)g(an)o(y)g
+(error)g(or)g(deb)n(ug)i(messages)0 5132 y(that)24 b(are)g(displayed)i
+(by)e(the)f(back)o(end.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0
+5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(24)p eop
+%%Page: 25 26
+25 25 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p
+1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215
+V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235
+V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31
+w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v
+614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.)
+49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427
+y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5
+b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a
+Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V
+28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094
+V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f
+(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6
+b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879
+766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30
+b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o
+(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h
+Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25
+b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107
+1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518
+y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325
+1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879
+2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e
+(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n
+(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41
+b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e
+Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g
+(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6
+b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d
+(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51
+b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h
+Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g
+Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879
+2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e
+Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27
+b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n
+(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d
+Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71
+3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877
+3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224
+4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d
+(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879
+3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28
+b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399
+y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35
+b(descriptor)h(member)1879 3512 y Fp(constraint.word)p
+2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o
+(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40
+b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33
+b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28
+b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g
+(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879
+3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j
+(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n
+(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o
+(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303
+a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303
+V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565
+v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e
+(applicable)i(to)e(string-v)n(alued)k(options)1879 4415
+y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e
+(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i
+(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641
+28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e
+Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the)
+e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p
+3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23
+b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905
+5381 y(25)p eop
+%%Page: 26 27
+26 26 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 32 a 91 x Fr(File)23
+b(f)n(ormats)i(and)d(translation)j(functions)0 356 y
+Fq(The)h(recommended)j(\002le)d(formats)h(for)g(translation)j(tables)e
+(are)e(the)h Fp(po)e Fq(\002les)h(and)h Fp(mo)e Fq(or)i
+Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0
+469 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g(k)
+o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e
+(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 582 y Fp(msgstr)p
+Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i
+Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22
+b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 695 y
+Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22
+b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h
+Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0
+807 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d
+Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0
+1092 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34
+b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g
+(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0
+1205 y(should)h(use)f(the)g(function)i Fp(gettext)19
+b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24
+b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 1318 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0
+1489 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g
+(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i
+(tables,)f(then)e(the)g(fron-)0 1602 y(tend)f(is)f(responsible)k(to)c
+(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23
+b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g
+(create)i(its)0 1715 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0
+2000 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the)
+g(gette)o(xt)h(tools.)2241 2000 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 2241 2000 a 2241 2000
+a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 2241 2000 a 2241 2000 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 2241 2000 a 0 2351 a Fn(4.3)119
+b(Operations)0 2620 y Fm(4.3.1)99 b Fc(sane)p 545 2620
+30 4 v 35 w(init)0 2853 y Fq(This)35 b(function)h(must)f(be)g(called)h
+(before)g(an)o(y)f(other)g(SANE)d(function)37 b(can)e(be)g(called.)63
+b(The)35 b(beha)n(vior)i(of)d(a)h(SANE)0 2966 y(back)o(end)h(is)e
+(unde\002ned)i(if)e(this)h(function)i(is)d(not)g(called)i(\002rst.)60
+b(The)34 b(v)o(ersion)i(code)f(of)f(the)g(back)o(end)j(is)d(returned)i
+(in)0 3079 y(the)28 b(v)n(alue)h(pointed)h(to)e(by)h
+Fp(version)p 1267 3079 28 4 v 29 w(code)p Fq(.)40 b(If)28
+b(that)h(pointer)h(is)d Fp(NULL)p Fq(,)f(no)i(v)o(ersion)i(code)e(is)g
+(returned.)45 b(Ar)n(gument)0 3192 y Fp(authorize)18
+b Fq(is)23 b(either)i(a)e(pointer)i(to)e(a)g(function)i(that)f(is)f(in)
+l(v)n(ok)o(ed)j(when)d(the)h(back)o(end)h(requires)h(authentication)h
+(for)d(a)0 3305 y(speci\002c)g(resource)i(or)e Fp(NULL)c
+Fq(if)k(the)g(frontend)h(does)g(not)f(support)h(authentication.)227
+3551 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int)h(*)j(version_code,)
+1482 3664 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o(ba)o(ck)48
+b(authorize\);)0 3910 y Fq(The)23 b(authorization)28
+b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i
+(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 4157
+y Fp(sane)p 452 4157 V 31 w(open)p Fq(,)c Fp(sane)p 967
+4157 V 31 w(control)p 1383 4157 V 29 w(option)p Fq(,)f
+Fp(sane)p 2005 4157 V 31 w(start)0 4403 y Fq(If)25 b(a)h(back)o(end)i
+(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f
+(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0
+4516 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h
+(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d
+(accessing)k(protected)0 4629 y(resources.)66 b(Back)o(ends)37
+b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40
+b(that)35 b(do)h(not)f(require)i(user)f(as-)0 4742 y(sistance.)64
+b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j
+(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0
+4855 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g
+(based)e(on)g(resource-)i(and)e(user)n(-name.)0 5026
+y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing)
+h(declaration:)1905 5381 y(26)p eop
+%%Page: 27 28
+27 27 bop 227 123 a Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o(LEN)157
+b(128)227 236 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN)157
+b(128)227 462 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o(_C)o
+(al)o(lba)o(ck)o(\))445 574 y(\(SANE_String_Con)o(st)c(resource,)500
+687 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE)o(N])
+o(,)500 800 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o(D_)o
+(LE)o(N])o(\);)0 1000 y Fq(Three)31 b(ar)n(guments)i(are)e(passed)h(to)
+f(the)g(authorization)j(function:)46 b Fp(resource)26
+b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0
+1113 y(the)24 b(resource)j(that)d(requires)i(authorization.)35
+b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d
+(user)n(-prompt)k(requesting)0 1226 y(a)36 b(username)i(and)f(a)g
+(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b
+Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g
+(array)g(of)0 1339 y Fp(SANE)p 225 1339 28 4 v 31 w(MAX)p
+421 1339 V 31 w(USERNAME)p 892 1339 V 29 w(LEN)22 b Fq(and)i
+Fp(SANE)p 1482 1339 V 31 w(MAX)p 1678 1339 V 32 w(PASSWORD)p
+2150 1339 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6
+b(.)33 b(The)23 b(authorization)0 1452 y(call)k(should)h(place)f(the)f
+(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38
+b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0
+1565 y(NUL)c(terminated.)0 1852 y Fm(4.3.2)99 b Fc(sane)p
+545 1852 30 4 v 35 w(exit)0 2070 y Fq(This)26 b(function)i(must)e(be)g
+(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38
+b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h
+(handles)0 2183 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f
+(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g
+(through)g(a)d(call)h(to)g Fp(sane)p 3656 2183 28 4 v
+31 w(clo-)0 2296 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d
+(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f
+(this)g(function\).)48 b(After)29 b(this)h(function)0
+2408 y(returns,)36 b(no)c(function)i(other)f(than)g Fp(sane)p
+1396 2408 V 31 w(init\(\))28 b Fq(may)k(be)g(called)h(\(re)o(gardless)h
+(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0 2521
+y Fp(sane)p 225 2521 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f
+(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e
+(being)g(released)i(properly)-6 b(.)227 2721 y Fp(void)53
+b(sane_exit)d(\(void\);)0 3008 y Fm(4.3.3)99 b Fc(sane)p
+545 3008 30 4 v 35 w(get)p 760 3008 V 35 w(devices)0
+3226 y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g
+(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30
+b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6
+b(,)0 3339 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h
+Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f
+Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p
+3635 3339 28 4 v 29 w(list)p Fq(.)0 3452 y(The)27 b(returned)i(list)f
+(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g
+(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0
+3565 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p
+1056 3565 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25
+b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0
+3678 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41
+b(If)27 b(ar)n(gument)h Fp(local)p 1899 3678 V 31 w(only)c
+Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n
+(vices)0 3791 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE)
+d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n
+(vice)g(list)g(includes)i(all)e(remote)0 3904 y(de)n(vices)e(that)f
+(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227
+4104 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device)
+d(***)54 b(device_list,)1864 4216 y(SANE_Bool)c(local_only\);)0
+4416 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g
+Fp(SANE)p 1242 4416 V 31 w(STATUS)p 1603 4416 V 30 w(NO)p
+1743 4416 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)1357 4635 y Fr(Back)o(end)f
+(Implementation)i(Note)227 4779 y Fq(SANE)h(does)k(not)f(require)h
+(that)f(this)h(function)g(is)f(called)h(before)g(a)e
+Fp(sane)p 2646 4779 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227
+4892 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o
+(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f
+(unnecessary)j(and)227 5005 y(undesirable)29 b(to)d(call)g(this)h
+(function)h(\002rst.)1607 4926 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 1607 4926 a 1607 4926
+a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 1607 4926 a 79 x Fq(The)d(same)h(informtation)j(about)e(a)e(de)n
+(vice)i(has)f(to)g(be)g(returned)227 5118 y(when)e Fp(sane)p
+672 5118 28 4 v 31 w(open)d Fq(is)i(called.)1290 5118
+y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 1290 5118 a 1290 5118 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 1290 5118 a 1290 5118 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 1290
+5118 a 1905 5381 a Fq(27)p eop
+%%Page: 28 29
+28 28 bop 0 123 a Fm(4.3.4)99 b Fc(sane)p 545 123 30
+4 v 35 w(open)0 356 y Fq(This)26 b(function)h(is)f(used)h(to)e
+(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36
+b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0
+469 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40
+b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33
+b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e
+Fp(*h)p Fq(.)0 503 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 503 a 0 503 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 503 a 79 x Fq(The)d(description)
+j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e Fp(**device)p
+2040 582 28 4 v 29 w(description)p Fq(.)i(This)e(is)f(the)i(same)f
+(description)j(that)0 695 y(is)h(returned)j(in)d(the)h(list)g(by)f
+Fp(sane)p 1144 695 V 31 w(get)p 1340 695 V 32 w(devices)p
+Fq(.)42 b(The)29 b(returned)i(data)g Fp(*h)c Fq(and)j
+Fp(*device)p 3186 695 V 30 w(description)23 b Fq(is)0
+807 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid)i(until)f
+(a)f(call)h(to)g Fp(sane)p 2288 807 V 30 w(close\(\))c
+Fq(is)j(performed.)3231 807 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 3231 807 a 3231 807 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 3231
+807 a 3231 807 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 3231 807 a 28 w Fq(As)g(a)g(special)i(case,)0
+920 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n(vice)g
+(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n(vice)e
+(\(if)f(there)h(is)g(such)g(a)0 1033 y(de)n(vice\).)227
+1280 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k
+(SANE_Handle)d(*)55 b(h,)e(const)f(SANE_Device)e(**)k(device_descrip)o
+(ti)o(on)o(\);)0 1526 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g
+(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+1772 y Fp(SANE)p 452 1772 28 4 v 31 w(STATUS)p 813 1772
+V 30 w(DEVICE)p 1173 1772 V 30 w(BUSY)p Fr(:)44 b Fq(The)23
+b(de)n(vice)i(is)e(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i
+(else\).)227 1918 y Fp(SANE)p 452 1918 V 31 w(STATUS)p
+813 1918 V 30 w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f
+(not)h(v)n(alid.)227 2065 y Fp(SANE)p 452 2065 V 31 w(STATUS)p
+813 2065 V 30 w(IO)p 953 2065 V 32 w(ERROR)p Fr(:)43
+b Fq(An)23 b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)
+n(vice.)227 2211 y Fp(SANE)p 452 2211 V 31 w(STATUS)p
+813 2211 V 30 w(NO)p 953 2211 V 32 w(MEM)p Fr(:)44 b
+Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n
+(ailable.)227 2357 y Fp(SANE)p 452 2357 V 31 w(STATUS)p
+813 2357 V 30 w(ACCESS)p 1173 2357 V 30 w(DENIED)p Fr(:)43
+b Fq(Access)30 b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)
+g(insuf)n(\002cient)427 2470 y(or)24 b(in)l(v)n(alid)h(authentication.)
+0 2778 y Fm(4.3.5)99 b Fc(sane)p 545 2778 30 4 v 35 w(close)0
+3011 y Fq(This)32 b(function)h(terminates)h(the)e(association)j
+(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h
+Fp(h)e Fq(and)h(the)g(de)n(vice)0 3123 y(it)h(represents.)59
+b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g
+(to)g Fp(sane)p 2326 3123 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j
+(\002rst.)57 b(After)33 b(this)0 3236 y(function)26 b(returns,)f
+(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227
+3508 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0
+3816 y Fm(4.3.6)99 b Fc(sane)p 545 3816 30 4 v 35 w(get)p
+760 3816 V 35 w(option)p 1155 3816 V 35 w(descriptor)0
+4049 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f
+(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h
+(descriptor)g(for)f(option)0 4161 y(number)i Fp(n)e Fq(of)h(the)h(de)n
+(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36
+b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0
+4274 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g
+(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de)
+n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 4387 y(includes)22
+b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i
+(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p
+Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 4500
+y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h
+(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227
+4771 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48
+b(*)445 4884 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)1905 5381 y
+Fq(28)p eop
+%%Page: 29 30
+29 29 bop 0 123 a Fm(4.3.7)99 b Fc(sane)p 545 123 30
+4 v 35 w(control)p 1000 123 V 34 w(option)0 347 y Fq(This)31
+b(function)h(is)f(used)g(to)g(set)g(or)g(inquire)h(the)f(current)h(v)n
+(alue)g(of)e(option)j(number)e Fp(n)f Fq(of)g(the)h(de)n(vice)h
+(represented)i(by)0 460 y(handle)26 b Fp(h)p Fq(.)k(The)24
+b(manner)i(in)e(which)h(the)f(option)i(is)f(controlled)i(is)d
+(speci\002ed)i(by)f(parameter)h Fp(a)p Fq(.)k(The)24
+b(possible)j(v)n(alues)e(of)0 572 y(this)g(parameter)h(are)e(described)
+j(in)d(more)g(detail)h(belo)n(w)-6 b(.)31 b(The)24 b(v)n(alue)h(of)f
+(the)g(option)i(is)e(passed)i(through)g(ar)n(gument)g
+Fp(v)p Fq(.)j(It)0 685 y(is)21 b(a)f(pointer)j(to)e(the)g(memory)h
+(that)f(holds)h(the)g(option)g(v)n(alue.)29 b(The)20
+b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f Fq(must)h(be)g(big)g
+(enough)0 798 y(to)26 b(hold)g(the)g(entire)h(option)h(v)n(alue)e
+(\(determined)i(by)e(member)g Fp(size)d Fq(in)j(the)g(corresponding)k
+(option)d(descriptor\).)39 b(The)0 911 y(only)23 b(e)o(xception)i(to)d
+(this)g(rule)h(is)f(that)h(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g
+(string)h(option,)h(the)e(string)i(pointed)g(to)e(by)g(ar)n(gument)0
+1024 y Fp(v)33 b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i
+(will)d(stop)h(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)
+i(the)d(\002rst)f Fp(NUL)0 1137 y Fq(terminator)c(in)e(the)g(string.)44
+b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p
+Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o
+(vide)i(details)g(on)e(ho)n(w)0 1250 y(well)23 b(the)h(request)h(has)f
+(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d
+(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227
+1468 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h
+(h,)k(SANE_Int)e(n,)2027 1580 y(SANE_Action)f(a,)j(void)g(*v,)2027
+1693 y(SANE_Int)e(*)j(i\);)0 1911 y Fq(The)21 b(w)o(ay)h(the)f(option)j
+(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d
+(controlled)k(by)c(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i
+(of)e(type)0 2024 y Fp(SANE)p 225 2024 28 4 v 31 w(Action)p
+Fq(.)k(The)e(possible)j(v)n(alues)f(and)f(their)g(meaning)h(is)e
+(described)j(in)e(T)-7 b(able)23 b(4.7.)p 185 2139 3531
+4 v 183 2252 4 113 v 628 2218 a Fr(Symbol)p 1363 2252
+V 1363 2252 V 493 w(Code)p 1664 2252 V 1664 2252 V 850
+w(Description)p 3714 2252 V 185 2255 3531 4 v 185 2272
+V 183 2385 4 113 v 234 2351 a Fp(SANE)p 459 2351 28 4
+v 31 w(ACTION)p 820 2351 V 30 w(GET)p 1015 2351 V 32
+w(VALUE)p 1363 2385 4 113 v 254 w Fq(0)p 1664 2385 V
+100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 2385
+V 183 2723 4 339 v 234 2464 a Fp(SANE)p 459 2464 28 4
+v 31 w(ACTION)p 820 2464 V 30 w(SET)p 1015 2464 V 32
+w(VALUE)p 1363 2723 4 339 v 254 w Fq(1)p 1664 2723 V
+100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g
+(passed)h(through)g(ar)n(-)1716 2576 y(gument)21 b Fp(v)d
+Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue)
+1716 2689 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p
+3714 2723 V 183 3288 4 565 v 234 2802 a Fp(SANE)p 459
+2802 28 4 v 31 w(ACTION)p 820 2802 V 30 w(SET)p 1015
+2802 V 32 w(AUTO)p 1363 3288 4 565 v 309 w Fq(2)p 1664
+3288 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28
+b(or)f(de)n(vice)g(will)g(au-)1716 2915 y(tomatically)39
+b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38
+b(mode)1716 3028 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o
+(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 3141 y(v)n(alue)22
+b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h
+Fp(v)e Fq(is)h(completely)1716 3254 y(ignored)j(in)f(this)g(case)g(and)
+g(may)f(be)h Fp(NULL)p Fq(.)p 3714 3288 V 185 3291 3531
+4 v 1168 3444 a(T)-7 b(able)24 b(4.7:)29 b(Action)24
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 3444 28 4 v
+31 w(Action)p Fq(\))0 3745 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an)
+g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o
+Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0
+3858 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e
+Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h
+(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0
+3971 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g
+(described)i(in)e(T)-7 b(able)23 b(4.8.)0 4134 y(This)g(function)j(may)
+d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+4351 y Fp(SANE)p 452 4351 V 31 w(STATUS)p 813 4351 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h
+(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427
+4464 y(option)e(number)-5 b(.)227 4602 y Fp(SANE)p 452
+4602 V 31 w(STATUS)p 813 4602 V 30 w(INVAL)p Fr(:)44
+b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227
+4741 y Fp(SANE)p 452 4741 V 31 w(STATUS)p 813 4741 V
+30 w(IO)p 953 4741 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+4879 y Fp(SANE)p 452 4879 V 31 w(STATUS)p 813 4879 V
+30 w(NO)p 953 4879 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 5017
+y Fp(SANE)p 452 5017 V 31 w(STATUS)p 813 5017 V 30 w(ACCESS)p
+1173 5017 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h
+(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427
+5130 y(or)24 b(in)l(v)n(alid)h(authentication.)1905 5381
+y(29)p eop
+%%Page: 30 31
+30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046
+a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746
+1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103
+1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a
+Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p
+1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21
+b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g
+(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h
+(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j
+(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797
+1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h
+(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i
+(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d
+(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797
+1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49
+b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f
+(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797
+2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32
+b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31
+b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28
+b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e
+(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h
+(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455
+V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4
+v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30
+w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133
+V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n
+(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f
+(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797
+2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g
+Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j
+(should)e(reload)g(all)f(options.)1797 2986 y(This)36
+b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one)
+1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923
+4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p
+628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444
+3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g
+(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797
+3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p
+2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797
+3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f
+(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26
+b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if)
+1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30
+b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33
+b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797
+3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4
+791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29
+b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option)
+1905 5381 y(30)p eop
+%%Page: 31 32
+31 31 bop 0 123 a Fm(4.3.8)99 b Fc(sane)p 545 123 30
+4 v 35 w(get)p 760 123 V 35 w(parameters)0 356 y Fq(This)28
+b(function)i(is)e(used)h(to)e(obtain)j(the)e(current)i(scan)f
+(parameters.)44 b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j
+(to)d(be)0 469 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f
+(been)h(started)h(\()p Fp(sane)p 2070 469 28 4 v 31 w(start\(\))19
+b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0
+582 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6
+b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates)
+e(of)g(what)f(the)g(parameters)0 695 y(will)23 b(be)g(when)g
+Fp(sane)p 716 695 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32
+b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i
+(started)g(allo)n(ws,)0 807 y(for)c(e)o(xample,)h(to)e(get)h(an)g
+(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27
+b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0
+920 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f
+(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer)
+j Fp(p)c Fq(to)i(a)g(parameter)0 1033 y(structure.)k(The)23
+b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n
+(w)-6 b(.)227 1305 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e
+(\(SANE_Handle)h(h,)2027 1417 y(SANE_Parameters)f(*)54
+b(p\);)0 1689 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e
+(a)f(structure)k(of)d(type)g Fp(SANE)p 2314 1689 V 31
+w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0
+1802 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6
+b(.)910 1723 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 910 1723 a 910 1723 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 910 1723 a 227 2048
+a Fp(typedef)52 b(struct)336 2161 y({)445 2274 y(SANE_Frame)e(format;)
+445 2387 y(SANE_Int)h(flags;)445 2500 y(SANE_Int)g(lines;)445
+2613 y(SANE_Int)g(depth;)445 2725 y(SANE_Int)g(pixels_per_line;)445
+2838 y(SANE_Int)g(bytes_per_line;)445 2951 y(SANE_Int)g
+(channels_per_ima)o(ge)o(;)445 3064 y(SANE_String)f(formatdesc;)445
+3177 y(SANE_String)g(proposed_filena)o(me)o(;)445 3290
+y(SANE_Int)h(dpi_x;)445 3403 y(SANE_Int)g(dpi_y;)445
+3516 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j
+(*/)336 3629 y(})227 3742 y(SANE_Parameters)o(;)0 3988
+y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f(the)g
+(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 b(possible)i(v)n
+(alues)f(for)f(type)0 4101 y Fp(SANE)p 225 4101 28 4
+v 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7 b(able)28
+b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e(described)
+i(in)f(more)f(detail)h(in)f(Sec-)0 4214 y(tion)d(3.2.)0
+4385 y(The)d Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g
+(for)h(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g
+(de\002ned,)h(all)f(unused)i(bits)0 4498 y(ha)n(v)o(e)g(to)g(be)f(set)h
+(to)f(0:)136 4770 y Fk(\017)46 b Fp(SANE)p 452 4770 V
+31 w(PFLAG)p 758 4770 V 31 w(LAST)p 1009 4770 V 31 w(FRAME)27
+b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g(if)g(and)h
+(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227
+4882 y(being)23 b(acquired)i(\(or)d(the)g(frame)g(that)g(will)g(be)g
+(acquired)i(ne)o(xt)e(if)g(there)h(is)f(no)g(current)h(frame\))g(is)f
+(the)g(last)g(frame)g(of)227 4995 y(a)g(multi)h(frame)g(image)g
+(\(e.g.,)f(the)h(current)h(frame)f(is)f(the)h(blue)g(component)i(of)e
+(a)f(red,)h(green,)g(blue)h(image\).)29 b(Note,)227 5108
+y(that)24 b(it)g(is)f(possible)j(to)d(transmit)i(multiple)g(images)f
+(in)f(succession.)0 5128 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 5128 a 0 5128 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 5128 a
+0 5128 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0 5128 a 1905 5381 a Fq(31)p eop
+%%Page: 32 33
+32 32 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 0 32 a 217 35 3466 4 v
+215 148 4 113 v 535 114 a Fr(Symbol)p 1144 148 V 1144
+148 V 368 w(Code)p 1446 148 V 1446 148 V 100 w(SANE)21
+b(standard)p 2159 148 V 2159 148 V 586 w(Description)p
+3681 148 V 217 151 3466 4 v 217 168 V 215 281 4 113 v
+267 247 a Fp(SANE)p 492 247 28 4 v 31 w(FRAME)p 798 247
+V 31 w(GRAY)p 1144 281 4 113 v 230 w Fq(0)p 1446 281
+V 318 w(v)o(ersion)k(1)p 2159 281 V 240 w(Band)f(co)o(v)o(ering)h
+(human)f(visual)h(range.)p 3681 281 V 215 394 V 267 360
+a Fp(SANE)p 492 360 28 4 v 31 w(FRAME)p 798 360 V 31
+w(RGB)p 1144 394 4 113 v 285 w Fq(1)p 1446 394 V 318
+w(v)o(ersion)g(1)p 2159 394 V 240 w(Pix)o(el-interlea)n(v)o(ed)i
+(red/green/blue)h(bands.)p 3681 394 V 215 506 V 267 473
+a Fp(SANE)p 492 473 28 4 v 31 w(FRAME)p 798 473 V 31
+w(RED)p 1144 506 4 113 v 285 w Fq(2)p 1446 506 V 318
+w(v)o(ersion)d(1)p 2159 506 V 240 w(Red)e(band)i(of)e(a)g
+(red/green/blue)28 b(image.)p 3681 506 V 215 619 V 267
+585 a Fp(SANE)p 492 585 28 4 v 31 w(FRAME)p 798 585 V
+31 w(GREEN)p 1144 619 4 113 v 175 w Fq(3)p 1446 619 V
+318 w(v)o(ersion)d(1)p 2159 619 V 240 w(Green)f(band)g(of)g(a)f
+(red/green/blue)28 b(image.)p 3681 619 V 215 732 V 267
+698 a Fp(SANE)p 492 698 28 4 v 31 w(FRAME)p 798 698 V
+31 w(BLUE)p 1144 732 4 113 v 230 w Fq(4)p 1446 732 V
+318 w(v)o(ersion)d(1)p 2159 732 V 240 w(Blue)e(band)i(of)e(a)g
+(red/green/blue)28 b(image.)p 3681 732 V 215 845 V 267
+811 a Fp(SANE)p 492 811 28 4 v 31 w(FRAME)p 798 811 V
+31 w(RAW)p 1144 845 4 113 v 285 w Fq(5)p 1446 845 V 318
+w(v)o(ersion)d(2)p 2159 845 V 240 w(Arbitrary)g(pix)o(el)f(property)i
+(transmission.)p 3681 845 V 215 958 V 267 924 a Fp(SANE)p
+492 924 28 4 v 31 w(FRAME)p 798 924 V 31 w(MIME)p 1144
+958 4 113 v 230 w Fq(6)p 1446 958 V 318 w(v)o(ersion)f(2)p
+2159 958 V 240 w(Data)e(described)j(by)e(a)f(mime)g(descriptor)-5
+b(.)p 3681 958 V 217 961 3466 4 v 1194 1115 a(T)e(able)23
+b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 2377
+1115 28 4 v 31 w(Frame)p Fq(\))0 1230 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 0 1230 a 0 1230
+a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 0 1230 a 0 1230 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 0 1230 a 0 1397 a
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 1397 a 0 1397
+a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0 1397 a 136 1488 a Fk(\017)46 b Fp(SANE)p 452 1488
+28 4 v 31 w(PFLAG)p 758 1488 V 31 w(MORE)p 1009 1488
+V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\))e(is)g(set)g(to)g
+(1)f(to)h(indicate)i(further)f(pending)h(images.)40 b(It)26
+b(is)227 1601 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f(1)g
+(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g(determined)i
+(at)e(a)g(v)o(ery)g(early)h(time,)f(where)227 1714 y(it)f(might)g(not)h
+(be)f(detectable,)i(if)e(there)h(actually)h(are)e(more)g(images)h(to)f
+(transfer)h(\(e.g.)28 b(you)22 b(will)e(usually)j(not)e(kno)n(w)227
+1827 y(if)31 b(the)h(document)h(feeder)g(contains)g(further)g(pages)g
+(when)e(starting)i(to)f(scan)g(the)f(current)i(one.)53
+b(Thus)31 b(you)h(are)227 1939 y(allo)n(wed)25 b(to)e(set)h(that)g(bit)
+g(b)n(ut)g(later)g(f)o(ail)g(at)f Fp(sane)p 1808 1939
+V 31 w(start\(\))p Fq(.)136 2127 y Fk(\017)46 b Fp(SANE)p
+452 2127 V 31 w(PFLAG)p 758 2127 V 31 w(NEW)p 954 2127
+V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h(to)g(1)
+f(to)h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g(a)227
+2240 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g
+(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group)
+h(multi-image)227 2353 y(scans.)136 2541 y Fk(\017)46
+b Fp(SANE)p 452 2541 V 31 w(PFLAG)p 758 2541 V 31 w(BACKSIDE)18
+b Fq(\(bit)24 b(3,)e(bitv)n(alue)j(8\))e(tell)g(if)g(the)g(current)i
+(image)e(w)o(as)g(acquired)i(from)e(the)g(front)h(\(0\))227
+2653 y(or)j(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g
+(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n
+(ws)g(to)f(group)227 2766 y(and)e(order)h(multi-image)g(transfers)h(re)
+o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h
+(\002rst/back)g(\002rst\).)0 3038 y(Note,)d(that)h(\003ags)e(is)h
+(compatibel)j(to)c(member)i Fp(last)p 1715 3038 V 31
+w(frame)18 b Fq(of)k Fp(SANE)p 2356 3038 V 31 w(Parameters)17
+b Fq(of)22 b(SANE)e(standard)k(v)o(ersion)0 3151 y(1)f(\(same)h(size)g
+(and)g(only)g(bit)g(0)f(\(bitv)n(alue)j(1\))d(w)o(as)h(used)g(with)f
+(same)h(function\).)0 3322 y(Member)33 b Fp(lines)d Fq(speci\002es)35
+b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)
+57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0
+3435 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)
+h(frontend)h(should)g(call)f Fp(sane)p 2572 3435 V 31
+w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0
+3548 y Fp(SANE)p 225 3548 V 31 w(STATUS)p 586 3548 V
+30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f(transferring)k
+(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i(inband,)h(it)c(is)0
+3661 y(recommended)23 b(to)e(set)g(that)g(member)l(,)h(if)f(a)n(v)n
+(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h(applicable,)i
+(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0 3832
+y(Member)31 b Fp(bytes)p 618 3832 V 30 w(per)p 813 3832
+V 32 w(line)d Fq(speci\002es)k(the)f(number)h(of)f(bytes)h(that)f
+(comprise)i(one)e(scan)g(line.)52 b(If)30 b(bytes)p 3585
+3832 V 35 w(per)p 3735 3832 V 34 w(line)0 3945 y(is)e(set)g(to)g(0,)g
+(which)h(can)f(currently)i(only)f(be)f(the)g(case)h(for)f
+Fp(SANE)p 2150 3945 V 31 w(FRAME)p 2456 3945 V 30 w(MIME)p
+Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0 4058
+y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i(simply)e
+(try)h(to)f(read)h(until)g Fp(SANE)p 2490 4058 V 31 w(STATUS)p
+2851 4058 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h(block)0
+4171 y(length.)j(F)o(or)22 b(ef)n(\002cienc)o(y)i(reasons,)g(medium)f
+(to)g(lar)n(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f
+(kilobytes\))j(should)g(be)e(used.)0 4284 y(Returning)i(short)g(reads)f
+(is)g(allo)n(wed)g(to)g(allo)n(w)f(for)h(small)f(b)n(uf)n(fers)j(in)d
+(the)h(back)o(end.)0 4456 y(Member)i Fp(depth)c Fq(speci\002es)27
+b(the)f(number)g(of)g(bits)g(per)g(sample.)35 b(Note,)26
+b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g(n*8)0
+4569 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23 b(with)h(other)g
+(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6
+b(.)0 4740 y(Member)24 b Fp(pixels)p 666 4740 V 30 w(per)p
+861 4740 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g
+(that)g(comprise)h(one)f(scan)g(line.)0 4912 y(Assume)k
+Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then)
+h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f
+Fp(depth)p Fq(\))e(and)0 5025 y(the)e(number)i(of)e(pix)o(els)h(per)f
+(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h
+Fp(pixels)p 2416 5025 V 30 w(per)p 2611 5025 V 31 w(line)p
+Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0
+5045 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 5045 a 0 5045 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 5045 a 0 5045 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0 5045 a 1905
+5381 a Fq(32)p eop
+%%Page: 33 34
+33 33 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0 32 a 91 x Fq(of)23 b(bytes)i(per)f
+(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h Fp(bytes)p
+1675 123 28 4 v 31 w(per)p 1871 123 V 31 w(line)p Fq(\))d(as)j(follo)n
+(ws:)1214 360 y Fh(c)i(>)p Fj(=)1445 216 y Fb(\()1554
+304 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p Fj(8)p Fk(e)424
+b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 417 y Fh(B)f Fk(\001)d
+Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h Fj(+)f(7\))p Fh(=)p
+Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g Fj(1)0 595 y Fq(Note)j(that)g
+(the)g(number)g(of)g(bytes)g(per)g(line)g(can)g(be)g(lar)n(ger)h(than)f
+(the)g(minimum)g(v)n(alue)g(imposed)h(by)f(the)g(right)g(side)g(of)0
+707 y(this)c(equation.)31 b(A)22 b(frontend)k(must)e(be)f(able)h(to)g
+(properly)i(cope)e(with)f(such)i(\223padded\224)h(image)e(formats.)0
+868 y(Member)f Fp(channels)p 775 868 V 29 w(per)p 969
+868 V 31 w(image)d Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the)
+e(image)f(consists)j(of.)j(When)23 b(the)g(image)0 981
+y(is)29 b(transmitted)i(in)e(more)g(than)g(one)h(frame)f
+Fp(channels)p 1869 981 V 29 w(per)p 2063 981 V 31 w(image)d
+Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g(frames)h(for)f(this)0
+1093 y(image.)0 1254 y(Member)g Fp(formatdesc)24 b Fq(is)29
+b(used)g(for)g(the)h(ne)n(w)e(frametypes)j Fp(SANE)p
+2301 1254 V 31 w(FRAME)p 2607 1254 V 30 w(RAW)c Fq(and)j
+Fp(SANE)p 3209 1254 V 31 w(FRAME)p 3515 1254 V 30 w(MIME)p
+Fq(.)c(Its)0 1367 y(meaning)f(dif)n(fers)g(between)f(the)g(tw)o(o)f
+(types:)136 1597 y Fk(\017)46 b Fp(SANE)p 452 1597 V
+31 w(FRAME)p 758 1597 V 31 w(RAW)p Fq(:)28 b(The)i Fp(formatdesc)c
+Fq(contains)32 b(a)f(description)i(of)e(the)g(channel)h(data)f(and)g
+(an)g(optional)227 1710 y(depth)25 b(information)h(separated)g(by)e(a)f
+(colon\(:\).)227 1855 y(A)g(plane)h(is)g(descibed)h(by)f(one)g
+(channel,)h(e.g.)k(\224)p Fp(gray)p Fq(\224)21 b(or)j(\224)p
+Fp(gray:12)p Fq(\224.)227 2001 y(Channel)c(interlea)n(v)o(ed)h(data)d
+(is)g(described)j(by)d(a)g(comma)g(separated)i(list)f(of)f(channel)i
+(descriptions,)i(e.g.)27 b(\224)p Fp(red,green,blue)p
+Fq(\224)227 2114 y(or)d(\224)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p
+Fq(\224,)17 b(the)24 b(channel)h(data)f(is)g(sent)g(in)f(the)h(gi)n(v)o
+(en)g(order)-5 b(.)227 2259 y(The)24 b(depth)i(information)h(does)e
+Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f
+(data,)g(it)e(is)g(only)h(an)g(informa-)227 2372 y(tion)f(for)g(the)g
+(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f
+(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227
+2518 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p
+Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p
+Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel)
+227 2630 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared)
+j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24
+b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 2743 y(description)e(lik)o(e)e
+Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g
+(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h
+(with)227 2856 y(usefull)f(colors.)227 3002 y(Note)30
+b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d
+(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227
+3115 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f
+(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27
+b(an)g(RGB)e(image)i(is)g(sent)g(it)227 3227 y(is)e(prefered)i(to)e
+(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d
+(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227
+3340 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d
+(de\002ned)i(in)e(member)h Fp(channels)p 2756 3340 V
+29 w(per)p 2950 3340 V 31 w(image)p Fq(.)136 3518 y Fk(\017)46
+b Fp(SANE)p 452 3518 V 31 w(FRAME)p 758 3518 V 31 w(MIME)p
+Fq(:)31 b(The)h Fp(formatdesc)c Fq(contains)36 b(the)d(MIME)f
+(type/subtype)38 b(*\(;parameter\))e(\002elds)d(as)227
+3631 y(described)f(in)c(RFC)f(1521,)k(4.)44 b(The)28
+b(Content-T)-7 b(ype)31 b(Header)f(Field,)f(without)h(the)f
+(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227 3744
+y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i
+(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g
+(possible,)k(please)227 3857 y(stick)28 b(to)f(the)h(IAN)m(A)d
+(assigned)30 b(MIME)25 b(types,)k(and)f(mak)o(e)f(sure)h(the)f
+(datastream)j(is)d(compliant)i(with)e(the)g(corre-)227
+3970 y(sponding)32 b(speci\002cation.)48 b(When)29 b(data)h(is)f
+(transmitted)i(with)e(the)g(framy)h(type)g Fp(SANE)p
+3052 3970 V 30 w(FRAME)p 3357 3970 V 31 w(MIME)c Fq(all)k(data)227
+4083 y(has)e(to)f(be)g(transmitted)j(whithin)e(one)g(frame,)g(multiple)
+g(frames)g(are)f(not)h(allo)n(wed)g(\(so)f(the)h(\003ag)e
+Fp(last)p 3601 4083 V 31 w(frame)227 4196 y Fq(has)e(to)e(be)h(set)g
+(when)g(using)i(this)e(frame)g(type\).)30 b(A)21 b(fully)j(compliant)h
+(SANE)20 b(back)o(end)26 b(is)c(required)j(to)e(transmit)h(in)227
+4309 y(either)29 b(SANE)d(nati)n(v)o(e)i(frametypes,)j(or)d(in)g(a)f
+(MIME)g(type,)i(for)g(which)f(a)f(con)l(v)o(erting)k(middleend)f(e)o
+(xists)f(and)f(is)227 4422 y(freely)d(a)n(v)n(ailable)h(for)e(all)f
+(platforms.)227 4567 y(Other)e(formats)h(may)f(be)g(transmitted,)i(b)n
+(ut)f(as)f(the)g(only)h(thing)g(the)f(a)n(v)o(erage)h(frontend)i(can)d
+(do)g(with)g(them,)g(is)g(sa)n(v)o(e)227 4680 y(them.)44
+b(This)29 b(is)f(not)h(considered)j(a)c(good)h(option,)j(as)c(it)h
+(does)g(not)g(f)o(acilitate)i(transmitting)g(the)e(data)g(to)g(a)f
+(client)227 4793 y(application)i(that)d(may)g(be)f(running)j(the)e
+(frontend.)40 b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g
+(transferred)j(by)c(the)h(back)o(end)i(is)e(not)227 4906
+y(an)k(image)f(in)g(nature,)k(it)c(w)o(ouldn')n(t)i(mak)o(e)e(sense)i
+(to)e(try)g(con)l(v)o(erting)k(it)c(an)o(yw)o(ay)-6 b(,)32
+b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227 5019 y(simple)22
+b Fp(SANE)p 715 5019 V 31 w(FRAME)p 1021 5019 V 31 w(MIME)c
+Fq(transfer)24 b(for)d(that)h(case.)29 b(But)21 b(e)n(v)o(en)g(then,)h
+(try)g(to)f(stick)h(to)g(well)f(kno)n(wn)g(stuf)n(f)h(with)227
+5132 y(freely)j(e)o(xisting)g(standards)h(and)e(vie)n(wers)h(as)e
+(well.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0
+5151 a 1905 5381 a Fq(33)p eop
+%%Page: 34 35
+34 34 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0 32 a 91 x Fq(The)23
+b(member)g Fp(proposed)p 929 123 28 4 v 29 w(filename)c
+Fq(can)24 b(be)f(used)i(to)e(suggest)i(a)e(reasonable)j(def)o(ault)f
+(\002lename)f(or)f(-e)o(xtension)j(in)0 236 y(case)21
+b(the)h(back)o(end)h(can)e(mak)o(e)g(such)h(a)e(suggestion,)k(lik)o(e)e
+(e.g.)27 b(an)21 b(image)g(database.)30 b(If)21 b(no)g(such)h
+(suggestion)i(is)c(intended,)0 349 y(set)k(the)g(\002eld)f(to)g
+(\224\224.)0 520 y(In)28 b(the)h(case)g(of)f(non-MIME)h(frames,)h(this)
+f(is)f(e)o(xpected)j(to)d(hold)h(the)g(basename)h(for)f(the)f(image,)i
+(with)e(the)h(e)o(xtension)0 633 y(determined)i(by)f(the)f(sa)n(v)o(e)h
+(function)h(of)e(the)h(frontend,)i(as)e(the)f(frontend)i(can)f(fully)g
+(understand)i(the)e(data)g(and)f(is)g(thus)0 746 y(able)24
+b(to)g(encode)h(it)e(in)h(an)o(y)f(format)h(it)g(wishes.)0
+917 y(F)o(or)f(MIME)f(frames)i(it)f(can)h(contain)h(either:)136
+1187 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which)
+g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o
+(xtension.)32 b(This)24 b(could)i(also)227 1300 y(be)e(gotten)h(from)e
+(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e
+(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)136 1487
+y Fk(\017)46 b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o
+(xtension.)0 1757 y(Note,)31 b(that)f(for)g(frontends)i(that)e(are)g
+(able)g(to)g(parse)g(a)f(gi)n(v)o(en)i(MIME)d(type)i(internally)-6
+b(,)34 b(it)29 b(is)g(perfectly)j(permissible)g(to)0
+1870 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g(the)g(proposed)i
+(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h(basename,)h(when)
+f(using)g(internal)0 1983 y(sa)n(v)o(e)g(algorithms)i(for)d(dif)n
+(ferent)j(formats.)0 2154 y(In)34 b(an)o(y)g(case,)k(if)c(the)g
+(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f(frontend)h
+(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0
+2267 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g
+(local)g(\002lesystem)h(restrictions.)0 2439 y(Special)i(care)g(should)
+g(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o
+(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all)
+g(path)0 2552 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o
+(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h
+(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0
+2664 y(a)n(v)n(oiding)h(to)e(o)o(v)o(erwrite)g(e)o(xisting)h(\002les.)
+40 b(\(Creating)30 b(of)d(leading)i(dot)f(\002les)f(-)g(lik)o(e)h
+(.rhosts)h(-)e(is)g(not)h(an)g(issue)g(here,)h(as)e(a\))0
+2777 y(co)o(v)o(ers)d(that\).)0 2949 y(The)k(string)h
+Fp(proposed)p 848 2949 V 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f
+(transmit)i(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in)
+e(the)0 3062 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of)
+n(fer)-5 b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h
+(information)i(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0
+3174 y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j
+(enganged)f(\002lters,)f(etc.)0 3346 y(The)34 b(members)g
+Fp(dpi)p 711 3346 V 32 w(x,)53 b(dpi)p 1071 3346 V 32
+w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h
+(resolution.)63 b(Note,)37 b(that)d(multiple-image)0
+3459 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c
+(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j
+(resolution)g(between)0 3572 y(frames)24 b(of)g(the)f(same)h(image.)0
+3743 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g
+(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h
+(unchanged)j(when)c(future)0 3856 y(e)o(xtensions)j(are)e(done.)30
+b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e
+(to)g(0.)2484 3856 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 2484 3856 a 2484 3856 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 2484 3856
+a 2484 3856 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 2484 3856 a 0 4163 a Fm(4.3.9)99 b Fc(sane)p
+545 4163 30 4 v 35 w(start)0 4396 y Fq(This)23 b(function)j(initiates)g
+(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i
+(by)c(handle)i Fp(h)p Fq(.)227 4641 y Fp(SANE_Status)50
+b(sane_start)g(\(SANE_Handle)f(h\);)0 4886 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h
+(status)g(codes.)227 5132 y Fp(SANE)p 452 5132 28 4 v
+31 w(STATUS)p 813 5132 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22
+b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g
+Fp(sane)p 3297 5132 V 31 w(cancel)p Fq(.)1905 5381 y(34)p
+eop
+%%Page: 35 36
+35 35 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(STATUS)p
+813 123 V 30 w(DEVICE)p 1173 123 V 30 w(BUSY)p Fr(:)44
+b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6 b(.)30 b(The)23
+b(operation)j(should)g(be)d(retried)i(later)-5 b(.)227
+269 y Fp(SANE)p 452 269 V 31 w(STATUS)p 813 269 V 30
+w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227
+415 y Fp(SANE)p 452 415 V 31 w(STATUS)p 813 415 V 30
+w(NO)p 953 415 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g
+(is)e(out)h(of)g(documents.)227 561 y Fp(SANE)p 452 561
+V 31 w(STATUS)p 813 561 V 30 w(COVER)p 1118 561 V 31
+w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227
+707 y Fp(SANE)p 452 707 V 31 w(STATUS)p 813 707 V 30
+w(IO)p 953 707 V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g
+(while)f(communicating)i(with)e(the)g(de)n(vice.)227
+852 y Fp(SANE)p 452 852 V 31 w(STATUS)p 813 852 V 30
+w(NO)p 953 852 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)0 1160
+y Fm(4.3.10)99 b Fc(sane)p 595 1160 30 4 v 35 w(read)0
+1393 y Fq(This)19 b(function)j(is)e(used)g(to)g(read)g(image)g(data)g
+(from)g(the)g(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)27 b(Ar)n(gument)20 b Fp(buf)e Fq(is)h(a)g(pointer)0
+1506 y(to)27 b(a)g(memory)g(area)h(that)f(is)g(at)g(least)h
+Fp(maxlen)c Fq(bytes)k(long.)41 b(The)26 b(number)i(of)f(bytes)i
+(returned)g(is)e(stored)h(in)f Fp(*len)p Fq(.)37 b(A)0
+1619 y(back)o(end)d(must)d(set)h(this)g(to)g(zero)g(when)g(the)g(call)g
+(f)o(ails)g(\(i.e.,)h(when)f(a)f(status)i(other)f(than)h
+Fp(SANE)p 3205 1619 28 4 v 30 w(STATUS)p 3565 1619 V
+30 w(GOOD)c Fq(is)0 1732 y(returned\).)50 b(When)29 b(the)h(call)h
+(succeeds,)i(the)d(number)g(of)g(bytes)h(returned)g(can)f(be)g(an)o
+(ywhere)h(in)f(the)g(range)g(from)g(0)f(to)0 1844 y Fp(maxlen)20
+b Fq(bytes.)227 2090 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f
+(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482 2203 y(SANE_Int)c(maxlen,)g
+(SANE_Int)g(*)j(len\);)0 2449 y Fq(If)30 b(this)i(function)h(is)d
+(called)i(when)f(no)g(data)g(is)g(a)n(v)n(ailable,)j(one)e(of)e(tw)o(o)
+h(things)h(may)e(happen,)k(depending)g(on)d(the)g(I/O)0
+2561 y(mode)24 b(that)g(is)f(in)h(ef)n(fect)g(for)g(handle)h
+Fp(h)p Fq(.)114 2807 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g
+(blocking)i(I/O)e(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f
+(blocks)i(until)f(at)f(least)h(one)g(data)f(byte)h(is)227
+2920 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g(error)g(occurs\).)114
+3107 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c
+(mode,)k(the)d(call)g(returns)h(immediately)g(with)e(status)i
+Fp(SANE)p 3656 3107 V 31 w(STA-)227 3220 y(TUS)p 397
+3220 V 32 w(GOOD)21 b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0
+3466 y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via)
+g(a)f(call)h(to)f Fp(sane)p 2024 3466 V 31 w(set)p 2220
+3466 V 31 w(io)p 2361 3466 V 32 w(mode\(\))p Fq(.)0 3637
+y(This)g(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n
+(wing)h(status)g(codes.)227 3883 y Fp(SANE)p 452 3883
+V 31 w(STATUS)p 813 3883 V 30 w(CANCELLED)p Fr(:)42 b
+Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g
+Fp(sane)p 3297 3883 V 31 w(cancel)p Fq(.)227 4029 y Fp(SANE)p
+452 4029 V 31 w(STATUS)p 813 4029 V 30 w(EOF)p Fr(:)45
+b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h
+(frame.)44 b(If)28 b Fp(sane)p 3199 4029 V 31 w(read)e
+Fq(sends)427 4142 y(back)f(an)o(y)e(image)h(data)g(it)g(is)f(not)h
+(allo)n(wed)g(to)g(return)g(with)g Fp(SANE)p 2540 4142
+V 31 w(STATUS)p 2901 4142 V 30 w(EOF)p Fq(.)227 4288
+y Fp(SANE)p 452 4288 V 31 w(STATUS)p 813 4288 V 30 w(JAMMED)p
+Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227
+4434 y Fp(SANE)p 452 4434 V 31 w(STATUS)p 813 4434 V
+30 w(NO)p 953 4434 V 32 w(DOCS)p Fr(:)44 b Fq(The)23
+b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+4580 y Fp(SANE)p 452 4580 V 31 w(STATUS)p 813 4580 V
+30 w(COVER)p 1118 4580 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4726 y Fp(SANE)p
+452 4726 V 31 w(STATUS)p 813 4726 V 30 w(IO)p 953 4726
+V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 4871 y Fp(SANE)p
+452 4871 V 31 w(STATUS)p 813 4871 V 30 w(NO)p 953 4871
+V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 5017 y Fp(SANE)p
+452 5017 V 31 w(STATUS)p 813 5017 V 30 w(ACCESS)p 1173
+5017 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h
+(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427
+5130 y(or)24 b(in)l(v)n(alid)h(authentication.)1905 5381
+y(35)p eop
+%%Page: 36 37
+36 36 bop 0 123 a Fm(4.3.11)99 b Fc(sane)p 595 123 30
+4 v 35 w(cancel)0 354 y Fq(This)24 b(function)i(is)d(used)i(to)e
+(immediately)j(or)e(as)f(quickly)j(as)e(possible)i(cancel)f(the)f
+(currently)i(pending)g(operation)g(of)e(the)0 467 y(de)n(vice)h
+(represented)h(by)e(handle)h Fp(h)p Fq(.)227 709 y Fp(void)53
+b(sane_cancel)d(\(SANE_Handle)f(h\);)0 951 y Fq(This)33
+b(function)i(can)f(be)f(called)h(at)f(an)o(y)h(time)f(\(as)g(long)h(as)
+f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i(handle\))h(b)n(ut)f(usually)h
+(af)n(fects)f(long-)0 1064 y(running)28 b(operations)h(only)e(\(such)g
+(as)f(image)h(is)f(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h
+(this)f(function)j(asynchronously)i(\(e.g.,)0 1177 y(from)37
+b(within)g(a)f(signal)j(handler\).)70 b(It)37 b(is)f(important)j(to)d
+(note)i(that)f(completion)i(of)e(this)g(operaton)i(does)f
+Fl(not)h Fq(imply)0 1290 y(that)g(the)f(currently)i(pending)g
+(operation)h(has)d(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i
+(that)e(cancellation)i(has)d(been)0 1403 y Fl(initiated)p
+Fq(.)68 b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j
+(call)d(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0
+1516 y Fp(SANE)p 225 1516 28 4 v 31 w(STATUS)p 586 1516
+V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j
+(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0
+1629 y(this)i(implies)h(that)f(a)f(frontend)i(must)f
+Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g
+(cancelled)i(operation)g(has)e(returned.)0 1935 y Fm(4.3.12)99
+b Fc(sane)p 595 1935 30 4 v 35 w(set)p 810 1935 V 35
+w(io)p 965 1935 V 35 w(mode)0 2166 y Fq(This)21 b(function)j(is)e(used)
+g(to)f(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p
+Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d
+(non-blocking.)0 2279 y(If)i(ar)n(gument)j Fp(m)c Fq(is)h
+Fp(SANE)p 833 2279 28 4 v 31 w(TRUE)p Fq(,)e(the)j(mode)f(is)h(set)g
+(to)f(non-blocking)28 b(mode,)23 b(otherwise)i(it')-5
+b(s)24 b(set)g(to)f(blocking)j(mode.)227 2521 y Fp(SANE_Status)50
+b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 b(SANE_Bool)c(m\);)0
+2763 y Fq(By)33 b(def)o(ault,)38 b(ne)n(wly)c(opened)h(handles)h
+(operate)g(in)d(blocking)j(mode.)60 b(A)33 b(back)o(end)j(may)d(elect)i
+(not)f(to)g(support)h(non-)0 2876 y(blocking)29 b(I/O)c(mode.)38
+b(In)26 b(such)h(a)f(case)h(the)f(status)i(v)n(alue)f
+Fp(SANE)p 2107 2876 V 31 w(STATUS)p 2468 2876 V 30 w(UNSUPPORTED)20
+b Fq(is)27 b(returned.)39 b(Blocking)0 2989 y(I/O)32
+b(must)g(be)h(supported)i(by)d(all)h(back)o(ends,)k(so)32
+b(calling)i(this)f(function)i(with)d(ar)n(gument)i Fp(m)d
+Fq(set)i(to)f Fp(SANE)p 3509 2989 V 31 w(FALSE)d Fq(is)0
+3102 y(guaranteed)e(to)c(complete)i(successfully)-6 b(.)0
+3272 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h
+(follo)n(wing)h(status)g(codes:)227 3514 y Fp(SANE)p
+452 3514 V 31 w(STATUS)p 813 3514 V 30 w(INVAL)p Fr(:)44
+b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227
+3659 y Fp(SANE)p 452 3659 V 31 w(STATUS)p 813 3659 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)0 3964 y Fm(4.3.13)99 b
+Fc(sane)p 595 3964 30 4 v 35 w(get)p 810 3964 V 35 w(select)p
+1205 3964 V 34 w(fd)0 4196 y Fq(This)25 b(function)j(is)e(used)g(to)g
+(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d
+(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0
+4309 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h
+(a)f(call)h(to)f Fp(sane)p 1850 4309 28 4 v 31 w(read\(\))d
+Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29
+b(If)21 b(the)h(call)0 4422 y(completes)j(successfully)-6
+b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d
+Fp(*fd)p Fq(.)227 4664 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 4906 y Fq(This)37
+b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g
+Fp(sane)p 2056 4906 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed)
+h(and)f(the)g(returned)0 5019 y(\002le-descriptor)j(is)c(guaranteed)k
+(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h
+(image)f(acquisition)j(\(i.e.,)g(un-)0 5132 y(til)e Fp(sane)p
+339 5132 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 5132
+V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h
+Fp(sane)p 2810 5132 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)
+1905 5381 y(36)p eop
+%%Page: 37 38
+37 37 bop 0 123 a Fp(SANE)p 225 123 28 4 v 31 w(STATUS)p
+586 123 V 30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e
+(guarantee)i(to)e(close)h(the)f(returned)i(select)f(\002le)f
+(descriptor)i(at)e(the)0 236 y(point)24 b(when)e(the)h(ne)o(xt)g
+Fp(sane)p 962 236 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h
+Fp(SANE)p 2202 236 V 31 w(STATUS)p 2563 236 V 30 w(EOF)p
+Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 349
+y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f
+(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p
+3167 349 V 31 w(read\(\))p Fq(.)0 520 y(A)30 b(back)o(end)k(may)e
+(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31
+b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0
+633 y Fp(SANE)p 225 633 V 31 w(STATUS)p 586 633 V 30
+w(UNSUPPORTED)p Fq(.)0 805 y(Note)25 b(that)h(the)g(only)g(operation)i
+(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c(a)g(host)i
+(operating-system)i(dependent)0 918 y(test)23 b(whether)h(the)e
+(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h(test)g(can)g(be)g
+(implemented)h(using)g Fp(select\(\))18 b Fq(or)23 b
+Fp(poll\(\))0 1031 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f(other)i
+(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l(,)23
+b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0
+1144 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)
+f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g
+(until)g(a)f(call)g(to)0 1256 y Fp(sane)p 225 1256 V
+31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i
+(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this)
+g(operation)i(is)d(strongly)0 1369 y(encouraged)27 b(as)c(it)g(permits)
+i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g
+(acquisition)j(is)c(in)h(progress.)0 1541 y(This)f(function)j(may)d(f)o
+(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227
+1787 y Fp(SANE)p 452 1787 V 31 w(STATUS)p 813 1787 V
+30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)
+227 1933 y Fp(SANE)p 452 1933 V 31 w(STATUS)p 813 1933
+V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)0 2241 y Fm(4.3.14)99 b
+Fc(sane)p 595 2241 30 4 v 35 w(strstatus)0 2474 y Fq(This)28
+b(function)i(can)f(be)f(used)h(to)f(translate)i(a)e(SANE)e(status)j
+(code)g(into)g(a)f(printable)i(string.)44 b(The)28 b(returned)i(string)
+g(is)e(a)0 2587 y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g
+(complete)h(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f
+(\(full-stop\).)32 b(The)22 b(function)j(is)0 2700 y(guaranteed)k(to)c
+(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g
+(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this)
+g(function)h(is)0 2813 y(performed.)227 3059 y Fp(const)53
+b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g
+(status\);)0 3411 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0
+3676 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i
+(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b
+Fp(sane)p 2797 3676 28 4 v 31 w(init\(\))17 b Fq(and)22
+b Fp(sane)p 3547 3676 V 31 w(exit\(\))0 3789 y Fq(initialize)j(and)d(e)
+o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31
+b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f
+(initialization)j(and)d(before)0 3902 y(e)o(xiting)i(the)f(back)o(end.)
+0 4074 y(Function)j Fp(sane)p 573 4074 V 31 w(get)p 769
+4074 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h
+(after)g Fp(sane)p 2572 4074 V 31 w(init\(\))c Fq(has)k(been)h(called.)
+36 b(It)26 b(returns)0 4187 y(the)32 b(list)f(of)h(the)f(de)n(vices)i
+(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53
+b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0
+4300 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f
+(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n
+(ferent)h(calls.)30 b(It)21 b(should)j(be)0 4413 y(noted)i(that)f(this)
+g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g
+(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of)
+0 4526 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36
+b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f
+(ability)h(for)f(a)f(user)i(to)e(directly)0 4638 y(select)g(a)e
+(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g
+(function.)0 4810 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e
+(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352
+4810 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h
+(at)0 4923 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o
+(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e
+(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 5036 y(at)e(an)o(y)h(gi)n(v)o
+(en)g(time.)1905 5381 y(37)p eop
+%%Page: 38 39
+38 38 bop 536 2582 a @beginspecial 0 @llx 0 @lly 601
+@urx 542 @ury 3060 @rhi @setspecial
+%%BeginDocument: figs/flow.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: flow.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Tue Dec 3 22:09:10 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 601 542
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-161.0 577.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr
+% Polyline
+n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr
+% Polyline
+n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 6600 m
+gs 1 -1 sc (image acquisition) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 3825 m
+gs 1 -1 sc (device setup) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 7515 m
+gs 1 -1 sc (- go back to) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5775 7515 m
+gs 1 -1 sc (sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+7275 7515 m
+gs 1 -1 sc (if more frames desired) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 3300 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 5100 m
+gs 1 -1 sc (- sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 4500 m
+gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 4080 m
+gs 1 -1 sc (sane_control_option\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 3600 m
+gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 5700 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 6900 m
+gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6000 m
+gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6450 m
+gs 1 -1 sc (sane_read\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 8100 m
+gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (- sane_init\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 9300 m
+gs 1 -1 sc (- sane_exit\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+3600 1800 m
+gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 2700 m
+gs 1 -1 sc (- sane_open\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 8700 m
+gs 1 -1 sc (- sane_close\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4800 2175 m
+gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23
+b(\003o)n(w)0 3154 y(An)g(opened)i(de)n(vice)g(can)f(be)f(setup)i
+(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f
+(functions)j Fp(sane)p 3460 3154 28 4 v 30 w(get)p 3655
+3154 V 32 w(opt-)0 3267 y(ion)p 170 3267 V 31 w(descriptor\(\))k
+Fq(and)38 b Fp(sane)p 1280 3267 V 31 w(control)p 1696
+3267 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n
+(vice,)42 b(obtaining)e(option)0 3380 y(descriptors)d(and)e(setting)h
+(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f
+(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0
+3493 y(read)g(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o
+(ginning)h(and)f(then)g(b)n(uild)h(a)d(dialog)j(\(either)g(graphical)g
+(or)e(a)g(command-)0 3606 y(line)27 b(oriented)i(option)g(list\))e
+(that)g(allo)n(ws)g(to)g(control)i(the)e(a)n(v)n(ailable)i(options.)40
+b(It)27 b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0
+3719 y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29
+b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f
+(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0
+3832 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary)
+h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34
+b(While)24 b(setting)i(up)0 3945 y(the)i(de)n(vice,)h(it)e(is)g(also)h
+(admissible)h(to)e(call)h Fp(sane)p 1655 3945 V 31 w(get)p
+1851 3945 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i
+(of)e(what)g(the)h(image)0 4057 y(parameters)e(will)d(look)h(lik)o(e)g
+(once)h(image)f(acquisition)i(be)o(gins.)0 4229 y(The)36
+b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e
+(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p
+3186 4229 V 31 w(set)p 3382 4229 V 31 w(io)p 3523 4229
+V 32 w(mode\(\))p Fq(.)0 4342 y(De)n(vices)30 b(are)f(required)i(to)e
+(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g(mode\),)
+h(b)n(ut)e(support)i(for)e(non-blocking)0 4455 y(I/O)23
+b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d(such)h(as)e
+(UNIX.)0 4626 y(After)g(the)g(de)n(vice)g(is)g(setup)h(properly)-6
+b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f(a)f(call)h(to)
+g Fp(sane)p 3077 4626 V 30 w(start\(\))p Fq(.)i(The)d(back-)0
+4739 y(end)33 b(calculates)h(the)f(e)o(xact)f(image)h(parameters)h(at)e
+(this)g(point.)56 b(So)31 b(future)i(calls)g(to)f Fp(sane)p
+3023 4739 V 31 w(get)p 3219 4739 V 31 w(parameters\(\))0
+4852 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h
+(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i
+(starts)f(at)f(this)0 4965 y(point)41 b(or)e(during)i(the)e(\002rst)h
+(call)f(to)h Fp(sane)p 1450 4965 V 31 w(read\(\))35 b
+Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking)
+44 b(I/O)0 5078 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e
+(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h
+Fp(sane)p 2949 5078 V 31 w(set)p 3145 5078 V 31 w(io)p
+3286 5078 V 32 w(mode\(\))c Fq(and/or)1905 5381 y(38)p
+eop
+%%Page: 39 40
+39 39 bop 0 123 a Fp(sane)p 225 123 28 4 v 31 w(get)p
+421 123 V 31 w(select)p 782 123 V 30 w(fd\(\))21 b Fq(at)i(this)h
+(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f
+(the)h(back)o(end)h(does)g(not)e(support)0 236 y(the)h(requested)i
+(operation.)0 255 y
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 255 a 0 255 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 255 a 152 x Fq(Image)k(data)h(is)
+f(collected)i(by)e(repeatedly)j(calling)f Fp(sane)p 1914
+407 28 4 v 30 w(read\(\))27 b Fq(until)k(this)f(function)i(will)e
+(return)h(an)f(end-of-\002le)0 520 y(status)35 b(\()p
+Fp(SANE)p 495 520 V 31 w(STATUS)p 856 520 V 30 w(EOF)p
+Fq(\).)d(This)i(indicates)j(the)d(end)g(of)g(the)g(current)i(frame.)60
+b(If)34 b(the)h(frontend)h(e)o(xpects)f(addi-)0 633 y(tional)g(frames)g
+(\(e.g.,)h(the)e(indi)n(vidual)i(channels)g(in)e(of)g(a)f
+(red/green/blue)38 b(image)d(or)f(multiple)h(images\),)i(it)c(can)i
+(call)0 746 y Fp(sane)p 225 746 V 31 w(start\(\))20 b
+Fq(again.)31 b(If)24 b(the)h Fp(SANE)p 1349 746 V 31
+w(PFLAG)p 1655 746 V 30 w(LAST)p 1905 746 V 31 w(FRAME)c
+Fq(bit)k(is)f(set)g(in)g Fp(flags)p Fq(,)d(the)k(current)h(image)e(is)g
+(com-)0 859 y(plete.)60 b(In)33 b(this)i(case,)h(it)e(should)h(be)e
+(tested,)38 b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p
+2409 859 V 31 w(PFLAG)p 2715 859 V 31 w(MORE)p 2966 859
+V 31 w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 972
+y(further)e(calls)e(to)g Fp(sane)p 794 972 V 31 w(start\(\))c
+Fq(can)30 b(be)f(made)g(to)g(acquire)h(more)f(images.)46
+b(Please)30 b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0
+1085 y(be)f(set)g(at)f(the)h(be)o(ginning)i(of)e(a)f(the)h
+(transmission)i(of)e(the)g(last)g(frame)g(before)h(the)f(ne)n(w)f
+(image,)h(it)g(is)f(possible,)k(that)d(no)0 1198 y(reliable)f(decision)
+h(can)e(be)f(made)h(at)f(this)h(time.)34 b(It)26 b(is)f(thus)h
+(permissible)i(for)e(a)f(back)o(end)i(to)f(set)f(this)h(bit,)g(and)g
+(then)g(later)0 1311 y(at)33 b(the)g(actual)h(call)f(to)f
+Fp(sane)p 980 1311 V 31 w(start\(\))d Fq(return)34 b(an)f(error)g(lik)o
+(e)h Fp(SANE)p 2388 1311 V 31 w(STATUS)p 2749 1311 V
+30 w(NO)p 2889 1311 V 31 w(DOCS)p Fq(.)c(Such)j(a)f(sequence)j(is)0
+1424 y(permitted)27 b(to)f(transmit)h(multiple)g(images)g(from)e(a)h
+(single)h(page)g(as)e(well)h(as)f(multiple)j(pages.)36
+b(This)26 b(beha)n(viour)j(should)0 1536 y(be)21 b(controlled)i(by)e
+(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n(w)h(single-page)i
+(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 1649
+y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g(all)d
+(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p 2933 1649
+V 31 w(PFLAG)p 3239 1649 V 31 w(LAST)p 3490 1649 V 30
+w(FRAME)e Fq(on)0 1762 y(and)29 b Fp(SANE)p 384 1762
+V 31 w(PFLAG)p 690 1762 V 31 w(MORE)p 941 1762 V 31 w(IMAGES)c
+Fq(of)n(f)k(is)f(encountered,)34 b(or)28 b(an)h(error)h(other)g(than)f
+Fp(SANE)p 3085 1762 V 31 w(STATUS)p 3446 1762 V 30 w(EOF)e
+Fq(occurs)0 1875 y(in)21 b(a)g(SANE)e(function.)30 b(Note)21
+b(that)h Fp(SANE)p 1342 1875 V 31 w(STATUS)p 1703 1875
+V 30 w(NO)p 1843 1875 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)
+o(ay)f(for)h(the)f(back)o(end)j(to)d(indicate)0 1988
+y(the)j(end)g(of)f(a)g(multiple)i(image)f(scan.)0 2160
+y(A)c(frontend)k(may)d(choose)i(to)e(skip)i(frames)f(\(e.g.)28
+b(because)23 b(it)e(cannot)i(parse)g(them\),)e(which)h(is)f
+(accomplished)k(by)c(simply)0 2273 y(calling)30 b Fp(sane)p
+500 2273 V 31 w(start)25 b Fq(again,)30 b(which)f(will)f(get)h(you)g
+(to)f(the)h(ne)o(xt)f(frame,)i(without)f(ha)n(ving)i(to)d(read)h(and)g
+(discard)h(the)0 2386 y(current)25 b(one.)0 2557 y(In)d(order)h(to)f
+(prematurely)i(stop)f(scanning)h(and)f(to)e(reset)i(the)f(back)o(end)j
+(state,)d Fp(sane)p 2707 2557 V 31 w(cancel\(\))c Fq(can)k(be)g(called)
+h(at)f(an)o(y)0 2670 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d
+(well)h(after)g(normal)g(termination)i(of)e(a)f(multiple)h(image)g
+(scan)h(as)e(described)j(abo)o(v)o(e.)0 2842 y(When)33
+b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e
+(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 2842 V
+31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0
+2955 y(e)o(xiting)e(the)f(application,)37 b(function)d
+Fp(sane)p 1443 2955 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55
+b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0
+3068 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d
+(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0
+3239 y(The)e(follo)n(wing)i(C)d(sample)j(code)f(implements)h(a)e
+(reference)j(loop)e(for)g(acquiring)i(multiple)f(images:)0
+3510 y Fp(SANE_Parameters)48 b(parms;)0 3623 y(SANE_Status)268
+b(status;)0 3849 y(do)0 3962 y({)109 4075 y(do)109 4188
+y({)218 4301 y(/*)54 b(Now)f(start)f(acquiring)f(the)i(next)g(frame.)e
+(*/)218 4414 y(status=sane_sta)o(rt)o(\(ha)o(nd)o(le)o(\);)218
+4640 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h(problem,)d(and)i(no)h
+(more)e(frames)g(can)h(be)273 4752 y(*)h(read)f(at)g(this)g(time.)f
+(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S)49 b(still)273
+4865 y(*)54 b(being)e(clear,)g(this)h(will)f(break)h(out)g(of)g(_BOTH_)
+f(loops.)273 4978 y(*/)218 5091 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o
+(OD\))48 b(break;)0 5102 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0 5102 a 0 5102 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 5102 a
+0 5102 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 5102 a 1905 5381 a Fq(39)p eop
+%%Page: 40 41
+40 40 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 32 a 218 236 a Fp(/*)54
+b(Now)f(let)g(us)h(see)f(what)g(the)g(next)g(frame)f(brings.)f(*/)218
+349 y(status=sane_get)o(_p)o(ara)o(me)o(te)o(rs)o(\(h)o(and)o(le)o(,&)o
+(pa)o(rm)o(s\);)218 574 y(/*)j(This)f(actually)d(should)i(not)h(fail,)g
+(but)g(maybe)f(the)h(doc)h(feeder)273 687 y(*)g(jammed)e(or)h
+(something,)d(so)k(we)g(break)e(as)h(well,)g(if)g(something)273
+800 y(*)h(is)f(wrong.)273 913 y(*/)218 1026 y(if)h(\(status)d(!=)j
+(SANE_STATUS_GO)o(OD\))48 b(break;)218 1252 y(/*)54 b(Now)f(we)h(check)
+e(the)h(announced)e(parameters,)e(if)54 b(we)f(can)h(make)e(use)273
+1365 y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g
+(to)g(the)g(next)g(frame.)273 1478 y(*/)218 1591 y(if)h(\()g
+(do_i_like_that\()o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;)
+218 1817 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle)
+g(filenames,)273 1929 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e
+(files,)i(ask)h(user)273 2042 y(*)h(for)f(confirmation,)c(...)273
+2155 y(*/)218 2268 y(setup_for_trans)o(fe)o(r\(.)o(..)o(\);)218
+2494 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f(frame)f(data)h(and)g
+(process)f(it.)h(This)g(should)273 2607 y(*)h(return)e(SANE_STATUS_GO)o
+(OD)o(,)c(until)53 b(the)g(frame)f(is)i(complete,)273
+2720 y(*)g(what)f(causes)e(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273
+2833 y(*/)218 2946 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54
+b(\()g(status=sane_rea)o(d\()o(..)o(.\))48 b(\))54 b(\))545
+3059 y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)
+o(\(\))o(;)218 3284 y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f
+(anything)e(but)i(EOF,)g(break)f(out.)h(*/)218 3397 y(if)h(\(status)d
+(!=)j(SANE_STATUS_EO)o(F\))48 b({)436 3510 y(break;)218
+3623 y(})218 3849 y(/*)54 b(Now)f(loop)g(until)f(we)i(have)e(all)i
+(frames)d(of)j(an)g(image.)d(*/)109 3962 y(})j(while\(!\(parms.f)o(la)o
+(g)49 b(&)54 b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0
+4188 y(/*)g(O.K.)e(-)i(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h
+(it)h(together,)c(save)j(it,)55 4301 y(*)h(flush)e(buffers,)f(transmit)
+g(it,)i(increment)d(filenames,)g(etc.)55 4413 y(*/)0
+4639 y(/*)k(Now)f(check)f(for)h(more)g(pending)e(images.)h(If)h(we)h
+(have)f(more,)f(redo)h(from)f(start.)55 4752 y(*)i(Some)e(backends)f
+(might)i(cheat)f(here)h(and)g(send)f(us)i(for)f(an)h(extra)e(round)g
+(which)55 4865 y(*)i(will)e(fail)h(at)h(sane_start,)49
+b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c(if)k(they)55
+4978 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start)f(of)i(the)f
+(last)g(frame)f(we)i(read.)55 5091 y(*/)0 5098 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0 5098
+a 0 5098 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 5098 a 0 5098 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 5098 a 1905 5381 a Fq(40)p
+eop
+%%Page: 41 42
+41 41 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 32 a 91 x Fp(})54 b(while\(parms.fla)o
+(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S\);)0
+349 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j
+(go)f(back)g(to)h(option-control)55 462 y(*)g(loop.)55
+574 y(*/)0 800 y(sane_cancel\(han)o(dl)o(e\))o(;)0 911
+y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0 911 a 0 911 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 911 a 0 911 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 911 a 340 x Fn(4.5)119
+b(W)-8 b(ell-Kno)o(wn)31 b(Options)0 1517 y Fq(While)c(most)f(back)o
+(end)j(options)f(are)f(completely)i(self-describing,)i(there)c(are)g(a)
+f(cases)h(where)g(a)f(user)h(interf)o(ace)i(might)0 1630
+y(w)o(ant)24 b(to)g(special-case)k(the)c(handling)j(of)d(certain)i
+(options.)32 b(F)o(or)24 b(e)o(xample,)h(the)f(scan)h(area)g(is)f
+(typically)i(de\002ned)f(by)g(four)0 1743 y(options)35
+b(that)e(specify)h(the)f(top-left)i(and)e(bottom-right)j(corners)e(of)f
+(the)g(area.)57 b(W)l(ith)33 b(a)f(graphical)j(user)e(interf)o(ace,)k
+(it)0 1856 y(w)o(ould)25 b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)
+e(type)i(in)f(these)g(four)h(numbers.)34 b(Instead,)26
+b(most)f(such)h(interf)o(aces)h(will)d(w)o(ant)h(to)0
+1969 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g(\(lo)n
+(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h(or)d(a)
+h(high\(er\))h(resolution)i(scan)d(of)0 2082 y(a)h(subpart)i(of)e(the)g
+(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f(scan)h
+(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0
+2194 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g
+(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n
+(v)o(e)h(well-de\002ned)0 2307 y(meanings.)0 2615 y Fm(4.5.1)99
+b(Option)25 b(Number)h(Count)0 2848 y Fq(Option)e(number)h(0)e(has)h
+(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g
+(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 2848
+28 4 v 30 w(TYPE)p 3556 2848 V 31 w(INT)d Fq(and)0 2961
+y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n
+(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g
+(includes)i(option)e(number)h(0\).)0 3074 y(This)23 b(means)h(that)f
+(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f
+(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o
+(ycle)0 3187 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h
+(until)h Fp(sane)p 1963 3187 V 31 w(get)p 2159 3187 V
+31 w(option)p 2520 3187 V 30 w(descriptor\(\))17 b Fq(returns)25
+b Fp(NULL)p Fq(,)c(or)j(a)0 3300 y(frontend)i(can)e(directly)h(read)f
+(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 3608
+y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 3689
+y
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 3689 a 0 3689 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 3689 a 152 x Fq(Option)33 b Fp(resolution)28
+b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j(at)c(which)i(an)e
+(image)h(should)i(be)d(acquired.)59 b(When)33 b(the)0
+3954 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g(dif)n(ferent)j(v)n
+(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h(to)f(de\002ne)h
+(the)g(options)h Fp(x)p 3327 3954 28 4 v 33 w(resolution)0
+4067 y Fq(and)40 b Fp(y)p 230 4067 V 33 w(resolution)p
+Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i Fp(resolution)34
+b Fr(or)40 b Fq(the)g(options)i Fp(x)p 3142 4067 V 32
+w(resolution)34 b Fr(and)0 4179 y Fp(y)p 60 4179 V 32
+w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0 4351
+y(The)k(type)h(of)g(this)g(option)h(is)e(either)i Fp(SANE)p
+1417 4351 V 31 w(TYPE)p 1668 4351 V 31 w(INT)c Fq(or)j
+Fp(SANE)p 2212 4351 V 31 w(TYPE)p 2463 4351 V 31 w(FIXED)p
+Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460 4351 V 30 w(UNIT)p
+3710 4351 V 31 w(DPI)0 4464 y Fq(\(dots/inch\).)0 4636
+y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g
+(back)o(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h
+(a)e(manner)i(consistent)0 4749 y(with)c(the)h(abo)o(v)o(e)g
+(de\002nition.)955 4749 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 955 4749 a 955 4749 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 955 4749
+a 955 4749 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 955 4749 a 1905 5381 a Fq(41)p eop
+%%Page: 42 43
+42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221
+@urx 205 @ury 1836 @rhi @setspecial
+%%BeginDocument: figs/area.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: area.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Wed Dec 4 19:19:37 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 221 205
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-59.0 231.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr
+/Helvetica findfont 180.00 scalefont setfont
+2550 2302 m
+gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+7.500 slw
+% Polyline
+n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3375 3150 m
+gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1500 m
+gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2700 1050 m
+gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1050 3600 m
+gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+4425 525 m
+gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1080 585 m
+gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 1725 1650 m 1725 1800 l gs col-1 s gr
+% Polyline
+n 1650 1725 m 1800 1725 l gs col-1 s gr
+% Polyline
+n 3375 2700 m 3375 2850 l gs col-1 s gr
+% Polyline
+n 3300 2775 m 3450 2775 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23
+b(area)h(options)0 2134 y Fm(4.5.3)99 b(Pr)n(e)o(view)25
+b(Mode)g(Option)0 2367 y Fq(The)g(boolean)j(option)f
+Fp(preview)22 b Fq(is)j(used)i(by)f(a)f(frontend)j(to)e(inform)g(the)g
+(back)o(end)i(when)e(image)g(acquisition)j(should)0 2480
+y(be)e(optimized)i(for)e(speed,)i(rather)g(than)e(quality)i(\(\223pre)n
+(vie)n(w)f(mode\224\).)41 b(When)27 b(set)g(to)g Fp(SANE)p
+3003 2480 28 4 v 31 w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0
+2593 y(in)e(ef)n(fect,)g(when)g(set)g(to)g Fp(SANE)p
+1012 2593 V 31 w(FALSE)d Fq(image)j(acquisition)j(should)f(proceed)f
+(in)f(normal)h(quality)g(mode.)33 b(The)25 b(setting)0
+2706 y(of)c(this)h(option)h Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e
+(other)i(option.)29 b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h
+(options)g(are)f(concerned,)i(the)e(pre)n(vie)n(w)0 2819
+y(mode)i(is)g(completely)i(side)e(ef)n(fect)h(free.)30
+b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g(frontend)i(will)e
+(tak)o(e)g(care)h(of)e(appropriately)0 2932 y(setting)i(the)e(scan)h
+(resolution)i(for)d(pre)n(vie)n(w)h(mode)f(\(through)j(option)e
+Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e(free)h(to)f(o)o(v)o
+(erride)0 3045 y(the)j Fp(resolution)21 b Fq(v)n(alue)27
+b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h(mode,)f(b)n(ut)g
+(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)g(to)f(the)0
+3158 y(frontend)35 b(where)n(v)o(er)e(possible.)1081
+3078 y
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+ 1081 3078 a 1081 3078 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 1081 3078 a 80 x Fq(When)f(the)h
+Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f
+(transfer)g(the)f(image)f(in)0 3270 y(frame)24 b(type)g
+Fp(SANE)p 639 3270 28 4 v 31 w(FRAME)p 945 3270 V 30
+w(RAW)e Fq(if)h(possible.)1584 3270 y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+ 1584 3270 a 1584
+3270 a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 1584 3270 a 1584 3270 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 1584 3270 a 0 3442 a Fq(This)j(option)i
+(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 3555 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+3863 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 4096
+y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g(are)f
+(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29
+b(The)22 b(scan)i(area)f(is)f(de\002ned)0 4209 y(by)h(tw)o(o)f(points)j
+(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e
+(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0
+4322 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e
+(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e
+(the)h(scan)g(surf)o(ace)h(as)0 4435 y(seen)25 b(by)g(the)g(sensor)h
+(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i
+(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24
+b(this)h(reason,)0 4547 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i
+(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f
+(simultaneously)k(the)c Fl(smallest)0 4660 y Fq(and)f(the)f
+(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h
+(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0
+4773 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f
+(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g
+(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0
+4886 y(necessary)i(con)l(v)o(ersions.)0 5058 y(The)d(names)h(of)g(the)f
+(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o
+(en)g(in)f(the)h(table)h(belo)n(w:)1905 5381 y(42)p eop
+%%Page: 43 44
+43 43 bop 1200 111 a Fr(Name)100 b(Description)1200 223
+y Fp(tl-x)107 b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue)
+1200 336 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i
+Fq(coordinate)g(v)n(alue)1200 449 y Fp(br-x)107 b Fq(Bottom-right)25
+b Fh(x)e Fq(coordinate)j(v)n(alue)1200 562 y Fp(br-y)107
+b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0
+778 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e(follo)
+n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g
+(options:)136 1003 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h
+(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p
+2091 1003 28 4 v 31 w(UNIT)p 2342 1003 V 31 w(PIXEL)p
+Fq(\))20 b(or)k(millimeters)h(\()p Fp(SANE)p 3484 1003
+V 31 w(UNIT)p 3735 1003 V 31 w(MM)p Fq(\))227 1116 y(to)f(these)g
+(options.)31 b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h
+(identical.)136 1298 y Fk(\017)46 b Fq(Whene)n(v)o(er)25
+b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h
+(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136
+1480 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g
+(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h
+(options)h(ha)n(v)o(e)f(range)227 1592 y(constraints)i(associated.)51
+b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f
+(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 1705
+y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f
+(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o
+(ace)g(size.)136 1887 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o
+(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i
+(missing.)0 2185 y Fm(4.5.5)99 b(Depth)26 b(option)0
+2267 y
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 2267 a 0 2267 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 2267 a 144 x Fq(Option)k Fp(depth)c
+Fq(is)k(used)g(to)f(select)i(the)e(image)h(depth)h(in)e(bits/sample)j
+(in)d(multi)h(bit)f(mode)h(-)f(\(this)h(means)g(for)g(24)f(bit)0
+2524 y(r)n(gb)23 b(mode)g(this)g(v)n(alue)g(must)f(be)h(8\).)28
+b(The)22 b(type)h(of)g(this)g(option)h(is)e Fp(SANE)p
+2319 2524 28 4 v 31 w(TYPE)p 2570 2524 V 31 w(INT)p Fq(.)e(The)i(unit)h
+(is)f Fp(SANE)p 3437 2524 V 31 w(UNIT)p 3688 2524 V 31
+w(BIT)p Fq(.)0 2637 y(F)o(or)h(1)g(bit)h(modes)g(\(Lineart)g(or)g
+(Halftone\))h(this)f(option)h(has)f(to)f(be)h(inacti)n(v)o(e.)30
+b(F)o(or)22 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0
+2750 y(Halftone\))h(the)f(back)o(end)i(should)f(use)f(the)g(well-kno)n
+(wn)g(option)h Fp(mode)p Fq(.)0 3028 y(This)h(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3141 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3253
+y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 0 3253 a 0 3253 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 0 3253 a 0 3253 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 0 3253 a 299 x
+Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 3633 y
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 3633
+a 0 3633 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 3633 a 145 x Fq(The)30 b Fp(gamma-table)24
+b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 3778
+28 4 v 31 w(CONSTRAINT)p 2225 3778 V 29 w(RANGE)d Fq(of)j(the)h(type)g
+Fp(SANE)p 3208 3778 V 31 w(TYPE)p 3459 3778 V 31 w(INT)d
+Fq(which)0 3891 y(represent)c(the)d(gamma)g(correction)j(table)e(for)g
+(gray)-6 b(.)28 b(In)22 b(color)g(mode)f(the)h Fp(gamma-table)15
+b Fq(may)21 b(be)h(used)g(to)f(set)g(a)g(com-)0 4003
+y(mon)d(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28
+b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12
+b Fp(green-gamma-tab)o(le)0 4116 y Fq(and)32 b Fp(blue-gamma-table)24
+b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g
+(correction)k(for)d(each)h(color)g(separately)-6 b(.)0
+4229 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h
+(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f
+Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 4342 y Fp(blue-gamma-tabl)o(e)19
+b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options)
+h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0
+4455 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f
+(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h
+(reduce)g(\(if)0 4568 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g
+(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45
+b(This)29 b(should)h(e.g.)44 b(look)0 4681 y(lik)o(e)24
+b(this:)0 4906 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o
+(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 5019 y(green_value)c(=)k
+(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\))
+o(\))0 5132 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o
+(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 5146 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 0 5146
+a 0 5146 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 0 5146 a 0 5146 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 0 5146 a 1905 5381 a Fq(43)p
+eop
+%%Page: 44 45
+44 44 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 32 a 91 x Fq(The)24
+b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e
+(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h
+(shado)n(w)-6 b(,)0 236 y(contrast,)24 b(brightness,)i(threshold,)f
+(analog)p 1379 236 28 4 v 35 w(gamma.)j(These)22 b(functions)j(are)e
+(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0
+349 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0
+633 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 746
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 859 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 0
+859 a 0 859 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 0 859 a 0 859 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 0 859 a 308 x Fm(4.5.7)99
+b(Scan)26 b(Mode)f(options)0 1249 y
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 0 1249 a 0 1249 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+
+0 1249 a 151 x Fq(The)d(option)i Fp(mode)19 b Fq(de\002nes)k(a)f
+Fp(SANE)p 1222 1400 28 4 v 31 w(CONSTRAINT)p 1803 1400
+V 28 w(STRING)p 2161 1400 V 30 w(LIST)e Fq(of)i(type)h
+Fp(SANE)p 2926 1400 V 31 w(TYPE)p 3177 1400 V 31 w(STRING)p
+Fq(.)18 b(It)k(is)g(used)0 1513 y(to)34 b(select)i(the)e(scanmode)i
+(\(e.g.)61 b(Color)34 b(or)g(Gray\).)61 b(W)-7 b(ell)34
+b(kno)n(wn)h(modes)g(are:)50 b Fp(Color)p Fq(,)34 b Fp(Gray)p
+Fq(,)g Fp(Halftone)c Fq(and)0 1626 y Fp(Lineart)p Fq(.)46
+b Fp(Color)27 b Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g
+(or)f(16)h(bits/sample\),)j Fp(Halftone)26 b Fq(and)31
+b Fp(Lineart)c Fq(are)0 1739 y(single)e(bit)f(modes.)0
+1852 y(This)f(w)o(ay)h(a)f(frontend)i(can)f(select)h(e.g)e(the)h(mode)g
+Fp(Gray)d Fq(for)j(scanning)h(a)f(f)o(ax.)0 2136 y(This)i(option)i(is)e
+(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 2249 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+2362 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 0 2362 a 0 2362 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 0 2362 a 0 2362 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 0 2362 a 308
+x Fm(4.5.8)99 b(Scan)26 b(Sour)n(ce)g(options)0 2751
+y
+ -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch
+pop /CBarY65 exch def
+ 0 2751 a 0 2751 a
+ 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint
+exch pop /CBarY66 exch def
+ 0 2751 a 152 x Fq(The)36 b(option)j
+Fp(source)33 b Fq(is)k(used)h(to)f(select)h(the)f(scansource)j(\(e.g.)
+69 b(Automatic)38 b(Document)g(Feeder\).)69 b(It)37 b(de\002nes)h(a)0
+3016 y Fp(SANE)p 225 3016 28 4 v 31 w(CONSTRAINT)p 806
+3016 V 28 w(STRING)p 1164 3016 V 30 w(LIST)20 b Fq(of)j(type)g
+Fp(SANE)p 1930 3016 V 31 w(TYPE)p 2181 3016 V 31 w(STRING)p
+Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b
+Fp(Flatbed)p Fq(,)0 3129 y Fp(Transparancy)49 b(Adapter)20
+b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0
+3413 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3526
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3639 y
+ -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch
+pop /CBarY67 exch def
+ 0
+3639 a 0 3639 a
+ 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint
+exch pop /CBarY68 exch def
+ 0 3639 a 0 3639 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore
+ 0 3639 a 308 x Fm(4.5.9)99
+b(Thr)n(eshold)0 4010 y
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 4010 a 0 4010 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 4010 a 170
+x Fq(The)29 b(option)j Fp(threshold)25 b Fq(is)30 b(used)g(to)g
+(de\002ne)h(the)f(threshold)i(for)e(Lineart)h(and)f(may)g(be)g
+(Halftone)h(mode.)48 b(In)30 b(multi)0 4293 y(bit)36
+b(modes)g(this)g(option)i(should)f(be)f(set)g(inacti)n(v)o(e.)67
+b(The)35 b(type)h(of)g(this)g(option)i(is)d Fp(SANE)p
+2975 4293 28 4 v 31 w(TYPE)p 3226 4293 V 31 w(FIXED)p
+Fq(.)d(The)k(unit)0 4406 y(is)g Fp(SANE)p 321 4406 V
+31 w(UNIT)p 572 4406 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g
+(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68
+b(It)36 b(de\002nes)g(the)g(minimum)0 4519 y(intensity)27
+b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data)
+h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v)
+n(alues)i(in)e(the)0 4631 y(follo)n(wing)h(w)o(ay:)0
+4744 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white)
+g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40
+b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 4857 y(intensities)e(brighter)g
+(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e
+(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0
+4970 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29
+b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f
+(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0
+5083 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14
+b(.)g(.)g(70)23 b(percent\).)0 5103 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 5103 a 0 5103
+a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 5103 a 0 5103 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 5103 a 1905 5381 a Fq(44)p eop
+%%Page: 45 46
+45 45 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 32 a 91 x Fq(This)26
+b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o
+(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e
+(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+349 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 349 a 0 349 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 349 a 0 349 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 349 a 284 x Fm(4.5.10)99
+b(Analog)24 b(gamma)0 715 y
+ -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch
+pop /CBarY73 exch def
+ 0 715 a 0 715 a
+ 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint
+exch pop /CBarY74 exch def
+ 0 715 a 134
+x Fq(The)37 b(option)i Fp(analog-gamma)31 b Fq(is)38
+b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h(analog)h
+(gamma)e(function)i(of)f(the)0 962 y(scanner)33 b(in)e(multi)h(bit)f
+(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g(option)h(should)g(be)e
+(set)g(inacti)n(v)o(e.)54 b(The)31 b(type)h(of)f(this)h(option)g(is)0
+1075 y Fp(SANE)p 225 1075 28 4 v 31 w(TYPE)p 476 1075
+V 31 w(FIXED)p Fq(.)27 b(The)k(unit)g(is)g Fp(SANE)p
+1486 1075 V 30 w(UNIT)p 1736 1075 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g
+(range)h(can)f(be)g(de\002ned)g(by)g(the)g(back)o(end)i(as)0
+1188 y(supported.)38 b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g
+(positi)n(v)o(e.)37 b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i
+(that)f(the)g(gamma)f(correction)k(has)d(no)0 1301 y(ef)n(fect.)j(A)20
+b(v)n(alue)j(lar)n(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j
+(of)c(the)h(image.)29 b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)
+f(options)0 1414 y Fp(analog-gamma-re)o(d)p Fq(,)16 b
+Fp(analog-gamma-gre)o(en)g Fq(and)24 b Fp(analog-gamma-bl)o(ue)o
+Fq(.)f(It)g(is)h(not)g(allo)n(wed)g(to)g(em-)0 1527 y(ulate)31
+b(an)e(anlog)i(gamma)e(function)j(by)d(a)h(digital)h(gamma)e(table.)48
+b(The)29 b(back)o(end)j(has)e(to)f(disable)j(\(or)d(not)h(de\002ne\))h
+(this)0 1640 y(option)25 b(when)f(the)g(scanner)h(does)f(not)g(support)
+i(an)d(analog)i(\(hardw)o(are\))h(gamma)d(function.)0
+1795 y(When)37 b(analog)i(gamma,)h(highlight)f(and)f(shado)n(w)f
+(functions)j(are)d(a)n(v)n(ailable)j(at)d(the)g(same)g(time)g(then)h
+(the)f(back)o(end)0 1908 y(author)32 b(has)g(to)e(care)i(about)g(the)f
+(order)h(in)e(which)i(the)f(functions)i(are)e(implemented)i(in)e(the)g
+(scanner)i(hardw)o(are.)52 b(The)0 2021 y(SANE)27 b(standard)32
+b(e)o(xpects)g(that)e(changing)j(the)d(analog)h(gamma)e(v)n(alue)i(has)
+f(no)g(ef)n(fect)h(to)f(the)g(shado)n(w)g(and)h(highlight)0
+2133 y(function.)59 b(When)33 b(the)g(analog)i(gamma)d(function)j(is)e
+(e)o(x)o(ecuted)i(in)d(the)i(scanner)g(hardw)o(are)h(before)f(the)f
+(shado)n(w)h(and)0 2246 y(highlight)d(functions)g(then)e(the)g(back)o
+(end)i(should)f(do)e(a)g(compensation.)47 b(F)o(or)27
+b(this)i(the)g(shado)n(w)g(and)g(highlight)i(v)n(alues)0
+2359 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g(corrected)j(with)d(the)h(rele)
+n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 2514 y(It)e(is)h(not)g(allo)n
+(wed)g(to)g(emulate)g(an)g(analog)h(gamma)e(function)j(by)e(a)f
+(digital)i(gamma)e(table.)29 b(The)21 b(back)o(end)j(has)e(to)f
+(disable)0 2627 y(\(or)j(not)g(de\002ne\))g(this)g(option)h(when)f(the)
+f(scanner)j(does)e(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(gamma)d(function.)0 2782 y(This)j(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+2895 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3008
+y
+ -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch
+pop /CBarY75 exch def
+ 0 3008 a 0 3008 a
+ 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint
+exch pop /CBarY76 exch def
+ 0 3008 a 0 3008 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore
+ 0 3008 a 284 x
+Fm(4.5.11)99 b(Shado)o(w)0 3356 y
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 3356 a 0 3356 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0
+3356 a 153 x Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g
+(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v)
+o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h(is)0
+3622 y Fp(SANE)p 225 3622 28 4 v 31 w(TYPE)p 476 3622
+V 31 w(FIXED)p Fq(.)26 b(The)k(unit)g(is)g Fp(SANE)p
+1482 3622 V 30 w(UNIT)p 1732 3622 V 31 w(PERCENT)p Fq(.)c(The)j(v)n
+(alue)i(range)g(should)g(be)f(0.0.)14 b(.)g(.)g(100.0)29
+b(if)g(pos-)0 3735 y(sible.)47 b(It)29 b(is)h(used)g(to)f(de\002ne)h
+(the)g(maximum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(an)e(image)
+h(data)g(v)n(alue)g(of)g(0)f(\(black\).)48 b(The)0 3847
+y(back)o(end)26 b(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f
+(follo)n(wing)i(w)o(ay:)0 3960 y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h
+(that)g(the)f(sensiti)n(vity)k(range)d(is)f(not)h(reduced,)k(only)c
+(the)f(minimum)h(intensity)h(produces)h(an)0 4073 y(image)30
+b(data)g(v)n(alue)h(of)e(0)h(\(black\).)48 b(A)29 b(v)n(alue)h(of)g
+(50.0)g(means)g(that)g(that)g(a)f(medium)h(intensity)i(and)e(e)n(v)o
+(erything)i(that)e(is)0 4186 y(dark)o(er)e(produces)h(an)e(image)g
+(data)h(v)n(alue)f(of)g(0)f(\(black\).)41 b(A)25 b(v)n(alue)j(of)e
+(100.0)i(means)f(the)g(sensiti)n(vity)j(range)e(is)e(reduced)0
+4299 y(to)i(0,)g(all)g(image)g(data)g(v)n(alues)h(are)f(0)g(\(black\).)
+43 b(If)28 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o(v)o(er)h(the)h
+(full)f(range)h(the)f(back)o(end)i(has)0 4412 y(to)25
+b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35
+b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e
+(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0
+4525 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p
+Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31
+b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0
+4638 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g
+(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g
+(disable)i(\(or)e(not)h(de\002ne\))0 4751 y(this)24 b(option)h(when)f
+(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(shado)n(w)e(function.)0 4906 y(This)i(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+5019 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 5132
+y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 5132 a 0 5132 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 5132 a 0 5132 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 5132 a 1905 5381
+a Fq(45)p eop
+%%Page: 46 47
+46 46 bop 0 123 a Fm(4.5.12)99 b(Highlight)0 204 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0
+204 a 0 204 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 204 a 148 x Fq(The)26 b(option)i Fp(highlight)21
+b Fq(is)26 b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f
+(white)g(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g
+(is)0 465 y Fp(SANE)p 225 465 28 4 v 31 w(TYPE)p 476
+465 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p
+1461 465 V 31 w(UNIT)p 1712 465 V 31 w(PERCENT)p Fq(.)d(The)j(v)n(alue)
+h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24 b(if)h(possi-)0
+577 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h(the)g(minimum)f
+(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e(maximum)h(possible)h
+(image)f(data)g(v)n(alue)0 690 y(\(white/full)c(intensity\).)31
+b(The)23 b(back)o(end)j(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f
+(follo)n(wing)i(w)o(ay:)0 803 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h
+(sensiti)n(vity)i(range)e(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h
+(ha)n(v)o(e)g(maximum)f(v)n(alue)h(\(white)f(/)g(full)0
+916 y(intensity\).)31 b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a)
+f(medium)h(intensity)i(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j
+(produces)f(the)f(max-)0 1029 y(imum)f(possible)j(image)e(data)g(v)n
+(alue)h(\(white)f(/)f(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e
+(100.0)i(means)f(that)g(the)g(sensiti)n(vity)j(range)d(is)0
+1142 y(not)d(reduced,)j(only)d(the)h(maximum)f(intensity)i(produces)h
+(an)d(image)g(data)h(with)f(maximum)g(possible)i(v)n(alue)f(\(white)f
+(/)g(full)0 1255 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h
+(able)g(to)f(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has)
+f(to)f(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 1368
+y(\(e.g.)35 b(30.)14 b(.)g(.)g(70)25 b(percent\).)38
+b(In)25 b(color)i(mode)f(there)h(can)f(be)g(options)h
+Fp(highlight-red)p Fq(,)20 b Fp(highlight-gree)o(n)f
+Fq(and)0 1481 y Fp(highlight-blue)p Fq(,)g(in)26 b(this)h(case)g
+Fp(highlight)21 b Fq(has)26 b(to)g(be)g(disabled.)39
+b(It)26 b(is)g(not)g(allo)n(wed)h(to)f(emulate)h(a)f(highlight)0
+1594 y(function)h(by)f(a)f(digital)i(gamma)d(table.)35
+b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h(de\002ne\))g
+(this)g(option)g(when)g(the)f(scanner)0 1707 y(does)f(not)g(support)i
+(an)d(analog)i(\(hardw)o(are\))h(highlight)g(function.)0
+1874 y(This)g(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1987
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2100 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 0
+2100 a 0 2100 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 0 2100 a 0 2100 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 0 2100 a 302 x Fm(4.5.13)99
+b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0 2483 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0
+2483 a 0 2483 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 2483 a 148 x Fq(The)18 b(option)h Fp(lamp-on)14
+b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h(scanner)h(on.)27
+b(The)17 b(type)i(of)f(this)h(option)g(is)f Fp(SANE)p
+3431 2631 28 4 v 31 w(TYPE)p 3682 2631 V 31 w(BUTTON)p
+Fq(.)0 2744 y(The)23 b(unit)h(is)g Fp(SANE)p 637 2744
+V 31 w(UNIT)p 888 2744 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e
+(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(on.)0
+2911 y(The)18 b(option)h Fp(lamp-off)14 b Fq(is)k(used)h(to)f(turn)g
+(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.)27 b(The)18
+b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p 3499 2911
+V 31 w(TYPE)p 3750 2911 V 30 w(BUTTON)p Fq(.)0 3024 y(The)23
+b(unit)h(is)g Fp(SANE)p 637 3024 V 31 w(UNIT)p 888 3024
+V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g(the)g
+(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0
+3191 y(These)33 b(options)h(are)f(not)g(mandatory)-6
+b(,)37 b(b)n(ut)c(if)f(a)g(back)o(end)j(does)e(support)i(them,)f(it)e
+(must)h(implement)h(it)e(in)g(a)g(manner)0 3304 y(consistent)26
+b(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0 3417 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0
+3417 a 0 3417 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 3417 a 0 3417 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 3417 a 302 x Fm(4.5.14)99
+b(Scanner)26 b(b)n(uttons)0 3782 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 3782 a 0 3782 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+
+0 3782 a 166 x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)
+e(state)h(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5
+b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 4061
+y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g
+(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to)
+d(the)g(same)0 4174 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f
+(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h
+(w)o(ould)f(be)g(implemented:)0 4287 y(Fi)n(v)o(e)25
+b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e
+(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o
+(ant)f(to)0 4400 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i
+(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n
+(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0
+4512 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g
+(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n
+(utton\).)47 b(F)o(or)0 4625 y(three)24 b(people)i(the)d(image)h(is)g
+(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g
+(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0
+4906 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e
+(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n
+(wing)i(options:)0 5019 y Fp(scanner-buttons)o(-l)o(oc)o(k)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 5019 28 4 v 31
+w(TYPE)p 1951 5019 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25
+b(=)e Fp(SANE)p 2813 5019 V 31 w(FALSE)0 5132 y(scanner-buttons)o(-s)o
+(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809
+5132 V 31 w(TYPE)p 2060 5132 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 5151 a 1905
+5381 a Fq(46)p eop
+%%Page: 47 48
+47 47 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 32 a 91 x Fp(scanner-buttons)o(-s)o
+(ta)o(tu)o(s-u)o(pd)o(at)o(e)17 b Fq(is)23 b(of)g(type)i
+Fp(SANE)p 2191 123 28 4 v 31 w(TYPE)p 2442 123 V 30 w(BUTTON)0
+236 y Fq(When)18 b(setting)i(these)f(options)h(the)f(back)o(end)h(does)
+f(not)f(set)g Fp(SANE)p 2091 236 V 31 w(INFO)p 2342 236
+V 31 w(RELOAD)p 2703 236 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p
+3445 236 V 31 w(INFO)p 3696 236 V 31 w(RELOAD)p 4057
+236 V 30 w(PARAMS)0 349 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0
+520 y(A)33 b(Frontend)j(has)f(to)f(disable)i(the)f(usage)g(of)g(the)f
+(scanner)n(-b)n(uttons)40 b(by)34 b(def)o(ault.)63 b(This)35
+b(is)f(important)i(because)g(other)0 633 y(frontends)26
+b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g
+(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25
+b(important)g(thing)0 746 y(is)f(that)h(some)f(scanners)i(do)f(not)f
+(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g
+(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0
+859 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g
+(scanner\).)136 1130 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o
+(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f
+(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31
+b(this)h(it)227 1243 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o
+(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 1243 V 31 w(TRUE)p
+Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227
+1356 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b
+Fp(SANE)p 1667 1356 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h
+(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-)227
+1469 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28
+b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e)
+n(v)o(ery)g(user)g(has)g(read)h(and)227 1582 y(write)24
+b(access)h(to.)336 1794 y Fr(\226)46 b Fq(If)20 b(the)h(lock\002le)g
+(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j(creates)f(the)e
+(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d(\(PID\))427
+1907 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27
+b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f
+(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 2020 y
+Fq(is)k(set)f(to)h Fp(SANE)p 953 2020 V 31 w(TRUE)336
+2166 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h
+(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g
+(back)o(end)i(has)e(to)g(check)g(if)427 2279 y(the)f(process)i(with)d
+(the)h(PID)f(stored)i(in)e(the)h(lock\002le)h(still)f(is)g(running.)46
+b(If)28 b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427
+2392 y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j
+Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g
+Fp(SANE)p 3340 2392 V 31 w(FALSE)p Fq(.)c(If)k(not)427
+2505 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of)
+h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g
+(access)427 2618 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e
+(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23
+b(set)h(to)g Fp(SANE)p 3194 2618 V 30 w(TRUE)136 2831
+y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i
+(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37
+b(If)28 b(it)g(is)h Fp(SANE)p 3472 2831 V 31 w(TRUE)c
+Fq(then)227 2943 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h
+(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 2943
+V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136
+3131 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n
+(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f
+(once)g(per)g(second)g(\(while)g(not)227 3244 y(scanning\):)336
+3432 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h
+Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o
+Fq(.)35 b(The)27 b(back)o(end)j(checks)427 3545 y(if)37
+b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i
+(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427
+3657 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h
+(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option)
+427 3770 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20
+b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f
+(means)g(the)h(b)n(utton)h(is)427 3883 y(not)23 b(pressed,)h(a)d(v)n
+(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30
+b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427
+3996 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f
+(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42
+b(The)27 b(back)o(end)427 4109 y(has)c(to)f(implement)h(a)f(timeout)h
+(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h
+(within)f(a)e(prede\002ned)j(time)427 4222 y(\(e.g.)50
+b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50
+b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427
+4335 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b
+Fp(SANE)p 1862 4335 V 31 w(FALSE)d Fq(and)j(does)h(set)f
+Fp(SANE)p 2881 4335 V 31 w(INFO)p 3132 4335 V 31 w(RELOAD)p
+3493 4335 V 30 w(OPTIONS)427 4448 y Fq(to)20 b(inform)g(the)g(frontend)
+i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n
+(-b)n(utton)k(functions.)30 b(If)20 b(access)427 4561
+y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o
+(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 4707 y Fr(\226)46
+b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i
+Fp(scanner-buttons-)o(st)o(at)o(us)136 4894 y Fk(\017)46
+b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g
+(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g
+Fp(scanner-buttons-)o(lo)o(ck)227 5007 y Fq(to)34 b Fp(SANE)p
+556 5007 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g
+(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f
+(same.)0 5009 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 5009 a 0 5009 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 5009 a 0 5009 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0
+5009 a 1905 5381 a Fq(47)p eop
+%%Page: 48 49
+48 48 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 32 a 227 123 a Fq(If)39
+b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es)g(the)h(lock\002le)g
+(and)f(sets)g(the)h(v)n(alue)f(of)g Fp(scanner-buttons)o(-lo)o(ck)31
+b Fq(to)227 236 y Fp(SANE)p 452 236 28 4 v 31 w(FALSE)p
+Fq(.)227 386 y Fp(sane)p 452 386 V 31 w(close\(\))14
+b Fq(should)20 b(do)e(the)h(same)f(as)g(setting)h(option)h
+Fp(scanner-buttons)o(-l)o(oc)o(k)11 b Fq(to)18 b Fp(SANE)p
+3601 386 V 31 w(FALSE)p Fq(.)0 505 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 505 a 0 505 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+
+0 505 a 0 505 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 505 a 1905 5381 a Fq(48)p eop
+%%Page: 49 50
+49 49 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51
+b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g
+(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h
+(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895
+y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e
+(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f
+(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h
+(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e
+(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h
+(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367
+y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e
+(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5
+b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480
+y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g
+(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i
+(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h
+(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g
+(access)g(to)g(the)g(system.)227 2743 y(Controlling)34
+b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e)
+n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227
+2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges)
+i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i
+(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36
+b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d
+(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47
+b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n
+(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227
+3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i
+(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g
+(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that)
+g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f
+(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g
+(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i
+(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24
+b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n
+(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22
+b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l
+(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f
+(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834
+y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h
+(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h
+(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19
+b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e
+(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws)
+227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices)
+h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44
+b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24
+b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g
+(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i
+(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g
+(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740
+y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i
+(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114
+4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client)
+h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o
+(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(49)p
+eop
+%%Page: 50 51
+50 50 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f
+(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e
+(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i
+(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45
+b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h
+(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227
+536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k
+(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o
+(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0
+896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h
+(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h
+(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0
+1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0
+1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7
+b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g
+(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0
+2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44
+b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28
+b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h
+(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n
+(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44
+b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30
+b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c
+(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).)
+0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29
+b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10
+b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227
+2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g
+(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h
+(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43
+b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g
+Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37
+b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227
+3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e
+Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6
+b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43
+b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40
+b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f
+(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g
+(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d
+(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227
+3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o
+(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues)
+g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f
+(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g
+(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47
+b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0
+4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378
+y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C)
+e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e
+(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737
+y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w)
+o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g
+(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28
+b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g
+(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f
+(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h
+(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(50)p eop
+%%Page: 51 52
+51 51 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded)
+j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g
+(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227
+236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29
+b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f
+(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0
+526 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by)
+e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g
+(in)e(which)i(the)o(y)227 639 y(appear)25 b(in)f(the)g(corresponding)j
+(C)c(type)h(declaration.)0 816 y Fa(union)p Fr(:)45 b
+Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e
+(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i
+(members)e(is)227 929 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30
+b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j
+(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1042 y(of)g(the)g
+(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1251 y(Note)25
+b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e
+(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f
+(constructed)0 1364 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g
+(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of)
+d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1524
+y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h
+(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h
+(protocol.)0 1858 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h
+(Requests)0 2112 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g
+(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\))
+f(protocol.)34 b(This)24 b(means)h(that)0 2225 y(all)h(acti)n(vity)h
+(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back)
+o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0
+2338 y(by)d(the)f(client.)0 2628 y Fm(5.2.1)99 b Fc(SANE)p
+545 2628 30 4 v 35 w(NET)p 760 2628 V 35 w(INIT)0 2849
+y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e
+(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20
+b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0
+2962 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g
+(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g
+(belo)n(w:)744 3165 y Fr(r)n(equest:)941 b(r)n(eply:)744
+3278 y Fp(SANE)p 969 3278 28 4 v 31 w(Word)52 b(version)p
+1657 3278 V 30 w(code)98 b(SANE)p 2225 3278 V 31 w(Word)52
+b(status)744 3391 y(SANE)p 969 3391 V 31 w(String)g(user)p
+1602 3391 V 30 w(name)153 b(SANE)p 2225 3391 V 31 w(Word)52
+b(version)p 2913 3391 V 30 w(code)0 3591 y Fq(The)32
+b Fp(version)p 563 3591 V 30 w(code)e Fq(ar)n(gument)35
+b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36
+b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3704
+y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39
+b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i
+(code)f(is)f(used)g(to)g(hold)0 3817 y(the)c(netw)o(ork)h(protocol)h(v)
+o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h
+(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0
+3930 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f
+(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e
+(the)g(netw)o(ork)0 4043 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o
+(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g
+(compatible\).)33 b(The)24 b Fp(user)p 3656 4043 V 31
+w(name)0 4156 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h
+(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59
+b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4269 y(cannot)26
+b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e
+Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h
+(be)f(placed)h(in)e(the)0 4382 y(authenticity)30 b(of)c(this)i(user)n
+(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o
+(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5
+b(.)39 b(E.g.,)25 b(it)0 4495 y(could)g(be)e(used)i(as)e(the)h(def)o
+(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0
+4654 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 4654 V 31 w(STA-)0 4767 y(TUS)p 170 4767
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g
+(unde\002ned)i(v)n(alues.)2384 4734 y Fg(1)2457 4767
+y Fq(The)d Fp(version)p 3013 4767 V 30 w(code)e Fq(ar)n(gument)28
+b(returns)0 4880 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw)
+o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g
+(pre)n(vious)i(paragraph)h(on)0 4993 y(the)d(meaning)h(of)e(the)h(b)n
+(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p
+0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19
+b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak)
+g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5
+b(.)1905 5381 y Fq(51)p eop
+%%Page: 52 53
+52 52 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0
+356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f
+(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055
+596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196
+b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822
+y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822
+V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h
+(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6
+b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344
+V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has)
+g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p
+2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0
+1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f
+Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765
+y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p
+760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open)
+i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760
+2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p
+985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V
+30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071
+2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577
+y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y
+Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k
+(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0
+2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099
+V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has)
+e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d
+Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23
+b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31
+b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j
+(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p
+Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g
+(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0
+3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g
+(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0
+3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p
+760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077
+4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p
+1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252
+4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d
+Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h
+(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905
+5381 y(52)p eop
+%%Page: 53 54
+53 53 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p
+1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h
+(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706
+705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97
+b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28
+w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h
+(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29
+b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h
+(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50
+b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n
+(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)
+o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445
+1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336
+1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30
+4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V
+34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i
+(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i
+(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694
+y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p
+1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187
+2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040
+2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31
+w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294
+b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033
+V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p
+1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52
+b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040
+3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52
+b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371
+V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e
+Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f
+(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23
+b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)
+g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34
+b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40
+b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75
+b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c
+Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945
+y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080
+3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p
+1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h
+Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p
+Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V
+31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058
+V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28
+b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g
+(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f
+(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n
+(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c
+Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31
+b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h
+Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32
+b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v)
+o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37
+b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g
+(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f
+(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o
+(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622
+y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24
+b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g
+(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call)
+0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p
+Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)
+h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f
+(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26
+b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36
+b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f
+Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p
+Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h
+(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(53)p
+eop
+%%Page: 54 55
+54 54 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on)
+d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i
+(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0
+236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f
+(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946
+236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V
+31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h
+(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28
+b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462
+y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply)
+i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i
+(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28
+b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that)
+f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0
+687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545
+995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V
+35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886
+1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p
+1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061
+1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061
+1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b
+Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e
+(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0
+2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40
+b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g
+(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j
+Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g
+(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750
+30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).)
+940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y
+Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p
+2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p
+2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116
+3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891
+3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913
+y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g
+(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h
+(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23
+b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19
+b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e
+(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33
+b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g
+(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section)
+g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d
+(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31
+b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0
+4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073
+4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28
+b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n
+(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27
+b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data)
+g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0
+4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g
+(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5
+b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g
+(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50
+b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.)
+0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence)
+j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted)
+j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j
+(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f
+(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905
+5381 y(54)p eop
+%%Page: 55 56
+55 55 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25
+b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g
+(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31
+w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j
+(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f
+(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0
+349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g
+(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i
+(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18
+b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g
+(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35
+b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36
+b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33
+b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742
+y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g
+(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j
+(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i
+(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o
+(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0
+968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31
+b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6
+b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v)
+o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i
+(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0
+1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j
+(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i
+(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h
+(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609
+30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f
+(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635
+b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30
+w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53
+b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f
+(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0
+2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p
+810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h
+(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854
+b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31
+w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53
+b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967
+3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006
+y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g
+(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31
+b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string)
+h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24
+b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j
+(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17
+b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j
+(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0
+4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512
+y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o
+(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n
+(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g
+(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo)
+n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0
+4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g
+(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i
+(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22
+b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e
+(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0
+5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905
+5381 y(55)p eop
+%%Page: 56 57
+56 56 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b
+Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20
+b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30
+b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f
+(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j
+(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0
+349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26
+b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f
+(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f
+(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31
+w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p
+Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v
+35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g
+(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5
+b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i
+(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h
+(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o
+(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y
+Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e
+Fq(call)j(will)f(be)h(closed.)1905 5381 y(56)p eop
+%%Page: 57 58
+57 57 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51
+b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28
+b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.)
+35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0
+1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g
+(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h
+(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0
+2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h
+(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18
+b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e
+(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c
+(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0
+2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g
+(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j
+(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o
+(an)o(e/)1905 5381 y Fq(57)p eop
+%%Page: 58 59
+58 58 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6 b(,)24
+b(36)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6 b(,)24
+b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0 1713
+y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021 y(enumeration)i
+(types,)f(35)0 2217 y(image)f(data)g(format,)g(8)0 2413
+y(mailing)h(list,)e(42)0 2609 y(netw)o(ork)i(authorization,)i(40)0
+2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031
+y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031
+V 36 w(Array)-6 b(,)23 b(38)0 3227 y(passw)o(ord,)i(22)0
+3340 y(pointer)l(,)g(35)0 3453 y(pre)n(vie)n(w)f(mode,)f(32)0
+3649 y(resolution)j(option,)f(32)0 3845 y(SANE)p 244
+3845 V 31 w(Action,)f(24)0 3957 y(SANE)p 244 3957 V 31
+w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12
+b(ALUE,)20 b(24)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p
+616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21
+b(24)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616
+4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(24)0
+4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296
+V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0
+4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(35)0 4635
+y(sane)p 165 4635 V 34 w(cancel,)h(28)0 4748 y(SANE)p
+244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19
+b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V
+32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p
+244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19
+b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V
+32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095
+1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h
+(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125
+V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095
+1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p
+2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p
+2339 1351 V 31 w(Char)l(,)k(14,)f(35)2095 1463 y(sane)p
+2260 1463 V 35 w(close,)h(23)2095 1576 y(SANE)p 2339
+1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095
+1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689
+V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31
+w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V
+31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915
+V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095
+2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028
+V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095
+2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V
+35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p
+2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339
+2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480
+V 35 w(e)o(xit,)f(22)2095 2593 y(SANE)p 2339 2593 V 31
+w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V
+31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095
+2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32
+w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095
+3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(26)2095 3157
+y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(26)
+2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270
+V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(26)2095 3383 y(SANE)p
+2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(26)2095
+3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31
+w(RED,)f(10,)h(26)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p
+2685 3609 V 31 w(RGB,)f(9,)h(26)2095 3722 y(sane)p 2260
+3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095
+3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p
+2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p
+2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(26)2095
+4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p
+2643 4060 V 35 w(fd,)d(29)2095 4173 y(SANE)p 2339 4173
+V 31 w(Handle,)h(15,)g(35)2095 4286 y(SANE)p 2339 4286
+V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(25)2095
+4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32
+w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(25)2095 4512
+y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32 w(RELO)m(AD)p
+2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(25)2095 4625 y(sane)p
+2260 4625 V 35 w(init,)j(19)2095 4738 y(SANE)p 2339 4738
+V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851 V 31 w(NET)p
+2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(40)2095 4964 y(SANE)p
+2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(40)2095
+5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(37)1905
+5381 y(58)p eop
+%%Page: 59 60
+59 59 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(NET)p
+453 123 V 32 w(CONTR)l(OL)p 913 123 V 30 w(OPTION,)21
+b(38)0 236 y(SANE)p 244 236 V 31 w(NET)p 453 236 V 32
+w(EXIT)-7 b(,)21 b(41)0 349 y(SANE)p 244 349 V 31 w(NET)p
+453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(37)0 462
+y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p 663
+462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(38)0
+574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p
+663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(39)0 687 y(SANE)p
+244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(36)0
+800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(37)0
+913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8
+b(AR)j(T)e(,)19 b(39)0 1026 y(sane)p 165 1026 V 34 w(open,)24
+b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139
+V 34 w(Descriptor)l(,)i(16)0 1252 y(SANE)p 244 1252 V
+31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21
+b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365
+V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0
+1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(26)0
+1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p
+165 1704 V 34 w(read,)g(27)0 1817 y(sane)p 165 1817 V
+34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0
+1929 y(sane)p 165 1929 V 34 w(start,)g(27)0 2042 y(SANE)p
+244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155
+V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p
+975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268
+V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19
+b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p
+603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21
+b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p
+603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21
+b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p
+603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720
+V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15)0
+2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833
+V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31
+w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32
+w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8
+b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171
+y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V
+30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p
+244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p
+765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397
+V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5
+b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24
+b(14,)f(35)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496
+3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34
+w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21
+b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962
+V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p
+504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244
+4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301
+y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10
+b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504
+4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526
+V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p
+244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V
+31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p
+493 4865 V 32 w(BIT)-7 b(,)22 b(18)0 4978 y(SANE)p 244
+4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(18)0 5091 y(SANE)p
+244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(18)2095
+123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(18)2095
+236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(18)2095
+349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7
+b(,)20 b(18)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p
+2588 462 V 32 w(PIXEL,)h(18)2095 574 y(SANE)p 2339 574
+V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(17)2095
+687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31
+w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p
+2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913
+V 31 w(W)-7 b(ord,)24 b(12,)f(35)2095 1026 y(scan)i(area)f(options,)h
+(32)2095 1139 y(scan)g(resolution,)h(32)2095 1252 y(structure,)g(36)
+2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095
+1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(36)2095
+1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095
+2374 y(well-kno)n(wn)h(options,)g(31)1905 5381 y(59)p
+eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/sane2/0.05/sane2-0.05.tex.gz b/sane2/0.05/sane2-0.05.tex.gz
new file mode 100644
index 00000000..9fad3a31
--- /dev/null
+++ b/sane2/0.05/sane2-0.05.tex.gz
@@ -0,0 +1,2664 @@
+\documentclass[11pt,DVIps]{report}
+
+\usepackage{times,epsfig,changebar,html}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex}
+\setlength{\textwidth}{6.5in}
+\setlength{\textheight}{8.5in}
+\setlength{\marginparwidth}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\marginparsep}{0pt}
+\addtolength{\topmargin}{-0.75in}
+
+\title{\huge SANE Standard Version 2.0 proposal 0.05 - rauch/beck}
+\author{}
+\date{May 14, 2002}
+
+\makeindex
+
+\begin{document}
+
+\newcommand{\filename}[1]{{\tt #1}}
+\newcommand{\code}[1]{{\tt #1}}
+\newcommand{\var}[1]{{\it #1}}
+\newcommand{\defn}[1]{#1\index{#1}}
+
+\begin{latexonly}
+ \setcounter{changebargrey}{0} % black change bars
+\end{latexonly}
+
+\maketitle
+\tableofcontents
+\listoffigures
+\listoftables
+
+
+\chapter{Preface}
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+\ref{chap:contact}.
+
+The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+\section{About This Document}
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+The remainder of this document is organized as follows.
+Chapter~\ref{chap:intro} provides introductional material.
+Chapter~\ref{chap:environ} presents the environment SANE is designed
+for. Chapter~\ref{chap:api} details the SANE Application Programmer
+Interface. Chapter~\ref{chap:net} specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter~\ref{chap:contact} gives information on how
+to join the SANE development process.
+
+\subsection{Typographic Conventions}
+
+Changes since the last revision of this document are highlighted
+like this:
+
+% \begin{changebar}
+% Paragraphs that changed since the last revision of the documention
+% are marked like this paragraph.
+% \end{changebar}
+
+\chapter{Introduction}\label{chap:intro}
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+\section{Terminology}
+
+An application that uses the SANE interface is called a SANE {\em
+ frontend}. A driver that implements the SANE interface is called a
+SANE {\em backend}. A {\em meta backend\/} provides some means to
+manage one or more other backends.
+
+
+\chapter{The SANE Environment}\label{chap:environ}
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE {\em option\/}. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+\code{brightness} whose value is an integer in the range from 0 to
+255.
+
+With self-describing options, a backend need not be concerned with
+{\em presentation\/} issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the {\em meaning\/} of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+\section{Attaching to a SANE backend}
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+\begin{itemize}
+
+\item {\bf Static linking:} A SANE backend may be linked directly into
+ a frontend. While the simplest method of attaching to a backend, it
+ is somewhat limited in functionality since the available devices is
+ limited to the ones for which support has been linked in when the
+ frontend was built. But even so static linking can be quite useful,
+ particularly when combined with a backend that can access scanners
+ via a network. Also, it is possible to support multiple backends
+ simultaneously by implementing a meta backend that manages several
+ backends that have been compiled in such a manner that they export
+ unique function names. For example, a backend called \code{be}
+ would normally export a function called \code{sane\_read()}. If
+ each backend would provide such a function, static linking would
+ fail due to multiple conflicting definitions of the same symbol.
+ This can be resolved by having backend \code{be} include a
+ header file that has lines of the form:
+ \begin{quote}
+\begin{verbatim}
+#define sane_read be_sane_read
+\end{verbatim}
+ \end{quote}
+ With definitions of this kind, backend \code{be} will export
+ function name \code{be\_sane\_read()}. Thus, all backends will
+ export unique names. As long as a meta backend knows about these
+ names, it is possible to combine several backends at link time and
+ select and use them dynamically at runtime.
+
+\item {\bf Dynamic linking:} A simpler yet more powerful way to
+ support multiple backends is to exploit dynamic linking on platforms
+ that support it. In this case, a frontend is linked against a
+ shared library that implements any SANE backend. Since each
+ dynamically linked backend exports the same set of global symbols
+ (all starting with the prefix \code{sane\_}), the dynamic library
+ that gets loaded at runtime does not necessarily have to be the same
+ one as one the frontend got linked against. In other words, it is
+ possible to switch the backend by installing the appropriate backend
+ dynamic library.
+
+ More importantly, dynamic linking makes it easy to implement a meta
+ backend that loads other backends {\em on demand}. This is a
+ powerful mechanism since it allows adding new backends merely by
+ installing a shared library and updating a configuration file.
+
+\item {\bf Network connection:} Arguably the ultimate way to attach to
+ a scanner is by using the network to connect to a backend on a
+ remote machine. This makes it possible to scan images from any host
+ in the universe, as long as there is a network connection to that
+ host and provided the user is permitted to access that scanner.
+
+\end{itemize}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth}
+ \caption{Example SANE Hiearchy}
+ \label{fig:hierarchy}
+ \end{center}
+\end{figure}
+
+The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine
+A uses a dynamic-linking based meta backend called \code{dll} to
+access the backends called \code{pnm}, \code{mustek}, and \code{net}.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called \code{saned}. The \code{saned} in
+turn has access to the \code{hp} and \code{autolum} backends through
+another instance of the \code{dll} backend. The \code{autolum} meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called \code{qcam}.
+
+Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+\section{Image Data Format}\label{sec:imageformat}\index{image data format}
+
+Arguably the most important aspect of an image acquisition system is
+how images are represented. The SANE approach is to define a simple
+yet powerful representation that is sufficient for vast majority of
+applications and devices. While the representation is simple, the
+interface has been defined carefully to allow extending it in the
+future without breaking backwards compatibility. Thus, it will be
+possible to accommodate future applications or devices that were not
+anticipated at the time this standard was created.
+
+A SANE image is a rectangular area. The rectangular area is
+subdivided into a number of rows and columns. At the intersection of
+each row and column is a (preferable quadratic) pixel. A pixel consists
+of one or more sample values. Each sample value represents one channel
+(e.g., the red channel). Each sample value has a certain bit depth.
+The bit depth is fixed for the entire image and can be as small as one
+bit. Valid bit depths are 1, 8, or 16 bits per sample. If a device's
+natural bit depth is something else, it is up to the driver to scale
+the sample values appropriately (e.g., a 4 bit sample could be scaled
+by a factor of four to represent a sample value of depth 8).
+
+\subsection{Image Transmission}
+
+The SANE API transmits an image as a sequence of frames. Each frame
+covers the same rectangular area as the entire image, but may contain
+only a subset of the channels in the final image. For example, a
+red/green/blue image could either be transmitted as a single frame
+that contains the sample values for all three channels or it could be
+transmitted as a sequence of three frames: the first frame containing
+the red channel, the second the green channel, and the third the blue
+channel.
+
+\begin{changebar}
+There are two different types of transmission: pixel oriented data or
+arbitary data.
+\end{changebar}
+
+Conceptually, each pixel oriented frame is transmitted
+a byte at a time. Each byte may contain 8 sample values (for an image
+bit depth of 1), one full sample value (for an image bit depth of 8),
+or a partial sample value (for an image bit depth of 16 or bigger).
+In the latter case, the bytes of each sample value are transmitted in
+the machine's native byte order.
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+\end{quote}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/xfer.eps,width=0.5\textwidth}
+ \caption{Transfer order of image data bytes}
+ \label{fig:xfer}
+ \end{center}
+\end{figure}
+
+The order in which the sample values in a frame are transmitted is
+illustrated in Figure~\ref{fig:xfer}. As can be seen, the values are
+transmitted row by row and each row is transmitted from left-most to
+right-most column. The left-to-right, top-to-bottom transmission
+order applies when the image is viewed in its normal orientation (as
+it would be displayed on a screen, for example).
+
+If a frame contains multiple channels, then the channels are
+transmitted in an interleaved fashion. Figure~\ref{fig:pixels}
+illustrates this for the case where a frame contains a complete
+red/green/blue image with a bit-depth of 8. For a bit depth of 1,
+each byte contains 8 sample values of a {\em single\/} channel. In
+other words, a bit depth 1 frame is transmitted in a byte interleaved
+fashion.
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/image-data.eps,width=0.8\textwidth}
+ \caption{Bit and byte order of image data}
+ \label{fig:pixels}
+ \end{center}
+\end{figure}
+
+When transmitting an image frame by frame, the frontend needs to know
+what part of the image a frame represents (and how many frames it
+should expect). For that purpose, the SANE API tags every frame with
+a type and a format descriptor.
+
+It also is possible to transmit arbitary (not necessaryly pixel oriented)
+data. This e.g. allows transmission of compressed images like jpeg, tiff, etc.
+
+This version of the SANE standard supports the following frame types:
+\begin{quote}
+\begin{description}
+\begin{changebar}
+
+\item[\code{\defn{SANE\_FRAME\_RAW}}:] The frame contains one
+ or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the
+ individual pixels that is subject to further description
+ in the \code{formatdesc} member of the \code{SANE\_Parameters}
+ structured type. The complete image may consist of several
+ channels, the number of channels is defined by member
+ \code{channels\_per\_image} of \code{SANE\_Parameters}.
+ The image may be transmitted in an arbitary number of
+ frames which can be determined by watching the \code{last\_frame}
+ flag in said type (or by counting the channels).
+ Note: This frame type replaces all frame types of the SANE standard version 1.
+
+\item[\code{\defn{SANE\_FRAME\_MIME}}:] The frame contains
+ arbitrary data of the MIME (see RFC 1521/1522) type that
+ is given in the \code{formatdesc} member of the
+ \code{SANE\_Parameters} structured type.
+ As such, it is assumed to be incomprehensible to the
+ frontend, except for selected types the frontend is
+ specifically capable of handling internally.
+ The frontend is free to ignore those frames, or employ
+ any appropriate means to otherwise handle this data
+ (like saving them to disk or spawning an external viewer).
+
+\item
+ The following frame types are part of the SANE standard version 1.
+ Backends that claim to be conform to the SANE standard version 2 are
+ not allowed to use these frame types.
+ A frontend can decide to support version 1 backends and version 2
+ backends. It is desirable to create a meta backend with
+ a frontend part conform to the SANE standard version 1 and
+ a backend part conform to the SANE standard version 2 (so all
+ version 2 frontends can connect to version 1 backends).
+ A version 1 backend does use the following frame types:
+
+\begin{description}
+
+\item[\code{\defn{SANE\_FRAME\_GRAY}}:] This is a frame type from
+ SANE standard version 1. Backends that claim to be conform to
+ the SANE standard version 2 are not allowed to use this frame type.
+ The frame contains a single channel of data that represents sample
+ values from a spectral band that covers the human visual range.
+ The image consists of this frame only.
+
+\item[\code{\defn{SANE\_FRAME\_RGB}}:] This is a frame type from
+ SANE standard version 1. Backends that claim to be conform to
+ the SANE standard version 2 are not allowed to use this frame type.
+ The frame contains three channels of data that represent sample
+ values from the red, green, and blue spectral bands. The sample
+ values are interleaved in the order red, green, and blue.
+ The image consists of this frame only.
+
+\item[\code{\defn{SANE\_FRAME\_RED}}:] This is a frame type from
+ SANE standard version 1. Backends that claim to be conform to
+ the SANE standard version 2 are not allowed to use this frame type.
+ The frame contains one channel of data that represents sample
+ values from the red spectral band. The complete image consists
+ of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN},
+ and \code{SANE\_FRAME\_BLUE}. The order in which the frames are
+ transmitted chosen by the backend.
+
+\item[\code{\defn{SANE\_FRAME\_GREEN}}:] This is a frame type from
+ SANE standard version 1. Backends that claim to be conform to
+ the SANE standard version 2 should not use this frame type.
+ The frame contains one channel of data that represents sample
+ values from the green spectral band. The complete image consists
+ of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN},
+ and \code{SANE\_FRAME\_BLUE}. The order in which the frames are
+ transmitted chosen by the backend.
+
+\item[\code{\defn{SANE\_FRAME\_BLUE}}:] This is a frame type from
+ SANE standard version 1. Backends that claim to be conform to
+ the SANE standard version 2 should not use this frame type.
+ The frame contains one channel of data that represents sample
+ values from the blue spectral band. The complete image consists
+ of three frames: \code{SANE\_\-FRAME\_RED}, \code{SANE\_FRAME\_GREEN},
+ and \code{SANE\_FRAME\_BLUE}. The order in which the frames are
+ transmitted chosen by the backend.
+
+\end{description}
+\end{changebar}
+
+
+\end{description}
+\end{quote}
+
+When the bit depth is 1 there are only two sample values possible,
+1 represents minimum intensity (black) and 0 represents maximum
+intensity (white). For all other bit depths a sample value of 0
+represents minimum intensity and larger values represent increasing
+intensity.
+
+
+\chapter{The SANE Application Programmer Interface (API)}\label{chap:api}
+
+\begin{changebar}
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called \filename{sane/sane-2.h}. This file should
+normally be included via a C pre-processor directive of the form:
+\begin{verbatim}
+ #include
+\end{verbatim}
+\end{changebar}
+
+
+\section{Version Control}
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+The SANE API provides the following five macros to manage version
+numbers.
+\begin{quote}
+ \begin{description}
+ \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+ \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:]
+ \label{sec:saneversioncode}
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (\var{maj}), the minor version number \var{min},
+ and the build revision of a backend (\var{bld}). The major and
+ minor version numbers must be in the range 0\ldots255 and the
+ build revision must be in the range 0\ldots65535.
+
+ Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the
+ major version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the
+ minor version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the
+ build revision component of the version code passed in argument
+ \var{vc}.
+ \end{description}
+\end{quote}
+
+
+\section{Data Types}
+
+\subsection{Base Types}
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+\begin{quote}
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};}
+\end{quote}
+\verb|SANE_Byte| must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. \verb|SANE_Word| must be
+capable of holding any of the following:
+\begin{itemize}
+ \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE|
+ \item signed integers in the range $-2^{31}\ldots2^{31}-1$
+ \item fixed point values in the range $-32768\ldots32767.9999$ with
+ a resolution of $1/65536$
+ \item 32 bits (for bit sets)
+\end{itemize}
+Note that the SANE standard does not define what C type
+\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some
+platforms, the latter may map to \verb|long int| whereas on others it
+may map to \verb|int|. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+\subsection{Boolean Type}
+
+\code{\defn{SANE\_Bool}} is used for variables that can take one of
+the two truth values \code{\defn{SANE\_FALSE}} and
+\code{\defn{SANE\_TRUE}}. The former value is defined to be 0,
+whereas the latter is 1.\footnote{This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.} The C
+declarations for this type are given below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Bool| whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+\subsection{Integer Type}
+
+\code{\defn{SANE\_Int}} is used for variables that can take integer
+values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is
+given below.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Word SANE_Int;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Int| whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+\subsection{Fixed-point Type}
+
+\code{\defn{SANE\_Fixed}} is used for variables that can take fixed
+point values in the range $-32768$ to $32767.9999$ with a resolution
+of $1/65535$. The C declarations relating to this type are given
+below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+\end{verbatim}
+\end{quote}
+The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of $1/65536$.
+
+Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Fixed| whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE
+ fixed-point value that is smaller than the double value \var{d}.
+ No range checking is performed. If the value of \var{d} is out of
+ range, the result is undefined.
+
+ \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest
+ double machine number that corresponds to fixed-point value
+ \var{w}.
+
+ \end{description}
+\end{quote}
+SANE does {\em not\/} require that the following two expressions hold
+true (even if the values of \var{w} and \var{d} are in range):
+\begin{quote}
+\begin{verbatim}
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+\end{verbatim}
+\end{quote}
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+\subsection{Text}
+
+\subsubsection{Character Type}
+
+Type \code{\defn{SANE\_Char}} represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+\verb|char| type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+\verb|sizeof(SANE_Char)==sizeof(char)|.
+\begin{quote}
+\begin{verbatim}
+typedef char SANE_Char;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{String Type}
+
+Type \code{\defn{SANE\_String}} represents a text string as a sequence
+of C \verb|char| values. The end of the sequence is indicated by a
+\verb|'\0'| (\defn{NUL}) character.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+\end{verbatim}
+\end{quote}
+The type \code{\defn{SANE\_String\_Const}} is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+\begin{quote}
+\begin{verbatim}
+const SANE_String str;
+\end{verbatim}
+\end{quote}
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+\subsection{Scanner Handle Type}
+
+Access to a scanner is provided through an opaque type called
+\code{\defn{SANE\_Handle}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef void *SANE_Handle;
+\end{verbatim}
+\end{quote}
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a \verb|SANE_Handle|. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+\subsection{Status Type}
+
+Most SANE operations return a value of type \code{\defn{SANE\_Status}}
+to indicate whether the completion status of the operation. If an
+operation completes successfully, \verb|SANE_STATUS_GOOD| is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table \ref{tab:status}. It is recommended to use function
+\code{sane\_strstatus()} to convert status codes into a legible
+string.
+
+\begin{table}[htbp]
+ \begin{center}
+ \begin{tabular}{|l|r|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} &
+ \multicolumn{1}{c|}{\bf Description} \\
+ \hline\hline
+\code{\defn{SANE\_STATUS\_GOOD}}
+ & 0 & Operation completed succesfully. \\
+\code{\defn{SANE\_STATUS\_UNSUPPORTED}}
+ & 1 & Operation is not supported. \\
+\code{\defn{SANE\_STATUS\_CANCELLED}}
+ & 2 & Operation was cancelled. \\
+\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}}
+ & 3 & Device is busy---retry later. \\
+\code{\defn{SANE\_STATUS\_INVAL}}
+ & 4 & Data or argument is invalid. \\
+\code{\defn{SANE\_STATUS\_EOF}}
+ & 5 & No more data available (end-of-file). \\
+\code{\defn{SANE\_STATUS\_JAMMED}}
+ & 6 & Document feeder jammed. \\
+\code{\defn{SANE\_STATUS\_NO\_DOCS}}
+ & 7 & Document feeder out of documents. \\
+\code{\defn{SANE\_STATUS\_COVER\_OPEN}}
+ & 8 & Scanner cover is open. \\
+\code{\defn{SANE\_STATUS\_IO\_ERROR}}
+ & 9 & Error during device I/O. \\
+\code{\defn{SANE\_STATUS\_NO\_MEM}}
+ & 10 & Out of memory. \\
+\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}}
+ & 11 & Access to resource has been denied. \\
+ \hline
+ \end{tabular}
+ \caption{Status Codes}\label{tab:status}
+ \end{center}
+\end{table}
+
+
+\subsection{Device Descriptor Type}
+\begin{changebar}
+
+Each SANE device is represented by a structure of type
+\code{\defn{SANE\_Device}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+\index{device-name}
+The structure provides the unique name of the scanner in member
+\code{name}. It is this unique name that should be passed in a call
+to \code{sane\_open()}. The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is {\em recommended\/} that backends keep
+unique names below 32 characters in length. However, applications
+{\em must\/} be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members \code{vendor}, \code{model}, and \code{type} are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \hspace{\fill}
+ \begin{tabular}[t]{|ll|}
+ \hline
+ \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\
+ \hline\hline
+ \code{AGFA} & \code{Microtek} \\
+ \code{Abaton} & \code{Minolta} \\
+ \code{Acer} & \code{Mustek} \\
+ \code{Apple} & \code{NEC} \\
+ \code{Artec} & \code{Nikon} \\
+ \code{Avision} & \code{Plustek} \\
+ \code{CANON} & \code{Polaroid} \\
+ \code{Connectix} & \code{Ricoh} \\
+ \code{Epson} & \code{Sharp} \\
+ \code{Fujitsu} & \code{Siemens} \\
+ \code{Hewlett-Packard} & \code{Tamarack} \\
+ \code{IBM} & \code{UMAX} \\
+ \code{Kodak} & \code{Noname} \\
+ \code{Logitech} & \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \begin{tabular}[t]{|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\
+ \hline\hline
+ \code{film scanner} \\
+ \code{flatbed scanner} \\
+ \code{frame grabber} \\
+ \code{handheld scanner} \\
+ \code{multi-function peripheral} \\
+ \code{sheetfed scanner} \\
+ \code{still camera} \\
+ \code{video camera} \\
+ \code{virtual device} \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \caption{Predefined Device Information Strings}
+ \label{tab:devinfo}
+ \end{center}
+\end{table}
+Note that vendor string \code{Noname} can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+\begin{changebar}
+The backend has to set up the string \code{email\_backend\_author}
+with the email address of the backend author or a contact person.
+
+The backend should fill the string \code{device\_location} with a
+text that describes where a user can find this device, the text
+should be read from the backend config file.
+
+The string \code{comment} can be used to display any comment to the user,
+the text should be read from the backend config file.
+
+The string \code{reserved\_string} is planed for future use, the backend
+has to set this string to "".
+
+With member \code{backend\_version\_code} a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+The member \code{backend\_capability\_flags} contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+The member \code{reserved\_int} is planned for future use, the backend has
+to set the value of the integer to 0.
+\end{changebar}
+
+\subsection{Option Descriptor Type}\label{sec:odesc}
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+\code{\defn{SANE\_Option\_Descriptor}} type is given below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{Option Name}
+
+Member \code{name} is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (\code{a}--\code{z}),
+digits (\code{0}--\code{9}), or the dash character (\code{-}) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+\subsubsection{Option Title}
+
+Member \code{title} is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+\subsubsection{Option Description}
+
+Member \code{desc} is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+\subsubsection{Option Value Type}
+
+Member \code{type} specifies the type of the option value. The
+possible values for type \code{\defn{SANE\_Value\_Type}} are described
+in Table \ref{tab:valuetype}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|p{0.6\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type
+ \verb|SANE_Bool|. \\
+
+\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type
+ \verb|SANE_Int|. \\
+
+\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type
+ \verb|SANE_Fixed|. \\
+
+\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type
+ \verb|SANE_String|. \\
+
+\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. \\
+
+\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members \code{title} and
+\code{type} are valid in the option descriptor. \\
+
+ \hline
+ \end{tabular}
+ \caption{Option Value Types (\code{SANE\_Value\_Type})}
+ \label{tab:valuetype}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Unit}
+
+Member \code{unit} specifies what the physical unit of the option
+value is. The possible values for type \code{\defn{SANE\_U\-nit}} are
+described in Table \ref{tab:units}. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\
+\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\
+\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\
+\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\
+\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\
+\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\
+\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\
+
+\hline
+ \end{tabular}
+ \caption{Physical Units (\code{SANE\_Unit})}
+ \label{tab:units}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Size}\label{sec:valuesize}
+
+Member \code{size} specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+\begin{quote}
+ \begin{description}
+ \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating \code{NUL} character is considered to be part of the
+ string. Note that the terminating \code{NUL} character must
+ always be present in string option values.
+ \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size
+ must be a positive integer multiple of the size of a
+ \verb|SANE_Word|. The option value is a vector of length
+ \[ \code{size}/\code{sizeof(SANE\_Word)}. \]
+ \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to
+ \code{sizeof(SANE\_Word)}.
+ \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The
+ option size is ignored.
+ \end{description}
+\end{quote}
+
+\subsubsection{Option Capabilities}
+
+Member \code{cap} describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table \ref{tab:capabilities}. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro
+ returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is currently active.
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This
+ macro returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is software settable.
+ \end{description}
+\end{quote}
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.59\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option
+ value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\
+
+\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both
+ simultaneously). \\
+
+\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option
+ value can be detected by software. If
+ \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/}
+ be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability
+ may or may not be set. If this capability is set but neither
+ \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT}
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. \\
+
+\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. \\
+
+\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling \code{sane\_control\_option()}
+ with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\
+
+\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). \\
+
+\code{\defn{SANE\_CAP\_ADVANCED}} & 64 &
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option.'' A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ \\
+
+\hline
+ \end{tabular}
+ \caption{Option Capabilities}
+ \label{tab:capabilities}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Constraints}
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member \code{constraint\_type} indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member \code{constraint}. The possible values of type
+\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the
+\code{constraint} union is described in Table~\ref{tab:constraints}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. \\
+
+ \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member \code{constraint.range} points to
+ a range of the type \code{\defn{SANE\_Range}}. This type is illustrated
+ below:
+ \begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+\end{verbatim}
+ \end{quote}
+ All three members in this structure are interpreted according to the
+ option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|).
+ Members \code{min} and \code{max} specify the minimum and maximum
+ values, respectively. If member \code{quant} is non-zero, it
+ specifies the quantization value. If $l$ is the minimum value, $u$
+ the maximum value and $q$ the (non-zero) quantization of a range,
+ then the legal values are $v=k\cdot q+l$ for all non-negative
+ integer values of $k$ such that $v<=u$. \\
+
+\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ \code{constraint.word\_list} points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (\verb|SANE_Int|) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\
+
+\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated
+ list of strings that enumerate the legal values for the option
+ value.
+\\\hline
+ \end{tabular}
+ \caption{Option Value Constraints}
+ \label{tab:constraints}
+ \end{center}
+\end{table}
+
+
+\subsection{Internationlization}\label{sec:i18n}
+\begin{changebar}
+All backend texts should preferable be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+\subsubsection{How is a text marked for translation}
+
+The keyword \code{SANE\_I18N} is used to mark a text for translation.
+\code{SANE\_I18N} has to be defined as a dummy prototype:
+
+ \begin{quote}
+\begin{verbatim}
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+\end{verbatim}
+ \end{quote}
+
+You should not mark prototypes or variables with \code{SANE\_I18N}
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and
+variables (\verb|SANE_I18N(option[7].name)|).
+
+A correct marked text can look like this:\\
+\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\
+or\\
+\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\
+It also is allowed to mark texts in structs because the
+prototype \code{SANE\_I18N} has no effect to the compiler.
+
+\subsubsection{Which texts shall be marked for translation?}
+All option texts that are visible for the user should be marked for
+translation. This is:
+\begin{itemize}
+\item
+member \code{title}
+\item
+member \code{desc}
+\item
+member \code{string\_list}
+\end{itemize}
+of \code{SANE\_Option\_Descriptor}.
+
+It is not allowed to mark/translate memeber \code{name}.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+\subsubsection{File formats and translation functions}
+The recommended file formats for translation tables are the \code{po} files
+and \code{mo} or \code{gmo} files.
+The po file contains the original text marked with the keyword \code{msgid}
+and the translated text marked with the keyword \code{msgstr}.
+A \code{po} file that contains all needed \code{msgid}s can be created
+e.g. by the gnu gettext tool \verb|xgettext| with the option
+\verb|-k SANE_I18N|.
+The translator adds the translated texts to the \code{po} files.
+The gettext tool \code{msgfmt} converts the \code{po} files to the
+\code{mo} or \code{gmo} files.\\
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function \code{gettext}
+to translate the texts. This e.g. can look like this:\\
+\verb|snprintf(buf, sizeof(buf), gettext("english text"));|
+
+If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the \code{po} files to create its
+own translation tables from it.\\
+
+Note that it is strongly recommended to use the gettext tools.
+\end{changebar}
+
+
+\section{Operations}
+
+\subsection{\code{sane\_init}}
+
+This function must be called before any other SANE function can be
+called. The behavior of a SANE backend is undefined if this function
+is not called first. The version code of the backend is returned in
+the value pointed to by \code{version\_code}. If that pointer is
+\code{NULL}, no version code is returned.
+ Argument \code{authorize} is either a pointer to a function that is
+ invoked when the backend requires authentication for a specific
+ resource or \code{NULL} if the frontend does not support
+ authentication.
+\begin{quote}\index{sane\_init}
+\begin{verbatim}
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+\end{verbatim}
+\end{quote}
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+\begin{quote}
+ \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start}
+\end{quote}
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+\begin{quote}\index{SANE\_Authorization\_Callback}
+ \index{domain}\index{username}\index{password}
+\begin{verbatim}
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+\end{verbatim}
+\end{quote}
+Three arguments are passed to the authorization function:
+\code{resource} is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The \code{username}
+and \code{password} arguments are (pointers to) an array of
+\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN}
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+{\em must\/} be ASCII-NUL terminated.
+
+\subsection{\code{sane\_exit}}
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to \code{sane\_clo\-se()}, but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than \code{sane\_init()} may be called (regardless
+of the status value returned by \code{sane\_exit()}. Neglecting to
+call this function may result in some resources not being released
+properly.
+\begin{quote}\index{sane\_exit}
+\begin{verbatim}
+void sane_exit (void);
+\end{verbatim}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_devices}}
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a \code{NULL} terminated array of pointers to \verb|SANE_Device|
+structures in \code{*device\_list}. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to \code{sane\_exit()} is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument \code{local\_only} is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+\begin{quote}\index{sane\_get\_devices}
+\begin{verbatim}
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+\end{verbatim}
+\end{quote}
+
+This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an
+insufficient amount of memory is available.
+
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ SANE does not require that this function is called before a
+ \code{sane\_open()} call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+\begin{changebar}
+ The same informtation about
+ a device has to be returned when \code{sane\_open} is called.
+\end{changebar}
+\end{quote}
+
+
+\subsection{\code{sane\_open}}
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+\code{name}. If the call completes successfully, a handle for the
+device is returned in \code{*h}.
+\begin{changebar}
+The description of the device
+is returned in \code{**device\_description}. This is the
+same description that is returned in the list by \code{sane\_get\_devices}.
+The returned data \code{*h} and \code{*device\_description} is guaranteed
+to remain unchanged and valid until a call to \code{sane\_close()}
+is performed.
+\end{changebar}
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+\begin{quote}\index{sane\_open}
+\begin{verbatim}
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h, const SANE_Device ** device_description);
+\end{verbatim}
+\end{quote}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently
+ busy (in use by somebody else).
+\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_close}}
+
+This function terminates the association between the device handle
+passed in argument \code{h} and the device it represents. If the
+device is presently active, a call to \code{sane\_cancel()} is
+performed first. After this function returns, handle \code{h} must
+not be used anymore.
+
+\begin{quote}\index{sane\_close}
+\begin{verbatim}
+void sane_close (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_get\_option\_descriptor}}
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number \code{n} of the device
+represented by handle \code{h}. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle \code{h} (the count
+includes option 0). If $n$ is not a valid option index, the function
+returns \code{NULL}. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+\begin{quote}\index{sane\_get\_option\_descriptor}
+\begin{verbatim}
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_control\_option}}\label{sec:control}
+
+This function is used to set or inquire the current value of option
+number \code{n} of the device represented by handle \code{h}. The
+manner in which the option is controlled is specified by parameter
+\code{a}. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+\code{v}. It is a pointer to the memory that holds the option value.
+The memory area pointed to by \code{v} must be big enough to hold the
+entire option value (determined by member \code{size} in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument \code{v} may be shorter since the backend will stop
+reading the option value upon encountering the first \code{NUL}
+terminator in the string. If argument \code{i} is not \code{NULL},
+the value of \code{*i} will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+\begin{quote}\index{sane\_control\_option}
+\begin{verbatim}
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+\end{verbatim}
+\end{quote}
+
+The way the option is affected by a call to this function is
+controlled by parameter \code{a} which is a value of type
+\code{\defn{SANE\_Action}}. The possible values and their meaning is
+described in Table~\ref{tab:actions}.
+
+\begin{table}[h]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\
+
+\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The
+ option value passed through argument \code{v} may be modified by the
+ backend if the value cannot be set exactly. \\
+
+\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter \code{v} is completely ignored in this case and
+ may be \code{NULL}. \\
+
+\hline
+ \end{tabular}
+ \caption{Action Values (\code{SANE\_Action})}
+ \label{tab:actions}
+ \end{center}
+\end{table}
+
+After setting a value via an action value of
+\verb|SANE_ACTION_SET_VALUE|, additional information on how well the
+request has been met is returned in \code{*i} (if \code{i} is
+non-\code{NULL}). The returned value is a bitset that may contain any
+combination of the values described in Table~\ref{tab:info}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in \code{*i} has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an
+ option may affect the value or availability of one or more {\em
+ other\/} options. When this happens, the SANE backend sets this
+ member in \code{*i} to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may
+ affect the parameter values (see \code{sane\_get\_parameters()}).
+ If setting an option affects the parameter values, this member will
+ be set in \code{*i}. Note that this member may be set even if the
+ parameters did not actually change. However, it is guaranteed that
+ the parameters never change without this member being set. \\
+
+\hline
+ \end{tabular}
+ \caption{Additional Information Returned When Setting an Option}
+ \label{tab:info}
+ \end{center}
+\end{table}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not
+ supported for the specified handle and option number.
+\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+
+\subsection{\code{sane\_get\_parameters}}
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (\code{sane\_start()} has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+\code{sane\_start()} gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle \code{h} of the device for which the
+parameters should be obtained and a pointer \code{p} to a parameter
+structure. The parameter structure is described in more detail below.
+
+\begin{quote}\index{sane\_get\_parameters}
+\begin{verbatim}
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+\end{verbatim}
+\end{quote}
+
+The scan parameters are returned in a structure of type
+\code{\defn{SANE\_Parameters}}. The C declaration of this structure
+is given below.
+\begin{changebar}
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String formatdesc;
+ SANE_String proposed_filename;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+\end{verbatim}
+\end{quote}
+
+Member \code{format} specifies the format of the next frame to be
+returned. The possible values for type \code{\defn{SANE\_Frame}} are
+described in Table~\ref{tab:frameformat}. The meaning of these
+values is described in more detail in Section~\ref{sec:imageformat}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|c|c|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf SANE standard} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\
+\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\
+\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\
+\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\
+
+\hline
+ \end{tabular}
+ \caption{Frame Format (\code{SANE\_Frame})}
+ \label{tab:frameformat}
+ \end{center}
+\end{table}
+
+The \code{flags} member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+\begin{itemize}
+
+\item
+\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image). Note, that it is possible to transmit
+multiple images in succession.
+
+\item
+\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. It is permissible to set that value to 1 "in good
+faith", as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer (e.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at \code{sane\_start()}.
+
+\item
+\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+\item
+\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tell if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+\end{itemize}
+
+Note, that flags is compatibel to member \code{last\_frame} of
+\code{SANE\_Parameters} of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+
+
+
+Member \code{lines} specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call \code{sane\_read()} until it
+returns a status of \code{SANE\_STATUS\_EOF}.
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+
+Member \code{bytes\_per\_line} specifies the number of bytes that
+comprise one scan line.
+If bytes\_per\_line is set to 0, which can currently only be the case for
+\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line
+length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF}
+with an arbitrary block length. For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+
+Member \code{depth} specifies the number of bits per sample.
+Note, that only 0 (for not applicable), 1, and n*8 are allowed
+values. Data with other depths has to be scaled up accordingly.
+
+Member \code{pixels\_per\_line} specifies the number of pixels that
+comprise one scan line.
+
+Assume $B$ is the number of channels in the frame, then the bit depth
+$d$ (as given by member \code{depth}) and the number of pixels per
+line $n$ (as given by this member \code{pixels\_per\_line}) are
+related to $c$, the number of bytes per line (as given by member
+\code{bytes\_per\_line}) as follows:
+\[
+ c >= \left\{
+ \begin{array}{ll}
+ \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\
+ B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$}
+ \end{array}
+ \right.
+\]
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+Member \code{channels\_per\_image} specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+\code{channels\_per\_image} has to be the same for all frames for this image.
+
+Member \code{formatdesc} is used for the new frametypes
+\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs
+between the two types:
+
+\begin{itemize}
+\item
+\code{SANE\_FRAME\_RAW}:
+The \code{formatdesc} contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}".
+
+Channel interleaved data is described by a comma separated list of channel descriptions,
+e.g. "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}",
+the channel data is sent in the given order.
+
+The depth information does {\bf not} define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member \code{depth}.
+
+Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be \code{infrared} or
+a wavelength description like \code{1100nm}, but be aware that a
+frontend may not be able to display such channels with usefull colors.
+
+Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member \code{channels\_per\_image}.
+
+\item
+\code{SANE\_FRAME\_MIME}:
+The \code{formatdesc} contains the MIME type/subtype *(;parameter)
+fields as described in RFC 1521, 4. The Content-Type Header Field,
+without the prefixing "Content-Type:".
+Note, that it is discouraged to transfer proprietary file formats over
+SANE. If at all possible, please stick to the IANA assigned MIME types,
+and make sure the datastream is compliant with the corresponding
+specification.
+When data is transmitted with the framy type \code{SANE\_FRAME\_MIME}
+all data has to be transmitted whithin one frame, multiple frames
+are not allowed (so the flag \code{last\_frame} has to be set
+when using this frame type).
+A fully compliant SANE backend is required to transmit in either
+SANE native frametypes, or in a MIME type, for which a converting
+middleend exists and is freely available for all platforms.
+
+Other formats may be transmitted, but as the only thing the average
+frontend can do with them, is save them. This is not considered a
+good option, as it does not facilitate transmitting the data to a
+client application that may be running the frontend.
+However, if the data transferred by the backend is not an image in
+nature, it wouldn't make sense to try converting it anyway, so it is
+acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that
+case. But even then, try to stick to well known stuff with freely
+existing standards and viewers as well.
+\end{itemize}
+
+The member \code{proposed\_filename} can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to "".
+
+In the case of non-MIME frames, this is expected to hold the basename for
+the image, with the extension determined by the save function of the
+frontend, as the frontend can fully understand the data and is thus able
+to encode it in any format it wishes.
+
+For MIME frames it can contain either:
+
+\begin{itemize}
+\item
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+\item
+A complete filename, including extension.
+\end{itemize}
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+In any case, if the frontend makes use of this field, the frontend
+must mangle this proposal or the final filename it produces with
+its help to suit local filesystem restrictions.
+
+Special care should be taken not to cause security flaws this way.
+For Unix, that means killing out all path separators (/) [to avoid
+to save away stuff in obscure places or create critical files like
+/etc/hosts.allow] and avoiding to overwrite existing files.
+(Creating of leading dot files - like .rhosts - is not an issue here,
+as a) covers that).
+
+The string \code{proposed\_comment} can be used to transmit additional
+image data, that can be stored in the comment areas several fileformats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc.
+
+The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different
+resolutions of each image. It is not permissible to change resolution
+between frames of the same image.
+
+The member \code{reserved} is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+\end{changebar}
+
+
+\subsection{\code{sane\_start}}
+
+This function initiates aquisition of an image from the device
+represented by handle \code{h}.
+\begin{quote}\index{sane\_start}
+\begin{verbatim}
+SANE_Status sane_start (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The
+ operation should be retried later.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_read}}
+
+This function is used to read image data from the device represented
+by handle \code{h}. Argument \code{buf} is a pointer to a memory area
+that is at least \code{maxlen} bytes long. The number of bytes
+returned is stored in \code{*len}. A backend must set this to zero
+when the call fails (i.e., when a status other than
+\code{SANE\_STA\-TUS\_GOOD} is returned). When the call succeeds, the
+number of bytes returned can be anywhere in the range from 0 to
+\code{maxlen} bytes.
+\begin{quote}\index{sane\_read}
+\begin{verbatim}
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+\end{verbatim}
+\end{quote}
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle \code{h}.
+\begin{enumerate}
+\item If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+\item If the device is in non-blocking I/O mode, the call returns
+ immediately with status \code{SANE\_STA\-TUS\_GOOD} and with
+ \code{*len} set to zero.
+\end{enumerate}
+The I/O mode of handle \code{h} can be set via a call to
+\code{sane\_set\_io\_mode()}.
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the
+ current frame. If \code{sane\_read} sends back any image data it
+is not allowed to return with \code{SANE\_STATUS\_EOF}.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_cancel}}
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+\code{h}.
+\begin{quote}\index{sane\_cancel}
+\begin{verbatim}
+void sane_cancel (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function can be called at any time (as long as handle \code{h} is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does {\em not\/} imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been {\em initiated}. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must {\em not\/} call any other operation until the
+cancelled operation has returned.
+
+
+\subsection{\code{sane\_set\_io\_mode}}
+
+This function is used to set the I/O mode of handle \code{h}. The I/O
+mode can be either blocking or non-blocking. If argument \code{m} is
+\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise
+it's set to blocking mode.
+\begin{quote}\index{sane\_set\_io\_mode}
+\begin{verbatim}
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+\end{verbatim}
+\end{quote}
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_select\_fd}}
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle \code{h} that is readable if and only if image data is
+available (i.e., when a call to \code{sane\_read()} will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in \code{*fd}.
+\begin{quote}\index{sane\_get\_select\_fd}
+\begin{verbatim}
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+\end{verbatim}
+\end{quote}
+This function can be called only after a call to \code{sane\_start()}
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until \code{sane\_cancel()} or \code{sane\_start()} get called again
+or until \code{sane\_read()} returns with status
+\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call \code{sane\_read()}.
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+\code{SANE\_STATUS\_UNSUPPORTED}.
+
+Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using \code{select()}
+or \code{poll()} under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to \code{sane\_read()} is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_strstatus}}
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return \code{NULL}.
+The returned pointer is valid at least until the next call to this
+function is performed.
+\begin{quote}\index{sane\_strstatus}
+\begin{verbatim}
+const SANE_String_Const sane_strstatus (SANE_Status status);
+\end{verbatim}
+\end{quote}
+
+\section{Code Flow}\index{code flow}
+
+The code flow for the SANE API is illustrated in
+Figure~\ref{fig:flow}. Functions \code{sane\_init()} and
+\code{sane\_exit()} initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+\begin{figure}[htb]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/flow.eps,height=0.5\textheight}
+ \caption{Code flow}
+ \label{fig:flow}
+ \end{center}
+\end{figure}
+
+Function \code{sane\_get\_devices()} can be called any time after
+\code{sane\_init()} has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+Once a device has been chosen, it is opened using a call to
+\code{sane\_open()}. Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+An opened device can be setup through the corresponding device handle
+using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and
+\code{sane\_control\_option()}. While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle. However, as options are set, other options
+may become active or inactive. Thus, after setting an option, it
+maybe necessary to re-read some or all option descriptors. While
+setting up the device, it is also admissible to call
+\code{sane\_get\_parameters()} to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+The device handle can be put in blocking or non-blocking mode by a
+call to \code{sane\_set\_io\_mode()}. Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+After the device is setup properly, image acquisition can be started
+by a call to \code{sane\_start()}. The backend calculates the exact
+image parameters at this point. So future calls to
+\code{sane\_get\_parameters()} will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to \code{sane\_read()} is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+\begin{changebar}
+Image data is collected by repeatedly calling \code{sane\_read()}
+until this function will return an end-of-file status
+(\code{SANE\_STATUS\_EOF}). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels in of a red/green/blue image or multiple images),
+it can call \code{sane\_start()} again.
+If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the
+current image is complete. In this case, it should be tested, if
+\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set.
+If yes, further calls to \code{sane\_start()} can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on
+and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other
+than \code{SANE\_STATUS\_EOF} occurs in a SANE function.
+Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling \code{sane\_start} again, which will get
+you to the next frame, without having to read and discard the current one.
+
+In order to prematurely stop scanning and to reset the backend state,
+\code{sane\_cancel()} can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+
+When done using the device, the handle should be closed by a call to
+\code{sane\_close()}. Finally, before exiting the application,
+function \code{sane\_exit()} must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+The following C sample code implements a reference loop for acquiring
+multiple images:
+
+\begin{verbatim}
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+{
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status=sane_start(handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now let us see what the next frame brings. */
+ status=sane_get_parameters(handle,&parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if ( do_i_like_that(&parms) == NO ) continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer(...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while( SANE_STATUS_GOOD == ( status=sane_read(...) ) )
+ read_in_and_process_data_as_required();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF) {
+ break;
+ }
+
+ /* Now loop until we have all frames of an image. */
+ } while(!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+/* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+/* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+} while(parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel(handle);
+\end{verbatim}
+
+\end{changebar}
+
+
+\section{Well-Known Options}\index{well-known options}
+
+While most backend options are completely self-describing, there are a
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+\subsection{Option Number Count}\index{option count}
+
+Option number 0 has an empty string as its name. The value of this
+option is of type \code{SANE\_TYPE\_INT} and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a
+frontend can directly read out the value of option number 0.
+
+\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option}
+
+\begin{changebar}
+Option \code{resolution} is used to select the resolution at which an
+image should be acquired. When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+\code{x\_resolution} and \code{y\_resolution}. Note that only
+the option \code{resolution} {\bf or} the options
+\code{x\_resolution} {\bf and} \code{y\_resolution} may be active.
+
+The type of this option is either \code{SANE\_TYPE\_INT} or
+\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\subsection{Preview Mode Option}\index{preview mode}
+
+The boolean option \code{preview} is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to \code{SANE\_TRUE},
+preview mode is in effect, when set to \code{SANE\_FALSE} image
+acquisition should proceed in normal quality mode. The setting of
+this option \emph{must not\/} affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option \code{resolution}). A backend is free to override the
+\code{resolution} value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+\begin{changebar}
+When the \code{preview} option is set the backend should transfer
+the image in frame type \code{SANE\_FRAME\_RAW} if possible.
+\end{changebar}
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+\subsection{Scan Area Options}\index{scan area options}
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure~\ref{fig:area}. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the {\em smallest} and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the {\em largest}. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+\begin{figure}[tbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/area.eps,height=0.3\textheight}
+ \caption{Scan area options}
+ \label{fig:area}
+ \end{center}
+\end{figure}
+
+The names of the four options that define the scan area are given in
+the table below:
+\begin{center}
+\begin{tabular}{ll}
+{\bf Name} & {\bf Description} \\
+\code{\defn{tl-x}} & Top-left $x$ coordinate value \\
+\code{\defn{tl-y}} & Top-left $y$ coordinate value \\
+\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\
+\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\
+\end{tabular}
+\end{center}
+There are several rules that should be followed by front and backends
+regarding these options:
+\begin{itemize}
+
+\item Backends must attach a unit of either pixels
+ (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to
+ these options. The unit of all four options must be identical.
+
+\item Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+\item A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+\item A frontend must work properly with any or all of these options
+ missing.
+
+\end{itemize}
+
+\subsection{Depth option}\index{bit depth option}
+\begin{changebar}
+Option \code{depth} is used to select the image depth in bits/sample
+in multi bit mode - (this means for 24 bit rgb mode this value must be 8).
+The type of this option is \code{SANE\_TYPE\_INT}.
+The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option \code{mode}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Gamma table options}\index{gamma table options}
+\begin{changebar}
+The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE}
+of the type \code{SANE\_TYPE\_INT} which represent the gamma correction
+table for gray. In color mode the \code{gamma-table} may be used to set
+a common gamma correction for red, green and blue. The options
+\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table}
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+\code{gamma-table} option, only the \code{red-}, \code{green-} and
+\code{blue-gamma-table} or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+\begin{verbatim}
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+\end{verbatim}
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog\_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Mode options}\index{mode options}
+\begin{changebar}
+The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: \code{Color}, \code{Gray}, \code{Halftone}
+and \code{Lineart}. \code{Color} and \code{Gray} are multi bit
+modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart}
+are single bit modes.\\
+This way a frontend can select e.g the mode \code{Gray}
+for scanning a fax.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Source options}\index{source options}
+\begin{changebar}
+The option \code{source} is used to select the scansource
+(e.g. Automatic Document Feeder).
+It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and
+\code{Automatic Document Feeder}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Threshold}\index{threshold option}
+\begin{changebar}
+The option \code{threshold} is used to define the threshold
+for Lineart and may be Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity
+(image data bit = 0). The backend has to
+scale the values in the following way:\\
+A value of 0.0 means all pixels get white /full intensity (all image data
+bits are 0). A value of 50.0 means intensities brighter than medium gray
+get white / full intensity (bit 0). A value of 100.0 means all pixels get
+black (all image data bits are 1). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Analog gamma}\index{analog gamma option}
+\begin{changebar}
+The option \code{analog-gamma} is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_NONE}. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options \code{analog-gamma-red},
+\code{analog-gamma-green} and \code{analog-gamma-blue}.
+It is not allowed to emulate an anlog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect to the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Shadow}\index{shadow options}
+\begin{changebar}
+The option \code{shadow} is used to define the shadow level / black point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black). The backend has to scale the values in the following way:\\
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{shadow-red}, \code{shadow-green}
+and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Highlight}\index{hightlight options}
+\begin{changebar}
+The option \code{highlight} is used to define the highlight level / white point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity). The backend has to scale the values in the
+following way:\\
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{highlight-red}, \code{highlight-green}
+and \code{highlight-blue}, in this case \code{highlight} has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option}
+\begin{changebar}
+The option \code{lamp-on} is used to turn the lamp of the scanner on.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned on.
+
+The option \code{lamp-off} is used to turn the lamp of the scanner off.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned off.
+
+These options are not mandatory, but if a backend does support them, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Scanner buttons}\index{scanner button options}
+\begin{changebar}
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.\\
+
+A backend that does make available the scanner-buttons has to
+implement the following options:\\
+\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\
+\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\
+\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\
+When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS}
+or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined.
+
+A Frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+\begin{itemize}
+
+\item
+A frontend that wants to read the button status has to lock the
+button functions at first. For this it does set the option
+\code{scanner-buttons-lock} to \code{SANE\_TRUE}.
+While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE}
+the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist.
+The lockfile has to be placed in a directory where every user has read and write access to.
+
+ \begin{itemize}
+ \item
+ If the lockfile does not exist then the backend creates the lockfile and writes the
+ process ID (PID) of the backend to the file. Button access is allowed: the value
+ of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \item
+ If the file does exist and the backend PID is not the file PID then the
+ backend has to check if the process with the PID stored in the lockfile
+ still is running. If yes then the button access is not allowed: the value of
+ option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile
+ is recreated and the PID of the backend is stored in the lockfile, button
+ access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \end{itemize}
+
+\item
+The frontend does read the value of option \code{scanner-buttons-lock}. If
+it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons.
+If it is \code{SANE\_FALSE} then access has been denied.
+
+\item
+If the button access is allowed the frontend has to do the following about
+once per second (while not scanning):
+ \begin{itemize}
+ \item
+ The frontend does set option \code{scanner-buttons-status-update}.
+ The backend checks if access to the buttons is allowed by comparing
+ the backend PID with the lockfile PID. If access is allowed it
+ does read the button status from the scanner and stores it in
+ the option \code{scanner-buttons-status}, each bit represents a button, a
+ value of 0 means the button is not pressed, a value of 1 means that the button
+ is pressed. When the scanner is busy the backend must not wait, it has to
+ return immedeatly and the button state keeps unchanged.
+ The backend has to implement a timeout function. When no button has been pressed
+ within a predefined time (e.g. 15 minutes) then the access permission is lost.
+ In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}
+ and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has
+ lost permission to access the scanner-button functions.
+ If access is not allowed it does set the \code{scanner-buttons-status} to 0.
+
+ \item
+ The frontend does read the value of option \code{scanner-buttons-status}
+ \end{itemize}
+
+\item
+When the frontend does exit or it does not want to use the buttons
+it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+The backend does check if the backend PID and the lockfile PID are
+the same. If this is true then it removes the lockfile and sets the value
+of \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\code{sane\_close()} should do the same as setting option
+\code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\end{itemize}
+\end{changebar}
+
+
+
+\input{net.tex}
+
+\chapter{Contact Information}\label{chap:contact}
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+\begin{quote}\index{mailing list}
+\begin{verbatim}
+majordomo@mostang.com
+\end{verbatim}
+\end{quote}
+To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``\code{help}'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+\begin{quote}
+\url{http://www.mostang.com/sane/}
+\end{quote}
+
+\newpage
+\input{sane.ind}
+
+\end{document}
diff --git a/sane2/0.06/sane2-0.06.dvi.gz b/sane2/0.06/sane2-0.06.dvi.gz
new file mode 100644
index 00000000..5a338344
Binary files /dev/null and b/sane2/0.06/sane2-0.06.dvi.gz differ
diff --git a/sane2/0.06/sane2-0.06.ps.gz b/sane2/0.06/sane2-0.06.ps.gz
new file mode 100644
index 00000000..a32a0595
--- /dev/null
+++ b/sane2/0.06/sane2-0.06.ps.gz
@@ -0,0 +1,5813 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
+%%Title: sane2.dvi
+%%Pages: 59
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic
+%%+ Times-BoldItalic
+%%DocumentPaperSizes: a4
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips sane2
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2002.04.15:2331
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% @@psencodingfile@{
+% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
+% version = "0.6",
+% date = "1 July 1998",
+% filename = "8r.enc",
+% email = "tex-fonts@@tug.org",
+% docstring = "Encoding for TrueType or Type 1 fonts
+% to be used with TeX."
+% @}
+%
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+%
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+%
+% (5) hyphen appears twice for compatibility with both
+% ASCII and Windows.
+%
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef
+ /breve /minus /.notdef
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+ /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there to here.
+ /grave /quotesingle
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /.notdef /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
+exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
+dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
+ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
+end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
+dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
+roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
+dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
+if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
+def end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (sane2.dvi)
+@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40
+1[40 1[45 97[{TeXBase1Encoding ReEncodeFont}13 90.9091
+/Times-BoldItalic rf
+%DVIPSBitmapFont: Fb cmex10 10 1
+/Fb 1 41 df40 D E
+%EndDVIPSBitmapFont
+/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60
+60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60
+60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37
+99.6264 /Courier rf
+%DVIPSBitmapFont: Fd cmtt10 10.95 13
+/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F
+A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F
+A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65
+D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800
+A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69
+D78 D<90390FF803C0D97FFF13E048B512C74814
+F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C
+91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900
+3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F
+E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380
+253A7BB830>83 D
+87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813
+03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00
+3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7
+13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F
+90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712
+7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13
+07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0
+252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0
+91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339
+7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0
+4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C
+14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01
+FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111
+D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC
+4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F
+9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC
+03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48
+15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A
+5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A
+485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E
+%EndDVIPSBitmapFont
+/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37
+1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25
+3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35
+74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1
+49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1
+66.4176 /Times-Roman rf
+%DVIPSBitmapFont: Fh cmmi10 10.95 16
+/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA
+1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0
+EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC
+EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F
+F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED
+3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC
+17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F
+C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED
+01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F
+F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC
+07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB
+FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72
+7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F
+E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE
+4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D
+90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9
+FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0
+1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01
+1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8
+A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A
+D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0
+387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848
+14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13
+074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F
+5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0
+EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000
+157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0
+38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F
+FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807
+031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13
+1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2
+ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7
+2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F
+001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B
+137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E
+13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00
+1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0
+C648C9FC2A3B7EA72D>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fi cmr8 8 3
+/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23
+>49 DII E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fj cmr10 10.95 12
+/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201
+5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E
+123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB
+01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12
+007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6
+14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12
+1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9
+FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC
+EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713
+800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015
+C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F
+90C7FCEB07F8243F7CBC2D>53 DI<
+1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814
+1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301
+5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16
+7BA147>61 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fk cmsy10 10.95 5
+/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4
+EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100
+DI E
+%EndDVIPSBitmapFont
+/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25
+25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24
+90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33
+39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66
+55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50
+50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50
+99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53
+66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120
+86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86
+11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43
+119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76
+3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13
+172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86
+90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61
+1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51
+1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45
+30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81
+90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45
+51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51
+40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61
+66 66 61 66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23
+2[30 30 40[{TeXBase1Encoding ReEncodeFont}55 90.9091
+/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115
+103 115 172 57 115 1[57 115 103 69 92 115 92 115 103
+12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149
+23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559
+/Times-Bold rf /Ft 134[50 23[44 19[89 23[50 2[50 50 50
+3[25 44[{TeXBase1Encoding ReEncodeFont}8 99.6264 /Times-Roman
+rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76
+86 76 86 76 10[124 2[96 4[124 8[105 3[124 10[86 3[86
+1[86 48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%BeginPaperSize: a4
+a4
+%%EndPaperSize
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44
+b(2.0)f(proposal)i(0.06)e(-)g(rauch/beck)1672 2698 y
+Ft(May)24 b(15,)h(2002)p eop
+%%Page: 1 2
+1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430
+b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26
+b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227
+b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91
+b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647
+y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24
+b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25
+b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n
+(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639
+b(13)136 3593 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3764 y(4.2)96
+b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(14)345 3935 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(14)345 4106 y(4.2.2)110 b(Boolean)25
+b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345 4277 y(4.2.3)110
+b(Inte)o(ger)25 b(T)-7 b(ype)88 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345
+4448 y(4.2.4)110 b(Fix)o(ed-point)26 b(T)-7 b(ype)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(15)345 4619 y(4.2.5)110 b(T)-6 b(e)o(xt)46
+b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345 4790 y(4.2.6)110
+b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4961
+y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)345 5132 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7
+b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(17)1927 5381 y(1)p eop
+%%Page: 2 3
+2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7
+b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(19)345 279 y(4.2.10)65 b(Internationalizatio)q(n)44
+b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(22)136 436 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)82 b(26)345 592 y(4.3.1)110 b Fp(sane)p 861
+592 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 749
+y(4.3.2)110 b Fp(sane)p 861 749 V 31 w(exit)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(26)345 905 y(4.3.3)110 b Fp(sane)p 861 905
+V 31 w(get)p 1057 905 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1062
+y(4.3.4)110 b Fp(sane)p 861 1062 V 31 w(open)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 1218 y(4.3.5)110 b Fp(sane)p 861
+1218 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1375 y(4.3.6)110
+b Fp(sane)p 861 1375 V 31 w(get)p 1057 1375 V 32 w(option)p
+1419 1375 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(28)345 1532 y(4.3.7)110 b Fp(sane)p 861 1532 V 31 w(control)p
+1277 1532 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(28)345 1688 y(4.3.8)110 b Fp(sane)p
+861 1688 V 31 w(get)p 1057 1688 V 32 w(parameters)25
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(29)345 1845 y(4.3.9)110 b Fp(sane)p 861 1845 V 31 w(start)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(34)345 2001 y(4.3.10)65 b Fp(sane)p
+861 2001 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(34)345 2158
+y(4.3.11)65 b Fp(sane)p 861 2158 V 31 w(cancel)33 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(35)345 2314 y(4.3.12)65 b Fp(sane)p 861 2314
+V 31 w(set)p 1057 2314 V 32 w(io)p 1199 2314 V 31 w(mode)78
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2471 y(4.3.13)65 b Fp(sane)p 861 2471 V 31 w(get)p
+1057 2471 V 32 w(select)p 1419 2471 V 30 w(fd)37 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2627 y(4.3.14)65 b Fp(sane)p 861 2627 V 31 w(strstatus)73
+b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(37)136 2784 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2940 y(4.5)96
+b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(40)345 3097 y(4.5.1)110 b(Option)25 b(Number)e(Count)70
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3253 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3410 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3566 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(41)345 3723 y(4.5.5)110 b(Depth)24 b(option)71
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(43)345 3879 y(4.5.6)110 b(Gamma)23
+b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(43)345 4036 y(4.5.7)110 b(Scan)24
+b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(43)345 4192 y(4.5.8)110 b(Scan)24
+b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4349 y(4.5.9)110 b(Threshold)43
+b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4505 y(4.5.10)65 b(Analog)25
+b(gamma)56 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4662 y(4.5.11)65 b(Shado)n(w)51
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4818 y(4.5.12)65
+b(Highlight)e(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4975 y(4.5.13)65
+b(T)l(urn)24 b(lamp)f(on)h(and)g(of)n(f)48 b(.)d(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 5132
+y(4.5.14)65 b(Scanner)25 b(b)n(uttons)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(46)1927 5381 y(2)p eop
+%%Page: 3 4
+3 3 bop 0 123 a Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989
+b(48)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(49)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24
+b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 638 y(5.1.2)110 b(T)-7
+b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 809 y(5.2)96
+b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 981 y(5.2.1)110
+b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(50)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153
+V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62
+b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(51)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p
+1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 1496 y(5.2.4)110
+b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(51)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667
+V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p
+1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(52)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p
+1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345
+2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057
+2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 2182
+y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182
+V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(53)345 2354 y(5.2.9)110 b Fp(SANE)p
+861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345
+2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057
+2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(54)345 2697 y(5.2.11)65 b Fp(SANE)p
+861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46
+b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(55)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871
+b(56)1927 5381 y Fq(3)p eop
+%%Page: 4 5
+4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349
+y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45
+b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data)
+g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g
+(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2119 y(4.2)96
+b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(42)1927 5381 y(4)p eop
+%%Page: 5 6
+5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349
+y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i
+(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23
+b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31
+w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p
+Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036
+y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23
+b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p
+Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f
+(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722
+y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139
+2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop
+%%Page: 6 7
+6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0
+1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g
+(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38
+b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e
+(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i
+(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0
+2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g
+(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d
+(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c
+(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f
+(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22
+b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0
+2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g
+(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119
+b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d
+(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f
+(an)e(application)k(that)d(requires)h(access)g(to)0 3135
+y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j
+(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5
+b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0
+3248 y(implementations)35 b(of)c(SANE)f(components.)55
+b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g
+(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o
+(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c
+(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0
+3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as)
+d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i
+(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l
+(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29
+b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26
+b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i
+(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement)
+i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o
+(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h
+(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o
+(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7
+b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g
+(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o
+(e)d(this:)1927 5381 y(6)p eop
+%%Page: 7 8
+7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0
+1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace)
+h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g
+(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22
+b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)
+g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0
+2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e
+(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f
+(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24
+b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23
+b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f
+(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21
+b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n
+(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29
+b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g
+(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i
+(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the)
+f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i
+(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h
+(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f
+(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0
+2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e
+(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5
+b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51
+b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g
+(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25
+b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h
+(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0
+3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21
+b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g
+(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g
+(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f
+(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k
+Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0
+3812 y(back)o(ends.)1927 5381 y(7)p eop
+%%Page: 8 9
+8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51
+b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g
+(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32
+b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0
+1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e
+(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44
+b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g
+(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f
+(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30
+b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25
+b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f
+(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d
+(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34
+b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h
+(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p
+Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n
+(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j
+(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)
+h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g
+(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0
+2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f
+(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30
+b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f
+(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h
+(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g
+(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22
+b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h
+Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e
+(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f
+(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back)
+o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e
+(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h
+(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o
+(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31
+b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h
+(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227
+4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h
+(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n
+(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g
+(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o
+(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227
+4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e
+(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227
+4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k
+(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d
+(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n
+(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f
+(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29
+b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o
+(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f
+(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4
+v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro)
+o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h
+(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f
+(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n
+(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i
+(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927
+5381 y(8)p eop
+%%Page: 9 10
+9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227
+310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g
+Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p
+2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p
+Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i
+(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n
+(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227
+536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time)
+f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136
+724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27
+b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i
+(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227
+837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41
+b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e
+(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d
+(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o
+(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30
+b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g
+Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f
+(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha)
+n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got)
+e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227
+1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f
+(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6
+b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i
+(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e
+(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p
+Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e
+(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227
+1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d
+(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30
+b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g
+(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to)
+227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.)
+43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f
+(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g
+(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g
+(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h
+(that)f(scanner)-5 b(.)0 2479 y
+ currentpoint currentpoint translate 0.64821 0.64821 scale neg exch
+neg exch translate
+ 0 2479 a 0 2479 a
+ gsave currentpoint currentpoint translate 270 neg rotate neg exch
+neg exch translate
+ 0 2479
+a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550
+@rwi @setspecial
+%%BeginDocument: figs/hierarchy.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hierarchy.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 2
+%%CreationDate: Thu Jan 30 22:02:12 1997
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%Magnification: 1.00
+%%Orientation: Landscape
+%%BoundingBox: 0 0 355 722
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-17.0 -17.0 translate
+ 90 rotate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n 0 612 m 0 0 l 792 0 l 792 612 l cp clip
+ 0.06000 0.06000 sc
+% Polyline
+n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr
+% Polyline
+n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr
+15.000 slw
+% Polyline
+n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+11399 5182 m
+gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+8099 5182 m
+gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr
+% Polyline
+n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr
+% Polyline
+n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr
+% Polyline
+n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr
+% Polyline
+n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 2700 1800 m 1200 3000 l gs col-1 s gr
+% Polyline
+n 3000 1800 m 3000 3000 l gs col-1 s gr
+% Polyline
+n 3300 1800 m 4800 3000 l gs col-1 s gr
+% Polyline
+n 9600 1800 m 9600 2100 l gs col-1 s gr
+% Polyline
+n 9450 2700 m 8100 4800 l gs col-1 s gr
+% Polyline
+n 11400 4200 m 11400 4800 l gs col-1 s gr
+% Polyline
+n 1200 3600 m 1200 4200 l gs col-1 s gr
+% Polyline
+n 3000 3600 m 3000 4125 l gs col-1 s gr
+% Polyline
+n 7875 5400 m 7350 5850 l gs col-1 s gr
+% Polyline
+n 8250 5400 m 8775 5850 l gs col-1 s gr
+% Polyline
+n 11475 5400 m 11475 5850 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr
+% Polyline
+n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 9750 2700 m 11400 3600 l gs col-1 s gr
+% Interp Spline
+gs n 4800 3600 m
+ 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto
+ 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto
+ 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto
+ 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto
+ 7224.0 624.7 8573.7 446.9 9450 900 curveto
+ 9524.5 938.5 9562.0 1013.5 9600 1200 curveto
+ gs col-1 s gr
+ gr
+
+/Helvetica ff 270.00 scf sf
+1199 3382 m
+gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 3382 m
+gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+1200 4425 m
+gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 4380 m
+gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+7350 6165 m
+gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+8925 6165 m
+gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+11475 6135 m
+gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 600 m
+gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+9600 630 m
+gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+4725 5850 m
+gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 1582 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+4799 3382 m
+gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 1582 m
+gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 2482 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+11399 3982 m
+gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial 2958 2479 a
+ currentpoint grestore moveto
+ 2958 2479 a 0 2479 a
+ currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale
+neg exch neg exch translate
+ 0 2479
+a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0
+4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h
+(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44
+b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g
+(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f
+(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0
+5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h
+(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i
+(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop
+%%Page: 10 11
+10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e
+Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36
+b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d
+(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o
+(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51
+b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h
+(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e
+(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d
+Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e
+Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f
+(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22
+b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f
+(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f
+(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i
+(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i
+(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g
+(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0
+972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h
+(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g
+(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back)
+o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e
+(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0
+1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0
+1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815
+y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h
+(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f
+(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39
+b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation)
+j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0
+2041 y(applications)f(and)c(de)n(vices.)59 b(While)34
+b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has)
+f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i
+(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g
+(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0
+2266 y(accommodate)26 b(future)e(applications)k(or)23
+b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g
+(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is)
+f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n
+(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0
+2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g
+(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21
+b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n
+(alues.)561 2585 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 561 2585 a 561 2585 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 561 2585 a 79
+x Fq(Each)g(sample)g(v)n(alue)g(represents)j(one)d(channel)h(\(e.g.,)e
+(the)h(red)g(channel\).)2958 2664 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 2958 2664 a 2958
+2664 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 2958 2664 a 2958 2664 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 2958 2664 a 0 2836 a Fq(The)i(SANE)f
+(API)g(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39
+b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0
+2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f
+(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67
+b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34
+b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f
+(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0
+3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g
+(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g
+(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f
+(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0
+3307 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 3307 a 0 3307 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 3307 a 152 x Fq(When)30 b(transmitting)i(an)
+e(image)g(frame)g(by)g(frame,)h(the)f(frontend)i(needs)f(to)e(kno)n(w)h
+(what)g(part)g(of)g(the)g(image)g(a)f(frame)0 3572 y(represents)e
+(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g(should)i(e)o(xpect\).)31
+b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d(API)i(tags)i(e)n(v)o(ery)f
+(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f(format)i(descriptor)-5
+b(.)1134 3685 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 1134 3685 a 1134 3685 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 1134 3685 a 1134
+3685 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 1134 3685 a 0 3704 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 3704 a 0 3704 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 3704
+a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f(of)e
+(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e Fp(SANE)p
+2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31 w(RAW)e
+Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p
+225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)18
+b(These)k(types)g(are)f(discussed)j(in)d(detail)h(in)f(the)g(follo)n
+(wing)h(sections.)30 b(The)21 b(frame)g(types)h(used)g(by)0
+4082 y(v)o(ersion)e(1)d(of)h(this)h(standard)h(\()p Fp(SANE)p
+1168 4082 V 31 w(FRAME)p 1474 4082 V 31 w(GRAY)p Fq(,)15
+b Fp(SANE)p 1983 4082 V 31 w(FRAME)p 2289 4082 V 30 w(RGB)p
+Fq(,)h Fp(SANE)p 2743 4082 V 31 w(FRAME)p 3049 4082 V
+30 w(RED)p Fq(,)g Fp(SANE)p 3503 4082 V 31 w(FRAME)p
+3809 4082 V 30 w(GREEN)p Fq(,)0 4195 y(and)24 b Fp(SANE)p
+379 4195 V 31 w(FRAME)p 685 4195 V 30 w(BLUE)p Fq(\))e(are)h(obsolete)j
+(and)e(superseded)j(by)c Fp(SANE)p 2360 4195 V 31 w(FRAME)p
+2666 4195 V 31 w(RAW)p Fq(.)2901 4195 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 2901 4195 a 2901
+4195 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 2901 4195 a 2901 4195 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 2901 4195 a 0 4215 a
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0
+4215 a 0 4215 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 4215 a 288 x Fm(3.2.1)99 b(Pixel)24
+b(oriented)i(frames)0 4566 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0 4566 a 0 4566 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 4566
+a 0 4566 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 4566 a 0 4566 a
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 4566 a 0 4566 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 4566
+a 170 x Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h(frames)e(is)g
+Fp(SANE)p 1561 4736 28 4 v 31 w(FRAME)p 1867 4736 V 30
+w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g(channels)i
+(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32
+b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f
+(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0
+4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h
+Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g
+Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25
+b(type.)0 5075 y(See)e(section)i Fr(??)f Fq(on)g(page)g
+Fr(??)g Fq(for)f(details)i(about)g(the)f(format)g(descriptions.)2472
+5075 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 2472 5075 a 2472 5075 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 2472 5075 a 2472 5075
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 2472 5075 a 0 5094 a
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 5094 a 0 5094 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 5094 a 0 5094
+a
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0 5094 a 0 5094 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 5094 a 0 5094 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 5094 a 1905 5381
+a Fq(10)p eop
+%%Page: 11 12
+11 11 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 32 a 91 x Fq(Each)24
+b(sample)h(v)n(alue)g(has)f(a)g(certain)h(bit)g(depth.)31
+b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g(entire)i(image)e
+(and)h(can)f(be)g(as)g(small)g(as)0 236 y(one)f(bit.)29
+b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h(or)g(16)g(bits)g
+(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5 b(s)25
+b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0
+349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n
+(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f
+(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d
+(sample)h(v)n(alue)g(of)g(depth)g(8\).)1634 462 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 1634
+462 a 1634 462 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 1634 462 a 1634 462 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 1634 462 a 0 481
+a
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 481 a 0 481 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 481 a 141 x Fq(The)18 b(complete)h(image)g(may)e
+(consist)j(of)e(se)n(v)o(eral)h(channels,)j(the)c(number)h(of)f
+(channels)i(is)e(de\002ned)h(by)f(member)g Fp(channels)p
+3998 622 28 4 v 30 w(per)p 4193 622 V 31 w(image)0 735
+y Fq(of)25 b Fp(SANE)p 325 735 V 31 w(Parameters)p Fq(.)k(The)24
+b(image)i(may)f(be)g(transmitted)j(in)d(an)g(arbitary)i(number)f(of)g
+(frames)f(which)h(can)g(be)f(de-)0 848 y(termined)j(by)f(w)o(atching)h
+(the)f Fp(last)p 1186 848 V 31 w(frame)d Fq(\003ag)i(in)h(said)g(type)h
+(\(or)f(by)g(counting)i(the)e(channels\).)41 b(Note:)35
+b(This)27 b(frame)0 961 y(type)d(replaces)i(all)d(frame)h(types)h(of)e
+(the)h(SANE)d(standard)26 b(v)o(ersion)f(1.)2271 961
+y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 2271 961 a 2271 961 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 2271 961 a 2271 961 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 2271 961
+a 0 1122 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i
+(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48
+b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 1235
+y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f
+(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f
+(8\),)h(or)f(a)g(partial)h(sam-)0 1347 y(ple)j(v)n(alue)g(\(for)f(an)h
+(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31
+b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g
+(are)0 1460 y(transmitted)26 b(in)d(the)h(machine')-5
+b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 1621
+y Fr(Back)o(end)22 b(Implementation)i(Note)227 1767 y
+Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h
+(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f
+(adjusted)227 1880 y(appropriately)32 b(if)c(necessary)-6
+b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i
+(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 1993
+y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o
+(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f
+(then)f(apply)i(the)227 2105 y(adjustment)d(if)d(necessary)-6
+b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er)
+n(-mak)o(es-right)q(\224)29 b(approach.)975 3247 y @beginspecial
+0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial
+%%BeginDocument: figs/xfer.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfer.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:30 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 362 182
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-134.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+15.000 slw
+% Polyline
+n 2400 3300 m 8100 3300 l gs col-1 s gr
+n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3375 m 2400 3675 l gs col-1 s gr
+15.000 slw
+n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 3750 m 8100 3750 l gs col-1 s gr
+n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3825 m 2400 4125 l gs col-1 s gr
+15.000 slw
+n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr
+15.000 slw
+% Polyline
+n 2400 4200 m 8100 4200 l gs col-1 s gr
+n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 4275 m 2400 4575 l gs col-1 s gr
+15.000 slw
+n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 4650 m 8100 4650 l gs col-1 s gr
+n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1111 3443 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24
+b(order)h(of)e(image)h(data)g(bytes)0 3746 y(The)f(order)i(in)f(which)g
+(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e
+(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0
+3859 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g
+(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e
+(right-most)i(column.)30 b(The)0 3972 y(left-to-right,)35
+b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h
+(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4085
+y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g
+(e)o(xample\).)0 4246 y(If)d(a)g(frame)h(contains)h(multiple)g
+(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f
+(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0
+4359 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h
+(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f
+(bit-depth)j(of)d(8.)0 4519 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g
+(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g
+Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h
+(depth)h(1)0 4632 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g
+(interlea)n(v)o(ed)j(f)o(ashion.)1851 4553 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 1851 4553
+a 1851 4553 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 1851 4553 a 79 x Fq(The)c(\002rst)h(sample)h(of)f(each)g
+(byte)h(is)f(represented)j(by)d(the)g(most)0 4745 y(signi\002cant)g
+(bit.)548 4745 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 548 4745 a 548 4745 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 548 4745 a 548
+4745 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 548 4745 a 0 4906 a Fq(When)g(the)h(bit)f(depth)i(is)e(1)f
+(there)i(are)g(only)g(tw)o(o)e(sample)i(v)n(alues)h(possible,)g(1)e
+(represents)j(minimum)d(intensity)j(\(black\))0 5019
+y(and)19 b(0)g(represents)i(maximum)e(intensity)i(\(white\).)28
+b(F)o(or)18 b(all)h(other)h(bit)f(depths)i(a)d(sample)i(v)n(alue)f(of)g
+(0)g(represents)i(minimum)0 5132 y(intensity)26 b(and)e(lar)n(ger)h(v)n
+(alues)g(represent)h(increasing)g(intensity)-6 b(.)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0 5151 a 0 5151 a
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 5151 a 0
+5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(11)p
+eop
+%%Page: 12 13
+12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx
+93 @ury 3744 @rwi @setspecial
+%%BeginDocument: figs/image-data.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: image-data.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:36 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 521 93
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-88.0 120.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+1875 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3225 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+4575 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l
+ 5850 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 600 m
+gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+5925 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+7275 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+8625 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l
+ 9900 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 600 m
+gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1950 m
+gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1950 m
+gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1950 m
+gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1950 m
+gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1950 m
+gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1950 m
+gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+10050 1275 m
+gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1125 m
+gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23
+b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 1070
+a 0 1070 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0
+1243 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 1243 a 0 1243 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 1243 a 0 1243 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0 1243 a 0
+1243 a
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 0 1243 a 0 1243 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 0 1243 a 151 x Fq(It)32 b(also)i(is)e
+(possible)j(to)e(transmit)h(arbitary)g(\(not)g(necessaryly)i(pix)o(el)d
+(oriented\))i(data.)57 b(This)33 b(allo)n(ws)g(transmission)i(of)0
+1507 y(compressed)26 b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)
+1402 1507 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 1402 1507 a 1402 1507 a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 1402 1507 a 1402
+1507 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 1402 1507 a 0 1527 a
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 1527 a 0 1527 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 1527
+a 152 x Fq(The)i(type)i(of)f(arbitrary)i(data)f(frames)f(is)g
+Fp(SANE)p 1547 1679 28 4 v 31 w(FRAME)p 1853 1679 V 30
+w(MIME)p Fq(.)2144 1679 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 2144 1679 a 2144 1679 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 2144
+1679 a 2144 1679 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 2144 1679 a 25 w Fq(The)g(frame)g(contains)i
+(arbitrary)g(data)f(of)e(the)i(MIME)0 1791 y(\(see)g(RFC)e(1521/1522\))
+30 b(type)e(that)f(is)f(gi)n(v)o(en)i(in)e(the)h Fp(format)p
+2039 1791 28 4 v 30 w(desc)d Fq(member)j(of)g(the)g Fp(SANE)p
+3096 1791 V 31 w(Parameters)21 b Fq(struc-)0 1904 y(tured)27
+b(type)g(\(see)g(See)f(section)i Fr(??)e Fq(on)g(page)h
+Fr(??)q Fq(\).)36 b(As)26 b(such,)h(it)f(is)g(assumed)i(to)e(be)g
+(incomprehensible)31 b(to)26 b(the)g(frontend,)0 2017
+y(e)o(xcept)i(for)e(selected)j(types)e(the)g(frontend)h(is)f
+(speci\002cally)h(capable)g(of)f(handling)i(internally)-6
+b(.)40 b(The)26 b(frontend)i(is)e(free)h(to)0 2130 y(ignore)32
+b(those)g(frames,)g(or)f(emplo)o(y)h(an)o(y)e(appropriate)k(means)d(to)
+g(otherwise)h(handle)g(this)f(data)h(\(lik)o(e)f(sa)n(ving)i(them)d(to)
+0 2243 y(disk)24 b(or)g(spa)o(wning)h(an)e(e)o(xternal)i(vie)n(wer\).)
+1905 5381 y(12)p eop
+%%Page: 13 14
+13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51
+b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512
+y(Interface)e(\(API\))0 1879 y
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 1879 a 0 1879 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 1879
+a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f
+(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y)
+h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i
+(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o
+(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0
+2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h
+(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e
+(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d
+(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33
+b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0
+2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109
+2682 y Fp(#include)51 b()0 2748 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 2748
+a 0 2748 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 2748 a 0 2748 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 2748 a 333 x Fn(4.1)119
+b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard)
+25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28
+b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e
+(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d
+(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e
+(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51
+b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30
+b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g
+(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g
+(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h
+(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g
+(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o
+(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g
+(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o
+(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o
+(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i
+(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o
+(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129
+y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f
+(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n
+(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f
+(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n
+(vision.)48 b(While)30 b(control)h(of)e(these)0 4406
+y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o
+(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28
+b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e
+(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38
+b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n
+(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o
+(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o
+(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4
+v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29
+b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d
+(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905
+5381 y(13)p eop
+%%Page: 14 15
+14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p
+868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p
+Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g
+(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e
+(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g
+(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p
+Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f
+Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o
+(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g
+(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14
+b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d
+(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704
+y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g
+(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427
+817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e
+(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the)
+427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427
+1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f
+(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427
+1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f
+(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and)
+427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227
+1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V
+30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h
+(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427
+1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p
+868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32
+b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of)
+427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p
+868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18
+b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d
+(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j
+Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0
+2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23
+b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f
+(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o
+(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59
+b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52
+b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31
+w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g
+(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f
+(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c
+Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n
+(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f
+Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068
+y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g
+Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15
+b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j
+Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in)
+e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j
+Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d
+Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24
+b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e
+(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i
+Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33
+b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i
+(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25
+b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p
+Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o
+(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j
+(mapping.)1905 5381 y(14)p eop
+%%Page: 15 16
+15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0
+356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n
+(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v)
+n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j
+Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g
+(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097
+436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)
+h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52
+b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377
+b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187
+y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)
+g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e
+(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26
+b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25
+b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g
+Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0
+1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0
+1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y
+Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h
+(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h
+Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e
+Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30
+b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0
+2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f
+(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays)
+f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672
+y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27
+b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f
+Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0
+2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0
+3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326
+y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n
+(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in)
+f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p
+Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e
+Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27
+b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6
+b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103
+b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0
+4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p
+940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22
+b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29
+b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f
+(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p
+Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26
+b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p
+Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g
+(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5
+b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24
+b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17
+b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36
+b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros)
+h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g
+(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p
+0 4901 1560 4 v 105 4957 a Ff(1)134 4988 y Fe(This)19
+b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g
+(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905
+5381 y Fq(15)p eop
+%%Page: 16 17
+16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p
+Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c
+(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f
+(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking)
+h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f
+Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427
+349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p
+Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine)
+f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427
+608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j
+Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o
+(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g
+Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227
+1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48
+b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48
+b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i
+(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6
+b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0
+1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw)
+o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0
+2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29
+b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o
+(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g
+(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d
+Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48
+b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x)
+o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27
+b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f
+(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0
+2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50
+b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to)
+f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o
+(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227
+3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23
+b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695
+V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f
+(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27
+b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f
+Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52
+b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e
+(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h
+Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d
+Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f
+(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23
+b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773
+y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26
+b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i
+(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905
+5381 y(16)p eop
+%%Page: 17 18
+17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7
+b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i
+(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560
+356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32
+b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6
+b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0
+961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n
+(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e
+(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p
+Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f
+(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n
+(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0
+1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f
+(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether)
+f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57
+b(If)31 b(an)h(operation)j(completes)e(successfully)-6
+b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56
+b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f
+(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30
+b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0
+1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23
+b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p
+2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f
+(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385
+2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p
+1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p
+3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113
+v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p
+1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p
+2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6
+b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660
+2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p
+1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25
+b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435
+2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627
+V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083
+2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661
+V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31
+w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p
+1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n
+(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V
+435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021
+2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083
+2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p
+3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966
+28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000
+4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n
+(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113
+V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p
+1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p
+2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514
+3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4
+v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31
+w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100
+w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226
+V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31
+w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p
+1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er)
+e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p
+660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161
+3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083
+3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514
+3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4
+v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31
+w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100
+w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435
+3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643
+V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4
+113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f
+(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519
+3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0
+4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7
+b(ype)0 4346 y
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+ 0 4346 a 0 4346 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 0 4346 a 151 x Fq(Each)27
+b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type)
+g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26
+b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n
+(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969
+y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+
+0 5096 a 0 5096 a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 0 5096 a 0 5096 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 0 5096 a 1905 5381
+a Fq(17)p eop
+%%Page: 18 19
+18 18 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 0 32 a 445 123 a Fp(SANE_String_Cons)o
+(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445
+349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g
+(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g
+(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o
+(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913
+y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026
+y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139
+y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445
+1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478
+y(SANE_Device;)0 1533 y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+ 0 1533 a 0 1533 a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 0 1533 a 0
+1533 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f
+(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p
+Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0
+1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019
+1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h
+(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39
+b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is)
+h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o
+(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o
+(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique)
+j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30
+b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k)
+o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32
+b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0
+2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g
+(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n
+(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h
+(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52
+b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f
+Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e
+(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h
+(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n
+(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0
+2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g
+(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g
+(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928
+a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965
+1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698
+b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588
+b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698
+b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643
+b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p
+1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p
+1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p
+1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p
+1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p
+1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p
+1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93
+b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753
+b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643
+b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p
+1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115
+2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p
+3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094
+4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094
+V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207
+V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320
+V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433
+V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p
+3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p
+3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p
+3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p
+3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p
+3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24
+b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0
+5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26
+b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f
+(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f
+(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o
+(endor)h(speci\002c)g(and)f(therefore)i(completely)1905
+5381 y(18)p eop
+%%Page: 19 20
+19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i
+(back)o(ends.)0 143 y
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 143 a 0 143 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 143 a 150 x Fq(The)i(back)o
+(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p
+1648 293 28 4 v 30 w(backend)p 2063 293 V 30 w(author)25
+b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0
+406 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f
+(the)g(format:)0 649 y Fp(Firstname)50 b(Lastname)h()0 892 y Fq(The)33 b(string)j Fp(backend)p 805 892
+V 29 w(website)30 b Fq(has)k(to)g(be)g(set)g(up)g(by)g(the)g(back)o
+(end)i(with)e(the)g(website)h(or)e(ftp)h(address)i(of)e(the)0
+1005 y(back)o(end)26 b(in)d(the)h(format:)0 1247 y Fp(http://www.doma)o
+(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0
+1490 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h
+Fp(device)p 1572 1490 V 30 w(location)18 b Fq(with)23
+b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g
+(this)0 1603 y(de)n(vice,)h(the)g(te)o(xt)g(should)h(be)f(read)g(from)f
+(the)h(back)o(end)i(con\002g)e(\002le.)k(This)23 b(could)i(e.g.)k(look)
+24 b(lik)o(e)g(this:)0 1846 y Fp(building)51 b(93,)i(2nd)g(plane,)f
+(room)h(2124)0 2088 y Fq(The)33 b(string)h Fp(comment)c
+Fq(can)j(be)g(used)h(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user)
+l(,)k(the)c(te)o(xt)h(should)h(be)e(read)h(from)f(the)0
+2201 y(back)o(end)26 b(con\002g)e(\002le.)0 2372 y(The)f(string)i
+Fp(reserved)p 839 2372 V 29 w(string)20 b Fq(is)j(planed)i(for)f
+(future)h(use,)f(the)f(back)o(end)j(has)e(to)g(set)f(this)h(string)h
+(to)f(\224\224.)0 2542 y(W)l(ith)i(member)f Fp(backend)p
+915 2542 V 30 w(version)p 1330 2542 V 29 w(code)e Fq(a)i(frontend)j
+(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is)
+g(connected)0 2655 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0
+2825 y(The)30 b(member)h Fp(backend)p 889 2825 V 29 w(capability)p
+1468 2825 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g
+(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0
+2938 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f
+(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f
+(de\002ned)i(when)f(there)g(is)0 3051 y(the)f(need)g(for)g(it.)k(The)23
+b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g
+(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3222 y(The)d(member)h
+Fp(reserved)p 926 3222 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g
+(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g
+(inte)o(ger)h(to)e(0.)3900 3222 y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 3900 3222 a 3900 3222
+a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 3900 3222 a 3900 3222 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 3900 3222 a 0 3528 a Fm(4.2.9)99
+b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3760 y Fq(Option)23
+b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h
+(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30
+b(Options)0 3873 y(are)h(used)g(to)f(control)j(virtually)g(all)d
+(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n
+(wer)f(of)h(the)g(SANE)d(API)h(stems)0 3986 y(from)22
+b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f
+(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g
+(descriptor)-5 b(.)31 b(Thus,)0 4098 y(a)21 b(frontend)i(can)e(control)
+i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n
+(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0
+4211 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28
+b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i
+(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4324 y(operates.)31
+b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p
+1485 4324 28 4 v 31 w(Option)p 1846 4324 V 30 w(Descriptor)18
+b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227
+4567 y Fp(typedef)52 b(struct)336 4680 y({)445 4793 y(SANE_String_Cons)
+o(t)c(name;)445 4906 y(SANE_String_Cons)o(t)g(title;)445
+5019 y(SANE_String_Cons)o(t)g(desc;)445 5132 y(SANE_Value_Type)g(type;)
+1905 5381 y Fq(19)p eop
+%%Page: 20 21
+20 20 bop 445 123 a Fp(SANE_Unit)51 b(unit;)445 236 y(SANE_Int)g(size;)
+445 349 y(SANE_Int)g(cap;)445 462 y(SANE_Constraint_)o(Ty)o(pe)d
+(constraint_type)o(;)445 574 y(union)555 687 y({)664
+800 y(const)k(SANE_String_Con)o(st)c(*string_list;)664
+913 y(const)k(SANE_Word)e(*word_list;)664 1026 y(const)i(SANE_Range)e
+(*range;)555 1139 y(})445 1252 y(constraint;)336 1365
+y(})227 1478 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0
+1782 y Fr(Option)23 b(Name)0 2015 y Fq(Member)k Fp(name)e
+Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40
+b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n
+(vice)0 2128 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n
+(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).)
+55 b(The)31 b(option)i(name)f(must)0 2241 y(consist)e(of)d(lo)n(wer)n
+(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p
+Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i
+(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43
+b(The)27 b(\002rst)h(character)0 2354 y(must)c(be)f(a)g(lo)n(wer)n
+(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g
+(dash\).)0 2659 y Fr(Option)g(T)n(itle)0 2892 y Fq(Member)e
+Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h
+(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21
+b(should)i(typically)0 3005 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o
+(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i
+(of)d(the)h(option.)0 3309 y Fr(Option)f(Description)0
+3542 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e
+(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to)
+g(describe)i(the)e(option.)35 b(It)24 b(is)0 3655 y(the)g
+(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h
+(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e
+(this)0 3768 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i
+(breaks.)0 4072 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0
+4305 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the)
+g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h
+Fp(SANE)p 3217 4305 28 4 v 31 w(Value)p 3523 4305 V 31
+w(Type)c Fq(are)0 4418 y(described)26 b(in)e(T)-7 b(able)23
+b(4.3.)0 4723 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 4956
+y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h
+(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20
+b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765
+4956 V 31 w(U-)0 5069 y(nit)e Fq(are)j(described)i(in)d(T)-7
+b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g
+(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21
+b(is)g(entirely)1905 5381 y(20)p eop
+%%Page: 21 22
+21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p
+1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p
+3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v
+165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247
+V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281
+V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p
+Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360
+28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113
+v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g
+Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p
+390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042
+506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h
+(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165
+585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V
+31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V
+256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p
+Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p
+390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042
+1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f
+(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option)
+1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n
+(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k
+(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j
+(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g
+(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24
+b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5
+b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p
+390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042
+1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this)
+h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e
+(group)1395 1376 y(logically)35 b(related)e(options.)56
+b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395
+1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j
+(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if)
+e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395
+1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d
+Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395
+1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865
+3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24
+b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354
+2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0
+2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f
+(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h
+(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37
+b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j
+(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i
+(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f
+(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903
+4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856
+V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525
+w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876
+V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4
+v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113
+v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j
+(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548
+3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068
+V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102
+V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p
+3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181
+28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4
+113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24
+b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328
+V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024
+3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000
+3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p
+3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407
+28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4
+113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24
+b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V
+497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p
+1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p
+2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p
+3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632
+28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698
+3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24
+b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666
+V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29
+b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4
+v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22
+b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g
+(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26
+b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0
+4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v)
+n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703
+4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g
+(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e
+(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i
+Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g
+(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i
+Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e
+(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop
+%%Page: 22 23
+22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p
+703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31
+w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31
+b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e
+(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i
+(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437
+y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289
+437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452
+653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23
+b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486
+653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798
+V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p
+1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43
+b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y
+Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d
+Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31
+b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n
+(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f
+(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i
+(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h
+(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227
+1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V
+30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p
+Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553
+1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427
+1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i
+(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p
+813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p
+Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p
+2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427
+2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g
+Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8
+b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f
+(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37
+b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0
+2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n
+(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921
+2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003
+y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30
+b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h
+(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h
+(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n
+(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p
+3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d
+(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7
+b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0
+3598 y
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 3598 a 0 3598 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o
+(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26
+b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g
+(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27
+b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i
+(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g
+(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o
+(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h
+Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f
+(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526
+V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0
+4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227
+5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227
+5132 y(#endif)0 5135 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 0 5135 a 0 5135 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 0 5135 a 0 5135
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 0 5135 a 1905 5381 a Fq(22)p eop
+%%Page: 23 24
+23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p
+1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p
+3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86
+784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31
+w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254
+w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f
+(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p
+3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862
+931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010
+28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31
+w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V
+100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n
+(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123
+y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39
+b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25
+b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32
+b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n
+(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199
+1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462
+y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g
+(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286
+4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p
+507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160
+2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue)
+g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43
+b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p
+1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50
+b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513
+1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31
+w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)
+j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28
+b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p
+3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026
+y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p
+2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026
+V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139
+y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25
+b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252
+y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p
+3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p
+311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p
+1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22
+b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not)
+h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g
+(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513
+2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g
+(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f
+(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34
+3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p
+507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p
+1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d
+(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929
+y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f
+(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d
+(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513
+3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p
+2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of)
+1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099
+3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862
+3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311
+3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160
+3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e
+(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently)
+1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5
+b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513
+3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V
+34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31
+w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v
+349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h
+(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513
+3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6
+b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946
+y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d
+(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g
+(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513
+4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n
+(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f
+(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828
+4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24
+b(Capabilities)1905 5381 y(23)p eop
+%%Page: 24 25
+24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p
+1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215
+V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235
+V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31
+w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v
+614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.)
+49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427
+y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5
+b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a
+Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V
+28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094
+V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f
+(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6
+b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879
+766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30
+b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o
+(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h
+Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25
+b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107
+1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518
+y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325
+1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879
+2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e
+(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n
+(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41
+b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e
+Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g
+(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6
+b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d
+(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51
+b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h
+Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g
+Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879
+2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e
+Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27
+b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n
+(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d
+Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71
+3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877
+3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224
+4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d
+(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879
+3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28
+b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399
+y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35
+b(descriptor)h(member)1879 3512 y Fp(constraint.word)p
+2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o
+(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40
+b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33
+b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28
+b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g
+(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879
+3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j
+(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n
+(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o
+(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303
+a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303
+V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565
+v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e
+(applicable)i(to)e(string-v)n(alued)k(options)1879 4415
+y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e
+(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i
+(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641
+28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e
+Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the)
+e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p
+3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23
+b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905
+5381 y(24)p eop
+%%Page: 25 26
+25 25 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 32 a 91 x Fq(Y)-10 b(ou)33
+b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e
+Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f
+(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g
+(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p
+Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23
+b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o
+(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f
+(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746
+y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g
+(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f
+(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i
+Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the)
+h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o
+(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that)
+g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g
+(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46
+b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24
+b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p
+883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377
+V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549
+y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d
+Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or)
+f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f
+(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j
+(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g
+(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h
+Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0
+3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g
+(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e
+(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p
+Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i
+Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22
+b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538
+y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22
+b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h
+Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0
+3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d
+Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0
+3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34
+b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g
+(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0
+4049 y(should)h(use)f(the)g(function)i Fp(gettext)19
+b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24
+b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0
+4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g
+(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i
+(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c
+(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23
+b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g
+(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0
+4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the)
+g(gette)o(xt)h(tools.)2241 4843 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 2241 4843 a 2241 4843
+a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 2241 4843 a 2241 4843 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 2241 4843 a 1905 5381 a Fq(25)p
+eop
+%%Page: 26 27
+26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 385 y Fm(4.3.1)99
+b Fc(sane)p 545 385 30 4 v 35 w(init)0 611 y Fq(This)35
+b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d
+(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h
+(SANE)0 724 y(back)o(end)h(is)e(unde\002ned)i(if)e(this)h(function)i
+(is)d(not)g(called)i(\002rst.)60 b(The)34 b(v)o(ersion)i(code)f(of)f
+(the)g(back)o(end)j(is)d(returned)i(in)0 837 y(the)28
+b(v)n(alue)h(pointed)h(to)e(by)h Fp(version)p 1267 837
+28 4 v 29 w(code)p Fq(.)40 b(If)28 b(that)h(pointer)h(is)d
+Fp(NULL)p Fq(,)f(no)i(v)o(ersion)i(code)e(is)g(returned.)45
+b(Ar)n(gument)0 950 y Fp(authorize)18 b Fq(is)23 b(either)i(a)e
+(pointer)i(to)e(a)g(function)i(that)f(is)f(in)l(v)n(ok)o(ed)j(when)d
+(the)h(back)o(end)h(requires)h(authentication)h(for)d(a)0
+1063 y(speci\002c)g(resource)i(or)e Fp(NULL)c Fq(if)k(the)g(frontend)h
+(does)g(not)f(support)h(authentication.)227 1287 y Fp(SANE_Status)50
+b(sane_init)g(\(SANE_Int)h(*)j(version_code,)1482 1400
+y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o(ba)o(ck)48 b(authorize\);)0
+1625 y Fq(The)23 b(authorization)28 b(function)d(may)f(be)f(called)i
+(by)f(a)f(back)o(end)i(in)f(response)i(to)d(an)o(y)h(of)f(the)h(follo)n
+(wing)h(calls:)227 1849 y Fp(sane)p 452 1849 V 31 w(open)p
+Fq(,)c Fp(sane)p 967 1849 V 31 w(control)p 1383 1849
+V 29 w(option)p Fq(,)f Fp(sane)p 2005 1849 V 31 w(start)0
+2074 y Fq(If)25 b(a)h(back)o(end)i(w)o(as)d(initialized)k(without)d
+(authorization)k(function,)e(then)f(authorization)i(requests)f(that)e
+(cannot)i(be)d(han-)0 2187 y(dled)k(by)g(the)g(back)o(end)i(itself)f
+(will)e(f)o(ail)h(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n
+(v)o(ented)i(from)d(accessing)k(protected)0 2300 y(resources.)66
+b(Back)o(ends)37 b(are)f(encouraged)i(to)d(implement)h(means)g(of)f
+(authentication)40 b(that)35 b(do)h(not)f(require)i(user)f(as-)0
+2413 y(sistance.)64 b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f
+(authenticates)j(users)e(through)h(a)d(login)i(process)g(a)e(back)o
+(end)j(could)0 2526 y(automatically)27 b(lookup)e(the)f(apporpriate)i
+(passw)o(ord)g(based)e(on)g(resource-)i(and)e(user)n(-name.)0
+2690 y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n
+(wing)h(declaration:)227 2915 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o
+(E_)o(LEN)157 b(128)227 3028 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o
+(LEN)157 b(128)227 3254 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o
+(on)o(_C)o(al)o(lba)o(ck)o(\))445 3367 y(\(SANE_String_Con)o(st)c
+(resource,)500 3480 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o
+(NAM)o(E_)o(LE)o(N])o(,)500 3592 y(SANE_Char)g(password[SANE_MA)o(X_)o
+(PA)o(SS)o(WOR)o(D_)o(LE)o(N])o(\);)0 3817 y Fq(Three)31
+b(ar)n(guments)i(are)e(passed)h(to)f(the)g(authorization)j(function:)46
+b Fp(resource)26 b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h
+(of)0 3930 y(the)24 b(resource)j(that)d(requires)i(authorization.)35
+b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d
+(user)n(-prompt)k(requesting)0 4043 y(a)36 b(username)i(and)f(a)g
+(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b
+Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g
+(array)g(of)0 4156 y Fp(SANE)p 225 4156 V 31 w(MAX)p
+421 4156 V 31 w(USERNAME)p 892 4156 V 29 w(LEN)22 b Fq(and)i
+Fp(SANE)p 1482 4156 V 31 w(MAX)p 1678 4156 V 32 w(PASSWORD)p
+2150 4156 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6
+b(.)33 b(The)23 b(authorization)0 4269 y(call)k(should)h(place)f(the)f
+(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38
+b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0
+4382 y(NUL)c(terminated.)0 4680 y Fm(4.3.2)99 b Fc(sane)p
+545 4680 30 4 v 35 w(exit)0 4906 y Fq(This)26 b(function)i(must)e(be)g
+(called)h(to)f(terminate)h(use)f(of)g(a)g(back)o(end.)38
+b(The)25 b(function)j(will)e(\002rst)f(close)i(all)f(de)n(vice)h
+(handles)0 5019 y(that)d(still)h(might)f(be)f(open)i(\(it)f(is)f
+(recommended)j(to)e(close)h(de)n(vice)f(handles)i(e)o(xplicitly)g
+(through)g(a)d(call)h(to)g Fp(sane)p 3656 5019 28 4 v
+31 w(clo-)0 5132 y(se\(\))p Fq(,)k(b)n(ut)h(back)o(ends)j(are)d
+(required)i(to)e(release)i(all)e(resources)j(upon)e(a)e(call)i(to)f
+(this)g(function\).)48 b(After)29 b(this)h(function)1905
+5381 y(26)p eop
+%%Page: 27 28
+27 27 bop 0 123 a Fq(returns,)36 b(no)c(function)i(other)f(than)g
+Fp(sane)p 1396 123 28 4 v 31 w(init\(\))28 b Fq(may)k(be)g(called)h
+(\(re)o(gardless)h(of)e(the)h(status)g(v)n(alue)g(returned)h(by)0
+236 y Fp(sane)p 225 236 V 31 w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)
+f(call)g(this)g(function)i(may)d(result)i(in)e(some)h(resources)i(not)e
+(being)g(released)i(properly)-6 b(.)227 482 y Fp(void)53
+b(sane_exit)d(\(void\);)0 789 y Fm(4.3.3)99 b Fc(sane)p
+545 789 30 4 v 35 w(get)p 760 789 V 35 w(devices)0 1022
+y Fq(This)21 b(function)i(can)e(be)g(used)h(to)f(query)h(the)g(list)f
+(of)g(de)n(vices)h(that)g(are)f(a)n(v)n(ailable.)30 b(If)21
+b(the)g(function)i(e)o(x)o(ecutes)g(successfully)-6 b(,)0
+1135 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h Fp(NULL)d
+Fq(terminated)24 b(array)f(of)f(pointers)h(to)f Fp(SANE_Device)16
+b Fq(structures)25 b(in)d Fp(*device)p 3635 1135 28 4
+v 29 w(list)p Fq(.)0 1248 y(The)27 b(returned)i(list)f(is)f(guaranteed)
+j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g(\(a\))f(another)i
+(call)f(to)f(this)h(function)h(is)e(per)n(-)0 1361 y(formed)f(or)e
+(\(b\))h(a)g(call)g(to)g Fp(sane)p 1056 1361 V 31 w(exit\(\))c
+Fq(is)j(performed.)35 b(This)25 b(function)i(can)e(be)g(called)h
+(repeatedly)h(to)e(detect)h(when)0 1474 y(ne)n(w)g(de)n(vices)j(become)
+e(a)n(v)n(ailable.)41 b(If)27 b(ar)n(gument)h Fp(local)p
+1899 1474 V 31 w(only)c Fq(is)j(true,)h(only)f(local)h(de)n(vices)g
+(are)f(returned)i(\(de)n(vices)0 1587 y(directly)f(attached)h(to)d(the)
+h(machine)h(that)f(SANE)d(is)i(running)j(on\).)37 b(If)27
+b(it)f(is)g(f)o(alse,)i(the)f(de)n(vice)g(list)g(includes)i(all)e
+(remote)0 1699 y(de)n(vices)e(that)f(are)g(accessible)i(to)e(the)f
+(SANE)f(library)-6 b(.)227 1945 y Fp(SANE_Status)50 b(sane_get_devic)o
+(es)e(\(const)k(SANE_Device)d(***)54 b(device_list,)1864
+2058 y(SANE_Bool)c(local_only\);)0 2304 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g Fp(SANE)p 1242 2304
+V 31 w(STATUS)p 1603 2304 V 30 w(NO)p 1743 2304 V 31
+w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e(memory)h(is)f(a)
+n(v)n(ailable.)1357 2574 y Fr(Back)o(end)f(Implementation)i(Note)227
+2725 y Fq(SANE)h(does)k(not)f(require)h(that)f(this)h(function)g(is)f
+(called)h(before)g(a)e Fp(sane)p 2646 2725 V 31 w(open\(\))d
+Fq(call)k(is)f(performed.)227 2838 y(A)32 b(de)n(vice)j(name)e(may)g
+(be)g(speci\002ed)i(e)o(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h
+(mak)o(e)g(it)f(unnecessary)j(and)227 2950 y(undesirable)31
+b(to)c(call)h(this)g(function)h(\002rst.)1619 2871 y
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+
+1619 2871 a 1619 2871 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 1619 2871 a 79 x Fq(The)e(same)g(information)j
+(about)e(a)f(de)n(vice)i(has)e(to)h(be)f(returned)227
+3063 y(when)d Fp(sane)p 672 3063 28 4 v 31 w(open)d Fq(is)i(called.)
+1290 3063 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 1290 3063 a 1290 3063 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 1290 3063 a 1290
+3063 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 1290 3063 a 0 3371 a Fm(4.3.4)99 b Fc(sane)p 545
+3371 30 4 v 35 w(open)0 3604 y Fq(This)26 b(function)h(is)f(used)h(to)e
+(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36
+b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0
+3717 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40
+b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33
+b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e
+Fp(*h)p Fq(.)0 3751 y
+ -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch
+pop /CBarY65 exch def
+ 0 3751 a 0 3751 a
+ 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint
+exch pop /CBarY66 exch def
+ 0 3751 a 79 x
+Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e
+Fp(**device)p 2040 3830 28 4 v 29 w(description)p Fq(.)i(This)e(is)f
+(the)i(same)f(description)j(that)0 3943 y(is)h(returned)j(in)d(the)h
+(list)g(by)f Fp(sane)p 1144 3943 V 31 w(get)p 1340 3943
+V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g
+Fp(*h)c Fq(and)j Fp(*device)p 3186 3943 V 30 w(description)23
+b Fq(is)0 4055 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid)
+i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4055 V 30 w(close\(\))c
+Fq(is)j(performed.)3231 4055 y
+ -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch
+pop /CBarY67 exch def
+ 3231 4055 a 3231 4055
+a
+ 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint
+exch pop /CBarY68 exch def
+ 3231 4055 a 3231 4055 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore
+ 3231 4055 a 28 w Fq(As)g(a)g(special)i(case,)
+0 4168 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n
+(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n
+(vice)e(\(if)f(there)h(is)g(such)g(a)0 4281 y(de)n(vice\).)227
+4527 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k
+(SANE_Handle)d(*)55 b(h,)227 4640 y(const)e(SANE_Device)c(**)54
+b(device_descrip)o(ti)o(on\))o(;)0 4886 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h
+(status)g(codes.)227 5132 y Fp(SANE)p 452 5132 28 4 v
+31 w(STATUS)p 813 5132 V 30 w(DEVICE)p 1173 5132 V 30
+w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(currently)j(b)n(usy)f
+(\(in)f(use)f(by)h(somebody)i(else\).)1905 5381 y(27)p
+eop
+%%Page: 28 29
+28 28 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(STATUS)p
+813 123 V 30 w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f
+(not)h(v)n(alid.)227 269 y Fp(SANE)p 452 269 V 31 w(STATUS)p
+813 269 V 30 w(IO)p 953 269 V 32 w(ERROR)p Fr(:)43 b
+Fq(An)23 b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n
+(vice.)227 415 y Fp(SANE)p 452 415 V 31 w(STATUS)p 813
+415 V 30 w(NO)p 953 415 V 32 w(MEM)p Fr(:)44 b Fq(An)23
+b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227
+561 y Fp(SANE)p 452 561 V 31 w(STATUS)p 813 561 V 30
+w(ACCESS)p 1173 561 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30
+b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n
+(\002cient)427 674 y(or)24 b(in)l(v)n(alid)h(authentication.)0
+982 y Fm(4.3.5)99 b Fc(sane)p 545 982 30 4 v 35 w(close)0
+1215 y Fq(This)32 b(function)h(terminates)h(the)e(association)j
+(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h
+Fp(h)e Fq(and)h(the)g(de)n(vice)0 1328 y(it)h(represents.)59
+b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g
+(to)g Fp(sane)p 2326 1328 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j
+(\002rst.)57 b(After)33 b(this)0 1441 y(function)26 b(returns,)f
+(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227
+1712 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0
+2020 y Fm(4.3.6)99 b Fc(sane)p 545 2020 30 4 v 35 w(get)p
+760 2020 V 35 w(option)p 1155 2020 V 35 w(descriptor)0
+2253 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f
+(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h
+(descriptor)g(for)f(option)0 2366 y(number)i Fp(n)e Fq(of)h(the)h(de)n
+(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36
+b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0
+2479 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g
+(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de)
+n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2592 y(includes)22
+b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i
+(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p
+Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 2705
+y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h
+(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227
+2976 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48
+b(*)445 3089 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3397 y Fm(4.3.7)99
+b Fc(sane)p 545 3397 V 35 w(control)p 1000 3397 V 34
+w(option)0 3630 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g
+(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e
+Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 3743
+y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f
+(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h
+Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 3855
+y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6
+b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through)
+g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 3968 y(is)21 b(a)f(pointer)j(to)e
+(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29
+b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f
+Fq(must)h(be)g(big)g(enough)0 4081 y(to)26 b(hold)g(the)g(entire)h
+(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d
+Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39
+b(The)0 4194 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h
+(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e
+(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4307 y Fp(v)33
+b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h
+(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d
+(\002rst)f Fp(NUL)0 4420 y Fq(terminator)c(in)e(the)g(string.)44
+b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p
+Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o
+(vide)i(details)g(on)e(ho)n(w)0 4533 y(well)23 b(the)h(request)h(has)f
+(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d
+(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)227
+4779 y Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e(\(SANE_Handle)h
+(h,)k(SANE_Int)e(n,)2027 4892 y(SANE_Action)f(a,)j(void)g(*v,)2027
+5005 y(SANE_Int)e(*)j(i\);)1905 5381 y Fq(28)p eop
+%%Page: 29 30
+29 29 bop 185 35 3531 4 v 183 148 4 113 v 628 114 a Fr(Symbol)p
+1363 148 V 1363 148 V 493 w(Code)p 1664 148 V 1664 148
+V 850 w(Description)p 3714 148 V 185 151 3531 4 v 185
+168 V 183 281 4 113 v 234 247 a Fp(SANE)p 459 247 28
+4 v 31 w(ACTION)p 820 247 V 30 w(GET)p 1015 247 V 32
+w(VALUE)p 1363 281 4 113 v 254 w Fq(0)p 1664 281 V 100
+w(Get)23 b(current)i(option)g(v)n(alue.)p 3714 281 V
+183 619 4 339 v 234 360 a Fp(SANE)p 459 360 28 4 v 31
+w(ACTION)p 820 360 V 30 w(SET)p 1015 360 V 32 w(VALUE)p
+1363 619 4 339 v 254 w Fq(1)p 1664 619 V 100 w(Set)e(option)i(v)n
+(alue.)31 b(The)24 b(option)h(v)n(alue)g(passed)h(through)g(ar)n(-)1716
+473 y(gument)21 b Fp(v)d Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o
+(end)i(if)e(the)g(v)n(alue)1716 585 y(cannot)25 b(be)e(set)h(e)o
+(xactly)-6 b(.)p 3714 619 V 183 1184 4 565 v 234 698
+a Fp(SANE)p 459 698 28 4 v 31 w(ACTION)p 820 698 V 30
+w(SET)p 1015 698 V 32 w(AUTO)p 1363 1184 4 565 v 309
+w Fq(2)p 1664 1184 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38
+b(Back)o(end)28 b(or)f(de)n(vice)g(will)g(au-)1716 811
+y(tomatically)39 b(select)g(an)e(appropriate)k(v)n(alue.)71
+b(This)38 b(mode)1716 924 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o
+(v)o(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1037
+y(v)n(alue)22 b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h
+Fp(v)e Fq(is)h(completely)1716 1150 y(ignored)j(in)f(this)g(case)g(and)
+g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1184 V 185 1187 3531
+4 v 1168 1341 a(T)-7 b(able)24 b(4.7:)29 b(Action)24
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 1341 28 4 v
+31 w(Action)p Fq(\))0 1714 y(The)d(w)o(ay)h(the)f(option)j(is)d(af)n
+(fected)i(by)f(a)f(call)h(to)g(this)g(function)i(is)d(controlled)k(by)c
+(parameter)j Fp(a)c Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0
+1827 y Fp(SANE)p 225 1827 V 31 w(Action)p Fq(.)k(The)e(possible)j(v)n
+(alues)f(and)f(their)g(meaning)h(is)e(described)j(in)e(T)-7
+b(able)23 b(4.7.)0 1998 y(After)k(setting)h(a)e(v)n(alue)h(via)g(an)g
+(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o
+Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0
+2111 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e
+Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h
+(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0
+2224 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g
+(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2396 y(This)g(function)j(may)
+d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+2642 y Fp(SANE)p 452 2642 V 31 w(STATUS)p 813 2642 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h
+(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427
+2755 y(option)e(number)-5 b(.)227 2901 y Fp(SANE)p 452
+2901 V 31 w(STATUS)p 813 2901 V 30 w(INVAL)p Fr(:)44
+b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227
+3047 y Fp(SANE)p 452 3047 V 31 w(STATUS)p 813 3047 V
+30 w(IO)p 953 3047 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+3193 y Fp(SANE)p 452 3193 V 31 w(STATUS)p 813 3193 V
+30 w(NO)p 953 3193 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3339
+y Fp(SANE)p 452 3339 V 31 w(STATUS)p 813 3339 V 30 w(ACCESS)p
+1173 3339 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h
+(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427
+3452 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3760
+y Fm(4.3.8)99 b Fc(sane)p 545 3760 30 4 v 35 w(get)p
+760 3760 V 35 w(parameters)0 3993 y Fq(This)28 b(function)i(is)e(used)h
+(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44
+b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0
+4106 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h
+(started)h(\()p Fp(sane)p 2070 4106 28 4 v 31 w(start\(\))19
+b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0
+4219 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6
+b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates)
+e(of)g(what)f(the)g(parameters)0 4332 y(will)23 b(be)g(when)g
+Fp(sane)p 716 4332 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32
+b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i
+(started)g(allo)n(ws,)0 4445 y(for)c(e)o(xample,)h(to)e(get)h(an)g
+(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27
+b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0
+4558 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f
+(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer)
+j Fp(p)c Fq(to)i(a)g(parameter)0 4671 y(structure.)k(The)23
+b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n
+(w)-6 b(.)227 4942 y Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e
+(\(SANE_Handle)h(h,)2027 5055 y(SANE_Parameters)f(*)54
+b(p\);)1905 5381 y Fq(29)p eop
+%%Page: 30 31
+30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046
+a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746
+1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103
+1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a
+Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p
+1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21
+b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g
+(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h
+(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j
+(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797
+1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h
+(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i
+(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d
+(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797
+1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49
+b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f
+(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797
+2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32
+b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31
+b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28
+b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e
+(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h
+(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455
+V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4
+v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30
+w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133
+V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n
+(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f
+(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797
+2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g
+Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j
+(should)e(reload)g(all)f(options.)1797 2986 y(This)36
+b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one)
+1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923
+4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p
+628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444
+3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g
+(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797
+3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p
+2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797
+3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f
+(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26
+b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if)
+1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30
+b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33
+b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797
+3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4
+791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29
+b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option)
+1905 5381 y(30)p eop
+%%Page: 31 32
+31 31 bop 0 123 a Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e
+(a)f(structure)k(of)d(type)g Fp(SANE)p 2314 123 28 4
+v 31 w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0
+236 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910
+157 y
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 910 157 a 910 157 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 910 157 a 227 456 a Fp(typedef)52
+b(struct)336 569 y({)445 682 y(SANE_Frame)e(format;)445
+795 y(SANE_Int)h(flags;)445 908 y(SANE_Int)g(lines;)445
+1021 y(SANE_Int)g(depth;)445 1134 y(SANE_Int)g(pixels_per_line;)445
+1247 y(SANE_Int)g(bytes_per_line;)445 1360 y(SANE_Int)g
+(channels_per_ima)o(ge)o(;)445 1473 y(SANE_String)f(format_desc;)445
+1586 y(SANE_String)g(proposed_filena)o(me)o(;)445 1698
+y(SANE_Int)h(dpi_x;)445 1811 y(SANE_Int)g(dpi_y;)445
+1924 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j
+(*/)336 2037 y(})227 2150 y(SANE_Parameters)o(;)0 2371
+y Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f(the)g
+(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38 b(possible)i(v)n
+(alues)f(for)f(type)0 2484 y Fp(SANE)p 225 2484 28 4
+v 31 w(Frame)24 b Fq(are)k(described)h(in)e(T)-7 b(able)28
+b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n(alues)h(is)e(described)
+i(in)f(more)f(detail)h(in)f(Sec-)0 2597 y(tion)d(3.2.)0
+2691 y
+ -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch
+pop /CBarY73 exch def
+ 0 2691 a 0 2691 a
+ 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint
+exch pop /CBarY74 exch def
+ 0 2691 a 217 2694 3466 4 v 215
+2807 4 113 v 535 2773 a Fr(Symbol)p 1144 2807 V 1144
+2807 V 368 w(Code)p 1446 2807 V 1446 2807 V 100 w(SANE)d(standard)p
+2159 2807 V 2159 2807 V 586 w(Description)p 3681 2807
+V 217 2810 3466 4 v 217 2827 V 215 2940 4 113 v 267 2906
+a Fp(SANE)p 492 2906 28 4 v 31 w(FRAME)p 798 2906 V 31
+w(GRAY)p 1144 2940 4 113 v 230 w Fq(0)p 1446 2940 V 318
+w(v)o(ersion)k(1)p 2159 2940 V 240 w(Band)f(co)o(v)o(ering)h(human)f
+(visual)h(range.)p 3681 2940 V 215 3052 V 267 3019 a
+Fp(SANE)p 492 3019 28 4 v 31 w(FRAME)p 798 3019 V 31
+w(RGB)p 1144 3052 4 113 v 285 w Fq(1)p 1446 3052 V 318
+w(v)o(ersion)g(1)p 2159 3052 V 240 w(Pix)o(el-interlea)n(v)o(ed)i
+(red/green/blue)h(bands.)p 3681 3052 V 215 3165 V 267
+3132 a Fp(SANE)p 492 3132 28 4 v 31 w(FRAME)p 798 3132
+V 31 w(RED)p 1144 3165 4 113 v 285 w Fq(2)p 1446 3165
+V 318 w(v)o(ersion)d(1)p 2159 3165 V 240 w(Red)e(band)i(of)e(a)g
+(red/green/blue)28 b(image.)p 3681 3165 V 215 3278 V
+267 3244 a Fp(SANE)p 492 3244 28 4 v 31 w(FRAME)p 798
+3244 V 31 w(GREEN)p 1144 3278 4 113 v 175 w Fq(3)p 1446
+3278 V 318 w(v)o(ersion)d(1)p 2159 3278 V 240 w(Green)f(band)g(of)g(a)f
+(red/green/blue)28 b(image.)p 3681 3278 V 215 3391 V
+267 3357 a Fp(SANE)p 492 3357 28 4 v 31 w(FRAME)p 798
+3357 V 31 w(BLUE)p 1144 3391 4 113 v 230 w Fq(4)p 1446
+3391 V 318 w(v)o(ersion)d(1)p 2159 3391 V 240 w(Blue)e(band)i(of)e(a)g
+(red/green/blue)28 b(image.)p 3681 3391 V 215 3504 V
+267 3470 a Fp(SANE)p 492 3470 28 4 v 31 w(FRAME)p 798
+3470 V 31 w(RAW)p 1144 3504 4 113 v 285 w Fq(5)p 1446
+3504 V 318 w(v)o(ersion)d(2)p 2159 3504 V 240 w(Arbitrary)g(pix)o(el)f
+(property)i(transmission.)p 3681 3504 V 215 3617 V 267
+3583 a Fp(SANE)p 492 3583 28 4 v 31 w(FRAME)p 798 3583
+V 31 w(MIME)p 1144 3617 4 113 v 230 w Fq(6)p 1446 3617
+V 318 w(v)o(ersion)f(2)p 2159 3617 V 240 w(Data)e(described)j(by)e(a)f
+(mime)g(descriptor)-5 b(.)p 3681 3617 V 217 3620 3466
+4 v 1194 3774 a(T)e(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p
+Fp(SANE)p 2377 3774 28 4 v 31 w(Frame)p Fq(\))0 3889
+y
+ -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch
+pop /CBarY75 exch def
+ 0 3889 a 0 3889 a
+ 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint
+exch pop /CBarY76 exch def
+ 0 3889 a 0 3889 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore
+ 0 3889 a 255 x
+Fq(The)e Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h
+(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g
+(de\002ned,)h(all)f(unused)i(bits)0 4257 y(ha)n(v)o(e)g(to)g(be)f(set)h
+(to)f(0:)136 4499 y Fk(\017)46 b Fp(SANE)p 452 4499 28
+4 v 31 w(PFLAG)p 758 4499 V 31 w(LAST)p 1009 4499 V 31
+w(FRAME)27 b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g
+(if)g(and)h(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227
+4612 y(being)23 b(acquired)i(\(or)d(the)g(frame)g(that)g(will)g(be)g
+(acquired)i(ne)o(xt)e(if)g(there)h(is)f(no)g(current)h(frame\))g(is)f
+(the)g(last)g(frame)g(of)227 4725 y(a)g(multi)h(frame)g(image)g
+(\(e.g.,)f(the)h(current)h(frame)f(is)f(the)h(blue)g(component)i(of)e
+(a)f(red,)h(green,)g(blue)h(image\).)29 b(Note,)227 4838
+y(that)24 b(it)g(is)f(possible)j(to)d(transmit)i(multiple)g(images)f
+(in)f(succession.)136 5019 y Fk(\017)46 b Fp(SANE)p 452
+5019 V 31 w(PFLAG)p 758 5019 V 31 w(MORE)p 1009 5019
+V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\))e(is)g(set)g(to)g
+(1)f(to)h(indicate)i(further)f(pending)h(images.)40 b(It)26
+b(is)227 5132 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f(1)g
+(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g(determined)i
+(at)e(a)g(v)o(ery)g(early)h(time,)f(where)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0
+5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 5151 a 1905 5381
+a Fq(31)p eop
+%%Page: 32 33
+32 32 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 32 a 227 123 a Fq(it)21
+b(might)g(not)h(be)f(detectable,)i(if)e(there)h(actually)h(are)e(more)g
+(images)h(to)f(transfer)h(\(e.g.)28 b(you)22 b(will)e(usually)j(not)e
+(kno)n(w)227 236 y(if)31 b(the)h(document)h(feeder)g(contains)g
+(further)g(pages)g(when)e(starting)i(to)f(scan)g(the)f(current)i(one.)
+53 b(Thus)31 b(you)h(are)227 349 y(allo)n(wed)25 b(to)e(set)h(that)g
+(bit)g(b)n(ut)g(later)g(f)o(ail)g(at)f Fp(sane)p 1808
+349 28 4 v 31 w(start\(\))p Fq(.)136 536 y Fk(\017)46
+b Fp(SANE)p 452 536 V 31 w(PFLAG)p 758 536 V 31 w(NEW)p
+954 536 V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h
+(to)g(1)f(to)h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g
+(a)227 649 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g
+(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group)
+h(multi-image)227 762 y(scans.)136 949 y Fk(\017)46 b
+Fp(SANE)p 452 949 V 31 w(PFLAG)p 758 949 V 31 w(BACKSIDE)18
+b Fq(\(bit)24 b(3,)e(bitv)n(alue)j(8\))e(tell)g(if)g(the)g(current)i
+(image)e(w)o(as)g(acquired)i(from)e(the)g(front)h(\(0\))227
+1062 y(or)j(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g
+(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n
+(ws)g(to)f(group)227 1175 y(and)e(order)h(multi-image)g(transfers)h(re)
+o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h
+(\002rst/back)g(\002rst\).)0 1444 y(Note,)d(that)h(\003ags)e(is)h
+(compatible)j(to)c(member)i Fp(last)p 1715 1444 V 31
+w(frame)18 b Fq(of)k Fp(SANE)p 2356 1444 V 31 w(Parameters)17
+b Fq(of)22 b(SANE)e(standard)k(v)o(ersion)0 1557 y(1)f(\(same)h(size)g
+(and)g(only)g(bit)g(0)f(\(bitv)n(alue)j(1\))d(w)o(as)h(used)g(with)f
+(same)h(function\).)0 1728 y(Member)33 b Fp(lines)d Fq(speci\002es)35
+b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)
+57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0
+1841 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)
+h(frontend)h(should)g(call)f Fp(sane)p 2572 1841 V 31
+w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0
+1954 y Fp(SANE)p 225 1954 V 31 w(STATUS)p 586 1954 V
+30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f(transferring)k
+(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i(inband,)h(it)c(is)0
+2067 y(recommended)23 b(to)e(set)g(that)g(member)l(,)h(if)f(a)n(v)n
+(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h(applicable,)i
+(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0 2238
+y(Member)31 b Fp(bytes)p 618 2238 V 30 w(per)p 813 2238
+V 32 w(line)d Fq(speci\002es)k(the)f(number)h(of)f(bytes)h(that)f
+(comprise)i(one)e(scan)g(line.)52 b(If)30 b(bytes)p 3585
+2238 V 35 w(per)p 3735 2238 V 34 w(line)0 2351 y(is)e(set)g(to)g(0,)g
+(which)h(can)f(currently)i(only)f(be)f(the)g(case)h(for)f
+Fp(SANE)p 2150 2351 V 31 w(FRAME)p 2456 2351 V 30 w(MIME)p
+Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0 2464
+y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i(simply)e
+(try)h(to)f(read)h(until)g Fp(SANE)p 2490 2464 V 31 w(STATUS)p
+2851 2464 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h(block)0
+2576 y(length.)0 2747 y(Member)f Fp(depth)c Fq(speci\002es)27
+b(the)f(number)g(of)g(bits)g(per)g(sample.)35 b(Note,)26
+b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g(n*8)0
+2860 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23 b(with)h(other)g
+(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6
+b(.)0 3031 y(Member)24 b Fp(pixels)p 666 3031 V 30 w(per)p
+861 3031 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g
+(that)g(comprise)h(one)f(scan)g(line.)0 3203 y(Assume)k
+Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then)
+h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f
+Fp(depth)p Fq(\))e(and)0 3315 y(the)e(number)i(of)e(pix)o(els)h(per)f
+(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h
+Fp(pixels)p 2416 3315 V 30 w(per)p 2611 3315 V 31 w(line)p
+Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0
+3428 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h
+Fp(bytes)p 1675 3428 V 31 w(per)p 1871 3428 V 31 w(line)p
+Fq(\))d(as)j(follo)n(ws:)1214 3694 y Fh(c)i(>)p Fj(=)1445
+3550 y Fb(\()1554 3637 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p
+Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 3750
+y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h
+Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g
+Fj(1)0 3956 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g
+(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by)
+f(the)g(right)g(side)g(of)0 4068 y(this)c(equation.)31
+b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f
+(such)i(\223padded\224)h(image)e(formats.)0 4240 y(Member)f
+Fp(channels)p 775 4240 V 29 w(per)p 969 4240 V 31 w(image)d
+Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the)e(image)f(consists)
+j(of.)j(When)23 b(the)g(image)0 4352 y(is)29 b(transmitted)i(in)e(more)
+g(than)g(one)h(frame)f Fp(channels)p 1869 4352 V 29 w(per)p
+2063 4352 V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g
+(frames)h(for)f(this)0 4465 y(image.)0 4636 y(Member)d
+Fp(format)p 668 4636 V 30 w(desc)e Fq(is)h(used)i(for)f(the)h(ne)n(w)e
+(frametypes)j Fp(SANE)p 2310 4636 V 31 w(FRAME)p 2616
+4636 V 30 w(RAW)c Fq(and)j Fp(SANE)p 3212 4636 V 31 w(FRAME)p
+3518 4636 V 30 w(MIME)p Fq(.)c(Its)0 4749 y(meaning)i(dif)n(fers)g
+(between)f(the)g(tw)o(o)f(types:)136 5019 y Fk(\017)46
+b Fp(SANE)p 452 5019 V 31 w(FRAME)p 758 5019 V 31 w(RAW)p
+Fq(:)26 b(The)h Fp(format)p 1503 5019 V 30 w(desc)e Fq(contains)30
+b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f(an)g(optional)227
+5132 y(depth)d(information)h(separated)g(by)e(a)f(colon\(:\).)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 5151 a 1905
+5381 a Fq(32)p eop
+%%Page: 33 34
+33 33 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 32 a 227 123 a Fq(A)23
+b(plane)h(is)g(descibed)h(by)f(one)g(channel,)h(e.g.)k(\224)p
+Fp(gray)p Fq(\224)21 b(or)j(\224)p Fp(gray:12)p Fq(\224.)227
+273 y(Channel)c(interlea)n(v)o(ed)h(data)d(is)g(described)j(by)d(a)g
+(comma)g(separated)i(list)f(of)f(channel)i(descriptions,)i(e.g.)27
+b(\224)p Fp(red,green,blue)p Fq(\224)227 386 y(or)d(\224)p
+Fp(red:8,green:8,b)o(lu)o(e:)o(8)p Fq(\224,)17 b(the)24
+b(channel)h(data)f(is)g(sent)g(in)f(the)h(gi)n(v)o(en)g(order)-5
+b(.)227 536 y(The)24 b(depth)i(information)h(does)e Fr(not)f
+Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f(data,)g
+(it)e(is)g(only)h(an)g(informa-)227 649 y(tion)f(for)g(the)g(frontend.)
+31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f(the)h(size)g
+(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227 799 y(W)-7
+b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p Fq(,)h
+Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p Fq(.)55
+b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel)227
+912 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared)j
+(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24
+b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1025 y(description)e(lik)o(e)e
+Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g
+(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h
+(with)227 1138 y(usefull)f(colors.)227 1288 y(Note)30
+b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d
+(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227
+1401 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f
+(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27
+b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1514 y(is)e(prefered)i(to)e
+(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d
+(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227
+1627 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d
+(de\002ned)i(in)e(member)h Fp(channels)p 2756 1627 28
+4 v 29 w(per)p 2950 1627 V 31 w(image)p Fq(.)136 1815
+y Fk(\017)46 b Fp(SANE)p 452 1815 V 31 w(FRAME)p 758
+1815 V 31 w(MIME)p Fq(:)27 b(The)i Fp(format)p 1561 1815
+V 30 w(desc)e Fq(contains)32 b(the)e(MIME)e(type/subtype)34
+b(*\(;parameter\))e(\002elds)e(as)227 1928 y(described)i(in)c(RFC)f
+(1521,)k(4.)44 b(The)28 b(Content-T)-7 b(ype)31 b(Header)f(Field,)f
+(without)h(the)f(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227
+2041 y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i
+(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g
+(possible,)k(please)227 2154 y(stick)28 b(to)f(the)h(IAN)m(A)d
+(assigned)30 b(MIME)25 b(types,)k(and)f(mak)o(e)f(sure)h(the)f
+(datastream)j(is)d(compliant)i(with)e(the)g(corre-)227
+2266 y(sponding)32 b(speci\002cation.)49 b(When)30 b(data)g(is)f
+(transmitted)j(with)d(the)h(frame)g(type)g Fp(SANE)p
+3051 2266 V 31 w(FRAME)p 3357 2266 V 30 w(MIME)d Fq(all)j(data)227
+2379 y(has)h(to)f(be)g(transmitted)j(within)d(one)h(frame,)h(multiple)f
+(frames)g(are)f(not)h(allo)n(wed)g(\(so)f(the)h(\003ag)e
+Fp(last)p 3601 2379 V 31 w(frame)227 2492 y Fq(has)24
+b(to)e(be)h(set)g(when)g(using)i(this)e(frame)g(type\).)30
+b(A)21 b(fully)j(compliant)h(SANE)20 b(back)o(end)26
+b(is)c(required)j(to)e(transmit)h(in)227 2605 y(either)29
+b(SANE)d(nati)n(v)o(e)i(frametypes,)j(or)d(in)g(a)f(MIME)g(type,)i(for)
+g(which)f(a)f(con)l(v)o(erting)k(middleend)f(e)o(xists)f(and)f(is)227
+2718 y(freely)d(a)n(v)n(ailable)h(for)e(all)f(platforms.)227
+2868 y(Other)k(formats)g(may)g(be)f(transmitted,)k(b)n(ut)d(the)g(only)
+g(thing)h(the)e(a)n(v)o(erage)j(frontend)f(can)f(do)g(with)f(them,)h
+(is)g(sa)n(v)o(e)227 2981 y(them.)44 b(This)29 b(is)f(not)h(considered)
+j(a)c(good)h(option,)j(as)c(it)h(does)g(not)g(f)o(acilitate)i
+(transmitting)g(the)e(data)g(to)g(a)f(client)227 3094
+y(application)i(that)d(may)g(be)f(running)j(the)e(frontend.)40
+b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g(transferred)j(by)c(the)h
+(back)o(end)i(is)e(not)227 3207 y(an)k(image)f(in)g(nature,)k(it)c(w)o
+(ouldn')n(t)i(mak)o(e)e(sense)i(to)e(try)g(con)l(v)o(erting)k(it)c(an)o
+(yw)o(ay)-6 b(,)32 b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227
+3320 y(simple)22 b Fp(SANE)p 715 3320 V 31 w(FRAME)p
+1021 3320 V 31 w(MIME)c Fq(transfer)24 b(for)d(that)h(case.)29
+b(But)21 b(e)n(v)o(en)g(then,)h(try)g(to)f(stick)h(to)g(well)f(kno)n
+(wn)g(stuf)n(f)h(with)227 3433 y(freely)j(e)o(xisting)g(standards)h
+(and)e(vie)n(wers)h(as)e(well.)0 3704 y(The)g(member)g
+Fp(proposed)p 929 3704 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e
+(suggest)i(a)e(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o
+(xtension)j(in)0 3817 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g
+(such)h(a)e(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g
+(database.)30 b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0
+3930 y(set)k(the)g(\002eld)f(to)g(\224\224.)0 4102 y(In)28
+b(the)h(case)g(of)f(non-MIME)h(frames,)h(this)f(is)f(e)o(xpected)j(to)d
+(hold)h(the)g(basename)h(for)f(the)f(image,)i(with)e(the)h(e)o
+(xtension)0 4215 y(determined)i(by)f(the)f(sa)n(v)o(e)h(function)h(of)e
+(the)h(frontend,)i(as)e(the)f(frontend)i(can)f(fully)g(understand)i
+(the)e(data)g(and)f(is)g(thus)0 4327 y(able)24 b(to)g(encode)h(it)e(in)
+h(an)o(y)f(format)h(it)g(wishes.)0 4499 y(F)o(or)f(MIME)f(frames)i(it)f
+(can)h(contain)h(either:)136 4770 y Fk(\017)46 b Fq(A)23
+b(name)h(with)g(a)g(leading)i(dot,)e(which)g(is)g(considered)j(to)d(be)
+g(a)g(proposed)j(\002lename)d(e)o(xtension.)32 b(This)24
+b(could)i(also)227 4883 y(be)e(gotten)h(from)e(the)h(mime)f(database,)i
+(b)n(ut)f(for)g(systems)h(lacking)g(it,)e(this)h(might)g(be)g(con)l(v)o
+(enient.)32 b(Or:)136 5071 y Fk(\017)46 b Fq(A)23 b(complete)i
+(\002lename,)e(including)j(e)o(xtension.)0 5091 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 5091
+a 0 5091 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 5091 a 0 5091 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 5091 a 1905 5381 a Fq(33)p
+eop
+%%Page: 34 35
+34 34 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 32 a 91 x Fq(Note,)31
+b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g(parse)g(a)f(gi)n(v)
+o(en)i(MIME)d(type)i(internally)-6 b(,)34 b(it)29 b(is)g(perfectly)j
+(permissible)g(to)0 236 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g
+(the)g(proposed)i(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h
+(basename,)h(when)f(using)g(internal)0 349 y(sa)n(v)o(e)g(algorithms)i
+(for)d(dif)n(ferent)j(formats.)0 510 y(In)34 b(an)o(y)g(case,)k(if)c
+(the)g(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f
+(frontend)h(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0
+623 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g
+(local)g(\002lesystem)h(restrictions.)0 785 y(Special)i(care)g(should)g
+(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o
+(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all)
+g(path)0 898 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o
+(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h
+(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0
+1011 y(a)n(v)n(oiding)c(to)c(o)o(v)o(erwrite)i(e)o(xisting)h(\002les.)j
+(\(Creating)d(of)e(leading)h(dot)g(\002les)e(-)g(lik)o(e)i(.rhosts)g(-)
+e(is)h(not)g(an)g(issue)h(here,)f(because)0 1124 y(that')-5
+b(s)25 b(only)f(a)f(propose)j(\002lename)e(e)o(xtension)h(as)f
+(mentioned)h(abo)o(v)o(e.)0 1285 y(The)j(string)h Fp(proposed)p
+848 1285 28 4 v 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f(transmit)i
+(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in)e(the)0
+1398 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of)n(fer)-5
+b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h(information)i
+(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0 1511
+y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j
+(enganged)f(\002lters,)f(etc.)0 1673 y(The)34 b(members)g
+Fp(dpi)p 711 1673 V 32 w(x,)53 b(dpi)p 1071 1673 V 32
+w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h
+(resolution.)63 b(Note,)37 b(that)d(multiple-image)0
+1786 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c
+(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j
+(resolution)g(between)0 1899 y(frames)24 b(of)g(the)f(same)h(image.)0
+2061 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g
+(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h
+(unchanged)j(when)c(future)0 2173 y(e)o(xtensions)j(are)e(done.)30
+b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e
+(to)g(0.)2484 2173 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 2484 2173 a 2484 2173 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 2484 2173
+a 2484 2173 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 2484 2173 a 0 2467 a Fm(4.3.9)99 b Fc(sane)p
+545 2467 30 4 v 35 w(start)0 2690 y Fq(This)23 b(function)j(initiates)g
+(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i
+(by)c(handle)i Fp(h)p Fq(.)227 2906 y Fp(SANE_Status)50
+b(sane_start)g(\(SANE_Handle)f(h\);)0 3121 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h
+(status)g(codes.)227 3337 y Fp(SANE)p 452 3337 28 4 v
+31 w(STATUS)p 813 3337 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22
+b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g
+Fp(sane)p 3297 3337 V 31 w(cancel)p Fq(.)227 3474 y Fp(SANE)p
+452 3474 V 31 w(STATUS)p 813 3474 V 30 w(DEVICE)p 1173
+3474 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6
+b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5
+b(.)227 3612 y Fp(SANE)p 452 3612 V 31 w(STATUS)p 813
+3612 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g
+(jammed.)227 3750 y Fp(SANE)p 452 3750 V 31 w(STATUS)p
+813 3750 V 30 w(NO)p 953 3750 V 32 w(DOCS)p Fr(:)44 b
+Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+3888 y Fp(SANE)p 452 3888 V 31 w(STATUS)p 813 3888 V
+30 w(COVER)p 1118 3888 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4025 y Fp(SANE)p
+452 4025 V 31 w(STATUS)p 813 4025 V 30 w(IO)p 953 4025
+V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 4163 y Fp(SANE)p
+452 4163 V 31 w(STATUS)p 813 4163 V 30 w(NO)p 953 4163
+V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)0 4457 y Fm(4.3.10)99
+b Fc(sane)p 595 4457 30 4 v 35 w(read)0 4680 y Fq(This)19
+b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n
+(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20
+b Fp(buf)e Fq(is)h(a)g(pointer)0 4793 y(to)27 b(a)g(memory)g(area)h
+(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41
+b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f
+Fp(*len)p Fq(.)37 b(A)0 4906 y(back)o(end)d(must)d(set)h(this)g(to)g
+(zero)g(when)g(the)g(call)g(f)o(ails)g(\(i.e.,)h(when)f(a)f(status)i
+(other)f(than)h Fp(SANE)p 3205 4906 28 4 v 30 w(STATUS)p
+3565 4906 V 30 w(GOOD)c Fq(is)0 5019 y(returned\).)50
+b(When)29 b(the)h(call)h(succeeds,)i(the)d(number)g(of)g(bytes)h
+(returned)g(can)f(be)g(an)o(ywhere)h(in)f(the)g(range)g(from)g(0)f(to)0
+5132 y Fp(maxlen)20 b Fq(bytes.)1905 5381 y(34)p eop
+%%Page: 35 36
+35 35 bop 227 123 a Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f(h,)
+54 b(SANE_Byte)c(*)55 b(buf,)1482 236 y(SANE_Int)c(maxlen,)g(SANE_Int)g
+(*)j(len\);)0 482 y Fq(F)o(or)28 b(ef)n(\002cienc)o(y)i(reasons,)h
+(medium)e(to)g(lar)n(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h
+(fe)n(w)f(kilobytes\))j(should)g(be)d(used.)46 b(Re-)0
+595 y(turning)29 b(short)g(reads)g(is)e(allo)n(wed)i(to)e(allo)n(w)h
+(for)g(small)g(b)n(uf)n(fers)h(in)e(the)h(back)o(end.)43
+b(If)28 b(this)g(function)i(is)d(called)i(when)f(no)0
+708 y(data)c(is)g(a)n(v)n(ailable,)h(one)f(of)g(tw)o(o)f(things)i(may)e
+(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h(that)g(is)f(in)g(ef)n
+(fect)i(for)f(handle)h Fp(h)p Fq(.)114 954 y(1.)45 b(If)24
+b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e(mode)g(\(the)h(def)o
+(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f(at)f(least)h(one)g
+(data)f(byte)h(is)227 1067 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g
+(error)g(occurs\).)114 1255 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e
+(in)h(non-blocking)j(I/O)c(mode,)k(the)d(call)g(returns)h(immediately)g
+(with)e(status)i Fp(SANE)p 3656 1255 28 4 v 31 w(STA-)227
+1368 y(TUS)p 397 1368 V 32 w(GOOD)21 b Fq(and)j(with)f
+Fp(*len)e Fq(set)j(to)f(zero.)0 1614 y(The)g(I/O)g(mode)h(of)f(handle)i
+Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f(call)h(to)f Fp(sane)p
+2024 1614 V 31 w(set)p 2220 1614 V 31 w(io)p 2361 1614
+V 32 w(mode\(\))p Fq(.)0 1786 y(This)g(function)j(may)d(f)o(ail)h(with)
+g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+2032 y Fp(SANE)p 452 2032 V 31 w(STATUS)p 813 2032 V
+30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j
+(through)f(a)e(call)h(to)g Fp(sane)p 3297 2032 V 31 w(cancel)p
+Fq(.)227 2178 y Fp(SANE)p 452 2178 V 31 w(STATUS)p 813
+2178 V 30 w(EOF)p Fr(:)45 b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n
+(ailable)j(for)e(the)g(current)h(frame.)44 b(If)28 b
+Fp(sane)p 3199 2178 V 31 w(read)e Fq(sends)427 2291 y(back)f(an)o(y)e
+(image)h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g(return)g(with)g
+Fp(SANE)p 2540 2291 V 31 w(STATUS)p 2901 2291 V 30 w(EOF)p
+Fq(.)227 2437 y Fp(SANE)p 452 2437 V 31 w(STATUS)p 813
+2437 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g
+(jammed.)227 2583 y Fp(SANE)p 452 2583 V 31 w(STATUS)p
+813 2583 V 30 w(NO)p 953 2583 V 32 w(DOCS)p Fr(:)44 b
+Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+2729 y Fp(SANE)p 452 2729 V 31 w(STATUS)p 813 2729 V
+30 w(COVER)p 1118 2729 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 2876 y Fp(SANE)p
+452 2876 V 31 w(STATUS)p 813 2876 V 30 w(IO)p 953 2876
+V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 3022 y Fp(SANE)p
+452 3022 V 31 w(STATUS)p 813 3022 V 30 w(NO)p 953 3022
+V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 3168 y Fp(SANE)p
+452 3168 V 31 w(STATUS)p 813 3168 V 30 w(ACCESS)p 1173
+3168 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)h
+(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427
+3281 y(or)24 b(in)l(v)n(alid)h(authentication.)0 3589
+y Fm(4.3.11)99 b Fc(sane)p 595 3589 30 4 v 35 w(cancel)0
+3822 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f
+(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g
+(operation)g(of)e(the)0 3934 y(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)227 4181 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);)
+0 4427 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h
+(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i
+(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 4540
+y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f
+(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j
+(asynchronously)i(\(e.g.,)0 4653 y(from)37 b(within)g(a)f(signal)j
+(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f
+(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h
+Fq(imply)0 4766 y(that)g(the)f(currently)i(pending)g(operation)h(has)d
+(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e
+(cancellation)i(has)d(been)0 4879 y Fl(initiated)p Fq(.)68
+b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d
+(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0
+4992 y Fp(SANE)p 225 4992 28 4 v 31 w(STATUS)p 586 4992
+V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j
+(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0
+5105 y(this)i(implies)h(that)f(a)f(frontend)i(must)f
+Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g
+(cancelled)i(operation)g(has)e(returned.)1905 5381 y(35)p
+eop
+%%Page: 36 37
+36 36 bop 0 123 a Fm(4.3.12)99 b Fc(sane)p 595 123 30
+4 v 35 w(set)p 810 123 V 35 w(io)p 965 123 V 35 w(mode)0
+350 y Fq(This)21 b(function)j(is)e(used)g(to)f(set)h(the)g(I/O)f(mode)h
+(of)f(handle)i Fp(h)p Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i
+(blocking)h(or)d(non-blocking.)0 463 y(If)i(ar)n(gument)j
+Fp(m)c Fq(is)h Fp(SANE)p 833 463 28 4 v 31 w(TRUE)p Fq(,)e(the)j(mode)f
+(is)h(set)g(to)f(non-blocking)28 b(mode,)23 b(otherwise)i(it')-5
+b(s)24 b(set)g(to)f(blocking)j(mode.)227 691 y Fp(SANE_Status)50
+b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54 b(SANE_Bool)c(m\);)0
+920 y Fq(By)33 b(def)o(ault,)38 b(ne)n(wly)c(opened)h(handles)h
+(operate)g(in)d(blocking)j(mode.)60 b(A)33 b(back)o(end)j(may)d(elect)i
+(not)f(to)g(support)h(non-)0 1032 y(blocking)29 b(I/O)c(mode.)38
+b(In)26 b(such)h(a)f(case)h(the)f(status)i(v)n(alue)f
+Fp(SANE)p 2107 1032 V 31 w(STATUS)p 2468 1032 V 30 w(UNSUPPORTED)20
+b Fq(is)27 b(returned.)39 b(Blocking)0 1145 y(I/O)32
+b(must)g(be)h(supported)i(by)d(all)h(back)o(ends,)k(so)32
+b(calling)i(this)f(function)i(with)d(ar)n(gument)i Fp(m)d
+Fq(set)i(to)f Fp(SANE)p 3509 1145 V 31 w(FALSE)d Fq(is)0
+1258 y(guaranteed)e(to)c(complete)i(successfully)-6 b(.)0
+1424 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h
+(follo)n(wing)h(status)g(codes:)227 1652 y Fp(SANE)p
+452 1652 V 31 w(STATUS)p 813 1652 V 30 w(INVAL)p Fr(:)44
+b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227
+1794 y Fp(SANE)p 452 1794 V 31 w(STATUS)p 813 1794 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)0 2093 y Fm(4.3.13)99 b
+Fc(sane)p 595 2093 30 4 v 35 w(get)p 810 2093 V 35 w(select)p
+1205 2093 V 34 w(fd)0 2320 y Fq(This)25 b(function)j(is)e(used)g(to)g
+(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g(for)d
+(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0
+2433 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h
+(a)f(call)h(to)f Fp(sane)p 1850 2433 28 4 v 31 w(read\(\))d
+Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29
+b(If)21 b(the)h(call)0 2546 y(completes)j(successfully)-6
+b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d
+Fp(*fd)p Fq(.)227 2775 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 3003 y Fq(This)37
+b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g
+Fp(sane)p 2056 3003 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed)
+h(and)f(the)g(returned)0 3116 y(\002le-descriptor)j(is)c(guaranteed)k
+(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h
+(image)f(acquisition)j(\(i.e.,)g(un-)0 3229 y(til)e Fp(sane)p
+339 3229 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 3229
+V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h
+Fp(sane)p 2810 3229 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0
+3342 y Fp(SANE)p 225 3342 V 31 w(STATUS)p 586 3342 V
+30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i
+(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the)
+0 3454 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p
+962 3454 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h
+Fp(SANE)p 2202 3454 V 31 w(STATUS)p 2563 3454 V 30 w(EOF)p
+Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 3567
+y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f
+(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p
+3167 3567 V 31 w(read\(\))p Fq(.)0 3733 y(A)30 b(back)o(end)k(may)e
+(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31
+b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0
+3846 y Fp(SANE)p 225 3846 V 31 w(STATUS)p 586 3846 V
+30 w(UNSUPPORTED)p Fq(.)0 4012 y(Note)25 b(that)h(the)g(only)g
+(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c
+(a)g(host)i(operating-system)i(dependent)0 4125 y(test)23
+b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h
+(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18
+b Fq(or)23 b Fp(poll\(\))0 4238 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f
+(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l
+(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0
+4351 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)
+f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g
+(until)g(a)f(call)g(to)0 4464 y Fp(sane)p 225 4464 V
+31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i
+(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this)
+g(operation)i(is)d(strongly)0 4577 y(encouraged)27 b(as)c(it)g(permits)
+i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g
+(acquisition)j(is)c(in)h(progress.)0 4742 y(This)f(function)j(may)d(f)o
+(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227
+4971 y Fp(SANE)p 452 4971 V 31 w(STATUS)p 813 4971 V
+30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)
+227 5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112
+V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)1905 5381 y(36)p eop
+%%Page: 37 38
+37 37 bop 0 123 a Fm(4.3.14)99 b Fc(sane)p 595 123 30
+4 v 35 w(strstatus)0 356 y Fq(This)28 b(function)i(can)f(be)f(used)h
+(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i
+(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 469
+y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h
+(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f
+(\(full-stop\).)32 b(The)22 b(function)j(is)0 582 y(guaranteed)k(to)c
+(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g
+(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this)
+g(function)h(is)0 695 y(performed.)227 941 y Fp(const)53
+b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g
+(status\);)0 1292 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0
+1558 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i
+(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b
+Fp(sane)p 2797 1558 28 4 v 31 w(init\(\))17 b Fq(and)22
+b Fp(sane)p 3547 1558 V 31 w(exit\(\))0 1671 y Fq(initialize)j(and)d(e)
+o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31
+b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f
+(initialization)j(and)d(before)0 1784 y(e)o(xiting)i(the)f(back)o(end.)
+536 4453 y @beginspecial 0 @llx 0 @lly 601 @urx 542 @ury
+3060 @rhi @setspecial
+%%BeginDocument: figs/flow.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: flow.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Tue Dec 3 22:09:10 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 601 542
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-161.0 577.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr
+% Polyline
+n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr
+% Polyline
+n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 6600 m
+gs 1 -1 sc (image acquisition) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 3825 m
+gs 1 -1 sc (device setup) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 7515 m
+gs 1 -1 sc (- go back to) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5775 7515 m
+gs 1 -1 sc (sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+7275 7515 m
+gs 1 -1 sc (if more frames desired) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 3300 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 5100 m
+gs 1 -1 sc (- sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 4500 m
+gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 4080 m
+gs 1 -1 sc (sane_control_option\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 3600 m
+gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 5700 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 6900 m
+gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6000 m
+gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6450 m
+gs 1 -1 sc (sane_read\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 8100 m
+gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (- sane_init\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 9300 m
+gs 1 -1 sc (- sane_exit\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+3600 1800 m
+gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 2700 m
+gs 1 -1 sc (- sane_open\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 8700 m
+gs 1 -1 sc (- sane_close\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4800 2175 m
+gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1549 4649 a(Figure)h(4.1:)k(Code)23 b(\003o)n(w)0
+4961 y(Function)k Fp(sane)p 573 4961 V 31 w(get)p 769
+4961 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h
+(after)g Fp(sane)p 2572 4961 V 31 w(init\(\))c Fq(has)k(been)h(called.)
+36 b(It)26 b(returns)0 5074 y(the)32 b(list)f(of)h(the)f(de)n(vices)i
+(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53
+b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)1905
+5381 y(37)p eop
+%%Page: 38 39
+38 38 bop 0 123 a Fq(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n
+(f)h(or)f(a)f(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g
+(dif)n(ferent)h(calls.)30 b(It)21 b(should)j(be)0 236
+y(noted)i(that)f(this)g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n
+(w)d(since)h(it)g(requires)h(contacting)h(all)e(con\002gured)h(de)n
+(vices)g(\(some)f(of)0 349 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)
+36 b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i
+(the)f(ability)h(for)f(a)f(user)i(to)e(directly)0 462
+y(select)g(a)e(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h
+(to)g(this)g(function.)0 633 y(Once)e(a)g(de)n(vice)h(has)g(been)g
+(chosen,)h(it)e(is)g(opened)i(using)f(a)f(call)g(to)h
+Fp(sane)p 2352 633 28 4 v 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)
+f(can)g(be)f(open)h(at)0 746 y(an)o(y)i(gi)n(v)o(en)h(time.)34
+b(A)24 b(SANE)f(back)o(end)k(must)f(not)f(impose)h(arti\002cial)h
+(constraints)h(on)e(ho)n(w)e(man)o(y)i(de)n(vices)g(can)g(be)f(open)0
+859 y(at)e(an)o(y)h(gi)n(v)o(en)g(time.)0 1031 y(An)f(opened)i(de)n
+(vice)g(can)f(be)f(setup)i(through)g(the)f(corresponding)k(de)n(vice)d
+(handle)g(using)f(functions)j Fp(sane)p 3460 1031 V 30
+w(get)p 3655 1031 V 32 w(opt-)0 1144 y(ion)p 170 1144
+V 31 w(descriptor\(\))k Fq(and)38 b Fp(sane)p 1280 1144
+V 31 w(control)p 1696 1144 V 29 w(option\(\))p Fq(.)66
+b(While)37 b(setting)i(up)e(a)g(de)n(vice,)42 b(obtaining)e(option)0
+1256 y(descriptors)d(and)e(setting)h(and)f(reading)h(of)e(option)i(v)n
+(alues)g(can)e(be)h(mix)o(ed)f(freely)-6 b(.)62 b(It)34
+b(is)g(typical)i(for)f(a)f(frontend)i(to)0 1369 y(read)g(out)f(all)h(a)
+n(v)n(ailable)h(options)g(at)e(the)h(be)o(ginning)h(and)f(then)g(b)n
+(uild)h(a)d(dialog)j(\(either)g(graphical)g(or)e(a)g(command-)0
+1482 y(line)27 b(oriented)i(option)g(list\))e(that)g(allo)n(ws)g(to)g
+(control)i(the)e(a)n(v)n(ailable)i(options.)40 b(It)27
+b(should)h(be)f(noted)h(that)f(the)h(number)f(of)0 1595
+y(options)c(is)d(\002x)o(ed)h(for)f(a)h(gi)n(v)o(en)g(handle.)29
+b(Ho)n(we)n(v)o(er)l(,)21 b(as)g(options)h(are)f(set,)h(other)f
+(options)i(may)d(become)i(acti)n(v)o(e)f(or)g(inacti)n(v)o(e.)0
+1708 y(Thus,)j(after)h(setting)h(an)e(option,)h(it)f(maybe)h(necessary)
+h(to)e(re-read)i(some)e(or)g(all)h(option)g(descriptors.)34
+b(While)24 b(setting)i(up)0 1821 y(the)i(de)n(vice,)h(it)e(is)g(also)h
+(admissible)h(to)e(call)h Fp(sane)p 1655 1821 V 31 w(get)p
+1851 1821 V 31 w(parameters\(\))21 b Fq(to)28 b(get)f(an)g(estimate)i
+(of)e(what)g(the)h(image)0 1934 y(parameters)e(will)d(look)h(lik)o(e)g
+(once)h(image)f(acquisition)i(be)o(gins.)0 2106 y(The)36
+b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f(blocking)i(or)e
+(non-blocking)k(mode)c(by)h(a)e(call)i(to)f Fp(sane)p
+3186 2106 V 31 w(set)p 3382 2106 V 31 w(io)p 3523 2106
+V 32 w(mode\(\))p Fq(.)0 2218 y(De)n(vices)30 b(are)f(required)i(to)e
+(support)i(blocking)g(mode)e(\(which)h(is)e(the)i(def)o(ault)g(mode\),)
+h(b)n(ut)e(support)i(for)e(non-blocking)0 2331 y(I/O)23
+b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)d(such)h(as)e
+(UNIX.)0 2503 y(After)g(the)g(de)n(vice)g(is)g(setup)h(properly)-6
+b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f(a)f(call)h(to)
+g Fp(sane)p 3077 2503 V 30 w(start\(\))p Fq(.)i(The)d(back-)0
+2616 y(end)33 b(calculates)h(the)f(e)o(xact)f(image)h(parameters)h(at)e
+(this)g(point.)56 b(So)31 b(future)i(calls)g(to)f Fp(sane)p
+3023 2616 V 31 w(get)p 3219 2616 V 31 w(parameters\(\))0
+2729 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n(alues,)k(rather)c(than)h
+(estimates.)60 b(Whether)35 b(the)f(physical)i(image)e(acquisition)i
+(starts)f(at)f(this)0 2842 y(point)41 b(or)e(during)i(the)e(\002rst)h
+(call)f(to)h Fp(sane)p 1450 2842 V 31 w(read\(\))35 b
+Fq(is)40 b(unspeci\002ed)h(by)f(the)g(SANE)c(API.)i(If)h(non-blocking)
+44 b(I/O)0 2955 y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e
+(desired,)j(the)d(frontend)i(may)e(attempt)h(to)f(call)h
+Fp(sane)p 2949 2955 V 31 w(set)p 3145 2955 V 31 w(io)p
+3286 2955 V 32 w(mode\(\))c Fq(and/or)0 3068 y Fp(sane)p
+225 3068 V 31 w(get)p 421 3068 V 31 w(select)p 782 3068
+V 30 w(fd\(\))c Fq(at)i(this)h(point.)30 b(Either)24
+b(of)f(these)h(functions)i(may)d(f)o(ail)h(if)f(the)h(back)o(end)h
+(does)g(not)e(support)0 3180 y(the)h(requested)i(operation.)0
+3200 y
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 3200 a 0 3200 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 3200 a 152 x Fq(Image)k(data)h(is)f
+(collected)i(by)e(repeatedly)j(calling)f Fp(sane)p 1914
+3352 28 4 v 30 w(read\(\))27 b Fq(until)k(this)f(function)i(will)e
+(return)h(an)f(end-of-\002le)0 3465 y(status)40 b(\()p
+Fp(SANE)p 500 3465 V 31 w(STATUS)p 861 3465 V 30 w(EOF)p
+Fq(\).)c(This)i(indicates)j(the)e(end)g(of)f(the)h(current)h(frame.)74
+b(If)38 b(the)g(frontend)j(e)o(xpects)f(ad-)0 3578 y(ditional)e(frames)
+f(\(e.g.,)h(the)e(indi)n(vidual)j(channels)f(of)e(a)g(red/green/blue)k
+(image)d(or)e(multiple)j(images\),)i(it)35 b(can)i(call)0
+3691 y Fp(sane)p 225 3691 V 31 w(start\(\))20 b Fq(again.)31
+b(If)24 b(the)h Fp(SANE)p 1349 3691 V 31 w(PFLAG)p 1655
+3691 V 30 w(LAST)p 1905 3691 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g
+Fp(flags)p Fq(,)d(the)k(current)h(image)e(is)g(com-)0
+3804 y(plete.)60 b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38
+b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 3804
+V 31 w(PFLAG)p 2715 3804 V 31 w(MORE)p 2966 3804 V 31
+w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 3917 y(further)e(calls)e
+(to)g Fp(sane)p 794 3917 V 31 w(start\(\))c Fq(can)30
+b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30
+b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 4030 y(be)f(set)g(at)f
+(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g
+(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d
+(no)0 4142 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.)
+34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set)
+f(this)h(bit,)g(and)g(then)g(later)0 4255 y(at)33 b(the)g(actual)h
+(call)f(to)f Fp(sane)p 980 4255 V 31 w(start\(\))d Fq(return)34
+b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 4255 V 31 w(STATUS)p
+2749 4255 V 30 w(NO)p 2889 4255 V 31 w(DOCS)p Fq(.)c(Such)j(a)f
+(sequence)j(is)0 4368 y(permitted)27 b(to)f(transmit)h(multiple)g
+(images)g(from)e(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j
+(pages.)36 b(This)26 b(beha)n(viour)j(should)0 4481 y(be)21
+b(controlled)i(by)e(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n
+(w)h(single-page)i(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0
+4594 y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g
+(all)d(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p
+2933 4594 V 31 w(PFLAG)p 3239 4594 V 31 w(LAST)p 3490
+4594 V 30 w(FRAME)e Fq(on)0 4707 y(and)29 b Fp(SANE)p
+384 4707 V 31 w(PFLAG)p 690 4707 V 31 w(MORE)p 941 4707
+V 31 w(IMAGES)c Fq(of)n(f)k(is)f(encountered,)34 b(or)28
+b(an)h(error)h(other)g(than)f Fp(SANE)p 3085 4707 V 31
+w(STATUS)p 3446 4707 V 30 w(EOF)e Fq(occurs)0 4820 y(in)21
+b(a)g(SANE)e(function.)30 b(Note)21 b(that)h Fp(SANE)p
+1342 4820 V 31 w(STATUS)p 1703 4820 V 30 w(NO)p 1843
+4820 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)o(ay)f(for)h(the)
+f(back)o(end)j(to)d(indicate)0 4933 y(the)j(end)g(of)f(a)g(multiple)i
+(image)f(scan.)0 5104 y(A)c(frontend)k(may)d(choose)i(to)e(skip)i
+(frames)f(\(e.g.)28 b(because)23 b(it)e(cannot)i(parse)g(them\),)e
+(which)h(is)f(accomplished)k(by)c(simply)0 5124 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 5124
+a 0 5124 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 5124 a 0 5124 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 5124 a 1905 5381 a Fq(38)p
+eop
+%%Page: 39 40
+39 39 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 32 a 91 x Fq(calling)30
+b Fp(sane)p 500 123 28 4 v 31 w(start)25 b Fq(again,)30
+b(which)f(will)f(get)h(you)g(to)f(the)h(ne)o(xt)f(frame,)i(without)f
+(ha)n(ving)i(to)d(read)h(and)g(discard)h(the)0 236 y(current)25
+b(one.)0 407 y(In)d(order)h(to)f(prematurely)i(stop)f(scanning)h(and)f
+(to)e(reset)i(the)f(back)o(end)j(state,)d Fp(sane)p 2707
+407 V 31 w(cancel\(\))c Fq(can)k(be)g(called)h(at)f(an)o(y)0
+520 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d(well)h(after)g
+(normal)g(termination)i(of)e(a)f(multiple)h(image)g(scan)h(as)e
+(described)j(abo)o(v)o(e.)0 692 y(When)33 b(done)g(using)g(the)g(de)n
+(vice,)i(the)e(handle)h(should)g(be)e(closed)i(by)e(a)g(call)h(to)f
+Fp(sane)p 2875 692 V 31 w(close\(\))p Fq(.)51 b(Finally)-6
+b(,)35 b(before)0 805 y(e)o(xiting)e(the)f(application,)37
+b(function)d Fp(sane)p 1443 805 V 31 w(exit\(\))29 b
+Fq(must)j(be)g(called.)55 b(It)31 b(is)h(important)i(not)e(to)g(for)n
+(get)h(to)f(call)h(this)0 918 y(function)26 b(since)e(otherwise)h(some)
+f(resources)i(\(e.g.,)d(temporary)i(\002les)f(or)f(locks\))i(may)e
+(remain)i(unclaimed.)0 1089 y(The)e(follo)n(wing)i(C)d(sample)j(code)f
+(implements)h(a)e(reference)j(loop)e(for)g(acquiring)i(multiple)f
+(images:)0 1361 y Fp(SANE_Parameters)48 b(parms;)0 1474
+y(SANE_Status)268 b(status;)0 1699 y(do)0 1812 y({)109
+1925 y(do)109 2038 y({)218 2151 y(/*)54 b(Now)f(start)f(acquiring)f
+(the)i(next)g(frame.)e(*/)218 2264 y(status=sane_sta)o(rt)o(\(ha)o(nd)o
+(le)o(\);)218 2490 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h
+(problem,)d(and)i(no)h(more)e(frames)g(can)h(be)273 2603
+y(*)h(read)f(at)g(this)g(time.)f(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o
+(GE)o(S)49 b(still)273 2716 y(*)54 b(being)e(clear,)g(this)h(will)f
+(break)h(out)g(of)g(_BOTH_)f(loops.)273 2828 y(*/)218
+2941 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48
+b(break;)218 3167 y(/*)54 b(Now)f(let)g(us)h(see)f(what)g(the)g(next)g
+(frame)f(brings.)f(*/)218 3280 y(status=sane_get)o(_p)o(ara)o(me)o(te)o
+(rs)o(\(h)o(and)o(le)o(,&)o(pa)o(rm)o(s\);)218 3506 y(/*)j(This)f
+(actually)d(should)i(not)h(fail,)g(but)g(maybe)f(the)h(doc)h(feeder)273
+3619 y(*)g(jammed)e(or)h(something,)d(so)k(we)g(break)e(as)h(well,)g
+(if)g(something)273 3732 y(*)h(is)f(wrong.)273 3845 y(*/)218
+3958 y(if)h(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48
+b(break;)218 4183 y(/*)54 b(Now)f(we)h(check)e(the)h(announced)e
+(parameters,)e(if)54 b(we)f(can)h(make)e(use)273 4296
+y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g
+(the)g(next)g(frame.)273 4409 y(*/)218 4522 y(if)h(\()g
+(do_i_like_that\()o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;)
+218 4748 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle)
+g(filenames,)273 4861 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e
+(files,)i(ask)h(user)273 4974 y(*)h(for)f(confirmation,)c(...)273
+5087 y(*/)0 5094 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 5094 a 0 5094 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 5094 a 0 5094
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 5094 a 1905 5381 a Fq(39)p eop
+%%Page: 40 41
+40 40 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 32 a 218 123 a Fp(setup_for_trans)o
+(fe)o(r\(.)o(..)o(\);)218 349 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f
+(frame)f(data)h(and)g(process)f(it.)h(This)g(should)273
+462 y(*)h(return)e(SANE_STATUS_GO)o(OD)o(,)c(until)53
+b(the)g(frame)f(is)i(complete,)273 574 y(*)g(what)f(causes)e
+(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273 687 y(*/)218
+800 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54 b(\()g(status=sane_rea)o
+(d\()o(..)o(.\))48 b(\))54 b(\))545 913 y(read_in_and_proc)o(es)o(s_)o
+(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)o(\(\))o(;)218 1139
+y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f(anything)e(but)i(EOF,)
+g(break)f(out.)h(*/)218 1252 y(if)h(\(status)d(!=)j(SANE_STATUS_EO)o
+(F\))48 b({)436 1365 y(break;)218 1478 y(})218 1704 y(/*)54
+b(Now)f(loop)g(until)f(we)i(have)e(all)i(frames)d(of)j(an)g(image.)d
+(*/)109 1817 y(})j(while\(!\(parms.f)o(la)o(g)49 b(&)54
+b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0 2042 y(/*)g(O.K.)e(-)i
+(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h(it)h(together,)c(save)
+j(it,)55 2155 y(*)h(flush)e(buffers,)f(transmit)g(it,)i(increment)d
+(filenames,)g(etc.)55 2268 y(*/)0 2494 y(/*)k(Now)f(check)f(for)h(more)
+g(pending)e(images.)h(If)h(we)h(have)f(more,)f(redo)h(from)f(start.)55
+2607 y(*)i(Some)e(backends)f(might)i(cheat)f(here)h(and)g(send)f(us)i
+(for)f(an)h(extra)e(round)g(which)55 2720 y(*)i(will)e(fail)h(at)h
+(sane_start,)49 b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c
+(if)k(they)55 2833 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start)
+f(of)i(the)f(last)g(frame)f(we)i(read.)55 2946 y(*/)0
+3059 y(})g(while\(parms.fla)o(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA)
+o(GE)o(S\);)0 3284 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h
+(backend)e(and)j(go)f(back)g(to)h(option-control)55 3397
+y(*)g(loop.)55 3510 y(*/)0 3736 y(sane_cancel\(han)o(dl)o(e\))o(;)0
+3847 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 3847 a 0 3847 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 3847 a 0 3847 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 3847 a 340
+x Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31 b(Options)0 4453
+y Fq(While)c(most)f(back)o(end)j(options)f(are)f(completely)i
+(self-describing,)i(there)c(are)g(a)f(cases)h(where)g(a)f(user)h
+(interf)o(ace)i(might)0 4566 y(w)o(ant)24 b(to)g(special-case)k(the)c
+(handling)j(of)d(certain)i(options.)32 b(F)o(or)24 b(e)o(xample,)h(the)
+f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g(four)0
+4678 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e
+(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33
+b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 4791 y(w)o(ould)25
+b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g
+(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will)
+d(w)o(ant)h(to)0 4904 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g
+(\(lo)n(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h
+(or)d(a)h(high\(er\))h(resolution)i(scan)d(of)0 5017
+y(a)h(subpart)i(of)e(the)g(scanner)i(surf)o(ace\))h(and)d(let)h(the)f
+(user)h(pick)g(the)f(scan)h(area)g(by)f(dragging)j(a)d(rectangle)i
+(into)f(the)f(desired)1905 5381 y(40)p eop
+%%Page: 41 42
+41 41 bop 0 123 a Fq(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f
+(SANE)e(API)g(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e
+(that)g(ha)n(v)o(e)h(well-de\002ned)0 236 y(meanings.)0
+539 y Fm(4.5.1)99 b(Option)25 b(Number)h(Count)0 769
+y Fq(Option)e(number)h(0)e(has)h(an)f(empty)h(string)h(as)e(its)h
+(name.)29 b(The)23 b(v)n(alue)h(of)g(this)g(option)h(is)e(of)g(type)i
+Fp(SANE)p 3306 769 28 4 v 30 w(TYPE)p 3556 769 V 31 w(INT)d
+Fq(and)0 882 y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g
+(options)h(a)n(v)n(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)
+f(count)g(includes)i(option)e(number)h(0\).)0 995 y(This)23
+b(means)h(that)f(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d
+(number)h(of)f(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d
+(either)i(c)o(ycle)0 1108 y(through)h(all)d(option)i(numbers)g
+(starting)h(at)d(one)h(until)h Fp(sane)p 1963 1108 V
+31 w(get)p 2159 1108 V 31 w(option)p 2520 1108 V 30 w(descriptor\(\))17
+b Fq(returns)25 b Fp(NULL)p Fq(,)c(or)j(a)0 1220 y(frontend)i(can)e
+(directly)h(read)f(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0
+1524 y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0
+1605 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0 1605 a 0 1605 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 1605 a 149 x Fq(Option)33
+b Fp(resolution)28 b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j
+(at)c(which)i(an)e(image)h(should)i(be)d(acquired.)59
+b(When)33 b(the)0 1866 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g
+(dif)n(ferent)j(v)n(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h
+(to)f(de\002ne)h(the)g(options)h Fp(x)p 3327 1866 28
+4 v 33 w(resolution)0 1979 y Fq(and)40 b Fp(y)p 230 1979
+V 33 w(resolution)p Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i
+Fp(resolution)34 b Fr(or)40 b Fq(the)g(options)i Fp(x)p
+3142 1979 V 32 w(resolution)34 b Fr(and)0 2092 y Fp(y)p
+60 2092 V 32 w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0
+2261 y(The)k(type)h(of)g(this)g(option)h(is)e(either)i
+Fp(SANE)p 1417 2261 V 31 w(TYPE)p 1668 2261 V 31 w(INT)c
+Fq(or)j Fp(SANE)p 2212 2261 V 31 w(TYPE)p 2463 2261 V
+31 w(FIXED)p Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460
+2261 V 30 w(UNIT)p 3710 2261 V 31 w(DPI)0 2374 y Fq(\(dots/inch\).)0
+2542 y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2655
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 2655 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+
+955 2655 a 955 2655 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 955 2655 a 955 2655 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 955 2655
+a 0 2958 a Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0
+3188 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f
+(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g
+(acquisition)j(should)0 3301 y(be)e(optimized)i(for)e(speed,)i(rather)g
+(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41
+b(When)27 b(set)g(to)g Fp(SANE)p 3003 3301 28 4 v 31
+w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 3414 y(in)e(ef)n(fect,)g
+(when)g(set)g(to)g Fp(SANE)p 1012 3414 V 31 w(FALSE)d
+Fq(image)j(acquisition)j(should)f(proceed)f(in)f(normal)h(quality)g
+(mode.)33 b(The)25 b(setting)0 3527 y(of)c(this)h(option)h
+Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e(other)i(option.)29
+b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f
+(concerned,)i(the)e(pre)n(vie)n(w)0 3640 y(mode)i(is)g(completely)i
+(side)e(ef)n(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that)
+f(the)g(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0
+3753 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f
+(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e
+(free)h(to)f(o)o(v)o(erride)0 3865 y(the)j Fp(resolution)21
+b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h
+(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)
+g(to)f(the)0 3978 y(frontend)35 b(where)n(v)o(er)e(possible.)1081
+3899 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 1081 3899 a 1081 3899 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 1081 3899 a 79 x Fq(When)f(the)h
+Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f
+(transfer)g(the)f(image)f(in)0 4091 y(frame)24 b(type)g
+Fp(SANE)p 639 4091 28 4 v 31 w(FRAME)p 945 4091 V 30
+w(RAW)e Fq(if)h(possible.)1584 4091 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 1584 4091 a 1584
+4091 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 1584 4091 a 1584 4091 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 1584 4091 a 0 4260 a Fq(This)j(option)i
+(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 4373 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+4676 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0 4906
+y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g(are)f
+(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29
+b(The)22 b(scan)i(area)f(is)f(de\002ned)0 5019 y(by)h(tw)o(o)f(points)j
+(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e
+(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0
+5132 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e
+(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e
+(the)h(scan)g(surf)o(ace)h(as)1905 5381 y(41)p eop
+%%Page: 42 43
+42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221
+@urx 205 @ury 1836 @rhi @setspecial
+%%BeginDocument: figs/area.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: area.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Wed Dec 4 19:19:37 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 221 205
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-59.0 231.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr
+/Helvetica findfont 180.00 scalefont setfont
+2550 2302 m
+gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+7.500 slw
+% Polyline
+n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3375 3150 m
+gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1500 m
+gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2700 1050 m
+gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1050 3600 m
+gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+4425 525 m
+gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1080 585 m
+gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 1725 1650 m 1725 1800 l gs col-1 s gr
+% Polyline
+n 1650 1725 m 1800 1725 l gs col-1 s gr
+% Polyline
+n 3375 2700 m 3375 2850 l gs col-1 s gr
+% Polyline
+n 3300 2775 m 3450 2775 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23
+b(area)h(options)0 2132 y(seen)h(by)g(the)g(sensor)h(\(which)f
+(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i(surf)o(ace)g
+(seen)g(by)e(the)h(user\).)33 b(F)o(or)24 b(this)h(reason,)0
+2245 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i(for)e(which)g(the)
+g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f(simultaneously)k(the)c
+Fl(smallest)0 2358 y Fq(and)f(the)f(bottom-right)k(corner)d(is)g(the)f
+(corner)i(for)f(which)f(the)h(abscissa)h(and)f(ordinate)i(v)n(alues)e
+(are)g(simulatenously)j(the)0 2471 y Fl(lar)m(g)o(est)p
+Fq(.)h(If)22 b(this)i(coordinate)h(system)f(is)f(not)g(natural)h(for)f
+(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g(the)g(job)g(of)f(the)h(back)o
+(end)i(to)e(perform)h(the)0 2584 y(necessary)i(con)l(v)o(ersions.)0
+2754 y(The)d(names)h(of)g(the)f(four)i(options)g(that)f(de\002ne)g(the)
+g(scan)g(area)g(are)g(gi)n(v)o(en)g(in)f(the)h(table)h(belo)n(w:)1200
+2991 y Fr(Name)100 b(Description)1200 3104 y Fp(tl-x)107
+b Fq(T)-7 b(op-left)24 b Fh(x)f Fq(coordinate)j(v)n(alue)1200
+3217 y Fp(tl-y)107 b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n
+(alue)1200 3330 y Fp(br-x)107 b Fq(Bottom-right)25 b
+Fh(x)e Fq(coordinate)j(v)n(alue)1200 3443 y Fp(br-y)107
+b Fq(Bottom-right)25 b Fh(y)h Fq(coordinate)g(v)n(alue)0
+3677 y(There)e(are)f(se)n(v)o(eral)i(rules)f(that)h(should)g(be)e
+(follo)n(wed)i(by)f(front)g(and)g(back)o(ends)i(re)o(garding)f(these)g
+(options:)136 3919 y Fk(\017)46 b Fq(Back)o(ends)25 b(must)f(attach)h
+(a)e(unit)h(of)f(either)i(pix)o(els)g(\()p Fp(SANE)p
+2091 3919 28 4 v 31 w(UNIT)p 2342 3919 V 31 w(PIXEL)p
+Fq(\))20 b(or)k(millimeters)h(\()p Fp(SANE)p 3484 3919
+V 31 w(UNIT)p 3735 3919 V 31 w(MM)p Fq(\))227 4032 y(to)f(these)g
+(options.)31 b(The)23 b(unit)h(of)g(all)f(four)h(options)i(must)d(be)h
+(identical.)136 4219 y Fk(\017)46 b Fq(Whene)n(v)o(er)25
+b(meaningful,)g(a)f(back)o(end)h(should)g(attach)g(a)e(range)i(or)e(a)h
+(w)o(ord-list)h(constraint)h(to)d(these)i(options.)136
+4406 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)i(the)f(size)g
+(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j(that)d(the)h
+(options)h(ha)n(v)o(e)f(range)227 4518 y(constraints)i(associated.)51
+b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i(e)o(xist,)f
+(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227 4631
+y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g(y)f
+(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h(surf)o
+(ace)g(size.)136 4818 y Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o
+(ork)g(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i
+(missing.)136 5005 y Fk(\017)46 b Fq(A)21 b(frontend)i(may)f
+(temporarily)i(set)d(the)h(v)n(alues)h(in)e(a)g(w)o(ay)h(that)g
+Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f Fp(br-x)d Fq(and)j
+Fp(tl-y)d Fq(is)j(lar)n(ger)227 5118 y(than)j Fp(br-y)p
+Fq(.)1905 5381 y(42)p eop
+%%Page: 43 44
+43 43 bop 0 123 a Fm(4.5.5)99 b(Depth)26 b(option)0 204
+y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 204 a 0 204 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 204 a 146 x Fq(Option)k Fp(depth)c
+Fq(is)k(used)g(to)f(select)i(the)e(image)h(depth)h(in)e(bits/sample)j
+(in)d(multi)h(bit)f(mode)h(-)f(\(this)h(means)g(for)g(24)f(bit)0
+463 y(r)n(gb)23 b(mode)g(this)g(v)n(alue)g(must)f(be)h(8\).)28
+b(The)22 b(type)h(of)g(this)g(option)h(is)e Fp(SANE)p
+2319 463 28 4 v 31 w(TYPE)p 2570 463 V 31 w(INT)p Fq(.)e(The)i(unit)h
+(is)f Fp(SANE)p 3437 463 V 31 w(UNIT)p 3688 463 V 31
+w(BIT)p Fq(.)0 576 y(F)o(or)h(1)g(bit)h(modes)g(\(Lineart)g(or)g
+(Halftone\))h(this)f(option)h(has)f(to)f(be)h(inacti)n(v)o(e.)30
+b(F)o(or)22 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0
+689 y(Halftone\))h(the)f(back)o(end)i(should)f(use)f(the)g(well-kno)n
+(wn)g(option)h Fp(mode)p Fq(.)0 968 y(This)h(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+1081 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1194
+y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 1194 a 0 1194 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 1194 a 0 1194 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 1194 a 300 x
+Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 1576 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 1576
+a 0 1576 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 1576 a 145 x Fq(The)30 b Fp(gamma-table)24
+b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 1721
+28 4 v 31 w(CONSTRAINT)p 2225 1721 V 29 w(RANGE)d Fq(of)j(the)h(type)g
+Fp(SANE)p 3208 1721 V 31 w(TYPE)p 3459 1721 V 31 w(INT)d
+Fq(which)0 1834 y(represent)c(the)d(gamma)g(correction)j(table)e(for)g
+(gray)-6 b(.)28 b(In)22 b(color)g(mode)f(the)h Fp(gamma-table)15
+b Fq(may)21 b(be)h(used)g(to)f(set)g(a)g(com-)0 1947
+y(mon)d(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28
+b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12
+b Fp(green-gamma-tab)o(le)0 2060 y Fq(and)32 b Fp(blue-gamma-table)24
+b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g
+(correction)k(for)d(each)h(color)g(separately)-6 b(.)0
+2173 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h
+(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f
+Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 2286 y Fp(blue-gamma-tabl)o(e)19
+b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options)
+h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0
+2399 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f
+(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h
+(reduce)g(\(if)0 2512 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g
+(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45
+b(This)29 b(should)h(e.g.)44 b(look)0 2625 y(lik)o(e)24
+b(this:)0 2854 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o
+(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 2967 y(green_value)c(=)k
+(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\))
+o(\))0 3080 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o
+(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 3309 y Fq(The)24
+b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e
+(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h
+(shado)n(w)-6 b(,)0 3422 y(contrast,)24 b(brightness,)i(threshold,)f
+(analog)p 1379 3422 V 35 w(gamma.)j(These)22 b(functions)j(are)e
+(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0
+3535 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0
+3814 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3927
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4039 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0
+4039 a 0 4039 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 4039 a 0 4039 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 4039 a 301 x Fm(4.5.7)99
+b(Scan)26 b(Mode)f(options)0 4421 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 4421 a 0 4421 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+
+0 4421 a 146 x Fq(The)d(option)i Fp(mode)19 b Fq(de\002nes)k(a)f
+Fp(SANE)p 1222 4567 28 4 v 31 w(CONSTRAINT)p 1803 4567
+V 28 w(STRING)p 2161 4567 V 30 w(LIST)e Fq(of)i(type)h
+Fp(SANE)p 2926 4567 V 31 w(TYPE)p 3177 4567 V 31 w(STRING)p
+Fq(.)18 b(It)k(is)g(used)0 4680 y(to)34 b(select)i(the)e(scanmode)i
+(\(e.g.)61 b(Color)34 b(or)g(Gray\).)61 b(W)-7 b(ell)34
+b(kno)n(wn)h(modes)g(are:)50 b Fp(Color)p Fq(,)34 b Fp(Gray)p
+Fq(,)g Fp(Halftone)c Fq(and)0 4793 y Fp(Lineart)p Fq(.)46
+b Fp(Color)27 b Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g
+(or)f(16)h(bits/sample\),)j Fp(Halftone)26 b Fq(and)31
+b Fp(Lineart)c Fq(are)0 4906 y(single)e(bit)f(modes.)0
+5019 y(This)f(w)o(ay)h(a)f(frontend)i(can)f(select)h(e.g)e(the)h(mode)g
+Fp(Gray)d Fq(for)j(scanning)h(a)f(f)o(ax.)0 5132 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0
+5132 a 0 5132 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 5132 a 0 5132 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 5132 a 1905 5381
+a Fq(43)p eop
+%%Page: 44 45
+44 44 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 32 a 91 x Fq(This)26
+b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o
+(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e
+(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+349 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 349 a 0 349 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 349 a 0 349 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 349 a 308 x Fm(4.5.8)99
+b(Scan)26 b(Sour)n(ce)g(options)0 738 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 738 a 0 738
+a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 738 a 152 x Fq(The)36 b(option)j Fp(source)33 b Fq(is)k(used)h(to)f
+(select)h(the)f(scansource)j(\(e.g.)69 b(Automatic)38
+b(Document)g(Feeder\).)69 b(It)37 b(de\002nes)h(a)0 1002
+y Fp(SANE)p 225 1002 28 4 v 31 w(CONSTRAINT)p 806 1002
+V 28 w(STRING)p 1164 1002 V 30 w(LIST)20 b Fq(of)j(type)g
+Fp(SANE)p 1930 1002 V 31 w(TYPE)p 2181 1002 V 31 w(STRING)p
+Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b
+Fp(Flatbed)p Fq(,)0 1115 y Fp(Transparancy)49 b(Adapter)20
+b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0
+1400 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1513
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1626 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0
+1626 a 0 1626 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 1626 a 0 1626 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 1626 a 308 x Fm(4.5.9)99
+b(Thr)n(eshold)0 1996 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 1996 a 0 1996 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 1996 a 171
+x Fq(The)29 b(option)j Fp(threshold)25 b Fq(is)30 b(used)g(to)g
+(de\002ne)h(the)f(threshold)i(for)e(Lineart)h(and)f(may)g(be)g
+(Halftone)h(mode.)48 b(In)30 b(multi)0 2280 y(bit)36
+b(modes)g(this)g(option)i(should)f(be)f(set)g(inacti)n(v)o(e.)67
+b(The)35 b(type)h(of)g(this)g(option)i(is)d Fp(SANE)p
+2975 2280 28 4 v 31 w(TYPE)p 3226 2280 V 31 w(FIXED)p
+Fq(.)d(The)k(unit)0 2392 y(is)g Fp(SANE)p 321 2392 V
+31 w(UNIT)p 572 2392 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g
+(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68
+b(It)36 b(de\002nes)g(the)g(minimum)0 2505 y(intensity)27
+b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data)
+h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v)
+n(alues)i(in)e(the)0 2618 y(follo)n(wing)h(w)o(ay:)0
+2731 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white)
+g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40
+b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 2844 y(intensities)e(brighter)g
+(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e
+(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0
+2957 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29
+b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f
+(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0
+3070 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14
+b(.)g(.)g(70)23 b(percent\).)0 3242 y(This)j(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3354 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3467
+y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 0 3467 a 0 3467 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 0 3467 a 0 3467 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 0 3467 a 308 x
+Fm(4.5.10)99 b(Analog)24 b(gamma)0 3857 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 3857 a 0
+3857 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 3857 a 151 x Fq(The)37 b(option)i Fp(analog-gamma)31
+b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h
+(analog)h(gamma)e(function)i(of)f(the)0 4121 y(scanner)33
+b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g
+(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31
+b(type)h(of)f(this)h(option)g(is)0 4234 y Fp(SANE)p 225
+4234 28 4 v 31 w(TYPE)p 476 4234 V 31 w(FIXED)p Fq(.)27
+b(The)k(unit)g(is)g Fp(SANE)p 1486 4234 V 30 w(UNIT)p
+1736 4234 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g
+(de\002ned)g(by)g(the)g(back)o(end)i(as)0 4347 y(supported.)38
+b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37
+b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f
+(correction)k(has)d(no)0 4460 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n
+(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29
+b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0
+4573 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g
+Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n
+(wed)g(to)g(em-)0 4686 y(ulate)31 b(an)e(anlog)i(gamma)e(function)j(by)
+d(a)h(digital)h(gamma)e(table.)48 b(The)29 b(back)o(end)j(has)e(to)f
+(disable)j(\(or)d(not)h(de\002ne\))h(this)0 4799 y(option)25
+b(when)f(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o
+(are\))h(gamma)d(function.)0 4970 y(When)37 b(analog)i(gamma,)h
+(highlight)f(and)f(shado)n(w)f(functions)j(are)d(a)n(v)n(ailable)j(at)d
+(the)g(same)g(time)g(then)h(the)f(back)o(end)0 5083 y(author)32
+b(has)g(to)e(care)i(about)g(the)f(order)h(in)e(which)i(the)f(functions)
+i(are)e(implemented)i(in)e(the)g(scanner)i(hardw)o(are.)52
+b(The)0 5103 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 0 5103 a 0 5103 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 0 5103 a 0 5103 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 0
+5103 a 1905 5381 a Fq(44)p eop
+%%Page: 45 46
+45 45 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 32 a 91 x Fq(SANE)27
+b(standard)32 b(e)o(xpects)g(that)e(changing)j(the)d(analog)h(gamma)e
+(v)n(alue)i(has)f(no)g(ef)n(fect)h(to)f(the)g(shado)n(w)g(and)h
+(highlight)0 236 y(function.)59 b(When)33 b(the)g(analog)i(gamma)d
+(function)j(is)e(e)o(x)o(ecuted)i(in)d(the)i(scanner)g(hardw)o(are)h
+(before)f(the)f(shado)n(w)h(and)0 349 y(highlight)d(functions)g(then)e
+(the)g(back)o(end)i(should)f(do)e(a)g(compensation.)47
+b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g(highlight)i(v)n(alues)0
+462 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g(corrected)j(with)d(the)h(rele)n
+(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0 622 y(It)e(is)h(not)g(allo)n
+(wed)g(to)g(emulate)g(an)g(analog)h(gamma)e(function)j(by)e(a)f
+(digital)i(gamma)e(table.)29 b(The)21 b(back)o(end)j(has)e(to)f
+(disable)0 735 y(\(or)j(not)g(de\002ne\))g(this)g(option)h(when)f(the)f
+(scanner)j(does)e(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(gamma)d(function.)0 895 y(This)j(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+1008 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1121
+y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 0 1121 a 0 1121 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 0 1121 a 0 1121 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 0 1121 a 292 x
+Fm(4.5.11)99 b(Shado)o(w)0 1476 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 0 1476 a 0 1476 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 0
+1476 a 159 x Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g
+(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v)
+o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h(is)0
+1748 y Fp(SANE)p 225 1748 28 4 v 31 w(TYPE)p 476 1748
+V 31 w(FIXED)p Fq(.)26 b(The)k(unit)g(is)g Fp(SANE)p
+1482 1748 V 30 w(UNIT)p 1732 1748 V 31 w(PERCENT)p Fq(.)c(The)j(v)n
+(alue)i(range)g(should)g(be)f(0.0.)14 b(.)g(.)g(100.0)29
+b(if)g(pos-)0 1861 y(sible.)47 b(It)29 b(is)h(used)g(to)f(de\002ne)h
+(the)g(maximum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(an)e(image)
+h(data)g(v)n(alue)g(of)g(0)f(\(black\).)48 b(The)0 1973
+y(back)o(end)26 b(has)e(to)f(scale)i(the)e(v)n(alues)i(in)f(the)f
+(follo)n(wing)i(w)o(ay:)0 2086 y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h
+(that)g(the)f(sensiti)n(vity)k(range)d(is)f(not)h(reduced,)k(only)c
+(the)f(minimum)h(intensity)h(produces)h(an)0 2199 y(image)30
+b(data)g(v)n(alue)h(of)e(0)h(\(black\).)48 b(A)29 b(v)n(alue)h(of)g
+(50.0)g(means)g(that)g(that)g(a)f(medium)h(intensity)i(and)e(e)n(v)o
+(erything)i(that)e(is)0 2312 y(dark)o(er)e(produces)h(an)e(image)g
+(data)h(v)n(alue)f(of)g(0)f(\(black\).)41 b(A)25 b(v)n(alue)j(of)e
+(100.0)i(means)f(the)g(sensiti)n(vity)j(range)e(is)e(reduced)0
+2425 y(to)i(0,)g(all)g(image)g(data)g(v)n(alues)h(are)f(0)g(\(black\).)
+43 b(If)28 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o(v)o(er)h(the)h
+(full)f(range)h(the)f(back)o(end)i(has)0 2538 y(to)25
+b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35
+b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e
+(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0
+2651 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p
+Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31
+b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0
+2764 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g
+(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g
+(disable)i(\(or)e(not)h(de\002ne\))0 2877 y(this)24 b(option)h(when)f
+(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(shado)n(w)e(function.)0 3037 y(This)i(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3150 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3263
+y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 0 3263 a 0 3263 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 0 3263 a 0 3263 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 0 3263 a 292 x
+Fm(4.5.12)99 b(Highlight)0 3637 y
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 0 3637 a 0 3637 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 0
+3637 a 140 x Fq(The)26 b(option)i Fp(highlight)21 b Fq(is)26
+b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f(white)g
+(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g(is)0
+3890 y Fp(SANE)p 225 3890 28 4 v 31 w(TYPE)p 476 3890
+V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p
+1461 3890 V 31 w(UNIT)p 1712 3890 V 31 w(PERCENT)p Fq(.)d(The)j(v)n
+(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24
+b(if)h(possi-)0 4002 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h
+(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e
+(maximum)h(possible)h(image)f(data)g(v)n(alue)0 4115
+y(\(white/full)c(intensity\).)31 b(The)23 b(back)o(end)j(has)e(to)f
+(scale)i(the)e(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0
+4228 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h(sensiti)n(vity)i(range)e
+(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h(ha)n(v)o(e)g(maximum)f
+(v)n(alue)h(\(white)f(/)g(full)0 4341 y(intensity\).)31
+b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a)f(medium)h(intensity)i
+(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j(produces)f(the)f(max-)
+0 4454 y(imum)f(possible)j(image)e(data)g(v)n(alue)h(\(white)f(/)f
+(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e(100.0)i(means)f(that)g
+(the)g(sensiti)n(vity)j(range)d(is)0 4567 y(not)d(reduced,)j(only)d
+(the)h(maximum)f(intensity)i(produces)h(an)d(image)g(data)h(with)f
+(maximum)g(possible)i(v)n(alue)f(\(white)f(/)g(full)0
+4680 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h(able)g(to)f
+(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has)f(to)f
+(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 4793 y(\(e.g.)35
+b(30.)14 b(.)g(.)g(70)25 b(percent\).)38 b(In)25 b(color)i(mode)f
+(there)h(can)f(be)g(options)h Fp(highlight-red)p Fq(,)20
+b Fp(highlight-gree)o(n)f Fq(and)0 4906 y Fp(highlight-blue)p
+Fq(,)g(in)26 b(this)h(case)g Fp(highlight)21 b Fq(has)26
+b(to)g(be)g(disabled.)39 b(It)26 b(is)g(not)g(allo)n(wed)h(to)f
+(emulate)h(a)f(highlight)0 5019 y(function)h(by)f(a)f(digital)i(gamma)d
+(table.)35 b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h
+(de\002ne\))g(this)g(option)g(when)g(the)f(scanner)0
+5132 y(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(highlight)g(function.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 0 5151
+a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(45)p eop
+%%Page: 46 47
+46 46 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 0 32 a 91 x Fq(This)26
+b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o
+(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e
+(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+349 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 0 349 a 0 349 a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 0 349 a 0 349 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 0 349 a 308 x Fm(4.5.13)99
+b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0 738 y
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0
+738 a 0 738 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 738 a 152 x Fq(The)18 b(option)h Fp(lamp-on)14
+b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h(scanner)h(on.)27
+b(The)17 b(type)i(of)f(this)h(option)g(is)f Fp(SANE)p
+3431 890 28 4 v 31 w(TYPE)p 3682 890 V 31 w(BUTTON)p
+Fq(.)0 1002 y(The)23 b(unit)h(is)g Fp(SANE)p 637 1002
+V 31 w(UNIT)p 888 1002 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e
+(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(on.)0
+1174 y(The)18 b(option)h Fp(lamp-off)14 b Fq(is)k(used)h(to)f(turn)g
+(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.)27 b(The)18
+b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p 3499 1174
+V 31 w(TYPE)p 3750 1174 V 30 w(BUTTON)p Fq(.)0 1287 y(The)23
+b(unit)h(is)g Fp(SANE)p 637 1287 V 31 w(UNIT)p 888 1287
+V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g(the)g
+(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0
+1459 y(These)33 b(options)h(are)f(not)g(mandatory)-6
+b(,)37 b(b)n(ut)c(if)f(a)g(back)o(end)j(does)e(support)i(them,)f(it)e
+(must)h(implement)h(it)e(in)g(a)g(manner)0 1572 y(consistent)26
+b(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0 1684 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0
+1684 a 0 1684 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 1684 a 0 1684 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 1684 a 308 x Fm(4.5.14)99
+b(Scanner)26 b(b)n(uttons)0 2056 y
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 2056 a 0 2056 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+
+0 2056 a 169 x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)
+e(state)h(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5
+b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 2338
+y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g
+(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to)
+d(the)g(same)0 2451 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f
+(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h
+(w)o(ould)f(be)g(implemented:)0 2564 y(Fi)n(v)o(e)25
+b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e
+(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o
+(ant)f(to)0 2677 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i
+(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n
+(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0
+2790 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g
+(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n
+(utton\).)47 b(F)o(or)0 2903 y(three)24 b(people)i(the)d(image)h(is)g
+(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g
+(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0
+3187 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e
+(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n
+(wing)i(options:)0 3300 y Fp(scanner-buttons)o(-l)o(oc)o(k)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 3300 28 4 v 31
+w(TYPE)p 1951 3300 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25
+b(=)e Fp(SANE)p 2813 3300 V 31 w(FALSE)0 3413 y(scanner-buttons)o(-s)o
+(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809
+3413 V 31 w(TYPE)p 2060 3413 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0
+3526 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 3526 V 31 w(TYPE)p
+2442 3526 V 30 w(BUTTON)0 3639 y Fq(When)18 b(setting)i(these)f
+(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p
+2091 3639 V 31 w(INFO)p 2342 3639 V 31 w(RELOAD)p 2703
+3639 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 3639 V 31
+w(INFO)p 3696 3639 V 31 w(RELOAD)p 4057 3639 V 30 w(PARAMS)0
+3752 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 3923
+y(A)33 b(Frontend)j(has)f(to)f(disable)i(the)f(usage)g(of)g(the)f
+(scanner)n(-b)n(uttons)40 b(by)34 b(def)o(ault.)63 b(This)35
+b(is)f(important)i(because)g(other)0 4036 y(frontends)26
+b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g
+(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25
+b(important)g(thing)0 4149 y(is)f(that)h(some)f(scanners)i(do)f(not)f
+(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g
+(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0
+4262 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g
+(scanner\).)136 4533 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o
+(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f
+(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31
+b(this)h(it)227 4646 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o
+(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 4646 V 31 w(TRUE)p
+Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227
+4759 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b
+Fp(SANE)p 1667 4759 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h
+(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-)227
+4872 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28
+b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e)
+n(v)o(ery)g(user)g(has)g(read)h(and)227 4985 y(write)24
+b(access)h(to.)0 4986 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 4986 a 0 4986 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 4986 a 0
+4986 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 4986 a 1905 5381 a Fq(46)p eop
+%%Page: 47 48
+47 47 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 32 a 336 123 a Fr(\226)46
+b Fq(If)20 b(the)h(lock\002le)g(does)g(not)f(e)o(xist)h(then)g(the)f
+(back)o(end)j(creates)f(the)e(lock\002le)h(and)g(writes)f(the)h
+(process)h(ID)d(\(PID\))427 236 y(of)f(the)h(back)o(end)h(to)e(the)g
+(\002le.)27 b(Button)18 b(access)i(is)e(allo)n(wed:)27
+b(the)18 b(v)n(alue)h(of)f(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)
+427 349 y Fq(is)k(set)f(to)h Fp(SANE)p 953 349 28 4 v
+31 w(TRUE)336 495 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o
+(xist)g(and)h(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g
+(then)h(the)g(back)o(end)i(has)e(to)g(check)g(if)427
+608 y(the)f(process)i(with)d(the)h(PID)f(stored)i(in)e(the)h
+(lock\002le)h(still)f(is)g(running.)46 b(If)28 b(yes)h(then)h(the)f(b)n
+(utton)h(access)g(is)427 721 y(not)i(allo)n(wed:)47 b(the)32
+b(v)n(alue)h(of)e(option)j Fp(scanner-button)o(s-)o(loc)o(k)25
+b Fq(is)31 b(set)h(to)g Fp(SANE)p 3340 721 V 31 w(FALSE)p
+Fq(.)c(If)k(not)427 834 y(then)c(the)e(lock\002le)i(is)e(recreated)j
+(and)e(the)g(PID)e(of)h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g
+(lock\002le,)h(b)n(utton)g(access)427 946 y(is)c(allo)n(wed:)30
+b(the)23 b(v)n(alue)i(of)e(option)i Fp(scanner-buttons-)o(lo)o(ck)16
+b Fq(is)23 b(set)h(to)g Fp(SANE)p 3194 946 V 30 w(TRUE)136
+1159 y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n
+(alue)i(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p
+Fq(.)37 b(If)28 b(it)g(is)h Fp(SANE)p 3472 1159 V 31
+w(TRUE)c Fq(then)227 1272 y(the)f(frontend)i(has)e(access)h(to)e(the)h
+(scanner)h(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p
+2400 1272 V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136
+1460 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n
+(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f
+(once)g(per)g(second)g(\(while)g(not)227 1572 y(scanning\):)336
+1760 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h
+Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o
+Fq(.)35 b(The)27 b(back)o(end)j(checks)427 1873 y(if)37
+b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i
+(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427
+1986 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h
+(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option)
+427 2099 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20
+b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f
+(means)g(the)h(b)n(utton)h(is)427 2212 y(not)23 b(pressed,)h(a)d(v)n
+(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30
+b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427
+2325 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f
+(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42
+b(The)27 b(back)o(end)427 2438 y(has)c(to)f(implement)h(a)f(timeout)h
+(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h
+(within)f(a)e(prede\002ned)j(time)427 2550 y(\(e.g.)50
+b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50
+b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427
+2663 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b
+Fp(SANE)p 1862 2663 V 31 w(FALSE)d Fq(and)j(does)h(set)f
+Fp(SANE)p 2881 2663 V 31 w(INFO)p 3132 2663 V 31 w(RELOAD)p
+3493 2663 V 30 w(OPTIONS)427 2776 y Fq(to)20 b(inform)g(the)g(frontend)
+i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n
+(-b)n(utton)k(functions.)30 b(If)20 b(access)427 2889
+y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o
+(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 3035 y Fr(\226)46
+b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i
+Fp(scanner-buttons-)o(st)o(at)o(us)136 3223 y Fk(\017)46
+b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g
+(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g
+Fp(scanner-buttons-)o(lo)o(ck)227 3336 y Fq(to)34 b Fp(SANE)p
+556 3336 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g
+(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f
+(same.)227 3449 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es)
+g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g
+Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 3562 y Fp(SANE)p
+452 3562 V 31 w(FALSE)p Fq(.)227 3712 y Fp(sane)p 452
+3712 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g
+(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11
+b Fq(to)18 b Fp(SANE)p 3601 3712 V 31 w(FALSE)p Fq(.)0
+3831 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 3831 a 0 3831 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 3831 a 0 3831 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 3831 a 1905
+5381 a Fq(47)p eop
+%%Page: 48 49
+48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51
+b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g
+(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h
+(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895
+y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e
+(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f
+(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h
+(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e
+(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h
+(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367
+y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e
+(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5
+b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480
+y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g
+(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i
+(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h
+(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g
+(access)g(to)g(the)g(system.)227 2743 y(Controlling)34
+b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e)
+n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227
+2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges)
+i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i
+(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36
+b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d
+(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47
+b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n
+(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227
+3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i
+(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g
+(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that)
+g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f
+(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g
+(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i
+(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24
+b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n
+(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22
+b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l
+(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f
+(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834
+y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h
+(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h
+(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19
+b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e
+(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws)
+227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices)
+h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44
+b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24
+b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g
+(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i
+(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g
+(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740
+y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i
+(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114
+4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client)
+h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o
+(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p
+eop
+%%Page: 49 50
+49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f
+(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e
+(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i
+(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45
+b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h
+(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227
+536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k
+(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o
+(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0
+896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h
+(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h
+(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0
+1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0
+1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7
+b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g
+(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0
+2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44
+b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28
+b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h
+(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n
+(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44
+b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30
+b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c
+(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).)
+0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29
+b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10
+b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227
+2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g
+(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h
+(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43
+b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g
+Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37
+b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227
+3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e
+Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6
+b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43
+b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40
+b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f
+(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g
+(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d
+(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227
+3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o
+(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues)
+g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f
+(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g
+(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47
+b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0
+4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378
+y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C)
+e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e
+(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737
+y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w)
+o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g
+(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28
+b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g
+(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f
+(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h
+(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop
+%%Page: 50 51
+50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded)
+j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g
+(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227
+236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29
+b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f
+(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0
+526 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by)
+e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g
+(in)e(which)i(the)o(y)227 639 y(appear)25 b(in)f(the)g(corresponding)j
+(C)c(type)h(declaration.)0 816 y Fa(union)p Fr(:)45 b
+Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e
+(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i
+(members)e(is)227 929 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30
+b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j
+(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1042 y(of)g(the)g
+(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1251 y(Note)25
+b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e
+(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f
+(constructed)0 1364 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g
+(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of)
+d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1524
+y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h
+(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h
+(protocol.)0 1858 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h
+(Requests)0 2112 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g
+(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\))
+f(protocol.)34 b(This)24 b(means)h(that)0 2225 y(all)h(acti)n(vity)h
+(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back)
+o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0
+2338 y(by)d(the)f(client.)0 2628 y Fm(5.2.1)99 b Fc(SANE)p
+545 2628 30 4 v 35 w(NET)p 760 2628 V 35 w(INIT)0 2849
+y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e
+(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20
+b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0
+2962 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g
+(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g
+(belo)n(w:)744 3165 y Fr(r)n(equest:)941 b(r)n(eply:)744
+3278 y Fp(SANE)p 969 3278 28 4 v 31 w(Word)52 b(version)p
+1657 3278 V 30 w(code)98 b(SANE)p 2225 3278 V 31 w(Word)52
+b(status)744 3391 y(SANE)p 969 3391 V 31 w(String)g(user)p
+1602 3391 V 30 w(name)153 b(SANE)p 2225 3391 V 31 w(Word)52
+b(version)p 2913 3391 V 30 w(code)0 3591 y Fq(The)32
+b Fp(version)p 563 3591 V 30 w(code)e Fq(ar)n(gument)35
+b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36
+b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3704
+y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39
+b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i
+(code)f(is)f(used)g(to)g(hold)0 3817 y(the)c(netw)o(ork)h(protocol)h(v)
+o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h
+(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0
+3930 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f
+(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e
+(the)g(netw)o(ork)0 4043 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o
+(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g
+(compatible\).)33 b(The)24 b Fp(user)p 3656 4043 V 31
+w(name)0 4156 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h
+(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59
+b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4269 y(cannot)26
+b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e
+Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h
+(be)f(placed)h(in)e(the)0 4382 y(authenticity)30 b(of)c(this)i(user)n
+(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o
+(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5
+b(.)39 b(E.g.,)25 b(it)0 4495 y(could)g(be)e(used)i(as)e(the)h(def)o
+(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0
+4654 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 4654 V 31 w(STA-)0 4767 y(TUS)p 170 4767
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g
+(unde\002ned)i(v)n(alues.)2384 4734 y Fg(1)2457 4767
+y Fq(The)d Fp(version)p 3013 4767 V 30 w(code)e Fq(ar)n(gument)28
+b(returns)0 4880 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw)
+o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g
+(pre)n(vious)i(paragraph)h(on)0 4993 y(the)d(meaning)h(of)e(the)h(b)n
+(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p
+0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19
+b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak)
+g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5
+b(.)1905 5381 y Fq(50)p eop
+%%Page: 51 52
+51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0
+356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f
+(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055
+596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196
+b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822
+y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822
+V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h
+(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6
+b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344
+V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has)
+g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p
+2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0
+1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f
+Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765
+y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p
+760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open)
+i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760
+2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p
+985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V
+30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071
+2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577
+y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y
+Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k
+(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0
+2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099
+V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has)
+e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d
+Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23
+b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31
+b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j
+(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p
+Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g
+(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0
+3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g
+(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0
+3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p
+760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077
+4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p
+1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252
+4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d
+Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h
+(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905
+5381 y(51)p eop
+%%Page: 52 53
+52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p
+1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h
+(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706
+705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97
+b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28
+w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h
+(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29
+b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h
+(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50
+b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n
+(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)
+o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445
+1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336
+1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30
+4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V
+34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i
+(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i
+(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694
+y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p
+1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187
+2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040
+2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31
+w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294
+b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033
+V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p
+1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52
+b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040
+3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52
+b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371
+V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e
+Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f
+(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23
+b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)
+g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34
+b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40
+b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75
+b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c
+Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945
+y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080
+3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p
+1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h
+Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p
+Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V
+31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058
+V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28
+b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g
+(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f
+(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n
+(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c
+Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31
+b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h
+Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32
+b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v)
+o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37
+b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g
+(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f
+(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o
+(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622
+y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24
+b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g
+(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call)
+0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p
+Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)
+h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f
+(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26
+b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36
+b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f
+Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p
+Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h
+(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p
+eop
+%%Page: 53 54
+53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on)
+d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i
+(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0
+236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f
+(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946
+236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V
+31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h
+(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28
+b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462
+y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply)
+i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i
+(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28
+b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that)
+f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0
+687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545
+995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V
+35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886
+1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p
+1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061
+1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061
+1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b
+Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e
+(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0
+2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40
+b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g
+(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j
+Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g
+(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750
+30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).)
+940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y
+Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p
+2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p
+2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116
+3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891
+3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913
+y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g
+(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h
+(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23
+b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19
+b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e
+(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33
+b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g
+(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section)
+g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d
+(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31
+b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0
+4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073
+4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28
+b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n
+(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27
+b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data)
+g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0
+4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g
+(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5
+b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g
+(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50
+b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.)
+0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence)
+j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted)
+j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j
+(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f
+(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905
+5381 y(53)p eop
+%%Page: 54 55
+54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25
+b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g
+(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31
+w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j
+(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f
+(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0
+349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g
+(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i
+(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18
+b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g
+(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35
+b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36
+b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33
+b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742
+y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g
+(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j
+(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i
+(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o
+(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0
+968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31
+b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6
+b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v)
+o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i
+(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0
+1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j
+(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i
+(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h
+(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609
+30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f
+(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635
+b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30
+w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53
+b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f
+(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0
+2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p
+810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h
+(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854
+b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31
+w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53
+b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967
+3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006
+y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g
+(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31
+b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string)
+h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24
+b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j
+(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17
+b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j
+(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0
+4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512
+y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o
+(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n
+(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g
+(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo)
+n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0
+4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g
+(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i
+(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22
+b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e
+(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0
+5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905
+5381 y(54)p eop
+%%Page: 55 56
+55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b
+Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20
+b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30
+b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f
+(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j
+(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0
+349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26
+b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f
+(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f
+(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31
+w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p
+Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v
+35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g
+(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5
+b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i
+(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h
+(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o
+(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y
+Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e
+Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop
+%%Page: 56 57
+56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51
+b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28
+b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.)
+35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0
+1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g
+(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h
+(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0
+2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h
+(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18
+b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e
+(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c
+(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0
+2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g
+(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j
+(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o
+(an)o(e/)1905 5381 y Fq(56)p eop
+%%Page: 57 58
+57 57 bop 0 586 a Fs(Index)0 1012 y Fq(array)-6 b(,)24
+b(36)0 1208 y(br)n(-x,)g(33)0 1321 y(br)n(-y)-6 b(,)24
+b(33)0 1517 y(code)g(\003o)n(w)-6 b(,)22 b(30)0 1713
+y(de)n(vice-name,)k(16)0 1825 y(domain,)e(22)0 2021 y(enumeration)i
+(types,)f(35)0 2217 y(image)f(data)g(format,)g(8)0 2413
+y(mailing)h(list,)e(42)0 2609 y(netw)o(ork)i(authorization,)i(40)0
+2722 y(NUL,)21 b(14)0 2918 y(option)k(count,)g(32)0 3031
+y(Option)p 256 3031 28 4 v 34 w(Descriptor)p 671 3031
+V 36 w(Array)-6 b(,)23 b(38)0 3227 y(passw)o(ord,)i(22)0
+3340 y(pointer)l(,)g(35)0 3453 y(pre)n(vie)n(w)f(mode,)f(32)0
+3649 y(resolution)j(option,)f(32)0 3845 y(SANE)p 244
+3845 V 31 w(Action,)f(24)0 3957 y(SANE)p 244 3957 V 31
+w(A)l(CTION)p 616 3957 V 32 w(GET)p 826 3957 V 31 w(V)-12
+b(ALUE,)20 b(24)0 4070 y(SANE)p 244 4070 V 31 w(A)l(CTION)p
+616 4070 V 32 w(SET)p 811 4070 V 31 w(A)-5 b(UT)n(O,)21
+b(24)0 4183 y(SANE)p 244 4183 V 31 w(A)l(CTION)p 616
+4183 V 32 w(SET)p 811 4183 V 31 w(V)-12 b(ALUE,)20 b(24)0
+4296 y(SANE)p 244 4296 V 31 w(Authorization)p 776 4296
+V 37 w(Callback,)k(22)0 4409 y(SANE)p 244 4409 V 31 w(Bool,)f(13)0
+4522 y(SANE)p 244 4522 V 31 w(Byte,)g(12,)h(35)0 4635
+y(sane)p 165 4635 V 34 w(cancel,)h(28)0 4748 y(SANE)p
+244 4748 V 31 w(CAP)p 453 4748 V 32 w(AD)l(V)-12 b(ANCED,)19
+b(20)0 4861 y(SANE)p 244 4861 V 31 w(CAP)p 453 4861 V
+32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(20)0 4974 y(SANE)p
+244 4974 V 31 w(CAP)p 453 4974 V 32 w(EMULA)-10 b(TED,)19
+b(20)0 5087 y(SANE)p 244 5087 V 31 w(CAP)p 453 5087 V
+32 w(HARD)p 744 5087 V 31 w(SELECT)-7 b(,)20 b(20)2095
+1012 y(SANE)p 2339 1012 V 31 w(CAP)p 2548 1012 V 32 w(IN)m(A)l(CTIVE,)h
+(20)2095 1125 y(SANE)p 2339 1125 V 31 w(CAP)p 2548 1125
+V 32 w(SOFT)p 2804 1125 V 31 w(DETECT)-7 b(,)20 b(20)2095
+1238 y(SANE)p 2339 1238 V 31 w(CAP)p 2548 1238 V 32 w(SOFT)p
+2804 1238 V 31 w(SELECT)-7 b(,)20 b(20)2095 1351 y(SANE)p
+2339 1351 V 31 w(Char)l(,)k(14,)f(35)2095 1463 y(sane)p
+2260 1463 V 35 w(close,)h(23)2095 1576 y(SANE)p 2339
+1576 V 31 w(CONSTRAINT)p 2949 1576 V 30 w(NONE,)d(21)2095
+1689 y(SANE)p 2339 1689 V 31 w(CONSTRAINT)p 2949 1689
+V 30 w(RANGE,)f(21)2095 1802 y(SANE)p 2339 1802 V 31
+w(CONSTRAINT)p 2949 1802 V 30 w(STRING)p 3309 1802 V
+31 w(LIST)-7 b(,)21 b(21)2095 1915 y(SANE)p 2339 1915
+V 31 w(Constraint)p 2746 1915 V 36 w(T)-7 b(ype,)23 b(19)2095
+2028 y(SANE)p 2339 2028 V 31 w(CONSTRAINT)p 2949 2028
+V 30 w(W)o(ORD)p 3257 2028 V 31 w(LIST)-7 b(,)22 b(21)2095
+2141 y(sane)p 2260 2141 V 35 w(control)p 2550 2141 V
+35 w(option,)j(24)2095 2254 y(SANE)p 2339 2254 V 31 w(CURRENT)p
+2797 2254 V 30 w(MAJOR,)d(11)2095 2367 y(SANE)p 2339
+2367 V 31 w(De)n(vice,)i(15)2095 2480 y(sane)p 2260 2480
+V 35 w(e)o(xit,)f(22)2095 2593 y(SANE)p 2339 2593 V 31
+w(F)-7 b(ALSE,)21 b(13)2095 2705 y(SANE)p 2339 2705 V
+31 w(FIX,)h(14)2095 2818 y(SANE)p 2339 2818 V 31 w(Fix)o(ed,)i(13)2095
+2931 y(SANE)p 2339 2931 V 31 w(FIXED)p 2639 2931 V 32
+w(SCALE)p 2961 2931 V 30 w(SHIFT)-7 b(,)22 b(13)2095
+3044 y(SANE)p 2339 3044 V 31 w(Frame,)h(26)2095 3157
+y(SANE)p 2339 3157 V 31 w(FRAME)p 2685 3157 V 31 w(BLUE,)e(10,)i(26)
+2095 3270 y(SANE)p 2339 3270 V 31 w(FRAME)p 2685 3270
+V 31 w(GRA)-10 b(Y)e(,)22 b(9,)h(26)2095 3383 y(SANE)p
+2339 3383 V 31 w(FRAME)p 2685 3383 V 31 w(GREEN,)e(10,)i(26)2095
+3496 y(SANE)p 2339 3496 V 31 w(FRAME)p 2685 3496 V 31
+w(RED,)f(10,)h(26)2095 3609 y(SANE)p 2339 3609 V 31 w(FRAME)p
+2685 3609 V 31 w(RGB,)f(9,)h(26)2095 3722 y(sane)p 2260
+3722 V 35 w(get)p 2405 3722 V 33 w(de)n(vices,)i(23)2095
+3835 y(sane)p 2260 3835 V 35 w(get)p 2405 3835 V 33 w(option)p
+2668 3835 V 35 w(descriptor)l(,)i(24)2095 3948 y(sane)p
+2260 3948 V 35 w(get)p 2405 3948 V 33 w(parameters,)f(26)2095
+4060 y(sane)p 2260 4060 V 35 w(get)p 2405 4060 V 33 w(select)p
+2643 4060 V 35 w(fd,)d(29)2095 4173 y(SANE)p 2339 4173
+V 31 w(Handle,)h(15,)g(35)2095 4286 y(SANE)p 2339 4286
+V 31 w(INFO)p 2583 4286 V 32 w(INEXA)l(CT)-7 b(,)21 b(25)2095
+4399 y(SANE)p 2339 4399 V 31 w(INFO)p 2583 4399 V 32
+w(RELO)m(AD)p 2983 4399 V 30 w(OPTIONS,)g(25)2095 4512
+y(SANE)p 2339 4512 V 31 w(INFO)p 2583 4512 V 32 w(RELO)m(AD)p
+2983 4512 V 30 w(P)-8 b(ARAMS,)20 b(25)2095 4625 y(sane)p
+2260 4625 V 35 w(init,)j(19)2095 4738 y(SANE)p 2339 4738
+V 31 w(Int,)h(13)2095 4851 y(SANE)p 2339 4851 V 31 w(NET)p
+2548 4851 V 32 w(A)-5 b(UTHORIZE,)19 b(40)2095 4964 y(SANE)p
+2339 4964 V 31 w(NET)p 2548 4964 V 32 w(CANCEL,)h(40)2095
+5077 y(SANE)p 2339 5077 V 31 w(NET)p 2548 5077 V 32 w(CLOSE,)g(37)1905
+5381 y(57)p eop
+%%Page: 58 59
+58 58 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(NET)p
+453 123 V 32 w(CONTR)l(OL)p 913 123 V 30 w(OPTION,)21
+b(38)0 236 y(SANE)p 244 236 V 31 w(NET)p 453 236 V 32
+w(EXIT)-7 b(,)21 b(41)0 349 y(SANE)p 244 349 V 31 w(NET)p
+453 349 V 32 w(GET)p 663 349 V 31 w(DEVICES,)f(37)0 462
+y(SANE)p 244 462 V 31 w(NET)p 453 462 V 32 w(GET)p 663
+462 V 31 w(OPTION)p 1029 462 V 31 w(DESCRIPT)n(ORS,)f(38)0
+574 y(SANE)p 244 574 V 31 w(NET)p 453 574 V 32 w(GET)p
+663 574 V 31 w(P)-8 b(ARAMETERS,)18 b(39)0 687 y(SANE)p
+244 687 V 31 w(NET)p 453 687 V 32 w(INIT)-7 b(,)22 b(36)0
+800 y(SANE)p 244 800 V 31 w(NET)p 453 800 V 32 w(OPEN,)e(37)0
+913 y(SANE)p 244 913 V 31 w(NET)p 453 913 V 32 w(ST)-8
+b(AR)j(T)e(,)19 b(39)0 1026 y(sane)p 165 1026 V 34 w(open,)24
+b(23)0 1139 y(SANE)p 244 1139 V 31 w(Option)p 526 1139
+V 34 w(Descriptor)l(,)i(16)0 1252 y(SANE)p 244 1252 V
+31 w(OPTION)p 610 1252 V 31 w(IS)p 722 1252 V 33 w(A)l(CTIVE,)21
+b(19)0 1365 y(SANE)p 244 1365 V 31 w(OPTION)p 610 1365
+V 31 w(IS)p 722 1365 V 33 w(SETT)-8 b(ABLE,)18 b(19)0
+1478 y(SANE)p 244 1478 V 31 w(P)o(arameters,)24 b(26)0
+1591 y(SANE)p 244 1591 V 31 w(Range,)g(21)0 1704 y(sane)p
+165 1704 V 34 w(read,)g(27)0 1817 y(sane)p 165 1817 V
+34 w(set)p 299 1817 V 34 w(io)p 403 1817 V 33 w(mode,)g(29)0
+1929 y(sane)p 165 1929 V 34 w(start,)g(27)0 2042 y(SANE)p
+244 2042 V 31 w(Status,)g(15)0 2155 y(SANE)p 244 2155
+V 31 w(ST)-8 b(A)e(TUS)p 603 2155 V 30 w(A)l(CCESS)p
+975 2155 V 30 w(DENIED,)21 b(15)0 2268 y(SANE)p 244 2268
+V 31 w(ST)-8 b(A)e(TUS)p 603 2268 V 30 w(CANCELLED,)19
+b(15)0 2381 y(SANE)p 244 2381 V 31 w(ST)-8 b(A)e(TUS)p
+603 2381 V 30 w(CO)-5 b(VER)p 938 2381 V 31 w(OPEN,)21
+b(15)0 2494 y(SANE)p 244 2494 V 31 w(ST)-8 b(A)e(TUS)p
+603 2494 V 30 w(DEVICE)p 968 2494 V 31 w(B)o(USY)e(,)21
+b(15)0 2607 y(SANE)p 244 2607 V 31 w(ST)-8 b(A)e(TUS)p
+603 2607 V 30 w(EOF)j(,)21 b(15)0 2720 y(SANE)p 244 2720
+V 31 w(ST)-8 b(A)e(TUS)p 603 2720 V 30 w(GOOD,)21 b(15)0
+2833 y(SANE)p 244 2833 V 31 w(ST)-8 b(A)e(TUS)p 603 2833
+V 30 w(INV)e(AL,)21 b(15)0 2946 y(SANE)p 244 2946 V 31
+w(ST)-8 b(A)e(TUS)p 603 2946 V 30 w(IO)p 729 2946 V 32
+w(ERR)l(OR,)21 b(15)0 3059 y(SANE)p 244 3059 V 31 w(ST)-8
+b(A)e(TUS)p 603 3059 V 30 w(J)-5 b(AMMED,)21 b(15)0 3171
+y(SANE)p 244 3171 V 31 w(ST)-8 b(A)e(TUS)p 603 3171 V
+30 w(NO)p 765 3171 V 32 w(DOCS,)21 b(15)0 3284 y(SANE)p
+244 3284 V 31 w(ST)-8 b(A)e(TUS)p 603 3284 V 30 w(NO)p
+765 3284 V 32 w(MEM,)21 b(15)0 3397 y(SANE)p 244 3397
+V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(UNSUPPOR)-5
+b(TED,)17 b(15)0 3510 y(SANE)p 244 3510 V 31 w(String,)24
+b(14,)f(35)0 3623 y(SANE)p 244 3623 V 31 w(String)p 496
+3623 V 34 w(Const,)h(14)0 3736 y(sane)p 165 3736 V 34
+w(strstatus,)i(30)0 3849 y(SANE)p 244 3849 V 31 w(TR)l(UE,)21
+b(13)0 3962 y(SANE)p 244 3962 V 31 w(TYPE)p 504 3962
+V 31 w(BOOL,)g(18)0 4075 y(SANE)p 244 4075 V 31 w(TYPE)p
+504 4075 V 31 w(B)o(UTT)n(ON,)g(18)0 4188 y(SANE)p 244
+4188 V 31 w(TYPE)p 504 4188 V 31 w(FIXED,)g(18)0 4301
+y(SANE)p 244 4301 V 31 w(TYPE)p 504 4301 V 31 w(GR)l(OUP)-10
+b(,)21 b(18)0 4413 y(SANE)p 244 4413 V 31 w(TYPE)p 504
+4413 V 31 w(INT)-7 b(,)22 b(18)0 4526 y(SANE)p 244 4526
+V 31 w(TYPE)p 504 4526 V 31 w(STRING,)f(18)0 4639 y(SANE)p
+244 4639 V 31 w(Unit,)i(18)0 4752 y(SANE)p 244 4752 V
+31 w(UNFIX,)e(14)0 4865 y(SANE)p 244 4865 V 31 w(UNIT)p
+493 4865 V 32 w(BIT)-7 b(,)22 b(18)0 4978 y(SANE)p 244
+4978 V 31 w(UNIT)p 493 4978 V 32 w(DPI,)g(18)0 5091 y(SANE)p
+244 5091 V 31 w(UNIT)p 493 5091 V 32 w(MICR)l(OSECOND,)d(18)2095
+123 y(SANE)p 2339 123 V 31 w(UNIT)p 2588 123 V 32 w(MM,)j(18)2095
+236 y(SANE)p 2339 236 V 31 w(UNIT)p 2588 236 V 32 w(NONE,)f(18)2095
+349 y(SANE)p 2339 349 V 31 w(UNIT)p 2588 349 V 32 w(PERCENT)-7
+b(,)20 b(18)2095 462 y(SANE)p 2339 462 V 31 w(UNIT)p
+2588 462 V 32 w(PIXEL,)h(18)2095 574 y(SANE)p 2339 574
+V 31 w(V)-10 b(alue)p 2576 574 V 34 w(T)j(ype,)23 b(17)2095
+687 y(SANE)p 2339 687 V 31 w(VERSION)p 2766 687 V 31
+w(CODE,)e(12)2095 800 y(SANE)p 2339 800 V 31 w(VERSION)p
+2766 800 V 31 w(MAJOR,)h(12)2095 913 y(SANE)p 2339 913
+V 31 w(W)-7 b(ord,)24 b(12,)f(35)2095 1026 y(scan)i(area)f(options,)h
+(32)2095 1139 y(scan)g(resolution,)h(32)2095 1252 y(structure,)g(36)
+2095 1448 y(tl-x,)e(33)2095 1561 y(tl-y)-6 b(,)24 b(33)2095
+1674 y(T)-7 b(ype)24 b(Strings,)g(16)2095 1870 y(union,)h(36)2095
+1983 y(username,)g(22)2095 2178 y(V)-10 b(endor)25 b(Strings,)f(16)2095
+2374 y(well-kno)n(wn)h(options,)g(31)1905 5381 y(58)p
+eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/sane2/0.06/sane2-0.06.tex.gz b/sane2/0.06/sane2-0.06.tex.gz
new file mode 100644
index 00000000..858035ec
--- /dev/null
+++ b/sane2/0.06/sane2-0.06.tex.gz
@@ -0,0 +1,2645 @@
+\documentclass[11pt,DVIps]{report}
+
+\usepackage{times,epsfig,changebar,html}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex}
+\setlength{\textwidth}{6.5in}
+\setlength{\textheight}{8.5in}
+\setlength{\marginparwidth}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\marginparsep}{0pt}
+\addtolength{\topmargin}{-0.75in}
+
+\title{\huge SANE Standard Version 2.0 proposal 0.06 - rauch/beck}
+\author{}
+\date{May 15, 2002}
+
+\makeindex
+
+\begin{document}
+
+\newcommand{\filename}[1]{{\tt #1}}
+\newcommand{\code}[1]{{\tt #1}}
+\newcommand{\var}[1]{{\it #1}}
+\newcommand{\defn}[1]{#1\index{#1}}
+
+\begin{latexonly}
+ \setcounter{changebargrey}{0} % black change bars
+\end{latexonly}
+
+\maketitle
+\tableofcontents
+\listoffigures
+\listoftables
+
+
+\chapter{Preface}
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+\ref{chap:contact}.
+
+The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+\section{About This Document}
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+The remainder of this document is organized as follows.
+Chapter~\ref{chap:intro} provides introductional material.
+Chapter~\ref{chap:environ} presents the environment SANE is designed
+for. Chapter~\ref{chap:api} details the SANE Application Programmer
+Interface. Chapter~\ref{chap:net} specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter~\ref{chap:contact} gives information on how
+to join the SANE development process.
+
+\subsection{Typographic Conventions}
+
+Changes since the last revision of this document are highlighted
+like this:
+
+% \begin{changebar}
+% Paragraphs that changed since the last revision of the documention
+% are marked like this paragraph.
+% \end{changebar}
+
+\chapter{Introduction}\label{chap:intro}
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+\section{Terminology}
+
+An application that uses the SANE interface is called a SANE {\em
+ frontend}. A driver that implements the SANE interface is called a
+SANE {\em backend}. A {\em meta backend\/} provides some means to
+manage one or more other backends.
+
+
+\chapter{The SANE Environment}\label{chap:environ}
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE {\em option\/}. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+\code{brightness} whose value is an integer in the range from 0 to
+255.
+
+With self-describing options, a backend need not be concerned with
+{\em presentation\/} issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the {\em meaning\/} of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+\section{Attaching to a SANE backend}
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+\begin{itemize}
+
+\item {\bf Static linking:} A SANE backend may be linked directly into
+ a frontend. While the simplest method of attaching to a backend, it
+ is somewhat limited in functionality since the available devices is
+ limited to the ones for which support has been linked in when the
+ frontend was built. But even so static linking can be quite useful,
+ particularly when combined with a backend that can access scanners
+ via a network. Also, it is possible to support multiple backends
+ simultaneously by implementing a meta backend that manages several
+ backends that have been compiled in such a manner that they export
+ unique function names. For example, a backend called \code{be}
+ would normally export a function called \code{sane\_read()}. If
+ each backend would provide such a function, static linking would
+ fail due to multiple conflicting definitions of the same symbol.
+ This can be resolved by having backend \code{be} include a
+ header file that has lines of the form:
+ \begin{quote}
+\begin{verbatim}
+#define sane_read be_sane_read
+\end{verbatim}
+ \end{quote}
+ With definitions of this kind, backend \code{be} will export
+ function name \code{be\_sane\_read()}. Thus, all backends will
+ export unique names. As long as a meta backend knows about these
+ names, it is possible to combine several backends at link time and
+ select and use them dynamically at runtime.
+
+\item {\bf Dynamic linking:} A simpler yet more powerful way to
+ support multiple backends is to exploit dynamic linking on platforms
+ that support it. In this case, a frontend is linked against a
+ shared library that implements any SANE backend. Since each
+ dynamically linked backend exports the same set of global symbols
+ (all starting with the prefix \code{sane\_}), the dynamic library
+ that gets loaded at runtime does not necessarily have to be the same
+ one as one the frontend got linked against. In other words, it is
+ possible to switch the backend by installing the appropriate backend
+ dynamic library.
+
+ More importantly, dynamic linking makes it easy to implement a meta
+ backend that loads other backends {\em on demand}. This is a
+ powerful mechanism since it allows adding new backends merely by
+ installing a shared library and updating a configuration file.
+
+\item {\bf Network connection:} Arguably the ultimate way to attach to
+ a scanner is by using the network to connect to a backend on a
+ remote machine. This makes it possible to scan images from any host
+ in the universe, as long as there is a network connection to that
+ host and provided the user is permitted to access that scanner.
+
+\end{itemize}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth}
+ \caption{Example SANE Hiearchy}
+ \label{fig:hierarchy}
+ \end{center}
+\end{figure}
+
+The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine
+A uses a dynamic-linking based meta backend called \code{dll} to
+access the backends called \code{pnm}, \code{mustek}, and \code{net}.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called \code{saned}. The \code{saned} in
+turn has access to the \code{hp} and \code{autolum} backends through
+another instance of the \code{dll} backend. The \code{autolum} meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called \code{qcam}.
+
+Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+\section{Image Data Format}\label{sec:imageformat}\index{image data format}
+
+Arguably the most important aspect of an image acquisition system is how
+images are represented. The SANE approach is to define a simple yet powerful
+representation that is sufficient for vast majority of applications and
+devices. While the representation is simple, the interface has been defined
+carefully to allow extending it in the future without breaking backwards
+compatibility. Thus, it will be possible to accommodate future applications or
+devices that were not anticipated at the time this standard was created.
+
+A SANE image is a rectangular area. The rectangular area is subdivided into a
+number of rows and columns. At the intersection of each row and column is a
+(preferable quadratic) pixel. A pixel consists of one or more sample values.
+\begin{changebar}
+ Each sample value represents one channel (e.g., the red channel).
+\end{changebar}
+
+The SANE API transmits an image as a sequence of frames. Each frame covers
+the same rectangular area as the entire image, but may contain only a subset
+of the channels in the final image. For example, a red/green/blue image could
+either be transmitted as a single frame that contains the sample values for
+all three channels or it could be transmitted as a sequence of three frames:
+the first frame containing the red channel, the second the green channel, and
+the third the blue channel.
+
+\begin{changebar}
+ When transmitting an image frame by frame, the frontend needs to know what
+ part of the image a frame represents (and how many frames it should expect).
+ For that purpose, the SANE API tags every frame with a type and a format
+ descriptor.
+\end{changebar}
+
+\begin{changebar}
+ There are two different types of frames: pixel oriented frames
+ \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames
+ \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the
+ following sections. The frame types used by version~1 of this standard
+ (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}},
+ \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and
+ \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by
+ \code{\defn{SANE\_FRAME\_RAW}}.
+\end{changebar}
+
+\begin{changebar}
+ \subsection{Pixel oriented frames}
+\end{changebar}
+
+\begin{changebar}
+ The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The
+ frame contains one or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the individual pixels that
+ is subject to further description in the \code{format\_desc} member of the
+ \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparams}
+ on page~\pageref{sec:sanegetparams} for details about the format
+ descriptions.
+\end{changebar}
+
+\begin{changebar}
+ Each sample value has a certain bit depth. The bit depth is fixed for the
+ entire image and can be as small as one bit. Valid bit depths are 1, 8, or
+ 16 bits per sample. If a device's natural bit depth is something else, it is
+ up to the driver to scale the sample values appropriately (e.g., a 4 bit
+ sample could be scaled by a factor of four to represent a sample value of
+ depth 8).
+\end{changebar}
+
+\begin{changebar}
+ The complete image may consist of several channels, the number of channels
+ is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}.
+ The image may be transmitted in an arbitary number of frames which can be
+ determined by watching the \code{last\_frame} flag in said type (or by
+ counting the channels). Note: This frame type replaces all frame types of
+ the SANE standard version 1.
+\end{changebar}
+
+Conceptually, each pixel oriented frame is transmitted
+a byte at a time. Each byte may contain 8 sample values (for an image
+bit depth of 1), one full sample value (for an image bit depth of 8),
+or a partial sample value (for an image bit depth of 16 or bigger).
+In the latter case, the bytes of each sample value are transmitted in
+the machine's native byte order.
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+\end{quote}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/xfer.eps,width=0.5\textwidth}
+ \caption{Transfer order of image data bytes}
+ \label{fig:xfer}
+ \end{center}
+\end{figure}
+
+The order in which the sample values in a frame are transmitted is illustrated
+in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by
+row and each row is transmitted from left-most to right-most column. The
+left-to-right, top-to-bottom transmission order applies when the image is
+viewed in its normal orientation (as it would be displayed on a screen, for
+example).
+
+If a frame contains multiple channels, then the channels are transmitted in an
+interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case
+where a frame contains a complete red/green/blue image with a bit-depth of 8.
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/image-data.eps,width=0.8\textwidth}
+ \caption{Bit and byte order of image data}
+ \label{fig:pixels}
+ \end{center}
+\end{figure}
+
+For a bit depth of 1, each byte contains 8 sample values of a {\em single\/}
+channel. In other words, a bit depth 1 frame is transmitted in a byte
+interleaved fashion.
+\begin{changebar}
+ The first sample of each byte is represented by the most significant bit.
+\end{changebar}
+
+When the bit depth is 1 there are only two sample values possible, 1
+represents minimum intensity (black) and 0 represents maximum intensity
+(white). For all other bit depths a sample value of 0 represents minimum
+intensity and larger values represent increasing intensity.
+
+\begin{changebar}
+ \subsection{Arbitrary data frames}
+\end{changebar}
+
+\begin{changebar}
+ It also is possible to transmit arbitary (not necessaryly pixel oriented)
+ data. This allows transmission of compressed images like jpeg, tiff, etc.
+\end{changebar}
+
+\begin{changebar}
+The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}.
+\end{changebar}
+The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is
+given in the \code{format\_desc} member of the \code{SANE\_Parameters}
+structured type (see See section~\ref{sec:sanegetparams} on
+page~\pageref{sec:sanegetparams}). As such, it is assumed to be
+incomprehensible to the frontend, except for selected types the frontend is
+specifically capable of handling internally. The frontend is free to ignore
+those frames, or employ any appropriate means to otherwise handle this data
+(like saving them to disk or spawning an external viewer).
+
+\chapter{The SANE Application Programmer Interface (API)}\label{chap:api}
+
+\begin{changebar}
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called \filename{sane/sane-2.h}. This file should
+normally be included via a C pre-processor directive of the form:
+\begin{verbatim}
+ #include
+\end{verbatim}
+\end{changebar}
+
+
+\section{Version Control}
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+The SANE API provides the following five macros to manage version
+numbers.
+\begin{quote}
+ \begin{description}
+ \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+ \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:]
+ \label{sec:saneversioncode}
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (\var{maj}), the minor version number \var{min},
+ and the build revision of a backend (\var{bld}). The major and
+ minor version numbers must be in the range 0\ldots255 and the
+ build revision must be in the range 0\ldots65535.
+
+ Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the
+ major version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the
+ minor version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the
+ build revision component of the version code passed in argument
+ \var{vc}.
+ \end{description}
+\end{quote}
+
+
+\section{Data Types}
+
+\subsection{Base Types}
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+\begin{quote}
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};}
+\end{quote}
+\verb|SANE_Byte| must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. \verb|SANE_Word| must be
+capable of holding any of the following:
+\begin{itemize}
+ \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE|
+ \item signed integers in the range $-2^{31}\ldots2^{31}-1$
+ \item fixed point values in the range $-32768\ldots32767.9999$ with
+ a resolution of $1/65536$
+ \item 32 bits (for bit sets)
+\end{itemize}
+Note that the SANE standard does not define what C type
+\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some
+platforms, the latter may map to \verb|long int| whereas on others it
+may map to \verb|int|. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+\subsection{Boolean Type}
+
+\code{\defn{SANE\_Bool}} is used for variables that can take one of
+the two truth values \code{\defn{SANE\_FALSE}} and
+\code{\defn{SANE\_TRUE}}. The former value is defined to be 0,
+whereas the latter is 1.\footnote{This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.} The C
+declarations for this type are given below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Bool| whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+\subsection{Integer Type}
+
+\code{\defn{SANE\_Int}} is used for variables that can take integer
+values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is
+given below.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Word SANE_Int;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Int| whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+\subsection{Fixed-point Type}
+
+\code{\defn{SANE\_Fixed}} is used for variables that can take fixed
+point values in the range $-32768$ to $32767.9999$ with a resolution
+of $1/65535$. The C declarations relating to this type are given
+below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+\end{verbatim}
+\end{quote}
+The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of $1/65536$.
+
+Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Fixed| whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE
+ fixed-point value that is smaller than the double value \var{d}.
+ No range checking is performed. If the value of \var{d} is out of
+ range, the result is undefined.
+
+ \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest
+ double machine number that corresponds to fixed-point value
+ \var{w}.
+
+ \end{description}
+\end{quote}
+SANE does {\em not\/} require that the following two expressions hold
+true (even if the values of \var{w} and \var{d} are in range):
+\begin{quote}
+\begin{verbatim}
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+\end{verbatim}
+\end{quote}
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+\subsection{Text}
+
+\subsubsection{Character Type}
+
+Type \code{\defn{SANE\_Char}} represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+\verb|char| type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+\verb|sizeof(SANE_Char)==sizeof(char)|.
+\begin{quote}
+\begin{verbatim}
+typedef char SANE_Char;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{String Type}
+
+Type \code{\defn{SANE\_String}} represents a text string as a sequence
+of C \verb|char| values. The end of the sequence is indicated by a
+\verb|'\0'| (\defn{NUL}) character.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+\end{verbatim}
+\end{quote}
+The type \code{\defn{SANE\_String\_Const}} is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+\begin{quote}
+\begin{verbatim}
+const SANE_String str;
+\end{verbatim}
+\end{quote}
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+\subsection{Scanner Handle Type}
+
+Access to a scanner is provided through an opaque type called
+\code{\defn{SANE\_Handle}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef void *SANE_Handle;
+\end{verbatim}
+\end{quote}
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a \verb|SANE_Handle|. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+\subsection{Status Type}
+
+Most SANE operations return a value of type \code{\defn{SANE\_Status}}
+to indicate whether the completion status of the operation. If an
+operation completes successfully, \verb|SANE_STATUS_GOOD| is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table \ref{tab:status}. It is recommended to use function
+\code{sane\_strstatus()} to convert status codes into a legible
+string.
+
+\begin{table}[htbp]
+ \begin{center}
+ \begin{tabular}{|l|r|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} &
+ \multicolumn{1}{c|}{\bf Description} \\
+ \hline\hline
+\code{\defn{SANE\_STATUS\_GOOD}}
+ & 0 & Operation completed succesfully. \\
+\code{\defn{SANE\_STATUS\_UNSUPPORTED}}
+ & 1 & Operation is not supported. \\
+\code{\defn{SANE\_STATUS\_CANCELLED}}
+ & 2 & Operation was cancelled. \\
+\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}}
+ & 3 & Device is busy---retry later. \\
+\code{\defn{SANE\_STATUS\_INVAL}}
+ & 4 & Data or argument is invalid. \\
+\code{\defn{SANE\_STATUS\_EOF}}
+ & 5 & No more data available (end-of-file). \\
+\code{\defn{SANE\_STATUS\_JAMMED}}
+ & 6 & Document feeder jammed. \\
+\code{\defn{SANE\_STATUS\_NO\_DOCS}}
+ & 7 & Document feeder out of documents. \\
+\code{\defn{SANE\_STATUS\_COVER\_OPEN}}
+ & 8 & Scanner cover is open. \\
+\code{\defn{SANE\_STATUS\_IO\_ERROR}}
+ & 9 & Error during device I/O. \\
+\code{\defn{SANE\_STATUS\_NO\_MEM}}
+ & 10 & Out of memory. \\
+\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}}
+ & 11 & Access to resource has been denied. \\
+ \hline
+ \end{tabular}
+ \caption{Status Codes}\label{tab:status}
+ \end{center}
+\end{table}
+
+
+\subsection{Device Descriptor Type}
+\begin{changebar}
+
+Each SANE device is represented by a structure of type
+\code{\defn{SANE\_Device}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const backend_website;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+\index{device-name}
+The structure provides the unique name of the scanner in member
+\code{name}. It is this unique name that should be passed in a call
+to \code{sane\_open()}. The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is {\em recommended\/} that backends keep
+unique names below 32 characters in length. However, applications
+{\em must\/} be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members \code{vendor}, \code{model}, and \code{type} are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \hspace{\fill}
+ \begin{tabular}[t]{|ll|}
+ \hline
+ \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\
+ \hline\hline
+ \code{AGFA} & \code{Microtek} \\
+ \code{Abaton} & \code{Minolta} \\
+ \code{Acer} & \code{Mustek} \\
+ \code{Apple} & \code{NEC} \\
+ \code{Artec} & \code{Nikon} \\
+ \code{Avision} & \code{Plustek} \\
+ \code{CANON} & \code{Polaroid} \\
+ \code{Connectix} & \code{Ricoh} \\
+ \code{Epson} & \code{Sharp} \\
+ \code{Fujitsu} & \code{Siemens} \\
+ \code{Hewlett-Packard} & \code{Tamarack} \\
+ \code{IBM} & \code{UMAX} \\
+ \code{Kodak} & \code{Noname} \\
+ \code{Logitech} & \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \begin{tabular}[t]{|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\
+ \hline\hline
+ \code{film scanner} \\
+ \code{flatbed scanner} \\
+ \code{frame grabber} \\
+ \code{handheld scanner} \\
+ \code{multi-function peripheral} \\
+ \code{sheetfed scanner} \\
+ \code{still camera} \\
+ \code{video camera} \\
+ \code{virtual device} \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \caption{Predefined Device Information Strings}
+ \label{tab:devinfo}
+ \end{center}
+\end{table}
+Note that vendor string \code{Noname} can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+\begin{changebar}
+The backend has to set up the string \code{email\_backend\_author}
+with the name and the email address of the backend author or a contact person
+in the format:
+\begin{verbatim}
+Firstname Lastname
+\end{verbatim}
+
+The string \code{backend\_website} has to be set up by the backend
+with the website or ftp address of the backend in the format:
+\begin{verbatim}
+http://www.domain.org/sane-hello/index.html
+\end{verbatim}
+
+The backend should fill the string \code{device\_location} with a
+text that describes where a user can find this device, the text
+should be read from the backend config file. This could e.g. look
+like this:
+\begin{verbatim}
+building 93, 2nd plane, room 2124
+\end{verbatim}
+
+The string \code{comment} can be used to display any comment to the user,
+the text should be read from the backend config file.
+
+The string \code{reserved\_string} is planed for future use, the backend
+has to set this string to "".
+
+With member \code{backend\_version\_code} a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+The member \code{backend\_capability\_flags} contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+The member \code{reserved\_int} is planned for future use, the backend has
+to set the value of the integer to 0.
+\end{changebar}
+
+\subsection{Option Descriptor Type}\label{sec:odesc}
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+\code{\defn{SANE\_Option\_Descriptor}} type is given below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{Option Name}
+
+Member \code{name} is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (\code{a}--\code{z}),
+digits (\code{0}--\code{9}), or the dash character (\code{-}) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+\subsubsection{Option Title}
+
+Member \code{title} is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+\subsubsection{Option Description}
+
+Member \code{desc} is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+\subsubsection{Option Value Type}
+
+Member \code{type} specifies the type of the option value. The
+possible values for type \code{\defn{SANE\_Value\_Type}} are described
+in Table \ref{tab:valuetype}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|p{0.6\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type
+ \verb|SANE_Bool|. \\
+
+\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type
+ \verb|SANE_Int|. \\
+
+\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type
+ \verb|SANE_Fixed|. \\
+
+\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type
+ \verb|SANE_String|. \\
+
+\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. \\
+
+\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members \code{title} and
+\code{type} are valid in the option descriptor. \\
+
+ \hline
+ \end{tabular}
+ \caption{Option Value Types (\code{SANE\_Value\_Type})}
+ \label{tab:valuetype}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Unit}
+
+Member \code{unit} specifies what the physical unit of the option
+value is. The possible values for type \code{\defn{SANE\_U\-nit}} are
+described in Table \ref{tab:units}. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\
+\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\
+\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\
+\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\
+\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\
+\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\
+\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\
+
+\hline
+ \end{tabular}
+ \caption{Physical Units (\code{SANE\_Unit})}
+ \label{tab:units}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Size}\label{sec:valuesize}
+
+Member \code{size} specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+\begin{quote}
+ \begin{description}
+ \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating \code{NUL} character is considered to be part of the
+ string. Note that the terminating \code{NUL} character must
+ always be present in string option values.
+ \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size
+ must be a positive integer multiple of the size of a
+ \verb|SANE_Word|. The option value is a vector of length
+ \[ \code{size}/\code{sizeof(SANE\_Word)}. \]
+ \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to
+ \code{sizeof(SANE\_Word)}.
+ \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The
+ option size is ignored.
+ \end{description}
+\end{quote}
+
+\subsubsection{Option Capabilities}
+
+Member \code{cap} describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table \ref{tab:capabilities}. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro
+ returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is currently active.
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This
+ macro returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is software settable.
+ \end{description}
+\end{quote}
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.59\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option
+ value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\
+
+\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both
+ simultaneously). \\
+
+\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option
+ value can be detected by software. If
+ \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/}
+ be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability
+ may or may not be set. If this capability is set but neither
+ \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT}
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. \\
+
+\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. \\
+
+\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling \code{sane\_control\_option()}
+ with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\
+
+\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). \\
+
+\code{\defn{SANE\_CAP\_ADVANCED}} & 64 &
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option.'' A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ \\
+
+\hline
+ \end{tabular}
+ \caption{Option Capabilities}
+ \label{tab:capabilities}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Constraints}
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member \code{constraint\_type} indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member \code{constraint}. The possible values of type
+\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the
+\code{constraint} union is described in Table~\ref{tab:constraints}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. \\
+
+ \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member \code{constraint.range} points to
+ a range of the type \code{\defn{SANE\_Range}}. This type is illustrated
+ below:
+ \begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+\end{verbatim}
+ \end{quote}
+ All three members in this structure are interpreted according to the
+ option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|).
+ Members \code{min} and \code{max} specify the minimum and maximum
+ values, respectively. If member \code{quant} is non-zero, it
+ specifies the quantization value. If $l$ is the minimum value, $u$
+ the maximum value and $q$ the (non-zero) quantization of a range,
+ then the legal values are $v=k\cdot q+l$ for all non-negative
+ integer values of $k$ such that $v<=u$. \\
+
+\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ \code{constraint.word\_list} points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (\verb|SANE_Int|) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\
+
+\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated
+ list of strings that enumerate the legal values for the option
+ value.
+\\\hline
+ \end{tabular}
+ \caption{Option Value Constraints}
+ \label{tab:constraints}
+ \end{center}
+\end{table}
+
+
+\subsection{Internationalization}\label{sec:i18n}
+\begin{changebar}
+All backend texts should be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+\subsubsection{How is a text marked for translation}
+
+The keyword \code{SANE\_I18N} is used to mark a text for translation.
+\code{SANE\_I18N} has to be defined as a dummy prototype:
+
+ \begin{quote}
+\begin{verbatim}
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+\end{verbatim}
+ \end{quote}
+
+You should not mark prototypes or variables with \code{SANE\_I18N}
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and
+variables (\verb|SANE_I18N(option[7].name)|).
+
+A correct marked text can look like this:\\
+\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\
+or\\
+\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\
+It also is allowed to mark texts in structs because the
+prototype \code{SANE\_I18N} has no effect to the compiler.
+
+\subsubsection{Which texts shall be marked for translation?}
+All option texts that are visible for the user should be marked for
+translation. This is:
+\begin{itemize}
+\item
+member \code{title}
+\item
+member \code{desc}
+\item
+member \code{string\_list}
+\end{itemize}
+of \code{SANE\_Option\_Descriptor}.
+
+It is not allowed to mark/translate member \code{name}.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+\subsubsection{File formats and translation functions}
+The recommended file formats for translation tables are the \code{po} files
+and \code{mo} or \code{gmo} files.
+The po file contains the original text marked with the keyword \code{msgid}
+and the translated text marked with the keyword \code{msgstr}.
+A \code{po} file that contains all needed \code{msgid}s can be created
+e.g. by the gnu gettext tool \verb|xgettext| with the option
+\verb|-k SANE_I18N|.
+The translator adds the translated texts to the \code{po} files.
+The gettext tool \code{msgfmt} converts the \code{po} files to the
+\code{mo} or \code{gmo} files.\\
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function \code{gettext}
+to translate the texts. This e.g. can look like this:\\
+\verb|snprintf(buf, sizeof(buf), gettext("english text"));|
+
+If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the \code{po} files to create its
+own translation tables from it.\\
+
+Note that it is strongly recommended to use the gettext tools.
+\end{changebar}
+
+
+\section{Operations}
+
+\subsection{\code{sane\_init}}
+
+This function must be called before any other SANE function can be
+called. The behavior of a SANE backend is undefined if this function
+is not called first. The version code of the backend is returned in
+the value pointed to by \code{version\_code}. If that pointer is
+\code{NULL}, no version code is returned.
+ Argument \code{authorize} is either a pointer to a function that is
+ invoked when the backend requires authentication for a specific
+ resource or \code{NULL} if the frontend does not support
+ authentication.
+\begin{quote}\index{sane\_init}
+\begin{verbatim}
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+\end{verbatim}
+\end{quote}
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+\begin{quote}
+ \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start}
+\end{quote}
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+\begin{quote}\index{SANE\_Authorization\_Callback}
+ \index{domain}\index{username}\index{password}
+\begin{verbatim}
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+\end{verbatim}
+\end{quote}
+Three arguments are passed to the authorization function:
+\code{resource} is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The \code{username}
+and \code{password} arguments are (pointers to) an array of
+\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN}
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+{\em must\/} be ASCII-NUL terminated.
+
+\subsection{\code{sane\_exit}}
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to \code{sane\_clo\-se()}, but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than \code{sane\_init()} may be called (regardless
+of the status value returned by \code{sane\_exit()}. Neglecting to
+call this function may result in some resources not being released
+properly.
+\begin{quote}\index{sane\_exit}
+\begin{verbatim}
+void sane_exit (void);
+\end{verbatim}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_devices}}
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a \code{NULL} terminated array of pointers to \verb|SANE_Device|
+structures in \code{*device\_list}. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to \code{sane\_exit()} is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument \code{local\_only} is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+\begin{quote}\index{sane\_get\_devices}
+\begin{verbatim}
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+\end{verbatim}
+\end{quote}
+
+This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an
+insufficient amount of memory is available.
+
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ SANE does not require that this function is called before a
+ \code{sane\_open()} call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+\begin{changebar}
+ The same information about
+ a device has to be returned when \code{sane\_open} is called.
+\end{changebar}
+\end{quote}
+
+
+\subsection{\code{sane\_open}}
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+\code{name}. If the call completes successfully, a handle for the
+device is returned in \code{*h}.
+\begin{changebar}
+The description of the device
+is returned in \code{**device\_description}. This is the
+same description that is returned in the list by \code{sane\_get\_devices}.
+The returned data \code{*h} and \code{*device\_description} is guaranteed
+to remain unchanged and valid until a call to \code{sane\_close()}
+is performed.
+\end{changebar}
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+\begin{quote}\index{sane\_open}
+\begin{verbatim}
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+\end{verbatim}
+\end{quote}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently
+ busy (in use by somebody else).
+\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_close}}
+
+This function terminates the association between the device handle
+passed in argument \code{h} and the device it represents. If the
+device is presently active, a call to \code{sane\_cancel()} is
+performed first. After this function returns, handle \code{h} must
+not be used anymore.
+
+\begin{quote}\index{sane\_close}
+\begin{verbatim}
+void sane_close (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_get\_option\_descriptor}}
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number \code{n} of the device
+represented by handle \code{h}. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle \code{h} (the count
+includes option 0). If $n$ is not a valid option index, the function
+returns \code{NULL}. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+\begin{quote}\index{sane\_get\_option\_descriptor}
+\begin{verbatim}
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_control\_option}}\label{sec:control}
+
+This function is used to set or inquire the current value of option
+number \code{n} of the device represented by handle \code{h}. The
+manner in which the option is controlled is specified by parameter
+\code{a}. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+\code{v}. It is a pointer to the memory that holds the option value.
+The memory area pointed to by \code{v} must be big enough to hold the
+entire option value (determined by member \code{size} in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument \code{v} may be shorter since the backend will stop
+reading the option value upon encountering the first \code{NUL}
+terminator in the string. If argument \code{i} is not \code{NULL},
+the value of \code{*i} will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+\begin{quote}\index{sane\_control\_option}
+\begin{verbatim}
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+\end{verbatim}
+\end{quote}
+
+The way the option is affected by a call to this function is
+controlled by parameter \code{a} which is a value of type
+\code{\defn{SANE\_Action}}. The possible values and their meaning is
+described in Table~\ref{tab:actions}.
+
+\begin{table}[h]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\
+
+\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The
+ option value passed through argument \code{v} may be modified by the
+ backend if the value cannot be set exactly. \\
+
+\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter \code{v} is completely ignored in this case and
+ may be \code{NULL}. \\
+
+\hline
+ \end{tabular}
+ \caption{Action Values (\code{SANE\_Action})}
+ \label{tab:actions}
+ \end{center}
+\end{table}
+
+After setting a value via an action value of
+\verb|SANE_ACTION_SET_VALUE|, additional information on how well the
+request has been met is returned in \code{*i} (if \code{i} is
+non-\code{NULL}). The returned value is a bitset that may contain any
+combination of the values described in Table~\ref{tab:info}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in \code{*i} has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an
+ option may affect the value or availability of one or more {\em
+ other\/} options. When this happens, the SANE backend sets this
+ member in \code{*i} to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may
+ affect the parameter values (see \code{sane\_get\_parameters()}).
+ If setting an option affects the parameter values, this member will
+ be set in \code{*i}. Note that this member may be set even if the
+ parameters did not actually change. However, it is guaranteed that
+ the parameters never change without this member being set. \\
+
+\hline
+ \end{tabular}
+ \caption{Additional Information Returned When Setting an Option}
+ \label{tab:info}
+ \end{center}
+\end{table}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not
+ supported for the specified handle and option number.
+\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+
+\subsection{\code{sane\_get\_parameters}}
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (\code{sane\_start()} has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+\code{sane\_start()} gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle \code{h} of the device for which the
+parameters should be obtained and a pointer \code{p} to a parameter
+structure. The parameter structure is described in more detail below.
+
+\begin{quote}\index{sane\_get\_parameters}
+\begin{verbatim}
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+\end{verbatim}
+\end{quote}
+
+The scan parameters are returned in a structure of type
+\code{\defn{SANE\_Parameters}}. The C declaration of this structure
+is given below.
+\begin{changebar}
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String format_desc;
+ SANE_String proposed_filename;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+\end{verbatim}
+\end{quote}
+
+Member \code{format} specifies the format of the next frame to be
+returned. The possible values for type \code{\defn{SANE\_Frame}} are
+described in Table~\ref{tab:frameformat}. The meaning of these
+values is described in more detail in Section~\ref{sec:imageformat}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|c|c|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf SANE standard} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\
+\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\
+\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\
+\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\
+
+\hline
+ \end{tabular}
+ \caption{Frame Format (\code{SANE\_Frame})}
+ \label{tab:frameformat}
+ \end{center}
+\end{table}
+
+The \code{flags} member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+\begin{itemize}
+
+\item
+\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image). Note, that it is possible to transmit
+multiple images in succession.
+
+\item
+\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. It is permissible to set that value to 1 "in good
+faith", as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer (e.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at \code{sane\_start()}.
+
+\item
+\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+\item
+\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tell if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+\end{itemize}
+
+Note, that flags is compatible to member \code{last\_frame} of
+\code{SANE\_Parameters} of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+
+
+
+Member \code{lines} specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call \code{sane\_read()} until it
+returns a status of \code{SANE\_STATUS\_EOF}.
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+
+Member \code{bytes\_per\_line} specifies the number of bytes that
+comprise one scan line.
+If bytes\_per\_line is set to 0, which can currently only be the case for
+\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line
+length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF}
+with an arbitrary block length.
+
+Member \code{depth} specifies the number of bits per sample.
+Note, that only 0 (for not applicable), 1, and n*8 are allowed
+values. Data with other depths has to be scaled up accordingly.
+
+Member \code{pixels\_per\_line} specifies the number of pixels that
+comprise one scan line.
+
+Assume $B$ is the number of channels in the frame, then the bit depth
+$d$ (as given by member \code{depth}) and the number of pixels per
+line $n$ (as given by this member \code{pixels\_per\_line}) are
+related to $c$, the number of bytes per line (as given by member
+\code{bytes\_per\_line}) as follows:
+\[
+ c >= \left\{
+ \begin{array}{ll}
+ \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\
+ B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$}
+ \end{array}
+ \right.
+\]
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+Member \code{channels\_per\_image} specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+\code{channels\_per\_image} has to be the same for all frames for this image.
+
+Member \code{format\_desc} is used for the new frametypes
+\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs
+between the two types:
+
+\begin{itemize}
+\item
+\code{SANE\_FRAME\_RAW}:
+The \code{format\_desc} contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}".
+
+Channel interleaved data is described by a comma separated list of channel descriptions,
+e.g. "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}",
+the channel data is sent in the given order.
+
+The depth information does {\bf not} define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member \code{depth}.
+
+Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be \code{infrared} or
+a wavelength description like \code{1100nm}, but be aware that a
+frontend may not be able to display such channels with usefull colors.
+
+Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member \code{channels\_per\_image}.
+
+\item
+\code{SANE\_FRAME\_MIME}:
+The \code{format\_desc} contains the MIME type/subtype *(;parameter)
+fields as described in RFC 1521, 4. The Content-Type Header Field,
+without the prefixing "Content-Type:".
+Note, that it is discouraged to transfer proprietary file formats over
+SANE. If at all possible, please stick to the IANA assigned MIME types,
+and make sure the datastream is compliant with the corresponding
+specification.
+When data is transmitted with the frame type \code{SANE\_FRAME\_MIME}
+all data has to be transmitted within one frame, multiple frames
+are not allowed (so the flag \code{last\_frame} has to be set
+when using this frame type).
+A fully compliant SANE backend is required to transmit in either
+SANE native frametypes, or in a MIME type, for which a converting
+middleend exists and is freely available for all platforms.
+
+Other formats may be transmitted, but the only thing the average
+frontend can do with them, is save them. This is not considered a
+good option, as it does not facilitate transmitting the data to a
+client application that may be running the frontend.
+However, if the data transferred by the backend is not an image in
+nature, it wouldn't make sense to try converting it anyway, so it is
+acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that
+case. But even then, try to stick to well known stuff with freely
+existing standards and viewers as well.
+\end{itemize}
+
+The member \code{proposed\_filename} can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to "".
+
+In the case of non-MIME frames, this is expected to hold the basename for
+the image, with the extension determined by the save function of the
+frontend, as the frontend can fully understand the data and is thus able
+to encode it in any format it wishes.
+
+For MIME frames it can contain either:
+
+\begin{itemize}
+\item
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+\item
+A complete filename, including extension.
+\end{itemize}
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+In any case, if the frontend makes use of this field, the frontend
+must mangle this proposal or the final filename it produces with
+its help to suit local filesystem restrictions.
+
+Special care should be taken not to cause security flaws this way.
+For Unix, that means killing out all path separators (/) [to avoid
+to save away stuff in obscure places or create critical files like
+/etc/hosts.allow] and avoiding to overwrite existing files.
+(Creating of leading dot files - like .rhosts - is not an issue here,
+because that's only a propose filename extension as mentioned above.
+
+The string \code{proposed\_comment} can be used to transmit additional
+image data, that can be stored in the comment areas several fileformats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc.
+
+The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different
+resolutions of each image. It is not permissible to change resolution
+between frames of the same image.
+
+The member \code{reserved} is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+\end{changebar}
+
+
+\subsection{\code{sane\_start}}
+
+This function initiates aquisition of an image from the device
+represented by handle \code{h}.
+\begin{quote}\index{sane\_start}
+\begin{verbatim}
+SANE_Status sane_start (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The
+ operation should be retried later.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_read}}
+
+This function is used to read image data from the device represented
+by handle \code{h}. Argument \code{buf} is a pointer to a memory area
+that is at least \code{maxlen} bytes long. The number of bytes
+returned is stored in \code{*len}. A backend must set this to zero
+when the call fails (i.e., when a status other than
+\code{SANE\_STA\-TUS\_GOOD} is returned). When the call succeeds, the
+number of bytes returned can be anywhere in the range from 0 to
+\code{maxlen} bytes.
+\begin{quote}\index{sane\_read}
+\begin{verbatim}
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+\end{verbatim}
+\end{quote}
+For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle \code{h}.
+\begin{enumerate}
+\item If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+\item If the device is in non-blocking I/O mode, the call returns
+ immediately with status \code{SANE\_STA\-TUS\_GOOD} and with
+ \code{*len} set to zero.
+\end{enumerate}
+The I/O mode of handle \code{h} can be set via a call to
+\code{sane\_set\_io\_mode()}.
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the
+ current frame. If \code{sane\_read} sends back any image data it
+is not allowed to return with \code{SANE\_STATUS\_EOF}.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_cancel}}
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+\code{h}.
+\begin{quote}\index{sane\_cancel}
+\begin{verbatim}
+void sane_cancel (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function can be called at any time (as long as handle \code{h} is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does {\em not\/} imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been {\em initiated}. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must {\em not\/} call any other operation until the
+cancelled operation has returned.
+
+
+\subsection{\code{sane\_set\_io\_mode}}
+
+This function is used to set the I/O mode of handle \code{h}. The I/O
+mode can be either blocking or non-blocking. If argument \code{m} is
+\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise
+it's set to blocking mode.
+\begin{quote}\index{sane\_set\_io\_mode}
+\begin{verbatim}
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+\end{verbatim}
+\end{quote}
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_select\_fd}}
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle \code{h} that is readable if and only if image data is
+available (i.e., when a call to \code{sane\_read()} will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in \code{*fd}.
+\begin{quote}\index{sane\_get\_select\_fd}
+\begin{verbatim}
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+\end{verbatim}
+\end{quote}
+This function can be called only after a call to \code{sane\_start()}
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until \code{sane\_cancel()} or \code{sane\_start()} get called again
+or until \code{sane\_read()} returns with status
+\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call \code{sane\_read()}.
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+\code{SANE\_STATUS\_UNSUPPORTED}.
+
+Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using \code{select()}
+or \code{poll()} under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to \code{sane\_read()} is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_strstatus}}
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return \code{NULL}.
+The returned pointer is valid at least until the next call to this
+function is performed.
+\begin{quote}\index{sane\_strstatus}
+\begin{verbatim}
+const SANE_String_Const sane_strstatus (SANE_Status status);
+\end{verbatim}
+\end{quote}
+
+\section{Code Flow}\index{code flow}
+
+The code flow for the SANE API is illustrated in
+Figure~\ref{fig:flow}. Functions \code{sane\_init()} and
+\code{sane\_exit()} initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+\begin{figure}[htb]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/flow.eps,height=0.5\textheight}
+ \caption{Code flow}
+ \label{fig:flow}
+ \end{center}
+\end{figure}
+
+Function \code{sane\_get\_devices()} can be called any time after
+\code{sane\_init()} has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+Once a device has been chosen, it is opened using a call to
+\code{sane\_open()}. Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+An opened device can be setup through the corresponding device handle
+using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and
+\code{sane\_control\_option()}. While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle. However, as options are set, other options
+may become active or inactive. Thus, after setting an option, it
+maybe necessary to re-read some or all option descriptors. While
+setting up the device, it is also admissible to call
+\code{sane\_get\_parameters()} to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+The device handle can be put in blocking or non-blocking mode by a
+call to \code{sane\_set\_io\_mode()}. Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+After the device is setup properly, image acquisition can be started
+by a call to \code{sane\_start()}. The backend calculates the exact
+image parameters at this point. So future calls to
+\code{sane\_get\_parameters()} will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to \code{sane\_read()} is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+\begin{changebar}
+Image data is collected by repeatedly calling \code{sane\_read()}
+until this function will return an end-of-file status
+(\code{SANE\_STATUS\_EOF}). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels of a red/green/blue image or multiple images),
+it can call \code{sane\_start()} again.
+If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the
+current image is complete. In this case, it should be tested, if
+\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set.
+If yes, further calls to \code{sane\_start()} can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on
+and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other
+than \code{SANE\_STATUS\_EOF} occurs in a SANE function.
+Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling \code{sane\_start} again, which will get
+you to the next frame, without having to read and discard the current one.
+
+In order to prematurely stop scanning and to reset the backend state,
+\code{sane\_cancel()} can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+
+When done using the device, the handle should be closed by a call to
+\code{sane\_close()}. Finally, before exiting the application,
+function \code{sane\_exit()} must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+The following C sample code implements a reference loop for acquiring
+multiple images:
+
+\begin{verbatim}
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+{
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status=sane_start(handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now let us see what the next frame brings. */
+ status=sane_get_parameters(handle,&parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if ( do_i_like_that(&parms) == NO ) continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer(...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while( SANE_STATUS_GOOD == ( status=sane_read(...) ) )
+ read_in_and_process_data_as_required();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF) {
+ break;
+ }
+
+ /* Now loop until we have all frames of an image. */
+ } while(!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+/* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+/* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+} while(parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel(handle);
+\end{verbatim}
+
+\end{changebar}
+
+
+\section{Well-Known Options}\index{well-known options}
+
+While most backend options are completely self-describing, there are a
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+\subsection{Option Number Count}\index{option count}
+
+Option number 0 has an empty string as its name. The value of this
+option is of type \code{SANE\_TYPE\_INT} and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a
+frontend can directly read out the value of option number 0.
+
+\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option}
+
+\begin{changebar}
+Option \code{resolution} is used to select the resolution at which an
+image should be acquired. When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+\code{x\_resolution} and \code{y\_resolution}. Note that only
+the option \code{resolution} {\bf or} the options
+\code{x\_resolution} {\bf and} \code{y\_resolution} may be active.
+
+The type of this option is either \code{SANE\_TYPE\_INT} or
+\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\subsection{Preview Mode Option}\index{preview mode}
+
+The boolean option \code{preview} is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to \code{SANE\_TRUE},
+preview mode is in effect, when set to \code{SANE\_FALSE} image
+acquisition should proceed in normal quality mode. The setting of
+this option \emph{must not\/} affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option \code{resolution}). A backend is free to override the
+\code{resolution} value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+\begin{changebar}
+When the \code{preview} option is set the backend should transfer
+the image in frame type \code{SANE\_FRAME\_RAW} if possible.
+\end{changebar}
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+\subsection{Scan Area Options}\index{scan area options}
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure~\ref{fig:area}. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the {\em smallest} and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the {\em largest}. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+\begin{figure}[tbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/area.eps,height=0.3\textheight}
+ \caption{Scan area options}
+ \label{fig:area}
+ \end{center}
+\end{figure}
+
+The names of the four options that define the scan area are given in
+the table below:
+\begin{center}
+\begin{tabular}{ll}
+{\bf Name} & {\bf Description} \\
+\code{\defn{tl-x}} & Top-left $x$ coordinate value \\
+\code{\defn{tl-y}} & Top-left $y$ coordinate value \\
+\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\
+\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\
+\end{tabular}
+\end{center}
+There are several rules that should be followed by front and backends
+regarding these options:
+\begin{itemize}
+
+\item Backends must attach a unit of either pixels
+ (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to
+ these options. The unit of all four options must be identical.
+
+\item Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+\item A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+\item A frontend must work properly with any or all of these options
+ missing.
+
+\item A frontend may temporarily set the values in a way that
+\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than
+\code{br-y}.
+
+\end{itemize}
+
+\subsection{Depth option}\index{bit depth option}
+\begin{changebar}
+Option \code{depth} is used to select the image depth in bits/sample
+in multi bit mode - (this means for 24 bit rgb mode this value must be 8).
+The type of this option is \code{SANE\_TYPE\_INT}.
+The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option \code{mode}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Gamma table options}\index{gamma table options}
+\begin{changebar}
+The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE}
+of the type \code{SANE\_TYPE\_INT} which represent the gamma correction
+table for gray. In color mode the \code{gamma-table} may be used to set
+a common gamma correction for red, green and blue. The options
+\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table}
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+\code{gamma-table} option, only the \code{red-}, \code{green-} and
+\code{blue-gamma-table} or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+\begin{verbatim}
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+\end{verbatim}
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog\_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Mode options}\index{mode options}
+\begin{changebar}
+The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: \code{Color}, \code{Gray}, \code{Halftone}
+and \code{Lineart}. \code{Color} and \code{Gray} are multi bit
+modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart}
+are single bit modes.\\
+This way a frontend can select e.g the mode \code{Gray}
+for scanning a fax.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Source options}\index{source options}
+\begin{changebar}
+The option \code{source} is used to select the scansource
+(e.g. Automatic Document Feeder).
+It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and
+\code{Automatic Document Feeder}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Threshold}\index{threshold option}
+\begin{changebar}
+The option \code{threshold} is used to define the threshold
+for Lineart and may be Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity
+(image data bit = 0). The backend has to
+scale the values in the following way:\\
+A value of 0.0 means all pixels get white /full intensity (all image data
+bits are 0). A value of 50.0 means intensities brighter than medium gray
+get white / full intensity (bit 0). A value of 100.0 means all pixels get
+black (all image data bits are 1). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Analog gamma}\index{analog gamma option}
+\begin{changebar}
+The option \code{analog-gamma} is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_NONE}. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options \code{analog-gamma-red},
+\code{analog-gamma-green} and \code{analog-gamma-blue}.
+It is not allowed to emulate an anlog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect to the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Shadow}\index{shadow options}
+\begin{changebar}
+The option \code{shadow} is used to define the shadow level / black point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black). The backend has to scale the values in the following way:\\
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{shadow-red}, \code{shadow-green}
+and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Highlight}\index{hightlight options}
+\begin{changebar}
+The option \code{highlight} is used to define the highlight level / white point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity). The backend has to scale the values in the
+following way:\\
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{highlight-red}, \code{highlight-green}
+and \code{highlight-blue}, in this case \code{highlight} has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option}
+\begin{changebar}
+The option \code{lamp-on} is used to turn the lamp of the scanner on.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned on.
+
+The option \code{lamp-off} is used to turn the lamp of the scanner off.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned off.
+
+These options are not mandatory, but if a backend does support them, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Scanner buttons}\index{scanner button options}
+\begin{changebar}
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.\\
+
+A backend that does make available the scanner-buttons has to
+implement the following options:\\
+\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\
+\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\
+\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\
+When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS}
+or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined.
+
+A Frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+\begin{itemize}
+
+\item
+A frontend that wants to read the button status has to lock the
+button functions at first. For this it does set the option
+\code{scanner-buttons-lock} to \code{SANE\_TRUE}.
+While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE}
+the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist.
+The lockfile has to be placed in a directory where every user has read and write access to.
+
+ \begin{itemize}
+ \item
+ If the lockfile does not exist then the backend creates the lockfile and writes the
+ process ID (PID) of the backend to the file. Button access is allowed: the value
+ of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \item
+ If the file does exist and the backend PID is not the file PID then the
+ backend has to check if the process with the PID stored in the lockfile
+ still is running. If yes then the button access is not allowed: the value of
+ option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile
+ is recreated and the PID of the backend is stored in the lockfile, button
+ access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \end{itemize}
+
+\item
+The frontend does read the value of option \code{scanner-buttons-lock}. If
+it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons.
+If it is \code{SANE\_FALSE} then access has been denied.
+
+\item
+If the button access is allowed the frontend has to do the following about
+once per second (while not scanning):
+ \begin{itemize}
+ \item
+ The frontend does set option \code{scanner-buttons-status-update}.
+ The backend checks if access to the buttons is allowed by comparing
+ the backend PID with the lockfile PID. If access is allowed it
+ does read the button status from the scanner and stores it in
+ the option \code{scanner-buttons-status}, each bit represents a button, a
+ value of 0 means the button is not pressed, a value of 1 means that the button
+ is pressed. When the scanner is busy the backend must not wait, it has to
+ return immedeatly and the button state keeps unchanged.
+ The backend has to implement a timeout function. When no button has been pressed
+ within a predefined time (e.g. 15 minutes) then the access permission is lost.
+ In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}
+ and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has
+ lost permission to access the scanner-button functions.
+ If access is not allowed it does set the \code{scanner-buttons-status} to 0.
+
+ \item
+ The frontend does read the value of option \code{scanner-buttons-status}
+ \end{itemize}
+
+\item
+When the frontend does exit or it does not want to use the buttons
+it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+The backend does check if the backend PID and the lockfile PID are
+the same. If this is true then it removes the lockfile and sets the value
+of \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\code{sane\_close()} should do the same as setting option
+\code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\end{itemize}
+\end{changebar}
+
+
+
+\input{net.tex}
+
+\chapter{Contact Information}\label{chap:contact}
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+\begin{quote}\index{mailing list}
+\begin{verbatim}
+majordomo@mostang.com
+\end{verbatim}
+\end{quote}
+To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``\code{help}'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+\begin{quote}
+\url{http://www.mostang.com/sane/}
+\end{quote}
+
+\newpage
+\input{sane.ind}
+
+\end{document}
diff --git a/sane2/0.07/doc000.html b/sane2/0.07/doc000.html
new file mode 100644
index 00000000..c35ca063
--- /dev/null
+++ b/sane2/0.07/doc000.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+Contents
+Contents
+
+
+
+List of Figures
+
+
+
+
+
+List of Tables
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc001.html b/sane2/0.07/doc001.html
new file mode 100644
index 00000000..d3c3689c
--- /dev/null
+++ b/sane2/0.07/doc001.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+./sane
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SANE Standard Version 2.0 proposal 0.07 - rauch/beck
+
+Dec 5, 2002
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc002.html b/sane2/0.07/doc002.html
new file mode 100644
index 00000000..fb16c3d7
--- /dev/null
+++ b/sane2/0.07/doc002.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+Preface
+
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+6.
+
+ The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc003.html b/sane2/0.07/doc003.html
new file mode 100644
index 00000000..c6872c9c
--- /dev/null
+++ b/sane2/0.07/doc003.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+About This Document
+
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+ The remainder of this document is organized as follows.
+Chapter 2 provides introductional material.
+Chapter 3 presents the environment SANE is designed
+for. Chapter 4 details the SANE Application Programmer
+Interface. Chapter 5 specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter 6 gives information on how
+to join the SANE development process.
+
+
+
+Changes since the last revision of this document are highlighted
+like this:
+
+
+ Paragraphs that changed since the last revision of the documention
+ are marked like this paragraph.
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc004.html b/sane2/0.07/doc004.html
new file mode 100644
index 00000000..132e99aa
--- /dev/null
+++ b/sane2/0.07/doc004.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+Introduction
+
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+ SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc005.html b/sane2/0.07/doc005.html
new file mode 100644
index 00000000..1fbad177
--- /dev/null
+++ b/sane2/0.07/doc005.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+Terminology
+
+
+An application that uses the SANE interface is called a SANE
+ frontend. A driver that implements the SANE interface is called a
+SANE backend. A meta backend provides some means to
+manage one or more other backends.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc006.html b/sane2/0.07/doc006.html
new file mode 100644
index 00000000..86d60331
--- /dev/null
+++ b/sane2/0.07/doc006.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+The SANE Environment
+
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+ Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE option. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+brightness whose value is an integer in the range from 0 to
+255.
+
+ With self-describing options, a backend need not be concerned with
+presentation issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the meaning of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc007.html b/sane2/0.07/doc007.html
new file mode 100644
index 00000000..d088ed3d
--- /dev/null
+++ b/sane2/0.07/doc007.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+Attaching to a SANE backend
+
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+
+
+
+
+
+
+ Figure 1: Example SANE Hiearchy
+
+
+
+
+ The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure 1. The figure shows that machine
+A uses a dynamic-linking based meta backend called dll to
+access the backends called pnm, mustek, and net.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called saned. The saned in
+turn has access to the hp and autolum backends through
+another instance of the dll backend. The autolum meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called qcam.
+
+ Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc008.html b/sane2/0.07/doc008.html
new file mode 100644
index 00000000..ad148642
--- /dev/null
+++ b/sane2/0.07/doc008.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+Image Data Format
+
+
+Arguably the most important aspect of an image acquisition system is how
+images are represented. The SANE approach is to define a simple yet powerful
+representation that is sufficient for vast majority of applications and
+devices. While the representation is simple, the interface has been defined
+carefully to allow extending it in the future without breaking backwards
+compatibility. Thus, it will be possible to accommodate future applications or
+devices that were not anticipated at the time this standard was created.
+
+ A SANE image is a rectangular area. The rectangular area is subdivided into a
+number of rows and columns. At the intersection of each row and column is a
+(preferable quadratic) pixel. A pixel consists of one or more sample values.
+Each sample value represents one channel (e.g., the red channel).
+
+ The SANE API transmits an image as a sequence of frames. Each frame covers
+the same rectangular area as the entire image, but may contain only a subset
+of the channels in the final image. For example, a red/green/blue image could
+either be transmitted as a single frame that contains the sample values for
+all three channels or it could be transmitted as a sequence of three frames:
+the first frame containing the red channel, the second the green channel, and
+the third the blue channel.
+
+ When transmitting an image frame by frame, the frontend needs to know what
+part of the image a frame represents (and how many frames it should expect).
+For that purpose, the SANE API tags every frame with a type and a format
+descriptor.
+
+
+ There are two different types of frames: pixel oriented frames
+ SANE_FRAME_RAW and arbitrary data frames
+ SANE_FRAME_MIME. These types are discussed in detail in the
+ following sections. The frame types used by version 1 of this standard
+ (SANE_FRAME_GRAY, SANE_FRAME_RGB,
+ SANE_FRAME_RED, SANE_FRAME_GREEN, and
+ SANE_FRAME_BLUE) are obsolete and superseded by
+ SANE_FRAME_RAW.
+
+
+
+ The type of pixel oriented frames is SANE_FRAME_RAW. The
+ frame contains one or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the individual pixels that
+ is subject to further description in the format_desc member of the
+ SANE_Parameters structured type. See section 4.3.8
+ on page 4.3.8 for details about the format
+ descriptions.
+
+
+ Each sample value has a certain bit depth. The bit depth is fixed for the
+ entire image and can be as small as one bit. Valid bit depths are 1, 8, or
+ 16 bits per sample. If a device's natural bit depth is something else, it is
+ up to the driver to scale the sample values appropriately (e.g., a 4 bit
+ sample could be scaled by a factor of four to represent a sample value of
+ depth 8).
+
+
+ The complete image may consist of several different channels. The number of channels
+ is defined by member channels_per_image of SANE_Parameters.
+ The image may be transmitted in an arbitary number of frames which can be
+ determined by watching the SANE_PFLAG_LAST_FRAME flag in said type (or by
+ counting the channels). Note: This frame type replaces all frame types of
+ the SANE standard version 1.
+
+
+ Conceptually, each pixel oriented frame is transmitted a byte at a time. Each
+byte may contain 8 sample values (for an image bit depth of 1), one full
+sample value (for an image bit depth of 8), or a partial sample value (for an
+image bit depth of 16 or bigger). In the latter case, the bytes of each
+sample value are transmitted in the machine's native byte order.
+
+
+ Backend Implementation Note
+
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+
+
+
+
+
+
+ Figure 2: Transfer order of image data bytes
+
+
+
+
+ The order in which the sample values in a frame are transmitted is illustrated
+in Figure 2. As can be seen, the values are transmitted row by
+row and each row is transmitted from left-most to right-most column. The
+left-to-right, top-to-bottom transmission order applies when the image is
+viewed in its normal orientation (as it would be displayed on a screen, for
+example).
+
+ If a frame contains multiple channels, then the channels are transmitted in an
+interleaved fashion. Figure 3 illustrates this for the case
+where a frame contains a complete red/green/blue image with a bit-depth of 8.
+
+
+
+
+
+ Figure 3: Bit and byte order of image data
+
+
+
+
+ For a bit depth of 1, each byte contains 8 sample values of a single
+channel. In other words, a bit depth 1 frame is transmitted in a byte
+interleaved fashion. The first sample of each byte is represented by the most
+significant bit.
+
+
+For gray channels at a bit depth of 1 only two sample values are possible: 1
+represents minimum intensity (black) and 0 represents maximum intensity
+(white). For all other channel types and bit depths a sample value of 0
+represents minimum intensity and larger values represent increasing intensity.
+
+
+
+It also is possible to transmit arbitrary (not necessaryly pixel oriented)
+data. This allows transmission of compressed images like jpeg, tiff, etc.
+
+ The type of arbitrary data frames is SANE_FRAME_MIME.
+The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is
+given in the format_desc member of the SANE_Parameters
+structured type (see See section 4.3.8 on
+page 4.3.8). As such, it is assumed to be
+incomprehensible to the frontend, except for selected types the frontend is
+specifically capable of handling internally. The frontend is free to ignore
+those frames, or employ any appropriate means to otherwise handle this data
+(like saving them to disk or spawning an external viewer).
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc009.html b/sane2/0.07/doc009.html
new file mode 100644
index 00000000..43cd21b4
--- /dev/null
+++ b/sane2/0.07/doc009.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+The SANE Application Programmer Interface (API)
+
+
+
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called sane/sane-2.h. This file should
+normally be included via a C pre-processor directive of the form:
+
+ #include <sane/sane-2.h>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc010.html b/sane2/0.07/doc010.html
new file mode 100644
index 00000000..8bb6685b
--- /dev/null
+++ b/sane2/0.07/doc010.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+Version Control
+
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+ SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+ The SANE API provides the following five macros to manage version
+numbers.
+
+
+ - SANE_CURRENT_MAJOR:
- The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+
- SANE_VERSION_CODE(maj,min,bld):
-
+
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (maj), the minor version number min,
+ and the build revision of a backend (bld). The major and
+ minor version numbers must be in the range 0...255 and the
+ build revision must be in the range 0...65535.
+
+
Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ - SANE_VERSION_MAJOR(vc):
- This macro returns the
+ major version number component of the version code passed in
+ argument vc.
+
- SANE_VERSION_MINOR(vc):
- This macro returns the
+ minor version number component of the version code passed in
+ argument vc.
+
- SANE_VERSION_BUILD(vc):
- This macro returns the
+ build revision component of the version code passed in argument
+ vc.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc011.html b/sane2/0.07/doc011.html
new file mode 100644
index 00000000..6f13f39b
--- /dev/null
+++ b/sane2/0.07/doc011.html
@@ -0,0 +1,1001 @@
+
+
+
+
+
+
+
+
+Data Types
+
+
+
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+
+ typedef some-scalar-type SANE_Byte;
+ typedef some-scalar-type SANE_Word;
+
+SANE_Byte must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. SANE_Word must be
+capable of holding any of the following:
+
+ - the truth values SANE_FALSE and SANE_TRUE
+
- signed integers in the range -231...231-1
+
- fixed point values in the range -32768...32767.9999 with
+ a resolution of 1/65536
+
- 32 bits (for bit sets)
+
+Note that the SANE standard does not define what C type
+SANE_Byte and SANE_Word map to. For example, on some
+platforms, the latter may map to long int whereas on others it
+may map to int. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+
+
+SANE_Bool is used for variables that can take one of
+the two truth values SANE_FALSE and
+SANE_TRUE. The former value is defined to be 0,
+whereas the latter is 1.1 The C
+declarations for this type are given below.
+
+
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+
+
+Note that SANE_Bool is simply an alias of SANE_Word. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Bool whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+
+
+SANE_Int is used for variables that can take integer
+values in the range -232 to 231-1. Its C declaration is
+given below.
+
+
+typedef SANE_Word SANE_Int;
+
+
+Note that SANE_Int is simply an alias of SANE_Word. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Int whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+
+SANE_Fixed is used for variables that can take fixed
+point values in the range -32768 to 32767.9999 with a resolution
+of 1/65535. The C declarations relating to this type are given
+below.
+
+
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+
+
+The macro SANE_FIXED_SCALE_SHIFT gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of 1/65536.
+
+Note that SANE_Fixed is simply an alias of SANE_Word.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Fixed whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+ For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+
+
+
+ - SANE_FIX(d):
- Returns the largest SANE
+ fixed-point value that is smaller than the double value d.
+ No range checking is performed. If the value of d is out of
+ range, the result is undefined.
+
+
- SANE_UNFIX(w):
- Returns the nearest
+ double machine number that corresponds to fixed-point value
+ w.
+
+
+
+SANE does not require that the following two expressions hold
+true (even if the values of w and d are in range):
+
+
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+
+
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+
+
+
+Type SANE_Char represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+char type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+sizeof(SANE_Char)==sizeof(char).
+
+
+typedef char SANE_Char;
+
+
+
+
+
+Type SANE_String represents a text string as a sequence
+of C char values. The end of the sequence is indicated by a
+'\0' (NUL) character.
+
+
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+
+
+The type SANE_String_Const is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+
+
+const SANE_String str;
+
+
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+
+Access to a scanner is provided through an opaque type called
+SANE_Handle. The C declaration of this type is given
+below.
+
+
+typedef void *SANE_Handle;
+
+
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a SANE_Handle. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+
+Most SANE operations return a value of type SANE_Status
+to indicate whether the completion status of the operation. If an
+operation completes successfully, SANE_STATUS_GOOD is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table 1. It is recommended to use function
+sane_strstatus() to convert status codes into a legible
+string.
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+SANE_STATUS_GOOD
+ |
+ 0 |
+ Operation completed succesfully. |
+
+
+SANE_STATUS_UNSUPPORTED
+ |
+ 1 |
+ Operation is not supported. |
+
+
+SANE_STATUS_CANCELLED
+ |
+ 2 |
+ Operation was cancelled. |
+
+
+SANE_STATUS_DEVICE_BUSY
+ |
+ 3 |
+ Device is busy---retry later. |
+
+
+SANE_STATUS_INVAL
+ |
+ 4 |
+ Data or argument is invalid. |
+
+
+SANE_STATUS_EOF
+ |
+ 5 |
+ No more data available (end-of-file). |
+
+
+SANE_STATUS_JAMMED
+ |
+ 6 |
+ Document feeder jammed. |
+
+
+SANE_STATUS_NO_DOCS
+ |
+ 7 |
+ Document feeder out of documents. |
+
+
+SANE_STATUS_COVER_OPEN
+ |
+ 8 |
+ Scanner cover is open. |
+
+
+SANE_STATUS_IO_ERROR
+ |
+ 9 |
+ Error during device I/O. |
+
+
+SANE_STATUS_NO_MEM
+ |
+ 10 |
+ Out of memory. |
+
+
+SANE_STATUS_ACCESS_DENIED
+ |
+ 11 |
+ Access to resource has been denied. |
+
+
+
+ |
+
+ Table 1: Status Codes
+
+
+
+
+
+
+Each SANE device is represented by a structure of type
+SANE_Device. The C declaration of this type is given
+below.
+
+
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const backend_website;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+
+
+
+
+The structure provides the unique name of the scanner in member
+name. It is this unique name that should be passed in a call
+to sane_open(). The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is recommended that backends keep
+unique names below 32 characters in length. However, applications
+must be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members vendor, model, and type are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+
+
+
+
+
+
+Vendor Strings |
+
+
+
+ AGFA |
+ Microtek |
+
+
+ Abaton |
+ Minolta |
+
+
+ Acer |
+ Mustek |
+
+
+ Apple |
+ NEC |
+
+
+ Artec |
+ Nikon |
+
+
+ Avision |
+ Plustek |
+
+
+ CANON |
+ Polaroid |
+
+
+ Connectix |
+ Ricoh |
+
+
+ Epson |
+ Sharp |
+
+
+ Fujitsu |
+ Siemens |
+
+
+ Hewlett-Packard |
+ Tamarack |
+
+
+ IBM |
+ UMAX |
+
+
+ Kodak |
+ Noname |
+
+
+ Logitech |
+ |
+
+
+
+ |
+
+
+
+
+Type Strings |
+
+
+
+ film scanner |
+
+
+ flatbed scanner |
+
+
+ frame grabber |
+
+
+ handheld scanner |
+
+
+ multi-function peripheral |
+
+
+ sheetfed scanner |
+
+
+ still camera |
+
+
+ video camera |
+
+
+ virtual device |
+
+
+
+ |
+
+
+ Table 2: Predefined Device Information Strings
+
+
+
+Note that vendor string Noname can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+
+The backend has to set up the string email_backend_author
+with the name and the email address of the backend author or a contact person
+in the format:
+
+Firstname Lastname <name@domain.org>
+
+
+The string backend_website has to be set up by the backend
+with the website or ftp address of the backend in the format:
+
+http://www.domain.org/sane-hello/index.html
+
+
+The backend should fill the string device_location with a
+text that describes where a user can find this device, the text
+should be read from the backend config file. This could e.g. look
+like this:
+
+building 93, 2nd plane, room 2124
+
+
+The string comment can be used to display any comment to the user,
+the text should be read from the backend config file.
+
+ The string reserved_string is planed for future use, the backend
+has to set this string to "".
+
+ With member backend_version_code a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+ The member backend_capability_flags contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+ The member reserved_int is planned for future use, the backend has
+to set the value of the integer to 0.
+
+
+
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+SANE_Option_Descriptor type is given below.
+
+
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+
+
+
+
+
+Member name is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (a--z),
+digits (0--9), or the dash character (-) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+
+
+Member title is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+
+
+Member desc is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+
+
+Member type specifies the type of the option value. The
+possible values for type SANE_Value_Type are described
+in Table 3.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+ SANE_TYPE_BOOL |
+ 0 |
+ Option value is of type
+ SANE_Bool. |
+
+
+
+ SANE_TYPE_INT |
+ 1 |
+ Option value is of type
+ SANE_Int. |
+
+
+
+ SANE_TYPE_FIXED |
+2 |
+ Option value is of type
+ SANE_Fixed. |
+
+
+
+ SANE_TYPE_STRING |
+3 |
+ Option value is of type
+ SANE_String. |
+
+
+
+ SANE_TYPE_BUTTON |
+ 4 |
+ An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. |
+
+
+
+ SANE_TYPE_GROUP |
+ 5 |
+ An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members title and
+type are valid in the option descriptor. |
+
+
+
+
+ |
+
+ Table 3: Option Value Types (SANE_Value_Type)
+
+
+
+
+
+
+Member unit specifies what the physical unit of the option
+value is. The possible values for type SANE_Unit are
+described in Table 4. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_UNIT_NONE |
+ 0 |
+ Value is unit-less (e.g., page count). |
+
+
+SANE_UNIT_PIXEL |
+ 1 |
+ Value is in number of pixels. |
+
+
+SANE_UNIT_BIT |
+ 2 |
+ Value is in number of bits. |
+
+
+SANE_UNIT_MM |
+ 3 |
+ Value is in millimeters. |
+
+
+SANE_UNIT_DPI |
+ 4 |
+ Value is a resolution in dots/inch. |
+
+
+SANE_UNIT_PERCENT |
+ 5 |
+ Value is a percentage. |
+
+
+SANE_UNIT_MICROSECOND |
+ 6 |
+ Value is time in µ-seconds. |
+
+
+
+
+ |
+
+ Table 4: Physical Units (SANE_Unit)
+
+
+
+
+
+
+Member size specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+
+
+ - SANE_TYPE_STRING:
- The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating NUL character is considered to be part of the
+ string. Note that the terminating NUL character must
+ always be present in string option values.
+
- SANE_TYPE_INT, SANE_TYPE_FIXED:
- The size
+ must be a positive integer multiple of the size of a
+ SANE_Word. The option value is a vector of length
+
+
+
+ size/sizeof(SANE_Word).
+
+ - SANE_TYPE_BOOL:
- The size must be set to
+ sizeof(SANE_Word).
+
- SANE_TYPE_BUTTON, SANE_TYPE_GROUP:
- The
+ option size is ignored.
+
+
+
+
+
+Member cap describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table 5. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+
+
+
+ - SANE_OPTION_IS_ACTIVE(cap):
- This macro
+ returns SANE_TRUE if and only if the option with the
+ capability set cap is currently active.
+
+
- SANE_OPTION_IS_SETTABLE(cap):
- This
+ macro returns SANE_TRUE if and only if the option with the
+ capability set cap is software settable.
+
+
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+ SANE_CAP_SOFT_SELECT |
+ 1 |
+ The option
+ value can be set by a call to sane_control_option(). |
+
+
+
+ SANE_CAP_HARD_SELECT |
+ 2 |
+ The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE_CAP_SOFT_SELECT (either one of them can be set, but not both
+ simultaneously). |
+
+
+
+ SANE_CAP_SOFT_DETECT |
+ 4 |
+ The option
+ value can be detected by software. If
+ SANE_CAP_SOFT_SELECT is set, this capability must
+ be set. If SANE_CAP_HARD_SELECT is set, this capability
+ may or may not be set. If this capability is set but neither
+ SANE_CAP_SOFT_SELECT nor SANE_CAP_HARD_SELECT
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. |
+
+
+
+ SANE_CAP_EMULATED |
+ 8 |
+ If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. |
+
+
+
+ SANE_CAP_AUTOMATIC |
+ 16 |
+ If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling sane_control_option()
+ with an action value of SANE_ACTION_SET_AUTO. |
+
+
+
+ SANE_CAP_INACTIVE |
+ 32 |
+ If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). |
+
+
+
+ SANE_CAP_ADVANCED |
+ 64 |
+
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option.'' A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ |
+
+
+
+
+ |
+
+ Table 5: Option Capabilities
+
+
+
+
+
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member constraint_type indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member constraint. The possible values of type
+SANE_Constraint_Type and the interpretation of the
+constraint union is described in Table 6.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_CONSTRAINT_NONE |
+ 0 |
+ The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. |
+
+
+
+ SANE_CONSTRAINT_RANGE |
+ 1 |
+ This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member constraint.range points to
+ a range of the type SANE_Range. This type is illustrated
+ below:
+
+
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+
+
+ All three members in this structure are interpreted according to the
+ option value type (SANE_TYPE_INT or SANE_TYPE_FIXED).
+ Members min and max specify the minimum and maximum
+ values, respectively. If member quant is non-zero, it
+ specifies the quantization value. If l is the minimum value, u
+ the maximum value and q the (non-zero) quantization of a range,
+ then the legal values are v=k*q+l for all non-negative
+ integer values of k such that v<=u. |
+
+
+
+ SANE_CONSTRAINT_WORD_LIST |
+ 2 |
+ This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ constraint.word_list points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (SANE_Int) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (SANE_TYPE_INT or SANE_TYPE_FIXED). |
+
+
+
+ SANE_CONSTRAINT_STRING_LIST |
+ 3 |
+ This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ constraint.string_list points to a NULL terminated
+ list of strings that enumerate the legal values for the option
+ value.
+ |
+
+
+ |
+
+ Table 6: Option Value Constraints
+
+
+
+
+
+
+All backend texts should be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+
+
+The keyword SANE_I18N is used to mark a text for translation.
+SANE_I18N has to be defined as a dummy prototype:
+
+
+
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+
+
+
+You should not mark prototypes or variables with SANE_I18N
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (SANE_I18N(START_SCAN_TEXT)) and
+variables (SANE_I18N(option[7].name)).
+
+ A correct marked text can look like this:
+snprintf(buf, sizeof(buf), SANE_I18N("Start scan")
+or
+#define START_SCAN_TEXT SANE_I18N("Start scan").
+It also is allowed to mark texts in structs because the
+prototype SANE_I18N has no effect to the compiler.
+
+
+All option texts that are visible for the user should be marked for
+translation. This is:
+
+-
+member title
+
-
+member desc
+
-
+member string_list
+
+of SANE_Option_Descriptor.
+
+It is not allowed to mark/translate member name.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+
+The recommended file formats for translation tables are the po files
+and mo or gmo files.
+The po file contains the original text marked with the keyword msgid
+and the translated text marked with the keyword msgstr.
+A po file that contains all needed msgids can be created
+e.g. by the gnu gettext tool xgettext with the option
+-k SANE_I18N.
+The translator adds the translated texts to the po files.
+The gettext tool msgfmt converts the po files to the
+mo or gmo files.
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function gettext
+to translate the texts. This e.g. can look like this:
+snprintf(buf, sizeof(buf), gettext("english text"));
+
+ If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the po files to create its
+own translation tables from it.
+
+ Note that it is strongly recommended to use the gettext tools.
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc012.html b/sane2/0.07/doc012.html
new file mode 100644
index 00000000..f4399328
--- /dev/null
+++ b/sane2/0.07/doc012.html
@@ -0,0 +1,874 @@
+
+
+
+
+
+
+
+
+Operations
+
+
+
+
+This function must be called before any other SANE function can be called.
+The behavior of a SANE backend is undefined if this function is not called
+first or if the status code returned by sane_init is different from
+SANE_STATUS_GOOD. The version code of the backend is returned
+in the value pointed to by version_code. If that pointer is
+NULL, no version code is returned. Argument authorize is either
+a pointer to a function that is invoked when the backend requires
+authentication for a specific resource or NULL if the frontend does not
+support authentication.
+
+
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+
+
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+
+ sane_open, sane_control_option, sane_start
+
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+
+
+
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+
+
+Three arguments are passed to the authorization function:
+resource is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The username
+and password arguments are (pointers to) an array of
+SANE_MAX_USERNAME_LEN and SANE_MAX_PASSWORD_LEN
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+must be ASCII-NUL terminated.
+
+
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to sane_close(), but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than sane_init() may be called (regardless
+of the status value returned by sane_exit(). Neglecting to
+call this function may result in some resources not being released
+properly.
+
+
+void sane_exit (void);
+
+
+
+
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a NULL terminated array of pointers to SANE_Device
+structures in *device_list. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to sane_exit() is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument local_only is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+
+
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+
+
+
+This function may fail with SANE_STATUS_NO_MEM if an
+insufficient amount of memory is available.
+
+
+
+ Backend Implementation Note
+
+ SANE does not require that this function is called before a
+ sane_open() call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+
+ The same information about
+ a device has to be returned when sane_open is called.
+
+
+
+
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+name. If the call completes successfully, a handle for the
+device is returned in *h.
+
+The description of the device
+is returned in **device_description. This is the
+same description that is returned in the list by sane_get_devices.
+The returned data *h and *device_description is guaranteed
+to remain unchanged and valid until a call to sane_close()
+is performed.
+
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+
+
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+
+
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_DEVICE_BUSY:
- The device is currently
+ busy (in use by somebody else).
+
- SANE_STATUS_INVAL:
- The device name is not valid.
+
- SANE_STATUS_IO_ERROR:
- An error occured while
+ communicating with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the device has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function terminates the association between the device handle
+passed in argument h and the device it represents. If the
+device is presently active, a call to sane_cancel() is
+performed first. After this function returns, handle h must
+not be used anymore.
+
+
+
+void sane_close (SANE_Handle h);
+
+
+
+
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number n of the device
+represented by handle h. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle h (the count
+includes option 0). If n is not a valid option index, the function
+returns NULL. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+
+
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+
+
+
+
+
+This function is used to set or inquire the current value of option
+number n of the device represented by handle h. The
+manner in which the option is controlled is specified by parameter
+a. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+v. It is a pointer to the memory that holds the option value.
+The memory area pointed to by v must be big enough to hold the
+entire option value (determined by member size in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument v may be shorter since the backend will stop
+reading the option value upon encountering the first NUL
+terminator in the string. If argument i is not NULL,
+the value of *i will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+
+
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+
+
+
+The way the option is affected by a call to this function is
+controlled by parameter a which is a value of type
+SANE_Action. The possible values and their meaning is
+described in Table 7.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_ACTION_GET_VALUE |
+ 0 |
+ Get current option value. |
+
+
+
+ SANE_ACTION_SET_VALUE |
+ 1 |
+ Set option value. The
+ option value passed through argument v may be modified by the
+ backend if the value cannot be set exactly. |
+
+
+
+ SANE_ACTION_SET_AUTO |
+ 2 |
+ Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter v is completely ignored in this case and
+ may be NULL. |
+
+
+
+
+ |
+
+ Table 7: Action Values (SANE_Action)
+
+
+
+
+ After setting a value via an action value of
+SANE_ACTION_SET_VALUE, additional information on how well the
+request has been met is returned in *i (if i is
+non-NULL). The returned value is a bitset that may contain any
+combination of the values described in Table 8.
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_INFO_INEXACT |
+ 1 |
+ This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in *i has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. |
+
+
+
+ SANE_INFO_RELOAD_OPTIONS |
+ 2 |
+ The setting of an
+ option may affect the value or availability of one or more
+ other options. When this happens, the SANE backend sets this
+ member in *i to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. |
+
+
+
+ SANE_INFO_RELOAD_PARAMS |
+ 4 |
+ The setting of an option may
+ affect the parameter values (see sane_get_parameters()).
+ If setting an option affects the parameter values, this member will
+ be set in *i. Note that this member may be set even if the
+ parameters did not actually change. However, it is guaranteed that
+ the parameters never change without this member being set. |
+
+
+
+
+ |
+
+ Table 8: Additional Information Returned When Setting an Option
+
+
+
+
+ This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_UNSUPPORTED:
- The operation is not
+ supported for the specified handle and option number.
+
- SANE_STATUS_INVAL:
- The option value is not valid.
+
- SANE_STATUS_IO_ERROR:
- An error occured while
+ communicating with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the option has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (sane_start() has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+sane_start() gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle h of the device for which the
+parameters should be obtained and a pointer p to a parameter
+structure. The parameter structure is described in more detail below.
+
+
+
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+
+
+
+The scan parameters are returned in a structure of type
+SANE_Parameters. The C declaration of this structure
+is given below.
+
+
+
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String format_desc;
+ SANE_String proposed_filename;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+
+
+
+
+
+Member format specifies the format of the next frame to be
+returned. The possible values for type SANE_Frame are
+described in Table 9. The meaning of these
+values is described in more detail in Section 3.2.
+
+
+
+
+
+Symbol |
+Code |
+SANE standard |
+Description |
+
+
+
+
+
+ SANE_FRAME_GRAY |
+ 0 |
+ version 1 |
+ Band covering human visual range. |
+
+
+SANE_FRAME_RGB |
+ 1 |
+ version 1 |
+ Pixel-interleaved red/green/blue bands. |
+
+
+SANE_FRAME_RED |
+ 2 |
+ version 1 |
+ Red band of a red/green/blue image. |
+
+
+SANE_FRAME_GREEN |
+ 3 |
+ version 1 |
+ Green band of a red/green/blue image. |
+
+
+SANE_FRAME_BLUE |
+ 4 |
+ version 1 |
+ Blue band of a red/green/blue image. |
+
+
+SANE_FRAME_RAW |
+ 5 |
+ version 2 |
+ Arbitrary pixel property transmission. |
+
+
+SANE_FRAME_MIME |
+ 6 |
+ version 2 |
+ Data described by a mime descriptor. |
+
+
+
+
+ |
+
+ Table 9: Frame Format (SANE_Frame)
+
+
+
+
+ The flags member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+
+
+-
+SANE_PFLAG_LAST_FRAME (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image). Note, that it is possible to transmit
+multiple images in succession.
+
+
-
+SANE_PFLAG_MORE_IMAGES (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. It is permissible to set that value to 1 "in good
+faith", as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer. E.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at sane_start().
+
+
-
+SANE_PFLAG_NEW_PAGE (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+
-
+SANE_PFLAG_BACKSIDE (bit 3, bitvalue 8) tells if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+
+
+Note, that flags is compatible to member last_frame of
+SANE_Parameters of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+
+ Member lines specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call sane_read() until it
+returns a status of SANE_STATUS_EOF.
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+
+ Member bytes_per_line specifies the number of bytes that
+comprise one scan line.
+If bytes_per_line is set to 0, which can currently only be the case for
+SANE_FRAME_MIME, the frontend shall not assume a constant line
+length. Instead it should simply try to read until SANE_STATUS_EOF
+with an arbitrary block length.
+
+ Member depth specifies the number of bits per sample.
+Note, that only 0 (for not applicable), 1, and n*8 are allowed
+values. Data with other depths has to be scaled up accordingly.
+
+ Member pixels_per_line specifies the number of pixels that
+comprise one scan line.
+
+ Assume B is the number of channels in the frame, then the bit depth
+d (as given by member depth) and the number of pixels per
+line n (as given by this member pixels_per_line) are
+related to c, the number of bytes per line (as given by member
+bytes_per_line) as follows:
+
+
+
+
+ c >= \left{
+ ll
+ \lceil B*n / 8\rceil if d=1
+ | (1) |
+
+ B*n *\lceil (d + 7)/8 \rceil if d>1
+
+ \right.
+
+
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+ Member channels_per_image specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+channels_per_image has to be the same for all frames for this image.
+
+ Member format_desc is used for the new frametypes
+SANE_FRAME_RAW and SANE_FRAME_MIME. Its meaning differs
+between the two types:
+
+
+-
+SANE_FRAME_RAW:
+The format_desc contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+
A plane is descibed by one channel, e.g. "gray" or "gray:12".
+
+ Channel interleaved data is described by a comma separated list of channel descriptions,
+for example "red,green,blue" or "red:8,green:8,blue:8",
+the channel data is sent in the given order.
+
+ The depth information does not define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member depth.
+
+ Well known channels are red, green, blue and gray.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be infrared or
+a wavelength description like 1100nm, but be aware that a
+frontend may not be able to display such channels with useful colors.
+
+ Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member channels_per_image.
+
+ -
+SANE_FRAME_MIME:
+The format_desc contains the MIME type/subtype *(;parameter)
+fields as described in RFC 1521, 4. The Content-Type header field,
+without the prefixing "Content-Type:".
+Note, that it is discouraged to transfer proprietary file formats over
+SANE. If at all possible, please stick to the IANA assigned MIME types,
+and make sure the data stream is compliant with the corresponding
+specification.
+When data is transmitted with the frame type SANE_FRAME_MIME
+all data has to be transmitted within one frame, multiple frames
+are not allowed (so the flag last_frame has to be set
+when using this frame type).
+A fully compliant SANE backend is required to transmit in either
+SANE native frametypes, or in a MIME type, for which a converting
+meta backend exists and is freely available for all platforms.
+
+
Other formats may be transmitted, but the only thing the average
+frontend can do with them, is save them. This is not considered a
+good option, as it does not facilitate transmitting the data to a
+client application that may be running the frontend.
+However, if the data transferred by the backend is not an image in
+nature, it wouldn't make sense to try converting it anyway, so it is
+acceptable to use a simple SANE_FRAME_MIME transfer for that
+case. But even then, try to stick to well known stuff with freely
+existing standards and viewers as well.
+
+
+The member proposed_filename can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to "".
+
+ In the case of raw frames, proposed_filename is expected to hold
+the basename for the image, with the extension determined by the save function
+of the frontend, as the frontend can fully understand the data and is thus
+able to encode it in any format it wishes.
+
+ For MIME frames proposed_filename can contain either:
+
+
+-
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+
-
+A complete filename, including extension.
+
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+ In any case, if the frontend makes use of this field, the frontend
+must mangle this proposal or the final filename it produces with
+its help to suit local filesystem restrictions.
+
+ Special care should be taken not to cause security flaws this way.
+For Unix, that means killing out all path separators (/) [to avoid
+to save away stuff in obscure places or create critical files like
+/etc/hosts.allow] and avoiding to overwrite existing files.
+(Creating of leading dot files - like .rhosts - is not an issue here,
+because that's only a proposed filename extension as mentioned above.
+
+ The string proposed_comment can be used to transmit additional
+image data, that can be stored in the comment areas several fileformats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc.
+
+ The members dpi_x, dpi_y encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different
+resolutions of each image. It is not permissible to change resolution
+between frames of the same image.
+
+ The member reserved is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+
+
+
+
+This function initiates aquisition of an image from the device
+represented by handle h.
+
+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_DEVICE_BUSY:
- The device is busy. The
+ operation should be retried later.
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_INVAL:
- The scan cannot be started with the current
+ set of options. The frontend should reload the option descriptors, as if
+ SANE_INFO_RELOAD_OPTIONS had been returned from a call to
+ sane_control_option(), since the device's capabilities may have
+ changed.
+
+
+
+
+
+This function is used to read image data from the device represented
+by handle h. Argument buf is a pointer to a memory area
+that is at least maxlen bytes long. The number of bytes
+returned is stored in *len. A backend must set this to zero
+when a status other than SANE_STATUS_GOOD is returned).
+When the call succeeds, the number of bytes returned can be anywhere in
+the range from 0 to maxlen bytes.
+
+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+
+
+For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle h.
+
+- If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+
- If the device is in non-blocking I/O mode, the call returns
+ immediately with status SANE_STATUS_GOOD and with
+ *len set to zero.
+
+The I/O mode of handle h can be set via a call to
+sane_set_io_mode().
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_EOF:
- No more data is available for the
+ current frame. If sane_read sends back any image data it
+is not allowed to return with SANE_STATUS_EOF.
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the device has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+h.
+
+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does not imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been initiated. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of SANE_STATUS_CANCELLED). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must not call any other operation until the
+cancelled operation has returned.
+
+
+
+This function is used to set the I/O mode of handle h. The I/O mode
+can be either blocking or non-blocking. If argument m is
+SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to
+blocking mode. This function can be called only after a call to
+sane_start() has been performed.
+
+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value SANE_STATUS_UNSUPPORTED is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument m set to SANE_FALSE is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+the requested I/O mode.
+
+
+
+
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle h that is readable if and only if image data is
+available (i.e., when a call to sane_read() will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in *fd.
+
+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start()
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until sane_cancel() or sane_start() get called again
+or until sane_read() returns with status
+SANE_STATUS_EOF). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+sane_read() call would return SANE_STATUS_EOF.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call sane_read().
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+SANE_STATUS_UNSUPPORTED.
+
+ Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using select()
+or poll() under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to sane_read() is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+ This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+ this operation.
+
+
+
+
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return NULL.
+The returned pointer is valid at least until the next call to this
+function is performed.
+
+
+const SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc013.html b/sane2/0.07/doc013.html
new file mode 100644
index 00000000..1f26de30
--- /dev/null
+++ b/sane2/0.07/doc013.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+Code Flow
+
+
+The code flow for the SANE API is illustrated in
+Figure 4. Functions sane_init() and
+sane_exit() initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+
+
+
+
+ Figure 4: Code flow
+
+
+
+
+ Function sane_get_devices() can be called any time after
+sane_init() has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+ Once a device has been chosen, it is opened using a call to
+sane_open(). Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+ An opened device can be setup through the corresponding device handle
+using functions sane_get_option_descriptor() and
+sane_control_option(). While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle. However, as options are set, other options
+may become active or inactive. Thus, after setting an option, it
+may be necessary to re-read some or all option descriptors. While
+setting up the device, it is also admissible to call
+sane_get_parameters() to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+ The device handle can be put in blocking or non-blocking mode by a
+call to sane_set_io_mode(). Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+ After the device is setup properly, image acquisition can be started
+by a call to sane_start(). The backend calculates the exact
+image parameters at this point. So future calls to
+sane_get_parameters() will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to sane_read() is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+sane_set_io_mode() and/or sane_get_select_fd() at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+
+Image data is collected by repeatedly calling sane_read()
+until this function will return an end-of-file status
+(SANE_STATUS_EOF). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels of a red/green/blue image or multiple images),
+it can call sane_start() again.
+If the SANE_PFLAG_LAST_FRAME bit is set in flags, the
+current image is complete. In this case, it should be tested, if
+flags has the SANE_PFLAG_MORE_IMAGES bit set.
+If yes, further calls to sane_start() can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+sane_start() return an error like SANE_STATUS_NO_DOCS.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with SANE_PFLAG_LAST_FRAME on
+and SANE_PFLAG_MORE_IMAGES off is encountered, or an error other
+than SANE_STATUS_EOF occurs in a SANE function.
+Note that SANE_STATUS_NO_DOCS also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling sane_start again, which will get
+you to the next frame, without having to read and discard the current one.
+
+ In order to prematurely stop scanning and to reset the backend state,
+sane_cancel() can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+
+ When done using the device, the handle should be closed by a call to
+sane_close(). Finally, before exiting the application,
+function sane_exit() must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+ The following C sample code implements a reference loop for acquiring
+multiple images:
+
+
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+{
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status=sane_start(handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now let us see what the next frame brings. */
+ status=sane_get_parameters(handle,&parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if ( do_i_like_that(&parms) == NO ) continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer(...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while( SANE_STATUS_GOOD == ( status=sane_read(...) ) )
+ read_in_and_process_data_as_required();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF) {
+ break;
+ }
+
+ /* Now loop until we have all frames of an image. */
+ } while(!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+/* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+/* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+} while(parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel(handle);
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc014.html b/sane2/0.07/doc014.html
new file mode 100644
index 00000000..9ad35325
--- /dev/null
+++ b/sane2/0.07/doc014.html
@@ -0,0 +1,455 @@
+
+
+
+
+
+
+
+
+Well-Known Options
+
+
+While most backend options are completely self-describing, there are
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+
+
+Option number 0 has an empty string as its name. The value of this
+option is of type SANE_TYPE_INT and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+sane_get_option_descriptor() returns NULL, or a
+frontend can directly read out the value of option number 0.
+
+
+
+
+Option resolution is used to select the resolution at which an
+image should be acquired. When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+x_resolution and y_resolution. Note that only
+the option resolution or the options
+x_resolution and y_resolution may be active.
+
+The type of this option is either SANE_TYPE_INT or
+SANE_TYPE_FIXED. The unit is SANE_UNIT_DPI (dots/inch).
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The boolean option preview is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to SANE_TRUE,
+preview mode is in effect, when set to SANE_FALSE image
+acquisition should proceed in normal quality mode. The setting of
+this option must not affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option resolution). A backend is free to override the
+resolution value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+
+When the preview option is set the backend should transfer
+the image in frame type SANE_FRAME_RAW if possible.
+
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure 5. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the smallest and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the largest. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+
+
+
+
+ Figure 5: Scan area options
+
+
+
+
+ The names of the four options that define the scan area are given in
+the table below:
+
+
+
+
+Name |
+ Description |
+
+
+tl-x |
+ Top-left x coordinate value |
+
+
+tl-y |
+ Top-left y coordinate value |
+
+
+br-x |
+ Bottom-right x coordinate value |
+
+
+br-y |
+ Bottom-right y coordinate value |
+
+
+ |
+
+
+There are several rules that should be followed by front and backends
+regarding these options:
+
+
+- Backends must attach a unit of either pixels
+ (SANE_UNIT_PIXEL) or millimeters (SANE_UNIT_MM) to
+ these options. The unit of all four options must be identical.
+
+
- Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+
- A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+
- A frontend must work properly with any or all of these options
+ missing.
+
+
+
- A frontend may temporarily set the values in a way that
+tl-x is larger than br-x and tl-y is larger than
+br-y.
+
+
+
+
+
+
+Option depth is used to select the image depth in bits/sample
+in multi bit mode - (this means for 24 bit RGB mode this value must be 8).
+The type of this option is SANE_TYPE_INT.
+The unit is SANE_UNIT_BIT. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option mode.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The gamma-table option defines a SANE_CONSTRAINT_RANGE
+of the type SANE_TYPE_INT which represents the gamma correction
+table for gray. In color mode the gamma-table may be used to set
+a common gamma correction for red, green and blue. The options
+red-gamma-table, green-gamma-table and blue-gamma-table
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+gamma-table option, only the red-, green- and
+blue-gamma-table or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option mode defines a SANE_CONSTRAINT_STRING_LIST
+of type SANE_TYPE_STRING.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: Color, Gray, Halftone
+and Lineart. Color and Gray are multi bit
+modes (8 or 16 bits/sample), Halftone and Lineart
+are single bit modes.
+This way a frontend can select e.g the mode Gray
+for scanning a fax.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option source is used to select the scan source
+(e.g. Automatic Document Feeder).
+It defines a SANE_CONSTRAINT_STRING_LIST
+of type SANE_TYPE_STRING.
+Well known sources are: Flatbed, Transparancy Adapter and
+Automatic Document Feeder.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option threshold is used to define the threshold
+for Lineart and maybe Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity
+(image data bit = 0). The backend has to
+scale the values in the following way:
+A value of 0.0 means all pixels get white /full intensity (all image data
+bits are 0). A value of 50.0 means intensities brighter than medium gray
+get white / full intensity (bit 0). A value of 100.0 means all pixels get
+black (all image data bits are 1). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30...70 percent).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option analog-gamma is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_NONE. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options analog-gamma-red,
+analog-gamma-green and analog-gamma-blue.
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect on the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option shadow is used to define the shadow level / black point level.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black). The backend has to scale the values in the following way:
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30...70 percent).
+In color mode there can be options shadow-red, shadow-green
+and shadow-blue, in this case the shadow function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option highlight is used to define the highlight level / white point level.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity). The backend has to scale the values in the
+following way:
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30...70 percent).
+In color mode there can be options highlight-red, highlight-green
+and highlight-blue, in this case highlight has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option lamp-on is used to turn the lamp of the scanner on.
+The type of this option is SANE_TYPE_BUTTON.
+The unit is SANE_UNIT_NONE. When the option is set
+then the lamp of the scanner is turned on.
+
+The option lamp-off is used to turn the lamp of the scanner off.
+The type of this option is SANE_TYPE_BUTTON.
+The unit is SANE_UNIT_NONE. When the option is set
+then the lamp of the scanner is turned off.
+
+ These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+
+
+
+
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.
+
+A backend that does make available the scanner-buttons has to
+implement the following options:
+scanner-buttons-lock is of type SANE_TYPE_BOOL, default = SANE_FALSE
+scanner-buttons-status is of type SANE_TYPE_INT, default = 0
+scanner-buttons-status-update is of type SANE_TYPE_BUTTON
+When setting these options the backend does not set SANE_INFO_RELOAD_OPTIONS
+or SANE_INFO_RELOAD_PARAMS if not explictly defined.
+
+ A frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc015.html b/sane2/0.07/doc015.html
new file mode 100644
index 00000000..9f831204
--- /dev/null
+++ b/sane2/0.07/doc015.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+Network Protocol
+
+
+The SANE interface has been designed to facilitate network access to
+image acquisition devices. In particular, most SANE implementations
+are expected to support a network backend (net client) and a
+corresponding network daemon (net server) that allows accessing image
+acquisition devices through a network connection. Network access is
+useful in several situations:
+
+
+- To provide controlled access to resources that are inaccessible
+ to a regular user. For example, a user may want to access a device
+ on a host where she has no account on. With the network protocol,
+ it is possible to allow certain users to access scanners without
+ giving them full access to the system.
+
+
Controlling access through the network daemon can be useful even in
+ the local case: for example, certain backends may require root
+ privileges to access a device. Rather than installing each frontend
+ as setuid-root, a system administrator could instead install the
+ SANE network daemon as setuid-root. This enables regular users to
+ access the privileged device through the SANE daemon (which,
+ presumably, supports a more fine-grained access control mechanism
+ than the simple setuid approach). This has the added benefit that
+ the system administrator only needs to trust the SANE daemon, not
+ each and every frontend that may need access to the privileged
+ device.
+
+ - Network access provides a sense of ubiquity of the available
+ image acquisition devices. For example, in a local area network
+ environment, this allows a user to log onto any machine and have
+ convenient access to any resource available to any machine on the
+ network (subject to permission constraints).
+
+
- For devices that do not require physical access when used (e.g.,
+ video cameras), network access allows a user to control and use
+ these devices without being in physical proximity. Indeed, if such
+ devices are connected to the Internet, access from any place in the
+ world is possible.
+
+
+
+The network protocol described in this chapter has been design with
+the following goals in mind:
+
+
+- Image transmission should be efficient (have low encoding
+ overhead).
+
+
- Accessing option descriptors on the client side must be
+ efficient (since this is a very common operation).
+
+
- Other operations, such as setting or inquiring the value of an
+ option are less performance critical since they typically require
+ explicit user action.
+
+
- The network protocol should be simple and easy to implement on
+ any host architecture and any programming language.
+
+
+The SANE protocol can be run across any transport protocol that
+provides reliable data delivery. While SANE does not specify a
+specific transport protocol, it is expected that TCP/IP will be among
+the most commonly used protocols.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc016.html b/sane2/0.07/doc016.html
new file mode 100644
index 00000000..a15ef654
--- /dev/null
+++ b/sane2/0.07/doc016.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+Data Type Encoding
+
+
+
+
+The four primitive types of the SANE standard are encoded as follows:
+
+
+- SANE_Byte:
- A byte is encoded as an 8 bit value.
+ Since the transport protocol is assumed to be byte-orientd, the bit
+ order is irrelevant.
+
+
- SANE_Word:
- A word is encoded as 4 bytes (32
+ bits). The bytes are ordered from most-significant to
+ least-significant byte (big-endian byte-order).
+
+
- SANE_Char:
- A character is currently encoded as an 8-bit
+ ISO LATIN-1 value. An extension to support wider character sets (16 or 32
+ bits) is planned for the future, but not supported at this point.
+
+
- SANE_String:
- A string pointer is encoded as a
+ SANE_Char array. The trailing NUL byte is considered part
+ of the array and a NULL pointer is encoded as a zero-length
+ array.
+
+
- SANE_Handle:
- A handle is encoded like a word.
+ The network backend needs to take care of converting these integer
+ values to the opaque pointer values that are presented to the user
+ of the network backend. Similarly, the SANE daemon needs to take
+ care of converting the opaque pointer values it receives from its
+ backends into 32-bit integers suitable for use for network encoding.
+
+
- enumeration types:
- Enumeration types are encoded
+ like words.
+
+
+
+
+
+Closely following the type constructors of the C language, the SANE network
+protocol supports the following four constructors:
+
+
+- pointer:
- A pointer is encoded by a word that indicates
+ whether the pointer is a NULL-pointer which is then followed by the
+ value that the pointer points to (in the case of a non-NULL pointer;
+ in the case of a NULL pointer, no bytes are encoded for the pointer
+ value).
+
+
- array:
- An array is encoded by a word that indicates
+ the length of the array followed by the values of the elements in
+ the array. The length may be zero in which case no bytes are
+ encoded for the element values.
+
+
- structure:
- A structure is encoded by simply encoding the
+ structure members in the order in which they appear in the
+ corresponding C type declaration.
+
+
- union:
- A union must always be accompanied by a tag
+ value that indicates which of the union members is the currently the
+ active one. For this reason, the union itself is encoded simply by
+ encoding the value of the currently active member.
+
+
+
+Note that for type constructors, the pointer, element, or member
+values themselves may have a constructed type. Thus, the above rules
+should be applied recursively until a sequence of primitive types has
+been found.
+
+ Also SANE had no need for encoding of circular structures. This
+greatly simplifies the network protocol.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc017.html b/sane2/0.07/doc017.html
new file mode 100644
index 00000000..bbeeabb6
--- /dev/null
+++ b/sane2/0.07/doc017.html
@@ -0,0 +1,460 @@
+
+
+
+
+
+
+
+
+Remote Procedure Call Requests
+
+
+The SANE network protocol is a client/server-style remote procedure
+call (RPC) protocol. This means that all activity is initiated by the
+client side (the network backend)---a server is restricted to
+answering request by the client.
+
+
+
+This RPC establishes a connection to a particular SANE network daemon.
+It must be the first call in a SANE network session. The parameter
+and reply arguments for this call are shown in the table below:
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word version_code |
+ SANE_Word status |
+
+
+ SANE_String user_name |
+ SANE_Word version_code |
+
+
+ |
+
+
+The version_code argument in the request is the SANE
+version-code of the network backend that is contacting the network
+daemon (see Section 4.1). The
+``build-revision'' in the version code is used to hold the network
+protocol version. The SANE network daemon receiving such a request
+must make sure that the network protocol version corresponds to a
+supported version since otherwise the encoding of the network stream
+may be incompatible (even though the SANE interface itself may be
+compatible). The user_name argument is the name of the user
+on whose behalf this call is being performed. If the network backend
+cannot determine a user-name, it passes a NULL pointer for this
+argument. No trust should be placed in the authenticity of this
+user-name. The intent of this string is to provide more convenience
+to the user. E.g., it could be used as the default-user name in
+subsequent authentication calls.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values.2 The version_code argument returns the
+SANE version-code that the network daemon supports. See the comments
+in the previous paragraph on the meaning of the build-revision in this
+version code.
+
+
+
+This RPC is used to obtain the list of devices accessible by the SANE
+daemon.
+
+
+
+
+ request: |
+ reply: |
+
+
+ void |
+ SANE_Word status |
+
+
+ |
+ SANE_Device ***device_list |
+
+
+ |
+
+
+There are no arguments in the request for this call.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The device_list
+argument is a pointer to a NULL-terminated array of
+SANE_Device pointers.
+
+
+
+This RPC is used to open a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String device_name |
+ SANE_Word status |
+
+
+ |
+ SANE_Word handle |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The device_name argument specifies the name of the device to
+open.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The handle
+argument specifies the device handle that uniquely identifies the
+connection. The resource argument is used to request
+authentication. If it has a non-NULL value, the network
+backend should authenticate the specified resource and then retry this
+operation (see Section 5.2.10 for details on how to
+authorize a resource).
+
+
+
+This RPC is used to close a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection that should be
+closed.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+This RPC is used to obtain all the option descriptors for a
+remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ Option_Descriptor_Array odesc |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+descriptors should be obtained.
+
+In the reply, the odesc argument is used to return the array of
+option descriptors. The option descriptor array has the following
+structure:
+
+
+struct Option_Descriptor_Array
+ {
+ SANE_Word num_options;
+ SANE_Option_Descriptor **desc;
+ };
+
+
+
+
+
+This RPC is used to control (inquire, set, or set to automatic) a
+specific option of a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ SANE_Word option |
+ SANE_Word info |
+
+
+ SANE_Word action |
+ SANE_Word value_type |
+
+
+ SANE_Word value_type |
+ SANE_Word value_size |
+
+
+ SANE_Word value_size |
+ void *value |
+
+
+ void *value |
+ SANE_String *resource |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+should be controlled. Argument option is the number (index) of
+the option that should be controlled. Argument action
+specifies what action should be taken (get, set, or set automatic).
+Argument value_type specifies the type of the option value
+(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT,
+SANE_TYPE_FIXED, SANE_TYPE_STRING,
+SANE_TYPE_BUTTON). Argument value_size specifies
+the size of the option value in number of bytes (see
+Section 4.2.9.6 for the precise meaning of this value).
+Finally, argument value is a pointer to the option value. It
+must be a writeable area that is at least value_size bytes
+large. (Note that this area must be writable even if the action is to
+set the option value. This is because the backend may not be able to
+set the exact option value, in which case the option value is used to
+return the next best value that the backend has chosen.)
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has undefined
+values. The info argument returns the information on how well
+the backend was able to satisfy the request. For details, see the
+description of the corresponding argument in
+Section 4.3.7. Arguments value_type and
+value_size have the same values as the arguments by the same
+name in corresponding request. The values are repeated here to ensure
+that both the request and the reply are self-contained (i.e., they can
+be encoded and decoded independently). Argument value is holds
+the value of the option that has become effective as a result of this
+RPC.
+
+
+
+This RPC is used to obtain the scan parameters of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Parameters params |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device whose scan parameters should be returned.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The argument
+params is used to return the scan parameters.
+
+
+
+This RPC is used to start image acquisition (scanning).
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Word port |
+
+
+ |
+ SANE_Word byte_order |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device from which the image should be acquired.
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument, status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has
+undefined values. The argument port returns the port number
+from which the image data will be available. To read the image data,
+a network client must connect to the remote host at the indicated port
+number. Through this port, the image data is transmitted as a
+sequence of data records. Each record starts with the data length in
+bytes. The data length is transmitted as a sequence of four bytes.
+These bytes should be interpreted as an unsigned integer in big-endian
+format. The four length bytes are followed by the number of data
+bytes indicated by the length. Except for byte-order, the data is in
+the same format as defined for sane_read(). Since some
+records may contain no data at all, a length value of zero is
+perfectly valid. The special length value of 0xffffffff is
+used to indicate the end of the data stream. That is, after receiving
+a record length of 0xffffffff, the network client should close
+the data connection and stop reading data.
+
+ Argument byte_order specifies the byte-order of the image
+data. A value of 0x1234 indicates little-endian format, a value of
+0x4321 indicates big-endian format. All other values are presently
+undefined and reserved for future enhancements of this protocol. The
+intent is that a network server sends data in its own byte-order and
+the client is responsible for adjusting the byte-order, if necessary.
+This approach causes no unnecessary overheads in the case where the
+server and client byte-order match and puts the extra burden on the
+client side when there is a byte-order mismatch. Putting the burden
+on the client-side improves the scalability properties of this
+protocol.
+
+
+
+This RPC is used to cancel the current operation of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection whose operation
+should be cancelled.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+
+This RPC is used to pass authorization data from the net client to the
+net server.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String resource |
+ SANE_Word dummy |
+
+
+ SANE_String username |
+ |
+
+
+ SANE_String password |
+ |
+
+
+ |
+
+
+The resource argument specifies the name of the resource to be
+authorized. This argument should be set to the string returned in the
+resource argument of the RPC reply that required this
+authorization call. The username and password are the
+name of the user that is accessing the resource and the password for
+the specified resource/user pair.
+
+Since the password is not encrypted during network transmission, it is
+recommended to use the following extension:
+
+ If the server adds the string `$MD5$' to the resource-name followed
+by a random string not longer then 128 bytes, the client may answer with the
+MD5 digest of the concatenation of the password and the random string. To
+differentiate between the MD5 digest and a strange password the client prepends
+the MD5 digest with the string `$MD5$'.
+
+ In the reply, dummy is completely unused. Note that there is
+no direct failure indication. This is unnecessary since a net client
+will retry the RPC that resulted in the authorization request until
+that call succeeds (or until the request is cancelled). The RPC that resulted
+in the authorization request continues after the reply from the client and may
+fail with SANE_STATUS_ACCESS_DENIED.
+
+
+
+This RPC is used to disconnect a net client from a net server. There
+are no request or reply arguments in this call. As a result of this
+call, the connection between the client and the server that was
+established by the SANE_NET_INIT call will be closed.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc018.html b/sane2/0.07/doc018.html
new file mode 100644
index 00000000..5cf8613d
--- /dev/null
+++ b/sane2/0.07/doc018.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+Contact Information
+
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+
+
+majordomo@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``help'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+
+http://www.mostang.com/sane/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/doc019.html b/sane2/0.07/doc019.html
new file mode 100644
index 00000000..3b7092a4
--- /dev/null
+++ b/sane2/0.07/doc019.html
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+Index
+
+
+
+analog gamma option
+array
+
+ bit depth option
+br-x
+br-y
+
+ code flow
+
+ device-name
+domain
+
+ enumeration types
+
+ gamma table options
+
+ hightlight options
+
+ image data format
+
+ lamp-off option
+lamp-on option
+
+ mailing list
+mode options
+
+ network authorization
+NUL
+
+ option count
+Option_Descriptor_Array
+
+ password
+pointer
+preview mode
+
+ resolution option
+
+ SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+scanner button options
+shadow options
+source options
+structure
+
+ threshold option
+tl-x
+tl-y
+Type Strings
+
+ union
+username
+
+ Vendor Strings
+
+ well-known options
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/footnotes.html b/sane2/0.07/footnotes.html
new file mode 100644
index 00000000..6478c6a8
--- /dev/null
+++ b/sane2/0.07/footnotes.html
@@ -0,0 +1,7 @@
+FootnotesFootnotes
+
+
1 This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.
+
2 The sane network
+ daemon should be careful not to leak information in the undefined
+ portion of the reply.
diff --git a/sane2/0.07/img000.gif b/sane2/0.07/img000.gif
new file mode 100644
index 00000000..2fb575aa
Binary files /dev/null and b/sane2/0.07/img000.gif differ
diff --git a/sane2/0.07/img001.gif b/sane2/0.07/img001.gif
new file mode 100644
index 00000000..a9482097
Binary files /dev/null and b/sane2/0.07/img001.gif differ
diff --git a/sane2/0.07/img002.gif b/sane2/0.07/img002.gif
new file mode 100644
index 00000000..f2b21a2b
Binary files /dev/null and b/sane2/0.07/img002.gif differ
diff --git a/sane2/0.07/img003.gif b/sane2/0.07/img003.gif
new file mode 100644
index 00000000..4d9e5454
Binary files /dev/null and b/sane2/0.07/img003.gif differ
diff --git a/sane2/0.07/img004.gif b/sane2/0.07/img004.gif
new file mode 100644
index 00000000..e8786b74
Binary files /dev/null and b/sane2/0.07/img004.gif differ
diff --git a/sane2/0.07/index.html b/sane2/0.07/index.html
new file mode 100644
index 00000000..d3c3689c
--- /dev/null
+++ b/sane2/0.07/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+./sane
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SANE Standard Version 2.0 proposal 0.07 - rauch/beck
+
+Dec 5, 2002
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.07/sane2-0.07.dvi b/sane2/0.07/sane2-0.07.dvi
new file mode 100644
index 00000000..c561272f
Binary files /dev/null and b/sane2/0.07/sane2-0.07.dvi differ
diff --git a/sane2/0.07/sane2-0.07.ps b/sane2/0.07/sane2-0.07.ps
new file mode 100644
index 00000000..fcdb334a
--- /dev/null
+++ b/sane2/0.07/sane2-0.07.ps
@@ -0,0 +1,5734 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software
+%%Title: sane.dvi
+%%Pages: 59
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic
+%%+ Times-BoldItalic
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips sane.dvi -o sane.ps
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2002.12.05:1707
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% @@psencodingfile@{
+% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
+% version = "0.6",
+% date = "1 July 1998",
+% filename = "8r.enc",
+% email = "tex-fonts@@tug.org",
+% docstring = "Encoding for TrueType or Type 1 fonts
+% to be used with TeX."
+% @}
+%
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+%
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+%
+% (5) hyphen appears twice for compatibility with both
+% ASCII and Windows.
+%
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef
+ /breve /minus /.notdef
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+ /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there to here.
+ /grave /quotesingle
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /.notdef /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
+exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
+dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
+ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
+end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
+dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
+roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
+dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
+if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
+def end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (sane.dvi)
+@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40
+1[40 1[45 97[{TeXBase1Encoding ReEncodeFont}13 90.9091
+/Times-BoldItalic rf
+%DVIPSBitmapFont: Fb cmex10 10 1
+/Fb 1 41 df40 D E
+%EndDVIPSBitmapFont
+/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60
+60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60
+60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37
+99.6264 /Courier rf
+%DVIPSBitmapFont: Fd cmtt10 10.95 13
+/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F
+A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F
+A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65
+D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800
+A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69
+D78 D<90390FF803C0D97FFF13E048B512C74814
+F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C
+91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900
+3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F
+E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380
+253A7BB830>83 D
+87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813
+03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00
+3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7
+13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F
+90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712
+7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13
+07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0
+252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0
+91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339
+7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0
+4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C
+14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01
+FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111
+D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC
+4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F
+9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC
+03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48
+15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A
+5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A
+485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E
+%EndDVIPSBitmapFont
+/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37
+1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25
+3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35
+74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1
+49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1
+66.4176 /Times-Roman rf
+%DVIPSBitmapFont: Fh cmmi10 10.95 16
+/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA
+1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0
+EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC
+EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F
+F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED
+3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC
+17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F
+C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED
+01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F
+F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC
+07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB
+FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72
+7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F
+E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE
+4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D
+90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9
+FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0
+1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01
+1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8
+A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A
+D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0
+387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848
+14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13
+074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F
+5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0
+EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000
+157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0
+38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F
+FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807
+031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13
+1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2
+ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7
+2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F
+001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B
+137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E
+13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00
+1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0
+C648C9FC2A3B7EA72D>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fi cmr8 8 3
+/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23
+>49 DII E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fj cmr10 10.95 12
+/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201
+5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E
+123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB
+01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12
+007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6
+14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12
+1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9
+FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC
+EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713
+800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015
+C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F
+90C7FCEB07F8243F7CBC2D>53 DI<
+1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814
+1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301
+5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16
+7BA147>61 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fk cmsy10 10.95 5
+/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4
+EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100
+DI E
+%EndDVIPSBitmapFont
+/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25
+25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24
+90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33
+39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66
+55 72 1[61 78 72 94 3[39 78 78 61 1[72 72 66 72 7[50
+50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}50
+99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53
+66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120
+86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86
+11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43
+119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76
+3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13
+172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86
+90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 30 2[30 1[30 56 66 66 86 66 66 56 51 61
+1[51 66 66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51
+1[25 25 45 45 45 45 45 45 45 45 45 45 25 23 30 23 1[45
+30 30 30 35[51 51 2[{TeXBase1Encoding ReEncodeFont}81
+90.9091 /Times-Roman rf /Fr 105[45 27[40 45 45 66 45
+51 30 35 40 51 51 45 51 76 25 51 1[25 51 45 30 40 51
+40 51 45 9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61
+66 66 61 66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23
+2[30 30 40[{TeXBase1Encoding ReEncodeFont}55 90.9091
+/Times-Bold rf /Fs 135[103 149 103 115 69 80 92 1[115
+103 115 172 57 115 1[57 115 103 69 92 115 92 115 103
+12[138 115 2[126 1[149 1[138 2[80 2[126 138 1[149 1[149
+23[69 69 40[{TeXBase1Encoding ReEncodeFont}34 206.559
+/Times-Bold rf /Ft 154[44 1[44 30[72 14[50 2[50 1[50
+3[25 44[{TeXBase1Encoding ReEncodeFont}7 99.6264 /Times-Roman
+rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76
+86 76 86 76 10[124 2[96 4[124 8[105 3[124 9[86 4[86 1[86
+48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44
+b(2.0)f(proposal)i(0.07)e(-)g(rauch/beck)1708 2698 y
+Ft(Dec)25 b(5,)g(2002)p eop
+%%Page: 1 2
+1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430
+b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26
+b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227
+b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91
+b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647
+y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24
+b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25
+b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n
+(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639
+b(13)136 3593 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3764 y(4.2)96
+b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(14)345 3935 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(14)345 4106 y(4.2.2)110 b(Boolean)25
+b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345 4277 y(4.2.3)110
+b(Inte)o(ger)25 b(T)-7 b(ype)88 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345
+4448 y(4.2.4)110 b(Fix)o(ed-point)26 b(T)-7 b(ype)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(15)345 4619 y(4.2.5)110 b(T)-6 b(e)o(xt)46
+b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345 4790 y(4.2.6)110
+b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4961
+y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)345 5132 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7
+b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(17)1927 5381 y(1)p eop
+%%Page: 2 3
+2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7
+b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(19)345 279 y(4.2.10)65 b(Internationalizatio)q(n)44
+b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(22)136 436 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)82 b(26)345 592 y(4.3.1)110 b Fp(sane)p 861
+592 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 749
+y(4.3.2)110 b Fp(sane)p 861 749 V 31 w(exit)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 905 y(4.3.3)110 b Fp(sane)p 861 905
+V 31 w(get)p 1057 905 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1062
+y(4.3.4)110 b Fp(sane)p 861 1062 V 31 w(open)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 1218 y(4.3.5)110 b Fp(sane)p 861
+1218 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1375 y(4.3.6)110
+b Fp(sane)p 861 1375 V 31 w(get)p 1057 1375 V 32 w(option)p
+1419 1375 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(28)345 1532 y(4.3.7)110 b Fp(sane)p 861 1532 V 31 w(control)p
+1277 1532 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(28)345 1688 y(4.3.8)110 b Fp(sane)p
+861 1688 V 31 w(get)p 1057 1688 V 32 w(parameters)25
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(29)345 1845 y(4.3.9)110 b Fp(sane)p 861 1845 V 31 w(start)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(34)345 2001 y(4.3.10)65 b Fp(sane)p
+861 2001 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(35)345 2158
+y(4.3.11)65 b Fp(sane)p 861 2158 V 31 w(cancel)33 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(35)345 2314 y(4.3.12)65 b Fp(sane)p 861 2314
+V 31 w(set)p 1057 2314 V 32 w(io)p 1199 2314 V 31 w(mode)78
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2471 y(4.3.13)65 b Fp(sane)p 861 2471 V 31 w(get)p
+1057 2471 V 32 w(select)p 1419 2471 V 30 w(fd)37 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2627 y(4.3.14)65 b Fp(sane)p 861 2627 V 31 w(strstatus)73
+b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(37)136 2784 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2940 y(4.5)96
+b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3097 y(4.5.1)110 b(Option)25 b(Number)e(Count)70
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3253 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3410 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3566 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(42)345 3723 y(4.5.5)110 b(Depth)24 b(option)71
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(43)345 3879 y(4.5.6)110 b(Gamma)23
+b(table)h(options)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(43)345 4036 y(4.5.7)110 b(Scan)24
+b(Mode)g(options)50 b(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4192 y(4.5.8)110 b(Scan)24
+b(Source)g(options)79 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4349 y(4.5.9)110 b(Threshold)43
+b(.)j(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4505 y(4.5.10)65 b(Analog)25
+b(gamma)56 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(44)345 4662 y(4.5.11)65 b(Shado)n(w)51
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4818 y(4.5.12)65
+b(Highlight)e(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)345 4975 y(4.5.13)65
+b(T)l(urn)24 b(lamp)f(on)h(and)g(of)n(f)48 b(.)d(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(46)345 5132
+y(4.5.14)65 b(Scanner)25 b(b)n(uttons)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(46)1927 5381 y(2)p eop
+%%Page: 3 4
+3 3 bop 0 123 a Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989
+b(48)136 294 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(49)345 466 y(5.1.1)110 b(Primiti)n(v)o(e)24
+b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 638 y(5.1.2)110 b(T)-7
+b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 809 y(5.2)96
+b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 981 y(5.2.1)110
+b Fp(SANE)p 861 981 28 4 v 31 w(NET)p 1057 981 V 32 w(INIT)82
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(50)345 1153 y(5.2.2)110 b Fp(SANE)p 861 1153
+V 31 w(NET)p 1057 1153 V 32 w(GET)p 1254 1153 V 31 w(DEVICES)62
+b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(51)345 1324 y(5.2.3)110 b Fp(SANE)p 861 1324 V 31 w(NET)p
+1057 1324 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 1496 y(5.2.4)110
+b Fp(SANE)p 861 1496 V 31 w(NET)p 1057 1496 V 32 w(CLOSE)27
+b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(51)345 1667 y(5.2.5)110 b Fp(SANE)p 861 1667
+V 31 w(NET)p 1057 1667 V 32 w(GET)p 1254 1667 V 31 w(OPTION)p
+1615 1667 V 30 w(DESCRIPTORS)28 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(52)345 1839 y(5.2.6)110 b Fp(SANE)p 861 1839 V 31 w(NET)p
+1057 1839 V 32 w(CONTROL)p 1474 1839 V 29 w(OPTION)36
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345
+2011 y(5.2.7)110 b Fp(SANE)p 861 2011 V 31 w(NET)p 1057
+2011 V 32 w(GET)p 1254 2011 V 31 w(PARAMETERS)34 b Fq(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 2182
+y(5.2.8)110 b Fp(SANE)p 861 2182 V 31 w(NET)p 1057 2182
+V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(53)345 2354 y(5.2.9)110 b Fp(SANE)p
+861 2354 V 31 w(NET)p 1057 2354 V 32 w(CANCEL)41 b Fq(.)k(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(54)345
+2526 y(5.2.10)65 b Fp(SANE)p 861 2526 V 31 w(NET)p 1057
+2526 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(54)345 2697 y(5.2.11)65 b Fp(SANE)p
+861 2697 V 31 w(NET)p 1057 2697 V 32 w(EXIT)82 b Fq(.)46
+b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(55)0 2960 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871
+b(56)1927 5381 y Fq(3)p eop
+%%Page: 4 5
+4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349
+y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45
+b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data)
+g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g
+(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(38)136 2119 y(4.2)96
+b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(42)1927 5381 y(4)p eop
+%%Page: 5 6
+5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349
+y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i
+(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23
+b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31
+w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p
+Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036
+y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23
+b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p
+Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f
+(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722
+y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139
+2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop
+%%Page: 6 7
+6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0
+1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g
+(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38
+b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e
+(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i
+(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0
+2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g
+(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d
+(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c
+(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f
+(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22
+b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0
+2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g
+(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119
+b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d
+(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f
+(an)e(application)k(that)d(requires)h(access)g(to)0 3135
+y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j
+(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5
+b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0
+3248 y(implementations)35 b(of)c(SANE)f(components.)55
+b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g
+(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o
+(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c
+(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0
+3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as)
+d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i
+(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l
+(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29
+b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26
+b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i
+(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement)
+i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o
+(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h
+(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o
+(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7
+b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g
+(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o
+(e)d(this:)0 4658 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0 4658 a 0 4658 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 4658 a 151 x
+Fq(P)o(aragraphs)h(that)f(changed)i(since)f(the)e(last)h(re)n(vision)i
+(of)d(the)h(documention)i(are)e(mark)o(ed)h(lik)o(e)f(this)g
+(paragraph.)3600 4809 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 3600 4809 a 3600 4809 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 3600
+4809 a 3600 4809 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 3600 4809 a 1927 5381 a Fq(6)p eop
+%%Page: 7 8
+7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0
+1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace)
+h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g
+(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22
+b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)
+g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0
+2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e
+(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f
+(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24
+b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23
+b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f
+(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21
+b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n
+(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29
+b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g
+(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i
+(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the)
+f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i
+(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h
+(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f
+(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0
+2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e
+(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5
+b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51
+b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g
+(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25
+b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h
+(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0
+3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21
+b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g
+(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g
+(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f
+(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k
+Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0
+3812 y(back)o(ends.)1927 5381 y(7)p eop
+%%Page: 8 9
+8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51
+b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g
+(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32
+b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0
+1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e
+(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44
+b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g
+(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f
+(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30
+b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25
+b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f
+(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d
+(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34
+b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h
+(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p
+Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n
+(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j
+(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)
+h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g
+(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0
+2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f
+(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30
+b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f
+(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h
+(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g
+(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22
+b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h
+Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e
+(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f
+(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back)
+o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e
+(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h
+(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o
+(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31
+b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h
+(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227
+4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h
+(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n
+(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g
+(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o
+(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227
+4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e
+(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227
+4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k
+(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d
+(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n
+(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f
+(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29
+b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o
+(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f
+(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4
+v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro)
+o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h
+(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f
+(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n
+(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i
+(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927
+5381 y(8)p eop
+%%Page: 9 10
+9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227
+310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g
+Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p
+2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p
+Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i
+(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n
+(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227
+536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time)
+f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136
+724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27
+b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i
+(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227
+837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41
+b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e
+(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d
+(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o
+(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30
+b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g
+Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f
+(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha)
+n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got)
+e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227
+1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f
+(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6
+b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i
+(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e
+(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p
+Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e
+(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227
+1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d
+(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30
+b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g
+(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to)
+227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.)
+43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f
+(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g
+(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g
+(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h
+(that)f(scanner)-5 b(.)0 2479 y
+ currentpoint currentpoint translate 0.64821 0.64821 scale neg exch
+neg exch translate
+ 0 2479 a 0 2479 a
+ gsave currentpoint currentpoint translate 270 neg rotate neg exch
+neg exch translate
+ 0 2479
+a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550
+@rwi @setspecial
+%%BeginDocument: figs/hierarchy.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hierarchy.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 2
+%%CreationDate: Thu Jan 30 22:02:12 1997
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%Magnification: 1.00
+%%Orientation: Landscape
+%%BoundingBox: 0 0 355 722
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-17.0 -17.0 translate
+ 90 rotate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n 0 612 m 0 0 l 792 0 l 792 612 l cp clip
+ 0.06000 0.06000 sc
+% Polyline
+n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr
+% Polyline
+n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr
+15.000 slw
+% Polyline
+n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+11399 5182 m
+gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+8099 5182 m
+gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr
+% Polyline
+n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr
+% Polyline
+n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr
+% Polyline
+n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr
+% Polyline
+n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 2700 1800 m 1200 3000 l gs col-1 s gr
+% Polyline
+n 3000 1800 m 3000 3000 l gs col-1 s gr
+% Polyline
+n 3300 1800 m 4800 3000 l gs col-1 s gr
+% Polyline
+n 9600 1800 m 9600 2100 l gs col-1 s gr
+% Polyline
+n 9450 2700 m 8100 4800 l gs col-1 s gr
+% Polyline
+n 11400 4200 m 11400 4800 l gs col-1 s gr
+% Polyline
+n 1200 3600 m 1200 4200 l gs col-1 s gr
+% Polyline
+n 3000 3600 m 3000 4125 l gs col-1 s gr
+% Polyline
+n 7875 5400 m 7350 5850 l gs col-1 s gr
+% Polyline
+n 8250 5400 m 8775 5850 l gs col-1 s gr
+% Polyline
+n 11475 5400 m 11475 5850 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr
+% Polyline
+n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 9750 2700 m 11400 3600 l gs col-1 s gr
+% Interp Spline
+gs n 4800 3600 m
+ 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto
+ 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto
+ 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto
+ 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto
+ 7224.0 624.7 8573.7 446.9 9450 900 curveto
+ 9524.5 938.5 9562.0 1013.5 9600 1200 curveto
+ gs col-1 s gr
+ gr
+
+/Helvetica ff 270.00 scf sf
+1199 3382 m
+gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 3382 m
+gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+1200 4425 m
+gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 4380 m
+gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+7350 6165 m
+gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+8925 6165 m
+gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+11475 6135 m
+gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 600 m
+gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+9600 630 m
+gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+4725 5850 m
+gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 1582 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+4799 3382 m
+gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 1582 m
+gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 2482 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+11399 3982 m
+gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial 2958 2479 a
+ currentpoint grestore moveto
+ 2958 2479 a 0 2479 a
+ currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale
+neg exch neg exch translate
+ 0 2479
+a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0
+4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h
+(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44
+b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g
+(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f
+(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0
+5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h
+(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i
+(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop
+%%Page: 10 11
+10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e
+Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36
+b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d
+(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o
+(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51
+b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h
+(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e
+(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d
+Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e
+Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f
+(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22
+b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f
+(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f
+(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i
+(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i
+(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g
+(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0
+972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h
+(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g
+(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back)
+o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e
+(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0
+1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0
+1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815
+y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h
+(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f
+(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39
+b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation)
+j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0
+2041 y(applications)f(and)c(de)n(vices.)59 b(While)34
+b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has)
+f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i
+(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g
+(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0
+2266 y(accommodate)26 b(future)e(applications)k(or)23
+b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g
+(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is)
+f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n
+(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0
+2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g
+(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21
+b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n
+(alues.)30 b(Each)24 b(sample)g(v)n(alue)g(represents)j(one)d(channel)h
+(\(e.g.,)e(the)h(red)g(channel\).)0 2836 y(The)i(SANE)f(API)g
+(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39
+b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0
+2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f
+(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67
+b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34
+b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f
+(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0
+3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g
+(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g
+(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f
+(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0
+3459 y(When)30 b(transmitting)i(an)e(image)g(frame)g(by)g(frame,)h(the)
+f(frontend)i(needs)f(to)e(kno)n(w)h(what)g(part)g(of)g(the)g(image)g(a)
+f(frame)0 3572 y(represents)e(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g
+(should)i(e)o(xpect\).)31 b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d
+(API)i(tags)i(e)n(v)o(ery)f(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f
+(format)i(descriptor)-5 b(.)0 3704 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 3704 a 0 3704
+a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 3704 a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f
+(of)e(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e
+Fp(SANE)p 2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31
+w(RAW)e Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p
+225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)18
+b(These)k(types)g(are)f(discussed)j(in)d(detail)h(in)f(the)g(follo)n
+(wing)h(sections.)30 b(The)21 b(frame)g(types)h(used)g(by)0
+4082 y(v)o(ersion)e(1)d(of)h(this)h(standard)h(\()p Fp(SANE)p
+1168 4082 V 31 w(FRAME)p 1474 4082 V 31 w(GRAY)p Fq(,)15
+b Fp(SANE)p 1983 4082 V 31 w(FRAME)p 2289 4082 V 30 w(RGB)p
+Fq(,)h Fp(SANE)p 2743 4082 V 31 w(FRAME)p 3049 4082 V
+30 w(RED)p Fq(,)g Fp(SANE)p 3503 4082 V 31 w(FRAME)p
+3809 4082 V 30 w(GREEN)p Fq(,)0 4195 y(and)24 b Fp(SANE)p
+379 4195 V 31 w(FRAME)p 685 4195 V 30 w(BLUE)p Fq(\))e(are)h(obsolete)j
+(and)e(superseded)j(by)c Fp(SANE)p 2360 4195 V 31 w(FRAME)p
+2666 4195 V 31 w(RAW)p Fq(.)0 4503 y Fm(3.2.1)99 b(Pixel)24
+b(oriented)i(frames)0 4736 y Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h
+(frames)e(is)g Fp(SANE)p 1561 4736 V 31 w(FRAME)p 1867
+4736 V 30 w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g
+(channels)i(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32
+b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f
+(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0
+4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h
+Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g
+Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25
+b(type.)0 5075 y(See)e(section)i(4.3.8)f(on)f(page)i(29)e(for)h
+(details)h(about)g(the)f(format)g(descriptions.)2563
+5075 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 2563 5075 a 2563 5075 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 2563 5075 a 2563 5075
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 2563 5075 a 1905 5381 a Fq(10)p eop
+%%Page: 11 12
+11 11 bop 0 123 a Fq(Each)24 b(sample)h(v)n(alue)g(has)f(a)g(certain)h
+(bit)g(depth.)31 b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g
+(entire)i(image)e(and)h(can)f(be)g(as)g(small)g(as)0
+236 y(one)f(bit.)29 b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h
+(or)g(16)g(bits)g(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5
+b(s)25 b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0
+349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n
+(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f
+(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d
+(sample)h(v)n(alue)g(of)g(depth)g(8\).)0 481 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 481
+a 0 481 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 481 a 137 x Fq(The)f(complete)i(image)f(may)f(consist)i(of)
+f(se)n(v)o(eral)g(dif)n(ferent)i(channels.)31 b(The)23
+b(number)h(of)g(channels)i(is)d(de\002ned)h(by)g(mem-)0
+731 y(ber)19 b Fp(channels)p 579 731 28 4 v 29 w(per)p
+773 731 V 31 w(image)c Fq(of)j Fp(SANE)p 1407 731 V 31
+w(Parameters)p Fq(.)k(The)c(image)h(may)f(be)g(transmitted)j(in)d(an)g
+(arbitary)i(number)0 844 y(of)28 b(frames)h(which)g(can)f(be)h
+(determined)h(by)f(w)o(atching)g(the)g Fp(SANE)p 2173
+844 V 31 w(PFLAG)p 2479 844 V 30 w(LAST)p 2729 844 V
+31 w(FRAME)d Fq(\003ag)h(in)i(said)g(type)g(\(or)f(by)0
+957 y(counting)e(the)e(channels\).)31 b(Note:)e(This)24
+b(frame)f(type)i(replaces)g(all)f(frame)f(types)i(of)f(the)f(SANE)e
+(standard)26 b(v)o(ersion)f(1.)3795 957 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 3795 957 a
+3795 957 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 3795 957 a 3795 957 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 3795 957 a 0 1113 a
+Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i(frame)d(is)
+g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48 b(Each)30
+b(byte)h(may)f(contain)i(8)d(sample)0 1226 y(v)n(alues)g(\(for)g(an)f
+(image)g(bit)h(depth)g(of)f(1\),)h(one)f(full)h(sample)g(v)n(alue)g
+(\(for)f(an)g(image)h(bit)f(depth)h(of)f(8\),)h(or)f(a)g(partial)h
+(sam-)0 1339 y(ple)j(v)n(alue)g(\(for)f(an)h(image)f(bit)h(depth)g(of)g
+(16)f(or)g(bigger\).)54 b(In)31 b(the)h(latter)g(case,)i(the)d(bytes)i
+(of)e(each)h(sample)g(v)n(alue)g(are)0 1452 y(transmitted)26
+b(in)d(the)h(machine')-5 b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5
+b(.)1357 1651 y Fr(Back)o(end)22 b(Implementation)i(Note)227
+1795 y Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o
+(e)h(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f
+(adjusted)227 1908 y(appropriately)32 b(if)c(necessary)-6
+b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i
+(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 2021
+y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o
+(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f
+(then)f(apply)i(the)227 2134 y(adjustment)d(if)d(necessary)-6
+b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er)
+n(-mak)o(es-right)q(\224)29 b(approach.)975 3263 y @beginspecial
+0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial
+%%BeginDocument: figs/xfer.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfer.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:30 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 362 182
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-134.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+15.000 slw
+% Polyline
+n 2400 3300 m 8100 3300 l gs col-1 s gr
+n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3375 m 2400 3675 l gs col-1 s gr
+15.000 slw
+n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 3750 m 8100 3750 l gs col-1 s gr
+n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3825 m 2400 4125 l gs col-1 s gr
+15.000 slw
+n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr
+15.000 slw
+% Polyline
+n 2400 4200 m 8100 4200 l gs col-1 s gr
+n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 4275 m 2400 4575 l gs col-1 s gr
+15.000 slw
+n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 4650 m 8100 4650 l gs col-1 s gr
+n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1111 3459 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24
+b(order)h(of)e(image)h(data)g(bytes)0 3759 y(The)f(order)i(in)f(which)g
+(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e
+(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0
+3872 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g
+(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e
+(right-most)i(column.)30 b(The)0 3985 y(left-to-right,)35
+b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h
+(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4097
+y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g
+(e)o(xample\).)0 4254 y(If)d(a)g(frame)h(contains)h(multiple)g
+(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f
+(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0
+4367 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h
+(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f
+(bit-depth)j(of)d(8.)0 4523 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g
+(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g
+Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h
+(depth)h(1)0 4636 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g
+(interlea)n(v)o(ed)j(f)o(ashion.)38 b(The)25 b(\002rst)h(sample)h(of)f
+(each)g(byte)h(is)f(represented)j(by)d(the)g(most)0 4749
+y(signi\002cant)g(bit.)0 4769 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 4769 a 0 4769 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 4769
+a 137 x Fq(F)o(or)g(gray)h(channels)i(at)d(a)g(bit)h(depth)g(of)g(1)f
+(only)h(tw)o(o)f(sample)h(v)n(alues)h(are)f(possible:)37
+b(1)26 b(represents)k(minimum)c(intensity)0 5019 y(\(black\))32
+b(and)f(0)f(represents)j(maximum)d(intensity)i(\(white\).)50
+b(F)o(or)29 b(all)i(other)g(channel)h(types)g(and)e(bit)h(depths)h(a)d
+(sample)0 5132 y(v)n(alue)24 b(of)g(0)f(represents)j(minimum)e
+(intensity)i(and)e(lar)n(ger)h(v)n(alues)f(represent)i(increasing)h
+(intensity)-6 b(.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 5151 a
+0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(11)p eop
+%%Page: 12 13
+12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx
+93 @ury 3744 @rwi @setspecial
+%%BeginDocument: figs/image-data.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: image-data.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:36 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 521 93
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-88.0 120.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+1875 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3225 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+4575 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l
+ 5850 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 600 m
+gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+5925 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+7275 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+8625 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l
+ 9900 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 600 m
+gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1950 m
+gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1950 m
+gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1950 m
+gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1950 m
+gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1950 m
+gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1950 m
+gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+10050 1275 m
+gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1125 m
+gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23
+b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 1070
+a 0 1070 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0
+1394 y Fq(It)31 b(also)g(is)g(possible)i(to)e(transmit)h(arbitrary)h
+(\(not)f(necessaryly)i(pix)o(el)e(oriented\))h(data.)52
+b(This)30 b(allo)n(ws)i(transmission)h(of)0 1507 y(compressed)26
+b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 1679
+y(The)k(type)h(of)g(arbitrary)i(data)e(frames)g(is)f
+Fp(SANE)p 1558 1679 28 4 v 31 w(FRAME)p 1864 1679 V 31
+w(MIME)p Fq(.)e(The)i(frame)g(contains)j(arbitrary)g(data)e(of)g(the)g
+(MIME)0 1791 y(\(see)f(RFC)e(1521/1522\))30 b(type)e(that)f(is)f(gi)n
+(v)o(en)i(in)e(the)h Fp(format)p 2039 1791 V 30 w(desc)d
+Fq(member)j(of)g(the)g Fp(SANE)p 3096 1791 V 31 w(Parameters)21
+b Fq(struc-)0 1904 y(tured)i(type)f(\(see)g(See)f(section)j(4.3.8)d(on)
+h(page)h(29\).)28 b(As)21 b(such,)i(it)e(is)g(assumed)i(to)f(be)g
+(incomprehensible)k(to)21 b(the)h(frontend,)0 2017 y(e)o(xcept)28
+b(for)e(selected)j(types)e(the)g(frontend)h(is)f(speci\002cally)h
+(capable)g(of)f(handling)i(internally)-6 b(.)40 b(The)26
+b(frontend)i(is)e(free)h(to)0 2130 y(ignore)32 b(those)g(frames,)g(or)f
+(emplo)o(y)h(an)o(y)e(appropriate)k(means)d(to)g(otherwise)h(handle)g
+(this)f(data)h(\(lik)o(e)f(sa)n(ving)i(them)d(to)0 2243
+y(disk)24 b(or)g(spa)o(wning)h(an)e(e)o(xternal)i(vie)n(wer\).)1392
+2243 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 1392 2243 a 1392 2243 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 1392 2243 a 1392 2243
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 1392 2243 a 1905 5381 a Fq(12)p eop
+%%Page: 13 14
+13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51
+b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512
+y(Interface)e(\(API\))0 1879 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 1879 a 0 1879 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 1879
+a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f
+(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y)
+h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i
+(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o
+(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0
+2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h
+(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e
+(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d
+(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33
+b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0
+2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109
+2682 y Fp(#include)51 b()0 2748 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 2748
+a 0 2748 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 2748 a 0 2748 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 2748 a 333 x Fn(4.1)119
+b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard)
+25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28
+b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e
+(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d
+(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e
+(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51
+b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30
+b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g
+(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g
+(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h
+(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g
+(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o
+(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g
+(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o
+(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o
+(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i
+(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o
+(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129
+y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f
+(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n
+(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f
+(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n
+(vision.)48 b(While)30 b(control)h(of)e(these)0 4406
+y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o
+(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28
+b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e
+(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38
+b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n
+(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o
+(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o
+(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4
+v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29
+b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d
+(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905
+5381 y(13)p eop
+%%Page: 14 15
+14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p
+868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p
+Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g
+(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e
+(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g
+(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p
+Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f
+Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o
+(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g
+(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14
+b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d
+(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704
+y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g
+(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427
+817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e
+(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the)
+427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427
+1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f
+(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427
+1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f
+(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and)
+427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227
+1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V
+30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h
+(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427
+1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p
+868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32
+b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of)
+427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p
+868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18
+b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d
+(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j
+Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0
+2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23
+b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f
+(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o
+(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59
+b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52
+b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31
+w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g
+(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f
+(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c
+Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n
+(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f
+Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068
+y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g
+Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15
+b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j
+Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in)
+e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j
+Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d
+Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24
+b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e
+(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i
+Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33
+b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i
+(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25
+b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p
+Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o
+(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j
+(mapping.)1905 5381 y(14)p eop
+%%Page: 15 16
+15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0
+356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n
+(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v)
+n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j
+Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g
+(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097
+436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)
+h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52
+b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377
+b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187
+y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)
+g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e
+(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26
+b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25
+b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g
+Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0
+1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0
+1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y
+Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h
+(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h
+Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e
+Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30
+b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0
+2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f
+(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays)
+f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672
+y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27
+b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f
+Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0
+2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0
+3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326
+y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n
+(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in)
+f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p
+Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e
+Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27
+b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6
+b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103
+b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0
+4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p
+940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22
+b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29
+b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f
+(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p
+Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26
+b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p
+Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g
+(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5
+b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24
+b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17
+b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36
+b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros)
+h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g
+(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p
+0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19
+b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g
+(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905
+5381 y Fq(15)p eop
+%%Page: 16 17
+16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p
+Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c
+(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f
+(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking)
+h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f
+Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427
+349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p
+Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine)
+f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427
+608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j
+Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o
+(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g
+Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227
+1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48
+b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48
+b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i
+(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6
+b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0
+1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw)
+o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0
+2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29
+b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o
+(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g
+(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d
+Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48
+b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x)
+o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27
+b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f
+(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0
+2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50
+b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to)
+f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o
+(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227
+3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23
+b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695
+V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f
+(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27
+b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f
+Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52
+b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e
+(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h
+Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d
+Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f
+(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23
+b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773
+y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26
+b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i
+(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905
+5381 y(16)p eop
+%%Page: 17 18
+17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7
+b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i
+(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560
+356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32
+b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6
+b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0
+961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n
+(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e
+(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p
+Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f
+(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n
+(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0
+1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f
+(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether)
+f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57
+b(If)31 b(an)h(operation)j(completes)e(successfully)-6
+b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56
+b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f
+(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30
+b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0
+1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23
+b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p
+2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f
+(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385
+2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p
+1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p
+3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113
+v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p
+1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p
+2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6
+b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660
+2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p
+1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25
+b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435
+2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627
+V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083
+2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661
+V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31
+w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p
+1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n
+(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V
+435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021
+2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083
+2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p
+3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966
+28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000
+4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n
+(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113
+V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p
+1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p
+2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514
+3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4
+v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31
+w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100
+w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226
+V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31
+w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p
+1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er)
+e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p
+660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161
+3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083
+3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514
+3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4
+v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31
+w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100
+w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435
+3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643
+V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4
+113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f
+(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519
+3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0
+4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7
+b(ype)0 4346 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 4346 a 0 4346 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 4346 a 151 x Fq(Each)27
+b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type)
+g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26
+b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n
+(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969
+y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+
+0 5096 a 0 5096 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 5096 a 0 5096 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 5096 a 1905 5381
+a Fq(17)p eop
+%%Page: 18 19
+18 18 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 32 a 445 123 a Fp(SANE_String_Cons)o
+(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445
+349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g
+(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g
+(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o
+(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913
+y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026
+y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139
+y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445
+1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478
+y(SANE_Device;)0 1533 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0 1533 a 0 1533 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 1533 a 0
+1533 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f
+(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p
+Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0
+1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019
+1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h
+(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39
+b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is)
+h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o
+(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o
+(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique)
+j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30
+b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k)
+o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32
+b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0
+2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g
+(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n
+(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h
+(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52
+b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f
+Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e
+(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h
+(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n
+(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0
+2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g
+(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g
+(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928
+a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965
+1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698
+b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588
+b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698
+b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643
+b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p
+1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p
+1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p
+1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p
+1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p
+1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p
+1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93
+b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753
+b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643
+b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p
+1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115
+2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p
+3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094
+4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094
+V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207
+V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320
+V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433
+V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p
+3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p
+3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p
+3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p
+3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p
+3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24
+b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0
+5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26
+b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f
+(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f
+(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o
+(endor)h(speci\002c)g(and)f(therefore)i(completely)1905
+5381 y(18)p eop
+%%Page: 19 20
+19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i
+(back)o(ends.)0 143 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 143 a 0 143 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 143 a 150 x Fq(The)i(back)o
+(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p
+1648 293 28 4 v 30 w(backend)p 2063 293 V 30 w(author)25
+b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0
+406 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f
+(the)g(format:)0 649 y Fp(Firstname)50 b(Lastname)h()0 892 y Fq(The)33 b(string)j Fp(backend)p 805 892
+V 29 w(website)30 b Fq(has)k(to)g(be)g(set)g(up)g(by)g(the)g(back)o
+(end)i(with)e(the)g(website)h(or)e(ftp)h(address)i(of)e(the)0
+1005 y(back)o(end)26 b(in)d(the)h(format:)0 1247 y Fp(http://www.doma)o
+(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0
+1490 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h
+Fp(device)p 1572 1490 V 30 w(location)18 b Fq(with)23
+b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g
+(this)0 1603 y(de)n(vice,)h(the)g(te)o(xt)g(should)h(be)f(read)g(from)f
+(the)h(back)o(end)i(con\002g)e(\002le.)k(This)23 b(could)i(e.g.)k(look)
+24 b(lik)o(e)g(this:)0 1846 y Fp(building)51 b(93,)i(2nd)g(plane,)f
+(room)h(2124)0 2088 y Fq(The)33 b(string)h Fp(comment)c
+Fq(can)j(be)g(used)h(to)g(display)h(an)o(y)e(comment)h(to)f(the)g(user)
+l(,)k(the)c(te)o(xt)h(should)h(be)e(read)h(from)f(the)0
+2201 y(back)o(end)26 b(con\002g)e(\002le.)0 2372 y(The)f(string)i
+Fp(reserved)p 839 2372 V 29 w(string)20 b Fq(is)j(planed)i(for)f
+(future)h(use,)f(the)f(back)o(end)j(has)e(to)g(set)f(this)h(string)h
+(to)f(\224\224.)0 2542 y(W)l(ith)i(member)f Fp(backend)p
+915 2542 V 30 w(version)p 1330 2542 V 29 w(code)e Fq(a)i(frontend)j
+(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e(a)g(back)o(end)j(it)d(is)
+g(connected)0 2655 y(to)e(via)h(one)g(or)g(more)f(meta)h(back)o(ends.)0
+2825 y(The)30 b(member)h Fp(backend)p 889 2825 V 29 w(capability)p
+1468 2825 V 29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g
+(planned)h(to)f(gi)n(v)o(e)f(the)h(back)o(end)i(the)0
+2938 y(chance)26 b(to)f(inform)g(the)g(frontend)i(about)f(its)f
+(capabilities.)36 b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f
+(de\002ned)i(when)f(there)g(is)0 3051 y(the)f(need)g(for)g(it.)k(The)23
+b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g
+(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3222 y(The)d(member)h
+Fp(reserved)p 926 3222 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g
+(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g
+(inte)o(ger)h(to)e(0.)3900 3222 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 3900 3222 a 3900 3222
+a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 3900 3222 a 3900 3222 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 3900 3222 a 0 3528 a Fm(4.2.9)99
+b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3760 y Fq(Option)23
+b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h
+(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30
+b(Options)0 3873 y(are)h(used)g(to)f(control)j(virtually)g(all)d
+(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n
+(wer)f(of)h(the)g(SANE)d(API)h(stems)0 3986 y(from)22
+b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f
+(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g
+(descriptor)-5 b(.)31 b(Thus,)0 4098 y(a)21 b(frontend)i(can)e(control)
+i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n
+(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0
+4211 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28
+b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i
+(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4324 y(operates.)31
+b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p
+1485 4324 28 4 v 31 w(Option)p 1846 4324 V 30 w(Descriptor)18
+b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227
+4567 y Fp(typedef)52 b(struct)336 4680 y({)445 4793 y(SANE_String_Cons)
+o(t)c(name;)445 4906 y(SANE_String_Cons)o(t)g(title;)445
+5019 y(SANE_String_Cons)o(t)g(desc;)445 5132 y(SANE_Value_Type)g(type;)
+1905 5381 y Fq(19)p eop
+%%Page: 20 21
+20 20 bop 445 123 a Fp(SANE_Unit)51 b(unit;)445 236 y(SANE_Int)g(size;)
+445 349 y(SANE_Int)g(cap;)445 462 y(SANE_Constraint_)o(Ty)o(pe)d
+(constraint_type)o(;)445 574 y(union)555 687 y({)664
+800 y(const)k(SANE_String_Con)o(st)c(*string_list;)664
+913 y(const)k(SANE_Word)e(*word_list;)664 1026 y(const)i(SANE_Range)e
+(*range;)555 1139 y(})445 1252 y(constraint;)336 1365
+y(})227 1478 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0
+1782 y Fr(Option)23 b(Name)0 2015 y Fq(Member)k Fp(name)e
+Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40
+b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n
+(vice)0 2128 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n
+(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).)
+55 b(The)31 b(option)i(name)f(must)0 2241 y(consist)e(of)d(lo)n(wer)n
+(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p
+Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i
+(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43
+b(The)27 b(\002rst)h(character)0 2354 y(must)c(be)f(a)g(lo)n(wer)n
+(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g
+(dash\).)0 2659 y Fr(Option)g(T)n(itle)0 2892 y Fq(Member)e
+Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h
+(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21
+b(should)i(typically)0 3005 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o
+(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i
+(of)d(the)h(option.)0 3309 y Fr(Option)f(Description)0
+3542 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e
+(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to)
+g(describe)i(the)e(option.)35 b(It)24 b(is)0 3655 y(the)g
+(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h
+(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e
+(this)0 3768 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i
+(breaks.)0 4072 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0
+4305 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the)
+g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h
+Fp(SANE)p 3217 4305 28 4 v 31 w(Value)p 3523 4305 V 31
+w(Type)c Fq(are)0 4418 y(described)26 b(in)e(T)-7 b(able)23
+b(4.3.)0 4723 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 4956
+y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h
+(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20
+b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765
+4956 V 31 w(U-)0 5069 y(nit)e Fq(are)j(described)i(in)d(T)-7
+b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g
+(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21
+b(is)g(entirely)1905 5381 y(20)p eop
+%%Page: 21 22
+21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p
+1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p
+3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v
+165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247
+V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281
+V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p
+Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360
+28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113
+v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g
+Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p
+390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042
+506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h
+(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165
+585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V
+31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V
+256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p
+Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p
+390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042
+1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f
+(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option)
+1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n
+(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k
+(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j
+(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g
+(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24
+b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5
+b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p
+390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042
+1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this)
+h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e
+(group)1395 1376 y(logically)35 b(related)e(options.)56
+b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395
+1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j
+(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if)
+e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395
+1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d
+Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395
+1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865
+3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24
+b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354
+2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0
+2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f
+(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h
+(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37
+b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j
+(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i
+(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f
+(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903
+4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856
+V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525
+w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876
+V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4
+v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113
+v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j
+(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548
+3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068
+V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102
+V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p
+3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181
+28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4
+113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24
+b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328
+V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024
+3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000
+3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p
+3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407
+28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4
+113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24
+b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V
+497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p
+1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p
+2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p
+3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632
+28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698
+3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24
+b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666
+V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29
+b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4
+v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22
+b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g
+(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26
+b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0
+4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v)
+n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703
+4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g
+(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e
+(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i
+Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g
+(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i
+Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e
+(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop
+%%Page: 22 23
+22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p
+703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31
+w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31
+b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e
+(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i
+(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437
+y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289
+437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452
+653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23
+b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486
+653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798
+V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p
+1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43
+b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y
+Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d
+Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31
+b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n
+(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f
+(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i
+(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h
+(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227
+1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V
+30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p
+Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553
+1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427
+1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i
+(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p
+813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p
+Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p
+2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427
+2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g
+Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8
+b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f
+(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37
+b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0
+2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n
+(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921
+2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003
+y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30
+b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h
+(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h
+(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n
+(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p
+3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d
+(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7
+b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0
+3598 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 3598 a 0 3598 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o
+(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26
+b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g
+(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27
+b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i
+(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g
+(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o
+(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h
+Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f
+(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526
+V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0
+4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227
+5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227
+5132 y(#endif)0 5135 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 0 5135 a 0 5135 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 0 5135 a 0 5135
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 0 5135 a 1905 5381 a Fq(22)p eop
+%%Page: 23 24
+23 23 bop 36 572 3828 4 v 34 685 4 113 v 452 651 a Fr(Symbol)p
+1160 685 V 466 w(Code)p 1461 685 V 1026 w(Description)p
+3862 685 V 36 688 3828 4 v 36 705 V 34 931 4 226 v 86
+784 a Fp(SANE)p 311 784 28 4 v 31 w(CAP)p 507 784 V 31
+w(SOFT)p 758 784 V 31 w(SELECT)p 1160 931 4 226 v 254
+w Fq(1)p 1461 931 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)h(set)f
+(by)g(a)g(call)g(to)g Fp(sane)p 3155 784 28 4 v 31 w(control)p
+3571 784 V 30 w(opt-)1513 897 y(ion\(\))p Fq(.)p 3862
+931 4 226 v 34 1495 4 565 v 86 1010 a Fp(SANE)p 311 1010
+28 4 v 31 w(CAP)p 507 1010 V 31 w(HARD)p 758 1010 V 31
+w(SELECT)p 1160 1495 4 565 v 254 w Fq(2)p 1461 1495 V
+100 w(The)28 b(option)j(v)n(alue)f(can)f(be)h(set)f(by)g(user)n
+(-interv)o(ention)34 b(\(e.g.,)c(by)f(\003ip-)1513 1123
+y(ping)35 b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39
+b(should)e(prompt)e(the)g(user)g(to)1513 1236 y(e)o(x)o(ecute)25
+b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)g(option.)32
+b(This)24 b(capa-)1513 1349 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n
+(v)o(e)g(with)e(SANE)p 2990 1349 28 4 v 31 w(CAP)p 3199
+1349 V 31 w(SOFT)p 3454 1349 V 31 w(SELECT)1513 1462
+y(\(either)25 b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g
+(both)g(simultaneously\).)p 3862 1495 4 565 v 34 2286
+4 791 v 86 1574 a Fp(SANE)p 311 1574 28 4 v 31 w(CAP)p
+507 1574 V 31 w(SOFT)p 758 1574 V 31 w(DETECT)p 1160
+2286 4 791 v 254 w Fq(4)p 1461 2286 V 100 w(The)43 b(option)h(v)n(alue)
+g(can)g(be)f(detected)i(by)f(softw)o(are.)88 b(If)43
+b Fp(SANE)p 3733 1574 28 4 v 31 w(-)1513 1687 y(CAP)p
+1683 1687 V 31 w(SOFT)p 1934 1687 V 31 w(SELECT)f Fq(is)j(set,)50
+b(this)c(capability)i Fl(must)e Fq(be)g(set.)93 b(If)1513
+1800 y Fp(SANE)p 1738 1800 V 31 w(CAP)p 1934 1800 V 31
+w(HARD)p 2185 1800 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)
+j(may)c(or)h(may)1513 1913 y(not)d(be)g(set.)42 b(If)28
+b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p
+3428 1913 V 31 w(CAP)p 3624 1913 V 31 w(SO-)1513 2026
+y(FT)p 1628 2026 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p
+2379 2026 V 31 w(CAP)p 2575 2026 V 31 w(HARD)p 2826 2026
+V 31 w(SELECT)c Fq(are,)j(then)h(there)g(is)1513 2139
+y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34 b(That)25
+b(is,)g(the)g(option)h(pro)o(vides)h(read-)1513 2252
+y(out)d(of)f(the)h(current)h(v)n(alue)g(only)-6 b(.)p
+3862 2286 4 791 v 34 2737 4 452 v 86 2365 a Fp(SANE)p
+311 2365 28 4 v 31 w(CAP)p 507 2365 V 31 w(EMULATED)p
+1160 2737 4 452 v 395 w Fq(8)p 1461 2737 V 100 w(If)22
+b(set,)h(this)g(capability)i(indicates)g(that)d(an)h(option)h(is)e(not)
+h(directly)h(sup-)1513 2478 y(ported)36 b(by)g(the)f(de)n(vice)h(and)g
+(is)f(instead)h(emulated)h(in)e(the)g(back)o(end.)1513
+2591 y(A)26 b(sophisticated)31 b(frontend)f(may)c(elect)j(to)e(use)g
+(its)h(o)n(wn)e(\(presumably)1513 2704 y(better\))f(emulation)g(in)f
+(lieu)g(of)f(an)h(emulated)h(option.)p 3862 2737 V 34
+3302 4 565 v 86 2816 a Fp(SANE)p 311 2816 28 4 v 31 w(CAP)p
+507 2816 V 31 w(AUTOMATIC)p 1160 3302 4 565 v 294 w Fq(16)p
+1461 3302 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d
+(the)g(back)o(end)i(\(or)e(the)h(de)n(vice\))1513 2929
+y(is)j(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f
+(automatically)-6 b(.)1513 3042 y(F)o(or)24 b(such)h(options,)i(it)d
+(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1513
+3155 y(calling)38 b Fp(sane)p 2021 3155 28 4 v 31 w(control)p
+2437 3155 V 29 w(option\(\))32 b Fq(with)k(an)g(action)h(v)n(alue)g(of)
+1513 3268 y Fp(SANE)p 1738 3268 V 31 w(ACTION)p 2099
+3268 V 30 w(SET)p 2294 3268 V 31 w(AUTO)p Fq(.)p 3862
+3302 4 565 v 34 3641 4 339 v 86 3381 a Fp(SANE)p 311
+3381 28 4 v 31 w(CAP)p 507 3381 V 31 w(INACTIVE)p 1160
+3641 4 339 v 349 w Fq(32)p 1461 3641 V 101 w(If)32 b(set,)j(this)e
+(capability)i(indicates)g(that)e(the)g(option)h(is)e(not)h(currently)
+1513 3494 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)j(it')-5
+b(s)21 b(meaningful)j(only)e(if)f(another)j(option)f(is)e(set)1513
+3607 y(to)i(some)h(other)g(v)n(alue\).)p 3862 3641 V
+34 4318 4 678 v 86 3720 a Fp(SANE)p 311 3720 28 4 v 31
+w(CAP)p 507 3720 V 31 w(ADVANCED)p 1160 4318 4 678 v
+349 w Fq(64)p 1461 4318 V 101 w(If)34 b(set,)i(this)f(capability)h
+(indicates)h(that)d(the)g(option)i(should)f(be)f(con-)1513
+3833 y(sidered)j(an)e(\223adv)n(anced)i(user)f(option.)-6
+b(\224)65 b(A)34 b(frontend)j(typically)g(dis-)1513 3946
+y(plays)31 b(such)g(options)h(in)e(a)g(less)h(conspicuous)i(w)o(ay)d
+(than)h(re)o(gular)h(op-)1513 4058 y(tions)c(\(e.g.,)e(a)h(command)g
+(line)g(interf)o(ace)i(may)e(list)g(such)g(options)i(last)1513
+4171 y(or)e(a)f(graphical)k(interf)o(ace)f(may)e(mak)o(e)g(them)g(a)n
+(v)n(ailable)j(in)c(a)h(seperate)1513 4284 y(\223adv)n(anced)f
+(settings\224)g(dialog\).)p 3862 4318 V 36 4322 3828
+4 v 1400 4475 a(T)-7 b(able)24 b(4.5:)29 b(Option)24
+b(Capabilities)1905 5381 y(23)p eop
+%%Page: 24 25
+24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p
+1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215
+V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235
+V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31
+w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v
+614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.)
+49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427
+y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5
+b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a
+Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V
+28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094
+V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f
+(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6
+b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879
+766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30
+b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o
+(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h
+Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25
+b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107
+1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518
+y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325
+1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879
+2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e
+(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n
+(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41
+b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e
+Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g
+(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6
+b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d
+(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51
+b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h
+Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g
+Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879
+2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e
+Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27
+b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n
+(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d
+Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71
+3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877
+3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224
+4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d
+(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879
+3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28
+b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399
+y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35
+b(descriptor)h(member)1879 3512 y Fp(constraint.word)p
+2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o
+(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40
+b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33
+b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28
+b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g
+(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879
+3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j
+(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n
+(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o
+(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303
+a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303
+V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565
+v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e
+(applicable)i(to)e(string-v)n(alued)k(options)1879 4415
+y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e
+(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i
+(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641
+28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e
+Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the)
+e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p
+3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23
+b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905
+5381 y(24)p eop
+%%Page: 25 26
+25 25 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 32 a 91 x Fq(Y)-10 b(ou)33
+b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e
+Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f
+(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g
+(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p
+Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23
+b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o
+(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f
+(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746
+y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g
+(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f
+(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i
+Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the)
+h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o
+(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that)
+g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g
+(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46
+b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24
+b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p
+883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377
+V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549
+y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d
+Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or)
+f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f
+(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j
+(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g
+(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h
+Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0
+3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g
+(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e
+(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p
+Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i
+Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22
+b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538
+y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22
+b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h
+Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0
+3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d
+Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0
+3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34
+b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g
+(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0
+4049 y(should)h(use)f(the)g(function)i Fp(gettext)19
+b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24
+b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0
+4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g
+(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i
+(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c
+(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23
+b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g
+(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0
+4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the)
+g(gette)o(xt)h(tools.)2241 4843 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 2241 4843 a 2241 4843
+a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 2241 4843 a 2241 4843 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 2241 4843 a 1905 5381 a Fq(25)p
+eop
+%%Page: 26 27
+26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 392 y Fm(4.3.1)99
+b Fc(sane)p 545 392 30 4 v 35 w(init)0 625 y Fq(This)35
+b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d
+(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h
+(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j(if)d(this)h(function)i
+(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g(status)h(code)f
+(returned)i(by)d Fp(sane)p 3561 738 28 4 v 31 w(init)e
+Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p 767 851
+V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion)h(code)g
+(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h(pointed)
+h(to)0 964 y(by)24 b Fp(version)p 504 964 V 29 w(code)p
+Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p Fq(,)e(no)j(v)o(ersion)i
+(code)e(is)g(returned.)31 b(Ar)n(gument)25 b Fp(authorize)19
+b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a)g(function)i(that)
+e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i(requires)g
+(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0
+1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h
+(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int)
+h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o
+(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28
+b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i
+(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041
+y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967
+2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f
+Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i
+(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f
+(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0
+2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h
+(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d
+(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37
+b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40
+b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64
+b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j
+(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0
+2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g
+(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911
+y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing)
+h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o
+(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN)
+157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o
+(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,)
+500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE)
+o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o
+(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed)
+h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26
+b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0
+4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35
+b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d
+(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g
+(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b
+Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g
+(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p
+421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i
+Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p
+2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6
+b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f
+(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38
+b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0
+4646 y(NUL)c(terminated.)1905 5381 y(26)p eop
+%%Page: 27 28
+27 27 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p 545 123 30
+4 v 35 w(exit)0 352 y Fq(This)26 b(function)i(must)e(be)g(called)h(to)f
+(terminate)h(use)f(of)g(a)g(back)o(end.)38 b(The)25 b(function)j(will)e
+(\002rst)f(close)i(all)f(de)n(vice)h(handles)0 465 y(that)d(still)h
+(might)f(be)f(open)i(\(it)f(is)f(recommended)j(to)e(close)h(de)n(vice)f
+(handles)i(e)o(xplicitly)g(through)g(a)d(call)h(to)g
+Fp(sane)p 3656 465 28 4 v 31 w(clo-)0 578 y(se\(\))p
+Fq(,)k(b)n(ut)h(back)o(ends)j(are)d(required)i(to)e(release)i(all)e
+(resources)j(upon)e(a)e(call)i(to)f(this)g(function\).)48
+b(After)29 b(this)h(function)0 691 y(returns,)36 b(no)c(function)i
+(other)f(than)g Fp(sane)p 1396 691 V 31 w(init\(\))28
+b Fq(may)k(be)g(called)h(\(re)o(gardless)h(of)e(the)h(status)g(v)n
+(alue)g(returned)h(by)0 804 y Fp(sane)p 225 804 V 31
+w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f(call)g(this)g(function)i
+(may)d(result)i(in)e(some)h(resources)i(not)e(being)g(released)i
+(properly)-6 b(.)227 1038 y Fp(void)53 b(sane_exit)d(\(void\);)0
+1341 y Fm(4.3.3)99 b Fc(sane)p 545 1341 30 4 v 35 w(get)p
+760 1341 V 35 w(devices)0 1570 y Fq(This)21 b(function)i(can)e(be)g
+(used)h(to)f(query)h(the)g(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)
+n(ailable.)30 b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)
+-6 b(,)0 1683 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h
+Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f
+Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p
+3635 1683 28 4 v 29 w(list)p Fq(.)0 1796 y(The)27 b(returned)i(list)f
+(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g
+(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0
+1909 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p
+1056 1909 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25
+b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0
+2022 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41
+b(If)27 b(ar)n(gument)h Fp(local)p 1899 2022 V 31 w(only)c
+Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n
+(vices)0 2135 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE)
+d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n
+(vice)g(list)g(includes)i(all)e(remote)0 2247 y(de)n(vices)e(that)f
+(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227
+2482 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device)
+d(***)54 b(device_list,)1864 2595 y(SANE_Bool)c(local_only\);)0
+2830 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g
+Fp(SANE)p 1242 2830 V 31 w(STATUS)p 1603 2830 V 30 w(NO)p
+1743 2830 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)1357 3087 y Fr(Back)o(end)f
+(Implementation)i(Note)227 3236 y Fq(SANE)h(does)k(not)f(require)h
+(that)f(this)h(function)g(is)f(called)h(before)g(a)e
+Fp(sane)p 2646 3236 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227
+3349 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o
+(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f
+(unnecessary)j(and)227 3462 y(undesirable)31 b(to)c(call)h(this)g
+(function)h(\002rst.)1619 3383 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 1619 3383 a 1619 3383
+a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 1619 3383 a 79 x Fq(The)e(same)g(information)j(about)e(a)f(de)n(vice)
+i(has)e(to)h(be)f(returned)227 3575 y(when)d Fp(sane)p
+672 3575 28 4 v 31 w(open)d Fq(is)i(called.)1290 3575
+y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 1290 3575 a 1290 3575 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 1290 3575 a 1290 3575 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 1290
+3575 a 0 3877 a Fm(4.3.4)99 b Fc(sane)p 545 3877 30 4
+v 35 w(open)0 4107 y Fq(This)26 b(function)h(is)f(used)h(to)e
+(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36
+b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0
+4219 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40
+b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33
+b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e
+Fp(*h)p Fq(.)0 4253 y
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 0 4253 a 0 4253 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 0 4253 a 79 x
+Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e
+Fp(**device)p 2040 4332 28 4 v 29 w(description)p Fq(.)i(This)e(is)f
+(the)i(same)f(description)j(that)0 4445 y(is)h(returned)j(in)d(the)h
+(list)g(by)f Fp(sane)p 1144 4445 V 31 w(get)p 1340 4445
+V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g
+Fp(*h)c Fq(and)j Fp(*device)p 3186 4445 V 30 w(description)23
+b Fq(is)0 4558 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid)
+i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4558 V 30 w(close\(\))c
+Fq(is)j(performed.)3231 4558 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 3231 4558 a 3231 4558
+a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 3231 4558 a 3231 4558 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 3231 4558 a 28 w Fq(As)g(a)g(special)i(case,)
+0 4671 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n
+(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n
+(vice)e(\(if)f(there)h(is)g(such)g(a)0 4784 y(de)n(vice\).)227
+5019 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k
+(SANE_Handle)d(*)55 b(h,)227 5132 y(const)e(SANE_Device)c(**)54
+b(device_descrip)o(ti)o(on\))o(;)1905 5381 y Fq(27)p
+eop
+%%Page: 28 29
+28 28 bop 0 123 a Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g
+(of)f(the)h(follo)n(wing)h(status)g(codes.)227 369 y
+Fp(SANE)p 452 369 28 4 v 31 w(STATUS)p 813 369 V 30 w(DEVICE)p
+1173 369 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e
+(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i(else\).)227
+515 y Fp(SANE)p 452 515 V 31 w(STATUS)p 813 515 V 30
+w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f(not)h(v)n
+(alid.)227 661 y Fp(SANE)p 452 661 V 31 w(STATUS)p 813
+661 V 30 w(IO)p 953 661 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+808 y Fp(SANE)p 452 808 V 31 w(STATUS)p 813 808 V 30
+w(NO)p 953 808 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 954
+y Fp(SANE)p 452 954 V 31 w(STATUS)p 813 954 V 30 w(ACCESS)p
+1173 954 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)
+h(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427
+1067 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1374
+y Fm(4.3.5)99 b Fc(sane)p 545 1374 30 4 v 35 w(close)0
+1607 y Fq(This)32 b(function)h(terminates)h(the)e(association)j
+(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h
+Fp(h)e Fq(and)h(the)g(de)n(vice)0 1720 y(it)h(represents.)59
+b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g
+(to)g Fp(sane)p 2326 1720 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j
+(\002rst.)57 b(After)33 b(this)0 1833 y(function)26 b(returns,)f
+(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227
+2105 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0
+2412 y Fm(4.3.6)99 b Fc(sane)p 545 2412 30 4 v 35 w(get)p
+760 2412 V 35 w(option)p 1155 2412 V 35 w(descriptor)0
+2645 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f
+(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h
+(descriptor)g(for)f(option)0 2758 y(number)i Fp(n)e Fq(of)h(the)h(de)n
+(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36
+b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0
+2871 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g
+(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de)
+n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2984 y(includes)22
+b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i
+(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p
+Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 3097
+y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h
+(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227
+3368 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48
+b(*)445 3481 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3789 y Fm(4.3.7)99
+b Fc(sane)p 545 3789 V 35 w(control)p 1000 3789 V 34
+w(option)0 4022 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g
+(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e
+Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 4135
+y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f
+(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h
+Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 4248
+y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6
+b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through)
+g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 4361 y(is)21 b(a)f(pointer)j(to)e
+(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29
+b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f
+Fq(must)h(be)g(big)g(enough)0 4474 y(to)26 b(hold)g(the)g(entire)h
+(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d
+Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39
+b(The)0 4587 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h
+(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e
+(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4700 y Fp(v)33
+b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h
+(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d
+(\002rst)f Fp(NUL)0 4812 y Fq(terminator)c(in)e(the)g(string.)44
+b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p
+Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o
+(vide)i(details)g(on)e(ho)n(w)0 4925 y(well)23 b(the)h(request)h(has)f
+(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d
+(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)1905
+5381 y(28)p eop
+%%Page: 29 30
+29 29 bop 227 123 a Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e
+(\(SANE_Handle)h(h,)k(SANE_Int)e(n,)2027 236 y(SANE_Action)f(a,)j(void)
+g(*v,)2027 349 y(SANE_Int)e(*)j(i\);)0 595 y Fq(The)21
+b(w)o(ay)h(the)f(option)j(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this)
+g(function)i(is)d(controlled)k(by)c(parameter)j Fp(a)c
+Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 708 y Fp(SANE)p
+225 708 28 4 v 31 w(Action)p Fq(.)k(The)e(possible)j(v)n(alues)f(and)f
+(their)g(meaning)h(is)e(described)j(in)e(T)-7 b(able)23
+b(4.7.)p 185 831 3531 4 v 183 943 4 113 v 628 910 a Fr(Symbol)p
+1363 943 V 1363 943 V 493 w(Code)p 1664 943 V 1664 943
+V 850 w(Description)p 3714 943 V 185 947 3531 4 v 185
+963 V 183 1076 4 113 v 234 1042 a Fp(SANE)p 459 1042
+28 4 v 31 w(ACTION)p 820 1042 V 30 w(GET)p 1015 1042
+V 32 w(VALUE)p 1363 1076 4 113 v 254 w Fq(0)p 1664 1076
+V 100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 1076
+V 183 1415 4 339 v 234 1155 a Fp(SANE)p 459 1155 28 4
+v 31 w(ACTION)p 820 1155 V 30 w(SET)p 1015 1155 V 32
+w(VALUE)p 1363 1415 4 339 v 254 w Fq(1)p 1664 1415 V
+100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g
+(passed)h(through)g(ar)n(-)1716 1268 y(gument)21 b Fp(v)d
+Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue)
+1716 1381 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p
+3714 1415 V 183 1980 4 565 v 234 1494 a Fp(SANE)p 459
+1494 28 4 v 31 w(ACTION)p 820 1494 V 30 w(SET)p 1015
+1494 V 32 w(AUTO)p 1363 1980 4 565 v 309 w Fq(2)p 1664
+1980 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28
+b(or)f(de)n(vice)g(will)g(au-)1716 1607 y(tomatically)39
+b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38
+b(mode)1716 1720 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o
+(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1833 y(v)n(alue)22
+b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h
+Fp(v)e Fq(is)h(completely)1716 1946 y(ignored)j(in)f(this)g(case)g(and)
+g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1980 V 185 1983 3531
+4 v 1168 2136 a(T)-7 b(able)24 b(4.7:)29 b(Action)24
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 2136 28 4 v
+31 w(Action)p Fq(\))0 2445 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an)
+g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o
+Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0
+2558 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e
+Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h
+(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0
+2671 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g
+(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2842 y(This)g(function)j(may)
+d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+3089 y Fp(SANE)p 452 3089 V 31 w(STATUS)p 813 3089 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h
+(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427
+3202 y(option)e(number)-5 b(.)227 3348 y Fp(SANE)p 452
+3348 V 31 w(STATUS)p 813 3348 V 30 w(INVAL)p Fr(:)44
+b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227
+3494 y Fp(SANE)p 452 3494 V 31 w(STATUS)p 813 3494 V
+30 w(IO)p 953 3494 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+3640 y Fp(SANE)p 452 3640 V 31 w(STATUS)p 813 3640 V
+30 w(NO)p 953 3640 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3786
+y Fp(SANE)p 452 3786 V 31 w(STATUS)p 813 3786 V 30 w(ACCESS)p
+1173 3786 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h
+(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427
+3899 y(or)24 b(in)l(v)n(alid)h(authentication.)0 4207
+y Fm(4.3.8)99 b Fc(sane)p 545 4207 30 4 v 35 w(get)p
+760 4207 V 35 w(parameters)0 4440 y Fq(This)28 b(function)i(is)e(used)h
+(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44
+b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0
+4553 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h
+(started)h(\()p Fp(sane)p 2070 4553 28 4 v 31 w(start\(\))19
+b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0
+4666 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6
+b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates)
+e(of)g(what)f(the)g(parameters)0 4779 y(will)23 b(be)g(when)g
+Fp(sane)p 716 4779 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32
+b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i
+(started)g(allo)n(ws,)0 4891 y(for)c(e)o(xample,)h(to)e(get)h(an)g
+(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27
+b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0
+5004 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f
+(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer)
+j Fp(p)c Fq(to)i(a)g(parameter)0 5117 y(structure.)k(The)23
+b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n
+(w)-6 b(.)1905 5381 y(29)p eop
+%%Page: 30 31
+30 30 bop 103 967 3695 4 v 101 1080 4 113 v 628 1046
+a Fr(Symbol)p 1444 1080 V 1444 1080 V 575 w(Code)p 1746
+1080 V 1746 1080 V 850 w(Description)p 3796 1080 V 103
+1084 3695 4 v 103 1100 V 101 2455 4 1355 v 153 1179 a
+Fp(SANE)p 378 1179 28 4 v 30 w(INFO)p 628 1179 V 31 w(INEXACT)p
+1444 2455 4 1355 v 613 w Fq(1)p 1746 2455 V 100 w(This)21
+b(v)n(alue)g(is)f(returned)j(when)e(setting)h(an)e(option)i(v)n(alue)g
+(re-)1797 1292 y(sulted)31 b(in)d(a)h(v)n(alue)g(being)h(selected)h
+(that)e(does)h(not)f(e)o(xactly)1797 1405 y(match)f(the)f(requested)j
+(v)n(alue.)40 b(F)o(or)26 b(e)o(xample,)i(if)f(a)g(scanner)1797
+1518 y(can)g(adjust)g(the)f(resolution)j(in)d(increments)i(of)e(30dpi)h
+(only)-6 b(,)1797 1631 y(setting)34 b(the)f(resolution)i(to)d(307dpi)i
+(may)e(result)i(in)e(an)g(ac-)1797 1744 y(tual)e(setting)h(of)d
+(300dpi.)47 b(When)30 b(this)f(happens,)j(the)d(bitset)1797
+1857 y(returned)k(in)d Fp(*i)e Fq(has)j(this)g(member)f(set.)49
+b(In)31 b(addition,)i(the)1797 1970 y(option)22 b(v)n(alue)f(is)f
+(modi\002ed)h(to)f(re\003ect)g(the)h(actual)g(\(rounded\))1797
+2083 y(v)n(alue)k(that)f(w)o(as)f(used)i(by)e(the)h(back)o(end.)32
+b(Note)23 b(that)h(ine)o(xact)1797 2195 y(v)n(alues)31
+b(are)f(admissible)i(for)e(strings)h(as)f(well.)47 b(A)28
+b(back)o(end)1797 2308 y(may)19 b(choose)i(to)d(\223round\224)j(a)e
+(string)h(to)e(the)i(closest)g(matching)1797 2421 y(le)o(gal)k(string)h
+(for)f(a)f(constrained)k(string)d(v)n(alue.)p 3796 2455
+V 101 3133 4 678 v 153 2534 a Fp(SANE)p 378 2534 28 4
+v 30 w(INFO)p 628 2534 V 31 w(RELOAD)p 989 2534 V 30
+w(OPTIONS)p 1444 3133 4 678 v 253 w Fq(2)p 1746 3133
+V 100 w(The)f(setting)j(of)d(an)g(option)j(may)d(af)n(fect)h(the)g(v)n
+(alue)g(or)g(a)n(v)n(ail-)1797 2647 y(ability)29 b(of)f(one)g(or)f
+(more)h Fl(other)j Fq(options.)42 b(When)28 b(this)g(hap-)1797
+2760 y(pens,)37 b(the)c(SANE)e(back)o(end)k(sets)f(this)g(member)f(in)g
+Fp(*i)f Fq(to)1797 2873 y(indicate)26 b(that)e(the)g(application)j
+(should)e(reload)g(all)f(options.)1797 2986 y(This)36
+b(member)f(may)g(be)g(set)h(if)f(and)h(only)g(if)f(at)g(least)h(one)
+1797 3099 y(option)26 b(changed.)p 3796 3133 V 101 3923
+4 791 v 153 3212 a Fp(SANE)p 378 3212 28 4 v 30 w(INFO)p
+628 3212 V 31 w(RELOAD)p 989 3212 V 30 w(PARAMS)p 1444
+3923 4 791 v 308 w Fq(4)p 1746 3923 V 100 w(The)d(setting)h(of)f(an)g
+(option)h(may)e(af)n(fect)i(the)f(parameter)h(v)n(al-)1797
+3325 y(ues)j(\(see)g Fp(sane)p 2341 3325 28 4 v 31 w(get)p
+2537 3325 V 31 w(parameters\(\))p Fq(\).)32 b(If)26 b(setting)i(an)1797
+3437 y(option)g(af)n(fects)g(the)f(parameter)h(v)n(alues,)g(this)f
+(member)f(will)1797 3550 y(be)c(set)f(in)g Fp(*i)p Fq(.)26
+b(Note)21 b(that)h(this)g(member)f(may)g(be)g(set)h(e)n(v)o(en)f(if)
+1797 3663 y(the)j(parameters)g(did)g(not)f(actually)i(change.)30
+b(Ho)n(we)n(v)o(er)l(,)22 b(it)h(is)1797 3776 y(guaranteed)33
+b(that)d(the)f(parameters)j(ne)n(v)o(er)e(change)h(without)1797
+3889 y(this)25 b(member)e(being)i(set.)p 3796 3923 4
+791 v 103 3926 3695 4 v 702 4080 a(T)-7 b(able)24 b(4.8:)29
+b(Additional)c(Information)h(Returned)f(When)f(Setting)h(an)e(Option)
+1905 5381 y(30)p eop
+%%Page: 31 32
+31 31 bop 227 123 a Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e
+(\(SANE_Handle)h(h,)2027 236 y(SANE_Parameters)f(*)54
+b(p\);)0 464 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e(a)
+f(structure)k(of)d(type)g Fp(SANE)p 2314 464 28 4 v 31
+w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0
+577 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910
+498 y
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 910 498 a 910 498 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 910 498 a 227 786 a Fp(typedef)52
+b(struct)336 899 y({)445 1012 y(SANE_Frame)e(format;)445
+1125 y(SANE_Int)h(flags;)445 1238 y(SANE_Int)g(lines;)445
+1350 y(SANE_Int)g(depth;)445 1463 y(SANE_Int)g(pixels_per_line;)445
+1576 y(SANE_Int)g(bytes_per_line;)445 1689 y(SANE_Int)g
+(channels_per_ima)o(ge)o(;)445 1802 y(SANE_String)f(format_desc;)445
+1915 y(SANE_String)g(proposed_filena)o(me)o(;)445 2028
+y(SANE_Int)h(dpi_x;)445 2141 y(SANE_Int)g(dpi_y;)445
+2254 y(char)i(reserved[32];)c(/*)k(32)h(bytes)e(for)i(future)d(use)j
+(*/)336 2367 y(})227 2480 y(SANE_Parameters)o(;)0 2540
+y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0 2540 a 0 2540 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 2540 a 0 2540 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 2540 a 0 2540
+a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 2540 a 0 2540 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 2540 a 148 x Fq(Member)38 b Fp(format)d
+Fq(speci\002es)k(the)f(format)h(of)f(the)g(ne)o(xt)h(frame)f(to)g(be)g
+(returned.)74 b(The)38 b(possible)i(v)n(alues)f(for)f(type)0
+2801 y Fp(SANE)p 225 2801 28 4 v 31 w(Frame)24 b Fq(are)k(described)h
+(in)e(T)-7 b(able)28 b(4.9.)39 b(The)27 b(meaning)i(of)e(these)h(v)n
+(alues)h(is)e(described)i(in)f(more)f(detail)h(in)f(Sec-)0
+2914 y(tion)d(3.2.)0 3005 y
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+ 0 3005 a 0 3005 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 0 3005
+a 217 3008 3466 4 v 215 3121 4 113 v 535 3087 a Fr(Symbol)p
+1144 3121 V 1144 3121 V 368 w(Code)p 1446 3121 V 1446
+3121 V 100 w(SANE)d(standard)p 2159 3121 V 2159 3121
+V 586 w(Description)p 3681 3121 V 217 3124 3466 4 v 217
+3141 V 215 3254 4 113 v 267 3220 a Fp(SANE)p 492 3220
+28 4 v 31 w(FRAME)p 798 3220 V 31 w(GRAY)p 1144 3254
+4 113 v 230 w Fq(0)p 1446 3254 V 318 w(v)o(ersion)k(1)p
+2159 3254 V 240 w(Band)f(co)o(v)o(ering)h(human)f(visual)h(range.)p
+3681 3254 V 215 3367 V 267 3333 a Fp(SANE)p 492 3333
+28 4 v 31 w(FRAME)p 798 3333 V 31 w(RGB)p 1144 3367 4
+113 v 285 w Fq(1)p 1446 3367 V 318 w(v)o(ersion)g(1)p
+2159 3367 V 240 w(Pix)o(el-interlea)n(v)o(ed)i(red/green/blue)h(bands.)
+p 3681 3367 V 215 3480 V 267 3446 a Fp(SANE)p 492 3446
+28 4 v 31 w(FRAME)p 798 3446 V 31 w(RED)p 1144 3480 4
+113 v 285 w Fq(2)p 1446 3480 V 318 w(v)o(ersion)d(1)p
+2159 3480 V 240 w(Red)e(band)i(of)e(a)g(red/green/blue)28
+b(image.)p 3681 3480 V 215 3593 V 267 3559 a Fp(SANE)p
+492 3559 28 4 v 31 w(FRAME)p 798 3559 V 31 w(GREEN)p
+1144 3593 4 113 v 175 w Fq(3)p 1446 3593 V 318 w(v)o(ersion)d(1)p
+2159 3593 V 240 w(Green)f(band)g(of)g(a)f(red/green/blue)28
+b(image.)p 3681 3593 V 215 3705 V 267 3672 a Fp(SANE)p
+492 3672 28 4 v 31 w(FRAME)p 798 3672 V 31 w(BLUE)p 1144
+3705 4 113 v 230 w Fq(4)p 1446 3705 V 318 w(v)o(ersion)d(1)p
+2159 3705 V 240 w(Blue)e(band)i(of)e(a)g(red/green/blue)28
+b(image.)p 3681 3705 V 215 3818 V 267 3784 a Fp(SANE)p
+492 3784 28 4 v 31 w(FRAME)p 798 3784 V 31 w(RAW)p 1144
+3818 4 113 v 285 w Fq(5)p 1446 3818 V 318 w(v)o(ersion)d(2)p
+2159 3818 V 240 w(Arbitrary)g(pix)o(el)f(property)i(transmission.)p
+3681 3818 V 215 3931 V 267 3897 a Fp(SANE)p 492 3897
+28 4 v 31 w(FRAME)p 798 3897 V 31 w(MIME)p 1144 3931
+4 113 v 230 w Fq(6)p 1446 3931 V 318 w(v)o(ersion)f(2)p
+2159 3931 V 240 w(Data)e(described)j(by)e(a)f(mime)g(descriptor)-5
+b(.)p 3681 3931 V 217 3935 3466 4 v 1194 4088 a(T)e(able)23
+b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 2377
+4088 28 4 v 31 w(Frame)p Fq(\))0 4204 y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+ 0 4204 a 0 4204
+a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 0 4204 a 0 4204 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 0 4204 a 247 x Fq(The)e Fp(flags)e
+Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h(which)f(up)g(to)g
+(no)n(w)f(4)h(informational)j(bits)d(are)g(de\002ned,)h(all)f(unused)i
+(bits)0 4564 y(ha)n(v)o(e)g(to)g(be)f(set)h(to)f(0:)136
+4793 y Fk(\017)46 b Fp(SANE)p 452 4793 28 4 v 31 w(PFLAG)p
+758 4793 V 31 w(LAST)p 1009 4793 V 31 w(FRAME)27 b Fq(\(bit)j(0,)i
+(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g(if)g(and)h(only)g(if)f(the)h
+(frame)f(that)h(is)f(currently)227 4906 y(being)23 b(acquired)i(\(or)d
+(the)g(frame)g(that)g(will)g(be)g(acquired)i(ne)o(xt)e(if)g(there)h(is)
+f(no)g(current)h(frame\))g(is)f(the)g(last)g(frame)g(of)227
+5019 y(a)g(multi)h(frame)g(image)g(\(e.g.,)f(the)h(current)h(frame)f
+(is)f(the)h(blue)g(component)i(of)e(a)f(red,)h(green,)g(blue)h
+(image\).)29 b(Note,)227 5132 y(that)24 b(it)g(is)f(possible)j(to)d
+(transmit)i(multiple)g(images)f(in)f(succession.)0 5151
+y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 5151 a 1905 5381
+a Fq(31)p eop
+%%Page: 32 33
+32 32 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fp(SANE)p 452 123 28 4 v 31 w(PFLAG)p 758 123 V 31
+w(MORE)p 1009 123 V 31 w(IMAGES)23 b Fq(\(bit)k(1,)g(bitv)n(alue)i(2\))
+e(is)g(set)g(to)g(1)f(to)h(indicate)i(further)f(pending)h(images.)40
+b(It)26 b(is)227 236 y(permissible)f(to)d(set)g(that)g(v)n(alue)h(to)f
+(1)g(\224in)g(good)h(f)o(aith\224,)g(as)f(it)g(has)g(to)g(be)g
+(determined)i(at)e(a)g(v)o(ery)g(early)h(time,)f(where)227
+349 y(it)32 b(might)f(not)h(be)g(detectable,)k(if)31
+b(there)i(actually)g(are)f(more)f(images)i(to)e(transfer)-5
+b(.)55 b(E.g.)c(you)32 b(will)f(usually)j(not)227 462
+y(kno)n(w)27 b(if)f(the)g(document)j(feeder)e(contains)i(further)f
+(pages)f(when)g(starting)h(to)f(scan)g(the)f(current)i(one.)38
+b(Thus)27 b(you)227 574 y(are)d(allo)n(wed)g(to)g(set)f(that)i(bit)e(b)
+n(ut)h(later)h(f)o(ail)f(at)f Fp(sane)p 1942 574 V 31
+w(start\(\))p Fq(.)136 762 y Fk(\017)46 b Fp(SANE)p 452
+762 V 31 w(PFLAG)p 758 762 V 31 w(NEW)p 954 762 V 31
+w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h(4\))f(is)f(set)h(to)g(1)f(to)
+h(indicate)i(that)e(the)g(current)h(frame)f(comes)g(from)g(a)227
+875 y(ne)n(w)i(physical)i(page.)30 b(This)23 b(bit)h(is)f(of)g
+(informational)k(character)f(only)e(to)f(help)h(frontends)i(to)e(group)
+h(multi-image)227 988 y(scans.)136 1176 y Fk(\017)46
+b Fp(SANE)p 452 1176 V 31 w(PFLAG)p 758 1176 V 31 w(BACKSIDE)16
+b Fq(\(bit)21 b(3,)f(bitv)n(alue)j(8\))d(tells)i(if)e(the)h(current)h
+(image)f(w)o(as)f(acquired)j(from)e(the)f(front)i(\(0\))227
+1288 y(or)27 b(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g
+(sheet.)38 b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n
+(ws)g(to)f(group)227 1401 y(and)e(order)h(multi-image)g(transfers)h(re)
+o(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h
+(\002rst/back)g(\002rst\).)0 1673 y(Note,)e(that)i Fp(flags)20
+b Fq(is)k(compatible)i(to)e(member)f Fp(last)p 1827 1673
+V 31 w(frame)e Fq(of)j Fp(SANE)p 2473 1673 V 31 w(Parameters)18
+b Fq(of)24 b(SANE)d(standard)26 b(v)o(er)n(-)0 1786 y(sion)e(1)f
+(\(same)h(size)g(and)g(only)h(bit)e(0)h(\(bitv)n(alue)h(1\))f(w)o(as)f
+(used)h(with)g(same)f(function\).)0 1957 y(Member)33
+b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h(scan)h(lines)g(the)
+g(frame)f(is)g(comprised)i(of.)57 b(If)33 b(this)h(v)n(alue)g(is)f(-1,)
+i(the)e(num-)0 2070 y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e
+(priori)j(and)e(the)h(frontend)h(should)g(call)f Fp(sane)p
+2572 2070 V 31 w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)
+h(of)0 2183 y Fp(SANE)p 225 2183 V 31 w(STATUS)p 586
+2183 V 30 w(EOF)p Fq(.)h(Note,)38 b(that)d(e)n(v)o(en)h(when)f
+(transferring)k(formats)d(that)g(ha)n(v)o(e)f(this)h(information)i
+(inband,)h(it)c(is)0 2296 y(recommended)23 b(to)e(set)g(that)g(member)l
+(,)h(if)f(a)n(v)n(ailable.)30 b(If)20 b(una)n(v)n(ailable)k(or)d(not)h
+(applicable,)i(set)d(to)f(-1)h(as)g(mentioned)i(abo)o(v)o(e.)0
+2468 y(Member)18 b Fp(bytes)p 605 2468 V 31 w(per)p 801
+2468 V 31 w(line)e Fq(speci\002es)j(the)f(number)h(of)f(bytes)h(that)g
+(comprise)h(one)e(scan)h(line.)27 b(If)18 b Fp(bytes)p
+3493 2468 V 31 w(per)p 3689 2468 V 31 w(line)0 2580 y
+Fq(is)28 b(set)g(to)g(0,)g(which)h(can)f(currently)i(only)f(be)f(the)g
+(case)h(for)f Fp(SANE)p 2150 2580 V 31 w(FRAME)p 2456
+2580 V 30 w(MIME)p Fq(,)d(the)k(frontend)h(shall)f(not)f(assume)h(a)0
+2693 y(constant)e(line)f(length.)36 b(Instead)27 b(it)e(should)i
+(simply)e(try)h(to)f(read)h(until)g Fp(SANE)p 2490 2693
+V 31 w(STATUS)p 2851 2693 V 30 w(EOF)d Fq(with)i(an)h(arbitrary)h
+(block)0 2806 y(length.)0 2978 y(Member)f Fp(depth)c
+Fq(speci\002es)27 b(the)f(number)g(of)g(bits)g(per)g(sample.)35
+b(Note,)26 b(that)g(only)g(0)f(\(for)h(not)g(applicable\),)j(1,)d(and)g
+(n*8)0 3091 y(are)e(allo)n(wed)g(v)n(alues.)30 b(Data)23
+b(with)h(other)g(depths)h(has)f(to)g(be)f(scaled)i(up)f(accordingly)-6
+b(.)0 3262 y(Member)24 b Fp(pixels)p 666 3262 V 30 w(per)p
+861 3262 V 31 w(line)d Fq(speci\002es)k(the)f(number)g(of)g(pix)o(els)g
+(that)g(comprise)h(one)f(scan)g(line.)0 3434 y(Assume)k
+Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j(in)d(the)h(frame,)g(then)
+h(the)e(bit)h(depth)h Fh(d)d Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f
+Fp(depth)p Fq(\))e(and)0 3547 y(the)e(number)i(of)e(pix)o(els)h(per)f
+(line)h Fh(n)e Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h
+Fp(pixels)p 2416 3547 V 30 w(per)p 2611 3547 V 31 w(line)p
+Fq(\))d(are)i(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0
+3660 y(of)g(bytes)i(per)f(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h
+Fp(bytes)p 1675 3660 V 31 w(per)p 1871 3660 V 31 w(line)p
+Fq(\))d(as)j(follo)n(ws:)1214 3926 y Fh(c)i(>)p Fj(=)1445
+3782 y Fb(\()1554 3870 y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p
+Fj(8)p Fk(e)424 b Fq(if)24 b Fh(d)h Fj(=)g(1)1554 3983
+y Fh(B)f Fk(\001)d Fh(n)f Fk(\001)g(d)p Fj(\()p Fh(d)h
+Fj(+)f(7\))p Fh(=)p Fj(8)p Fk(e)85 b Fq(if)24 b Fh(d)h(>)g
+Fj(1)0 4190 y Fq(Note)j(that)g(the)g(number)g(of)g(bytes)g(per)g(line)g
+(can)g(be)g(lar)n(ger)h(than)f(the)g(minimum)g(v)n(alue)g(imposed)h(by)
+f(the)g(right)g(side)g(of)0 4303 y(this)c(equation.)31
+b(A)22 b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f
+(such)i(\223padded\224)h(image)e(formats.)0 4474 y(Member)f
+Fp(channels)p 775 4474 V 29 w(per)p 969 4474 V 31 w(image)d
+Fq(speci\002es)j(the)g(number)h(of)e(channels)j(the)e(image)f(consists)
+j(of.)j(When)23 b(the)g(image)0 4587 y(is)29 b(transmitted)i(in)e(more)
+g(than)g(one)h(frame)f Fp(channels)p 1869 4587 V 29 w(per)p
+2063 4587 V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g
+(frames)h(for)f(this)0 4700 y(image.)0 4872 y(Member)d
+Fp(format)p 668 4872 V 30 w(desc)e Fq(is)h(used)i(for)f(the)h(ne)n(w)e
+(frametypes)j Fp(SANE)p 2310 4872 V 31 w(FRAME)p 2616
+4872 V 30 w(RAW)c Fq(and)j Fp(SANE)p 3212 4872 V 31 w(FRAME)p
+3518 4872 V 30 w(MIME)p Fq(.)c(Its)0 4985 y(meaning)i(dif)n(fers)g
+(between)f(the)g(tw)o(o)f(types:)0 5004 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 5004 a 0
+5004 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 5004 a 0 5004 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 5004 a 1905 5381 a Fq(32)p
+eop
+%%Page: 33 34
+33 33 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fp(SANE)p 452 123 28 4 v 31 w(FRAME)p 758 123 V 31
+w(RAW)p Fq(:)26 b(The)h Fp(format)p 1503 123 V 30 w(desc)e
+Fq(contains)30 b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f
+(an)g(optional)227 236 y(depth)d(information)h(separated)g(by)e(a)f
+(colon\(:\).)227 386 y(A)g(plane)h(is)g(descibed)h(by)f(one)g(channel,)
+h(e.g.)k(\224)p Fp(gray)p Fq(\224)21 b(or)j(\224)p Fp(gray:12)p
+Fq(\224.)227 535 y(Channel)h(interlea)n(v)o(ed)i(data)d(is)g(described)
+i(by)e(a)g(comma)f(separated)k(list)d(of)f(channel)j(descriptions,)h
+(for)d(e)o(xample)227 648 y(\224)p Fp(red,green,blue)p
+Fq(\224)14 b(or)21 b(\224)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p
+Fq(\224,)14 b(the)21 b(channel)h(data)f(is)f(sent)h(in)g(the)f(gi)n(v)o
+(en)h(order)-5 b(.)227 798 y(The)24 b(depth)i(information)h(does)e
+Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f
+(data,)g(it)e(is)g(only)h(an)g(informa-)227 911 y(tion)f(for)g(the)g
+(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f
+(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227
+1061 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p
+Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p
+Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel)
+227 1174 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared)
+j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24
+b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1286 y(description)e(lik)o(e)e
+Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g
+(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h
+(with)227 1399 y(useful)f(colors.)227 1549 y(Note)30
+b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d
+(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227
+1662 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f
+(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27
+b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1775 y(is)e(prefered)i(to)e
+(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d
+(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227
+1888 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d
+(de\002ned)i(in)e(member)h Fp(channels)p 2756 1888 V
+29 w(per)p 2950 1888 V 31 w(image)p Fq(.)136 2074 y Fk(\017)46
+b Fp(SANE)p 452 2074 V 31 w(FRAME)p 758 2074 V 31 w(MIME)p
+Fq(:)27 b(The)i Fp(format)p 1561 2074 V 30 w(desc)e Fq(contains)32
+b(the)e(MIME)e(type/subtype)34 b(*\(;parameter\))e(\002elds)e(as)227
+2187 y(described)35 b(in)d(RFC)e(1521,)k(4.)54 b(The)31
+b(Content-T)-7 b(ype)34 b(header)f(\002eld,)h(without)f(the)f
+(pre\002xing)i(\224Content-T)-7 b(ype:\224.)227 2300
+y(Note,)30 b(that)g(it)f(is)g(discouraged)k(to)c(transfer)i
+(proprietary)h(\002le)d(formats)h(o)o(v)o(er)f(SANE.)d(If)j(at)g(all)g
+(possible,)k(please)227 2413 y(stick)27 b(to)e(the)h(IAN)m(A)e
+(assigned)k(MIME)c(types,)j(and)f(mak)o(e)g(sure)g(the)g(data)h(stream)
+f(is)f(compliant)j(with)d(the)h(corre-)227 2526 y(sponding)32
+b(speci\002cation.)49 b(When)30 b(data)g(is)f(transmitted)j(with)d(the)
+h(frame)g(type)g Fp(SANE)p 3051 2526 V 31 w(FRAME)p 3357
+2526 V 30 w(MIME)d Fq(all)j(data)227 2639 y(has)h(to)f(be)g
+(transmitted)j(within)d(one)h(frame,)h(multiple)f(frames)g(are)f(not)h
+(allo)n(wed)g(\(so)f(the)h(\003ag)e Fp(last)p 3601 2639
+V 31 w(frame)227 2752 y Fq(has)24 b(to)e(be)h(set)g(when)g(using)i
+(this)e(frame)g(type\).)30 b(A)21 b(fully)j(compliant)h(SANE)20
+b(back)o(end)26 b(is)c(required)j(to)e(transmit)h(in)227
+2865 y(either)j(SANE)d(nati)n(v)o(e)i(frametypes,)i(or)e(in)g(a)f(MIME)
+g(type,)i(for)f(which)g(a)f(con)l(v)o(erting)k(meta)d(back)o(end)i(e)o
+(xists)f(and)227 2978 y(is)d(freely)g(a)n(v)n(ailable)i(for)e(all)g
+(platforms.)227 3128 y(Other)j(formats)g(may)g(be)f(transmitted,)k(b)n
+(ut)d(the)g(only)g(thing)h(the)e(a)n(v)o(erage)j(frontend)f(can)f(do)g
+(with)f(them,)h(is)g(sa)n(v)o(e)227 3240 y(them.)44 b(This)29
+b(is)f(not)h(considered)j(a)c(good)h(option,)j(as)c(it)h(does)g(not)g
+(f)o(acilitate)i(transmitting)g(the)e(data)g(to)g(a)f(client)227
+3353 y(application)i(that)d(may)g(be)f(running)j(the)e(frontend.)40
+b(Ho)n(we)n(v)o(er)l(,)27 b(if)g(the)g(data)g(transferred)j(by)c(the)h
+(back)o(end)i(is)e(not)227 3466 y(an)k(image)f(in)g(nature,)k(it)c(w)o
+(ouldn')n(t)i(mak)o(e)e(sense)i(to)e(try)g(con)l(v)o(erting)k(it)c(an)o
+(yw)o(ay)-6 b(,)32 b(so)e(it)h(is)f(acceptable)j(to)d(use)h(a)227
+3579 y(simple)22 b Fp(SANE)p 715 3579 V 31 w(FRAME)p
+1021 3579 V 31 w(MIME)c Fq(transfer)24 b(for)d(that)h(case.)29
+b(But)21 b(e)n(v)o(en)g(then,)h(try)g(to)f(stick)h(to)g(well)f(kno)n
+(wn)g(stuf)n(f)h(with)227 3692 y(freely)j(e)o(xisting)g(standards)h
+(and)e(vie)n(wers)h(as)e(well.)0 3959 y(The)g(member)g
+Fp(proposed)p 929 3959 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e
+(suggest)i(a)e(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o
+(xtension)j(in)0 4072 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g
+(such)h(a)e(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g
+(database.)30 b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0
+4185 y(set)k(the)g(\002eld)f(to)g(\224\224.)0 4355 y(In)e(the)h(case)g
+(of)g(ra)o(w)e(frames,)i Fp(proposed)p 1393 4355 V 29
+w(filename)17 b Fq(is)22 b(e)o(xpected)h(to)e(hold)i(the)e(basename)i
+(for)f(the)g(image,)g(with)f(the)0 4468 y(e)o(xtension)k(determined)g
+(by)f(the)f(sa)n(v)o(e)g(function)j(of)d(the)g(frontend,)i(as)e(the)g
+(frontend)i(can)f(fully)g(understand)i(the)d(data)h(and)0
+4581 y(is)f(thus)i(able)f(to)f(encode)i(it)f(in)f(an)o(y)h(format)g(it)
+f(wishes.)0 4752 y(F)o(or)g(MIME)f(frames)i Fp(proposed)p
+1133 4752 V 29 w(filename)19 b Fq(can)24 b(contain)h(either:)136
+5019 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which)
+g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o
+(xtension.)32 b(This)24 b(could)i(also)227 5132 y(be)e(gotten)h(from)e
+(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e
+(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)0 5151
+y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 0 5151 a 1905 5381
+a Fq(33)p eop
+%%Page: 34 35
+34 34 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o(xtension.)0
+391 y(Note,)31 b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g
+(parse)g(a)f(gi)n(v)o(en)i(MIME)d(type)i(internally)-6
+b(,)34 b(it)29 b(is)g(perfectly)j(permissible)g(to)0
+504 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g(the)g(proposed)i
+(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h(basename,)h(when)
+f(using)g(internal)0 617 y(sa)n(v)o(e)g(algorithms)i(for)d(dif)n
+(ferent)j(formats.)0 787 y(In)34 b(an)o(y)g(case,)k(if)c(the)g
+(frontend)j(mak)o(es)d(use)h(of)f(this)h(\002eld,)h(the)f(frontend)h
+(must)e(mangle)h(this)g(proposal)i(or)d(the)g(\002nal)0
+900 y(\002lename)24 b(it)f(produces)j(with)d(its)h(help)g(to)g(suit)g
+(local)g(\002lesystem)h(restrictions.)0 1071 y(Special)i(care)g(should)
+g(be)f(tak)o(en)i(not)e(to)g(cause)h(security)h(\003a)o(ws)d(this)i(w)o
+(ay)-6 b(.)36 b(F)o(or)25 b(Unix,)i(that)f(means)h(killing)h(out)e(all)
+g(path)0 1184 y(separators)i(\(/\))e([to)g(a)n(v)n(oid)h(to)f(sa)n(v)o
+(e)g(a)o(w)o(ay)g(stuf)n(f)g(in)f(obscure)j(places)f(or)f(create)h
+(critical)g(\002les)e(lik)o(e)i(/etc/hosts.allo)n(w])i(and)0
+1297 y(a)n(v)n(oiding)c(to)c(o)o(v)o(erwrite)i(e)o(xisting)h(\002les.)j
+(\(Creating)d(of)e(leading)h(dot)g(\002les)e(-)g(lik)o(e)i(.rhosts)g(-)
+e(is)h(not)g(an)g(issue)h(here,)f(because)0 1410 y(that')-5
+b(s)25 b(only)f(a)f(proposed)j(\002lename)e(e)o(xtension)i(as)d
+(mentioned)j(abo)o(v)o(e.)0 1580 y(The)i(string)h Fp(proposed)p
+848 1580 28 4 v 30 w(comment)24 b Fq(can)k(be)h(used)g(to)f(transmit)i
+(additional)h(image)d(data,)i(that)f(can)g(be)f(stored)i(in)e(the)0
+1693 y(comment)20 b(areas)h(se)n(v)o(eral)g(\002leformats)g(of)n(fer)-5
+b(.)28 b(It)19 b(can)i(contain)g(an)o(y)f(te)o(xtual)h(information)i
+(the)d(back)o(end)i(wishes)e(to)g(con)l(v)o(e)o(y)0 1806
+y(to)j(the)h(user)l(,)h(lik)o(e)f(date/time)h(of)e(e)o(xposure,)j
+(enganged)f(\002lters,)f(etc.)0 1977 y(The)34 b(members)g
+Fp(dpi)p 711 1977 V 32 w(x,)53 b(dpi)p 1071 1977 V 32
+w(y)33 b Fq(encode)j(the)e(horizontal)j(and)e(v)o(ertical)h
+(resolution.)63 b(Note,)37 b(that)d(multiple-image)0
+2090 y(scans)i(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c
+(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j
+(resolution)g(between)0 2203 y(frames)24 b(of)g(the)f(same)h(image.)0
+2374 y(The)f(member)g Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g
+(bytes)i(\(char\))f(to)f(k)o(eep)h(the)g(size)g(of)f(the)g(struct)h
+(unchanged)j(when)c(future)0 2486 y(e)o(xtensions)j(are)e(done.)30
+b(The)23 b(back)o(end)i(has)f(to)g(set)f(the)h(reserv)o(ed)i(bytes)e
+(to)g(0.)2484 2486 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 2484 2486 a 2484 2486 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 2484 2486
+a 2484 2486 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 2484 2486 a 0 2793 a Fm(4.3.9)99 b Fc(sane)p
+545 2793 30 4 v 35 w(start)0 3025 y Fq(This)23 b(function)j(initiates)g
+(aquisition)g(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i
+(by)c(handle)i Fp(h)p Fq(.)227 3269 y Fp(SANE_Status)50
+b(sane_start)g(\(SANE_Handle)f(h\);)0 3512 y Fq(This)23
+b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h
+(status)g(codes.)227 3756 y Fp(SANE)p 452 3756 28 4 v
+31 w(STATUS)p 813 3756 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22
+b(operation)j(w)o(as)d(cancelled)j(through)f(a)e(call)h(to)g
+Fp(sane)p 3297 3756 V 31 w(cancel)p Fq(.)227 3901 y Fp(SANE)p
+452 3901 V 31 w(STATUS)p 813 3901 V 30 w(DEVICE)p 1173
+3901 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e(b)n(usy)-6
+b(.)30 b(The)23 b(operation)j(should)g(be)d(retried)i(later)-5
+b(.)227 4046 y Fp(SANE)p 452 4046 V 31 w(STATUS)p 813
+4046 V 30 w(JAMMED)p Fr(:)43 b Fq(The)23 b(document)j(feeder)e(is)g
+(jammed.)227 4192 y Fp(SANE)p 452 4192 V 31 w(STATUS)p
+813 4192 V 30 w(NO)p 953 4192 V 32 w(DOCS)p Fr(:)44 b
+Fq(The)23 b(document)i(feeder)g(is)e(out)h(of)g(documents.)227
+4337 y Fp(SANE)p 452 4337 V 31 w(STATUS)p 813 4337 V
+30 w(COVER)p 1118 4337 V 31 w(OPEN)p Fr(:)44 b Fq(The)23
+b(scanner)i(co)o(v)o(er)f(is)f(open.)227 4482 y Fp(SANE)p
+452 4482 V 31 w(STATUS)p 813 4482 V 30 w(IO)p 953 4482
+V 32 w(ERROR)p Fr(:)43 b Fq(An)23 b(error)i(occurred)g(while)f
+(communicating)i(with)e(the)g(de)n(vice.)227 4628 y Fp(SANE)p
+452 4628 V 31 w(STATUS)p 813 4628 V 30 w(NO)p 953 4628
+V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)227 4773 y Fp(SANE)p
+452 4773 V 31 w(STATUS)p 813 4773 V 30 w(INVAL)p Fr(:)44
+b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with)e(the)h(current)h
+(set)f(of)f(options.)34 b(The)24 b(fron-)427 4886 y(tend)19
+b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c(if)g
+Fp(SANE)p 2316 4886 V 31 w(INFO)p 2567 4886 V 31 w(RELOAD)p
+2928 4886 V 30 w(OPTIONS)c Fq(had)19 b(been)427 4999
+y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p 1492
+4999 V 30 w(control)p 1907 4999 V 30 w(option\(\))p Fq(,)20
+b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may)427
+5112 y(ha)n(v)o(e)d(changed.)1905 5381 y(34)p eop
+%%Page: 35 36
+35 35 bop 0 123 a Fm(4.3.10)99 b Fc(sane)p 595 123 30
+4 v 35 w(read)0 356 y Fq(This)19 b(function)j(is)e(used)g(to)g(read)g
+(image)g(data)g(from)g(the)g(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)27 b(Ar)n(gument)20 b Fp(buf)e Fq(is)h(a)g(pointer)0
+469 y(to)27 b(a)g(memory)g(area)h(that)f(is)g(at)g(least)h
+Fp(maxlen)c Fq(bytes)k(long.)41 b(The)26 b(number)i(of)f(bytes)i
+(returned)g(is)e(stored)h(in)f Fp(*len)p Fq(.)37 b(A)0
+582 y(back)o(end)31 b(must)e(set)h(this)f(to)g(zero)h(when)f(a)g
+(status)h(other)g(than)g Fp(SANE)p 2262 582 28 4 v 31
+w(STATUS)p 2623 582 V 30 w(GOOD)c Fq(is)j(returned\).)48
+b(When)29 b(the)h(call)0 695 y(succeeds,)c(the)d(number)i(of)e(bytes)i
+(returned)h(can)d(be)h(an)o(ywhere)h(in)e(the)h(range)h(from)e(0)g(to)h
+Fp(maxlen)c Fq(bytes.)227 941 y Fp(SANE_Status)50 b(sane_read)g
+(\(SANE_Handle)f(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482
+1054 y(SANE_Int)c(maxlen,)g(SANE_Int)g(*)j(len\);)0 1300
+y Fq(F)o(or)28 b(ef)n(\002cienc)o(y)i(reasons,)h(medium)e(to)g(lar)n
+(ge)h(block)g(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f
+(kilobytes\))j(should)g(be)d(used.)46 b(Re-)0 1413 y(turning)29
+b(short)g(reads)g(is)e(allo)n(wed)i(to)e(allo)n(w)h(for)g(small)g(b)n
+(uf)n(fers)h(in)e(the)h(back)o(end.)43 b(If)28 b(this)g(function)i(is)d
+(called)i(when)f(no)0 1526 y(data)c(is)g(a)n(v)n(ailable,)h(one)f(of)g
+(tw)o(o)f(things)i(may)e(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h
+(that)g(is)f(in)g(ef)n(fect)i(for)f(handle)h Fp(h)p Fq(.)114
+1772 y(1.)45 b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e
+(mode)g(\(the)h(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f
+(at)f(least)h(one)g(data)f(byte)h(is)227 1885 y(a)n(v)n(ailable)h(\(or)
+e(until)g(some)g(error)g(occurs\).)114 2073 y(2.)45 b(If)37
+b(the)h(de)n(vice)h(is)e(in)h(non-blocking)j(I/O)c(mode,)k(the)d(call)g
+(returns)h(immediately)g(with)e(status)i Fp(SANE)p 3656
+2073 V 31 w(STA-)227 2186 y(TUS)p 397 2186 V 32 w(GOOD)21
+b Fq(and)j(with)f Fp(*len)e Fq(set)j(to)f(zero.)0 2432
+y(The)g(I/O)g(mode)h(of)f(handle)i Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f
+(call)h(to)f Fp(sane)p 2024 2432 V 31 w(set)p 2220 2432
+V 31 w(io)p 2361 2432 V 32 w(mode\(\))p Fq(.)0 2604 y(This)g(function)j
+(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g
+(codes.)227 2850 y Fp(SANE)p 452 2850 V 31 w(STATUS)p
+813 2850 V 30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d
+(cancelled)j(through)f(a)e(call)h(to)g Fp(sane)p 3297
+2850 V 31 w(cancel)p Fq(.)227 2996 y Fp(SANE)p 452 2996
+V 31 w(STATUS)p 813 2996 V 30 w(EOF)p Fr(:)45 b Fq(No)27
+b(more)i(data)g(is)f(a)n(v)n(ailable)j(for)e(the)g(current)h(frame.)44
+b(If)28 b Fp(sane)p 3199 2996 V 31 w(read)e Fq(sends)427
+3109 y(back)f(an)o(y)e(image)h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g
+(return)g(with)g Fp(SANE)p 2540 3109 V 31 w(STATUS)p
+2901 3109 V 30 w(EOF)p Fq(.)227 3255 y Fp(SANE)p 452
+3255 V 31 w(STATUS)p 813 3255 V 30 w(JAMMED)p Fr(:)43
+b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 3401
+y Fp(SANE)p 452 3401 V 31 w(STATUS)p 813 3401 V 30 w(NO)p
+953 3401 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e
+(out)h(of)g(documents.)227 3547 y Fp(SANE)p 452 3547
+V 31 w(STATUS)p 813 3547 V 30 w(COVER)p 1118 3547 V 31
+w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227
+3694 y Fp(SANE)p 452 3694 V 31 w(STATUS)p 813 3694 V
+30 w(IO)p 953 3694 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.)
+227 3840 y Fp(SANE)p 452 3840 V 31 w(STATUS)p 813 3840
+V 30 w(NO)p 953 3840 V 32 w(MEM)p Fr(:)44 b Fq(An)23
+b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227
+3986 y Fp(SANE)p 452 3986 V 31 w(STATUS)p 813 3986 V
+30 w(ACCESS)p 1173 3986 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30
+b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n
+(\002cient)427 4099 y(or)24 b(in)l(v)n(alid)h(authentication.)0
+4407 y Fm(4.3.11)99 b Fc(sane)p 595 4407 30 4 v 35 w(cancel)0
+4640 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f
+(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g
+(operation)g(of)e(the)0 4753 y(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)227 4999 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);)
+1905 5381 y Fq(35)p eop
+%%Page: 36 37
+36 36 bop 0 123 a Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o
+(y)h(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i
+(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 236
+y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f
+(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j
+(asynchronously)i(\(e.g.,)0 349 y(from)37 b(within)g(a)f(signal)j
+(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f
+(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h
+Fq(imply)0 462 y(that)g(the)f(currently)i(pending)g(operation)h(has)d
+(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e
+(cancellation)i(has)d(been)0 574 y Fl(initiated)p Fq(.)68
+b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d
+(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0
+687 y Fp(SANE)p 225 687 28 4 v 31 w(STATUS)p 586 687
+V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j
+(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0
+800 y(this)i(implies)h(that)f(a)f(frontend)i(must)f Fl(not)i
+Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g(cancelled)i
+(operation)g(has)e(returned.)0 1108 y Fm(4.3.12)99 b
+Fc(sane)p 595 1108 30 4 v 35 w(set)p 810 1108 V 35 w(io)p
+965 1108 V 35 w(mode)0 1341 y Fq(This)21 b(function)j(is)e(used)g(to)f
+(set)h(the)g(I/O)f(mode)h(of)f(handle)i Fp(h)p Fq(.)k(The)21
+b(I/O)g(mode)h(can)g(be)f(either)i(blocking)h(or)d(non-blocking.)0
+1454 y(If)27 b(ar)n(gument)j Fp(m)c Fq(is)i Fp(SANE)p
+850 1454 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g(is)f(set)h(to)g
+(non-blocking)j(mode,)e(otherwise)g(it')-5 b(s)28 b(set)g(to)f
+(blocking)j(mode.)0 1567 y(This)23 b(function)j(can)e(be)g(called)g
+(only)h(after)f(a)f(call)h(to)g Fp(sane)p 1917 1567 V
+30 w(start\(\))c Fq(has)k(been)g(performed.)227 1813
+y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54
+b(SANE_Bool)c(m\);)0 2060 y Fq(By)33 b(def)o(ault,)38
+b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60
+b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0
+2173 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f
+(status)i(v)n(alue)f Fp(SANE)p 2107 2173 V 31 w(STATUS)p
+2468 2173 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39
+b(Blocking)0 2286 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o
+(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i
+Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 2286 V 31 w(FALSE)d
+Fq(is)0 2398 y(guaranteed)e(to)c(complete)i(successfully)-6
+b(.)0 2570 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f
+(the)h(follo)n(wing)h(status)g(codes:)227 2816 y Fp(SANE)p
+452 2816 V 31 w(STATUS)p 813 2816 V 30 w(INVAL)p Fr(:)44
+b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227
+2963 y Fp(SANE)p 452 2963 V 31 w(STATUS)p 813 2963 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(the)f(requested)i(I/O)d(mode.)0 3270 y Fm(4.3.13)99
+b Fc(sane)p 595 3270 30 4 v 35 w(get)p 810 3270 V 35
+w(select)p 1205 3270 V 34 w(fd)0 3503 y Fq(This)25 b(function)j(is)e
+(used)g(to)g(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g
+(for)d(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0
+3616 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h
+(a)f(call)h(to)f Fp(sane)p 1850 3616 28 4 v 31 w(read\(\))d
+Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29
+b(If)21 b(the)h(call)0 3729 y(completes)j(successfully)-6
+b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d
+Fp(*fd)p Fq(.)227 3976 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 4222 y Fq(This)37
+b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g
+Fp(sane)p 2056 4222 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed)
+h(and)f(the)g(returned)0 4335 y(\002le-descriptor)j(is)c(guaranteed)k
+(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h
+(image)f(acquisition)j(\(i.e.,)g(un-)0 4448 y(til)e Fp(sane)p
+339 4448 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 4448
+V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h
+Fp(sane)p 2810 4448 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0
+4561 y Fp(SANE)p 225 4561 V 31 w(STATUS)p 586 4561 V
+30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i
+(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the)
+0 4674 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p
+962 4674 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h
+Fp(SANE)p 2202 4674 V 31 w(STATUS)p 2563 4674 V 30 w(EOF)p
+Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 4786
+y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f
+(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p
+3167 4786 V 31 w(read\(\))p Fq(.)0 4958 y(A)30 b(back)o(end)k(may)e
+(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31
+b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0
+5071 y Fp(SANE)p 225 5071 V 31 w(STATUS)p 586 5071 V
+30 w(UNSUPPORTED)p Fq(.)1905 5381 y(36)p eop
+%%Page: 37 38
+37 37 bop 0 123 a Fq(Note)25 b(that)h(the)g(only)g(operation)i
+(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c(a)g(host)i
+(operating-system)i(dependent)0 236 y(test)23 b(whether)h(the)e
+(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h(test)g(can)g(be)g
+(implemented)h(using)g Fp(select\(\))18 b Fq(or)23 b
+Fp(poll\(\))0 349 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f(other)i
+(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l(,)23
+b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0
+462 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)f
+(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g
+(until)g(a)f(call)g(to)0 574 y Fp(sane)p 225 574 28 4
+v 31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23
+b(man)o(y)f(input)i(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6
+b(,)22 b(support)i(for)f(this)g(operation)i(is)d(strongly)0
+687 y(encouraged)27 b(as)c(it)g(permits)i(an)e(application)k(to)d(do)f
+(other)i(w)o(ork)e(while)h(image)g(acquisition)j(is)c(in)h(progress.)0
+859 y(This)f(function)j(may)d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n
+(wing)h(status)g(codes:)227 1105 y Fp(SANE)p 452 1105
+V 31 w(STATUS)p 813 1105 V 30 w(INVAL)p Fr(:)44 b Fq(No)22
+b(image)i(acquisition)j(is)c(pending.)227 1251 y Fp(SANE)p
+452 1251 V 31 w(STATUS)p 813 1251 V 30 w(UNSUPPORTED)p
+Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g(support)h(this)g
+(operation.)0 1559 y Fm(4.3.14)99 b Fc(sane)p 595 1559
+30 4 v 35 w(strstatus)0 1792 y Fq(This)28 b(function)i(can)f(be)f(used)
+h(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i
+(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 1905
+y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h
+(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f
+(\(full-stop\).)32 b(The)22 b(function)j(is)0 2018 y(guaranteed)k(to)c
+(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g
+(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this)
+g(function)h(is)0 2131 y(performed.)227 2377 y Fp(const)53
+b(SANE_String_Co)o(ns)o(t)48 b(sane_strstatus)h(\(SANE_Status)g
+(status\);)0 2729 y Fn(4.4)119 b(Code)31 b(Flo)o(w)0
+2994 y Fq(The)21 b(code)h(\003o)n(w)d(for)j(the)f(SANE)e(API)g(is)i
+(illustrated)j(in)d(Figure)h(4.1.)28 b(Functions)23 b
+Fp(sane)p 2797 2994 28 4 v 31 w(init\(\))17 b Fq(and)22
+b Fp(sane)p 3547 2994 V 31 w(exit\(\))0 3107 y Fq(initialize)j(and)d(e)
+o(xit)g(the)h(back)o(end,)h(respecti)n(v)o(ely)-6 b(.)31
+b(All)22 b(other)h(calls)g(must)f(be)g(performed)i(after)f
+(initialization)j(and)d(before)0 3220 y(e)o(xiting)i(the)f(back)o(end.)
+0 3392 y(Function)j Fp(sane)p 573 3392 V 31 w(get)p 769
+3392 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h
+(after)g Fp(sane)p 2572 3392 V 31 w(init\(\))c Fq(has)k(been)h(called.)
+36 b(It)26 b(returns)0 3505 y(the)32 b(list)f(of)h(the)f(de)n(vices)i
+(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53
+b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)0
+3618 y(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n(f)h(or)f(a)f
+(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g(dif)n
+(ferent)h(calls.)30 b(It)21 b(should)j(be)0 3731 y(noted)i(that)f(this)
+g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n(w)d(since)h(it)g
+(requires)h(contacting)h(all)e(con\002gured)h(de)n(vices)g(\(some)f(of)
+0 3844 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)36
+b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i(the)f
+(ability)h(for)f(a)f(user)i(to)e(directly)0 3956 y(select)g(a)e
+(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h(to)g(this)g
+(function.)0 4128 y(Once)e(a)g(de)n(vice)h(has)g(been)g(chosen,)h(it)e
+(is)g(opened)i(using)f(a)f(call)g(to)h Fp(sane)p 2352
+4128 V 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)f(can)g(be)f(open)h
+(at)0 4241 y(an)o(y)i(gi)n(v)o(en)h(time.)34 b(A)24 b(SANE)f(back)o
+(end)k(must)f(not)f(impose)h(arti\002cial)h(constraints)h(on)e(ho)n(w)e
+(man)o(y)i(de)n(vices)g(can)g(be)f(open)0 4354 y(at)e(an)o(y)h(gi)n(v)o
+(en)g(time.)0 4526 y(An)f(opened)i(de)n(vice)g(can)f(be)f(setup)i
+(through)g(the)f(corresponding)k(de)n(vice)d(handle)g(using)f
+(functions)j Fp(sane)p 3460 4526 V 30 w(get)p 3655 4526
+V 32 w(opt-)0 4638 y(ion)p 170 4638 V 31 w(descriptor\(\))k
+Fq(and)38 b Fp(sane)p 1280 4638 V 31 w(control)p 1696
+4638 V 29 w(option\(\))p Fq(.)66 b(While)37 b(setting)i(up)e(a)g(de)n
+(vice,)42 b(obtaining)e(option)0 4751 y(descriptors)d(and)e(setting)h
+(and)f(reading)h(of)e(option)i(v)n(alues)g(can)e(be)h(mix)o(ed)f
+(freely)-6 b(.)62 b(It)34 b(is)g(typical)i(for)f(a)f(frontend)i(to)0
+4864 y(read)28 b(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)
+o(ginning)h(and)f(then)g(b)n(uild)g(a)f(dialog)i(\(either)f(graphical)i
+(or)d(a)g(command-line)0 4977 y(oriented)22 b(option)f(list\))f(that)h
+(allo)n(ws)f(to)f(control)j(the)e(a)n(v)n(ailable)i(options.)29
+b(It)20 b(should)h(be)f(noted)h(that)f(the)g(number)h(of)e(options)0
+5090 y(is)24 b(\002x)o(ed)f(for)i(a)e(gi)n(v)o(en)i(handle.)31
+b(Ho)n(we)n(v)o(er)l(,)24 b(as)g(options)i(are)e(set,)g(other)h
+(options)h(may)e(become)g(acti)n(v)o(e)h(or)f(inacti)n(v)o(e.)31
+b(Thus,)1905 5381 y(37)p eop
+%%Page: 38 39
+38 38 bop 536 2582 a @beginspecial 0 @llx 0 @lly 601
+@urx 542 @ury 3060 @rhi @setspecial
+%%BeginDocument: figs/flow.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: flow.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Tue Dec 3 22:09:10 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 601 542
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-161.0 577.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr
+% Polyline
+n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr
+% Polyline
+n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 6600 m
+gs 1 -1 sc (image acquisition) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 3825 m
+gs 1 -1 sc (device setup) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 7515 m
+gs 1 -1 sc (- go back to) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5775 7515 m
+gs 1 -1 sc (sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+7275 7515 m
+gs 1 -1 sc (if more frames desired) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 3300 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 5100 m
+gs 1 -1 sc (- sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 4500 m
+gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 4080 m
+gs 1 -1 sc (sane_control_option\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 3600 m
+gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 5700 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 6900 m
+gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6000 m
+gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6450 m
+gs 1 -1 sc (sane_read\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 8100 m
+gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (- sane_init\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 9300 m
+gs 1 -1 sc (- sane_exit\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+3600 1800 m
+gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 2700 m
+gs 1 -1 sc (- sane_open\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 8700 m
+gs 1 -1 sc (- sane_close\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4800 2175 m
+gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1549 2777 a Fq(Figure)25 b(4.1:)k(Code)23
+b(\003o)n(w)0 3152 y(after)35 b(setting)i(an)e(option,)j(it)d(may)f(be)
+h(necessary)i(to)e(re-read)h(some)f(or)g(all)g(option)h(descriptors.)66
+b(While)35 b(setting)h(up)0 3265 y(the)28 b(de)n(vice,)h(it)e(is)g
+(also)h(admissible)h(to)e(call)h Fp(sane)p 1655 3265
+28 4 v 31 w(get)p 1851 3265 V 31 w(parameters\(\))21
+b Fq(to)28 b(get)f(an)g(estimate)i(of)e(what)g(the)h(image)0
+3378 y(parameters)e(will)d(look)h(lik)o(e)g(once)h(image)f(acquisition)
+i(be)o(gins.)0 3549 y(The)36 b(de)n(vice)h(handle)h(can)e(be)g(put)h
+(in)f(blocking)i(or)e(non-blocking)k(mode)c(by)h(a)e(call)i(to)f
+Fp(sane)p 3186 3549 V 31 w(set)p 3382 3549 V 31 w(io)p
+3523 3549 V 32 w(mode\(\))p Fq(.)0 3661 y(De)n(vices)30
+b(are)f(required)i(to)e(support)i(blocking)g(mode)e(\(which)h(is)e(the)
+i(def)o(ault)g(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0
+3774 y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)
+d(such)h(as)e(UNIX.)0 3945 y(After)g(the)g(de)n(vice)g(is)g(setup)h
+(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f
+(a)f(call)h(to)g Fp(sane)p 3077 3945 V 30 w(start\(\))p
+Fq(.)i(The)d(back-)0 4058 y(end)33 b(calculates)h(the)f(e)o(xact)f
+(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g
+(to)f Fp(sane)p 3023 4058 V 31 w(get)p 3219 4058 V 31
+w(parameters\(\))0 4171 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n
+(alues,)k(rather)c(than)h(estimates.)60 b(Whether)35
+b(the)f(physical)i(image)e(acquisition)i(starts)f(at)f(this)0
+4284 y(point)41 b(or)e(during)i(the)e(\002rst)h(call)f(to)h
+Fp(sane)p 1450 4284 V 31 w(read\(\))35 b Fq(is)40 b(unspeci\002ed)h(by)
+f(the)g(SANE)c(API.)i(If)h(non-blocking)44 b(I/O)0 4396
+y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e(desired,)j(the)
+d(frontend)i(may)e(attempt)h(to)f(call)h Fp(sane)p 2949
+4396 V 31 w(set)p 3145 4396 V 31 w(io)p 3286 4396 V 32
+w(mode\(\))c Fq(and/or)0 4509 y Fp(sane)p 225 4509 V
+31 w(get)p 421 4509 V 31 w(select)p 782 4509 V 30 w(fd\(\))c
+Fq(at)i(this)h(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d
+(f)o(ail)h(if)f(the)h(back)o(end)h(does)g(not)e(support)0
+4622 y(the)h(requested)i(operation.)0 4642 y
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 4642 a
+0 4642 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 4642 a 151 x Fq(Image)k(data)h(is)f(collected)i(by)e
+(repeatedly)j(calling)f Fp(sane)p 1914 4793 28 4 v 30
+w(read\(\))27 b Fq(until)k(this)f(function)i(will)e(return)h(an)f
+(end-of-\002le)0 4906 y(status)40 b(\()p Fp(SANE)p 500
+4906 V 31 w(STATUS)p 861 4906 V 30 w(EOF)p Fq(\).)c(This)i(indicates)j
+(the)e(end)g(of)f(the)h(current)h(frame.)74 b(If)38 b(the)g(frontend)j
+(e)o(xpects)f(ad-)0 5019 y(ditional)e(frames)f(\(e.g.,)h(the)e(indi)n
+(vidual)j(channels)f(of)e(a)g(red/green/blue)k(image)d(or)e(multiple)j
+(images\),)i(it)35 b(can)i(call)0 5132 y Fp(sane)p 225
+5132 V 31 w(start\(\))20 b Fq(again.)31 b(If)24 b(the)h
+Fp(SANE)p 1349 5132 V 31 w(PFLAG)p 1655 5132 V 30 w(LAST)p
+1905 5132 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g Fp(flags)p
+Fq(,)d(the)k(current)h(image)e(is)g(com-)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 0 5151
+a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(38)p
+eop
+%%Page: 39 40
+39 39 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 32 a 91 x Fq(plete.)60
+b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38
+b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 123
+28 4 v 31 w(PFLAG)p 2715 123 V 31 w(MORE)p 2966 123 V
+31 w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 236 y(further)e(calls)e
+(to)g Fp(sane)p 794 236 V 31 w(start\(\))c Fq(can)30
+b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30
+b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 349 y(be)f(set)g(at)f
+(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g
+(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d
+(no)0 462 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.)
+34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set)
+f(this)h(bit,)g(and)g(then)g(later)0 574 y(at)33 b(the)g(actual)h(call)
+f(to)f Fp(sane)p 980 574 V 31 w(start\(\))d Fq(return)34
+b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 574 V 31 w(STATUS)p
+2749 574 V 30 w(NO)p 2889 574 V 31 w(DOCS)p Fq(.)c(Such)j(a)f(sequence)
+j(is)0 687 y(permitted)27 b(to)f(transmit)h(multiple)g(images)g(from)e
+(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j(pages.)36
+b(This)26 b(beha)n(viour)j(should)0 800 y(be)21 b(controlled)i(by)e
+(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n(w)h(single-page)i
+(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0 913
+y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g(all)d
+(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p 2933 913
+V 31 w(PFLAG)p 3239 913 V 31 w(LAST)p 3490 913 V 30 w(FRAME)e
+Fq(on)0 1026 y(and)29 b Fp(SANE)p 384 1026 V 31 w(PFLAG)p
+690 1026 V 31 w(MORE)p 941 1026 V 31 w(IMAGES)c Fq(of)n(f)k(is)f
+(encountered,)34 b(or)28 b(an)h(error)h(other)g(than)f
+Fp(SANE)p 3085 1026 V 31 w(STATUS)p 3446 1026 V 30 w(EOF)e
+Fq(occurs)0 1139 y(in)21 b(a)g(SANE)e(function.)30 b(Note)21
+b(that)h Fp(SANE)p 1342 1139 V 31 w(STATUS)p 1703 1139
+V 30 w(NO)p 1843 1139 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)
+o(ay)f(for)h(the)f(back)o(end)j(to)d(indicate)0 1252
+y(the)j(end)g(of)f(a)g(multiple)i(image)f(scan.)0 1422
+y(A)c(frontend)k(may)d(choose)i(to)e(skip)i(frames)f(\(e.g.)28
+b(because)23 b(it)e(cannot)i(parse)g(them\),)e(which)h(is)f
+(accomplished)k(by)c(simply)0 1535 y(calling)30 b Fp(sane)p
+500 1535 V 31 w(start)25 b Fq(again,)30 b(which)f(will)f(get)h(you)g
+(to)f(the)h(ne)o(xt)f(frame,)i(without)f(ha)n(ving)i(to)d(read)h(and)g
+(discard)h(the)0 1648 y(current)25 b(one.)0 1817 y(In)d(order)h(to)f
+(prematurely)i(stop)f(scanning)h(and)f(to)e(reset)i(the)f(back)o(end)j
+(state,)d Fp(sane)p 2707 1817 V 31 w(cancel\(\))c Fq(can)k(be)g(called)
+h(at)f(an)o(y)0 1930 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d
+(well)h(after)g(normal)g(termination)i(of)e(a)f(multiple)h(image)g
+(scan)h(as)e(described)j(abo)o(v)o(e.)0 2100 y(When)33
+b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e
+(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 2100 V
+31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0
+2213 y(e)o(xiting)e(the)f(application,)37 b(function)d
+Fp(sane)p 1443 2213 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55
+b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0
+2326 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d
+(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0
+2496 y(The)e(follo)n(wing)i(C)d(sample)j(code)f(implements)h(a)e
+(reference)j(loop)e(for)g(acquiring)i(multiple)f(images:)0
+2760 y Fp(SANE_Parameters)48 b(parms;)0 2873 y(SANE_Status)268
+b(status;)0 3099 y(do)0 3212 y({)109 3325 y(do)109 3438
+y({)218 3551 y(/*)54 b(Now)f(start)f(acquiring)f(the)i(next)g(frame.)e
+(*/)218 3664 y(status=sane_sta)o(rt)o(\(ha)o(nd)o(le)o(\);)218
+3890 y(/*)j(if)f(that)g(failed,)f(we)h(have)g(a)h(problem,)d(and)i(no)h
+(more)e(frames)g(can)h(be)273 4002 y(*)h(read)f(at)g(this)g(time.)f
+(Due)h(to)h(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S)49 b(still)273
+4115 y(*)54 b(being)e(clear,)g(this)h(will)f(break)h(out)g(of)g(_BOTH_)
+f(loops.)273 4228 y(*/)218 4341 y(if)i(\(status)d(!=)j(SANE_STATUS_GO)o
+(OD\))48 b(break;)218 4567 y(/*)54 b(Now)f(let)g(us)h(see)f(what)g(the)
+g(next)g(frame)f(brings.)f(*/)218 4680 y(status=sane_get)o(_p)o(ara)o
+(me)o(te)o(rs)o(\(h)o(and)o(le)o(,&)o(pa)o(rm)o(s\);)218
+4906 y(/*)j(This)f(actually)d(should)i(not)h(fail,)g(but)g(maybe)f(the)
+h(doc)h(feeder)273 5019 y(*)g(jammed)e(or)h(something,)d(so)k(we)g
+(break)e(as)h(well,)g(if)g(something)273 5132 y(*)h(is)f(wrong.)0
+5146 y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 0 5146 a 0 5146 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 0 5146 a 0 5146 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 0 5146 a 1905
+5381 a Fq(39)p eop
+%%Page: 40 41
+40 40 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 32 a 273 123 a Fp(*/)218
+236 y(if)54 b(\(status)d(!=)j(SANE_STATUS_GO)o(OD\))48
+b(break;)218 462 y(/*)54 b(Now)f(we)h(check)e(the)h(announced)e
+(parameters,)e(if)54 b(we)f(can)h(make)e(use)273 574
+y(*)i(of)f(the)h(frame)e(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g
+(the)g(next)g(frame.)273 687 y(*/)218 800 y(if)h(\()g(do_i_like_that\()
+o(&p)o(ar)o(ms)o(\))48 b(==)54 b(NO)g(\))g(continue;)218
+1026 y(/*)g(Set)f(up)h(for)f(reading)e(the)i(data)g(here.)f(Mangle)g
+(filenames,)273 1139 y(*)i(allocate)d(memory,)g(rewind)h(multiframe)e
+(files,)i(ask)h(user)273 1252 y(*)h(for)f(confirmation,)c(...)273
+1365 y(*/)218 1478 y(setup_for_trans)o(fe)o(r\(.)o(..)o(\);)218
+1704 y(/*)54 b(Now)f(we)h(read)e(in)i(the)f(frame)f(data)h(and)g
+(process)f(it.)h(This)g(should)273 1817 y(*)h(return)e(SANE_STATUS_GO)o
+(OD)o(,)c(until)53 b(the)g(frame)f(is)i(complete,)273
+1929 y(*)g(what)f(causes)e(SANE_STATUS_EOF)d(to)54 b(be)f(returned.)273
+2042 y(*/)218 2155 y(while\()f(SANE_STATUS_GOO)o(D)c(==)54
+b(\()g(status=sane_rea)o(d\()o(..)o(.\))48 b(\))54 b(\))545
+2268 y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)
+o(\(\))o(;)218 2494 y(/*)g(If)f(transfer)e(was)j(broken)d(due)j(to)f
+(anything)e(but)i(EOF,)g(break)f(out.)h(*/)218 2607 y(if)h(\(status)d
+(!=)j(SANE_STATUS_EO)o(F\))48 b({)436 2720 y(break;)218
+2833 y(})218 3059 y(/*)54 b(Now)f(loop)g(until)f(we)i(have)e(all)i
+(frames)d(of)j(an)g(image.)d(*/)109 3171 y(})j(while\(!\(parms.f)o(la)o
+(g)49 b(&)54 b(SANE_PFLAG_LAS)o(T_)o(FR)o(AME)o(\)\))o(;)0
+3397 y(/*)g(O.K.)e(-)i(we)g(now)f(have)g(a)h(complete)d(image.)h(Fit)h
+(it)h(together,)c(save)j(it,)55 3510 y(*)h(flush)e(buffers,)f(transmit)
+g(it,)i(increment)d(filenames,)g(etc.)55 3623 y(*/)0
+3849 y(/*)k(Now)f(check)f(for)h(more)g(pending)e(images.)h(If)h(we)h
+(have)f(more,)f(redo)h(from)f(start.)55 3962 y(*)i(Some)e(backends)f
+(might)i(cheat)f(here)h(and)g(send)f(us)i(for)f(an)h(extra)e(round)g
+(which)55 4075 y(*)i(will)e(fail)h(at)h(sane_start,)49
+b(as)54 b(they)f(were)f(not)i(able)e(to)i(determine)c(if)k(they)55
+4188 y(*)g(would)e(have)h(more)f(data)h(at)h(the)f(start)f(of)i(the)f
+(last)g(frame)f(we)i(read.)55 4301 y(*/)0 4413 y(})g(while\(parms.fla)o
+(gs)48 b(&)54 b(SANE_PFLAG_MORE)o(_I)o(MA)o(GE)o(S\);)0
+4639 y(/*)g(No)f(more)g(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j
+(go)f(back)g(to)h(option-control)55 4752 y(*)g(loop.)55
+4865 y(*/)0 5091 y(sane_cancel\(han)o(dl)o(e\))o(;)0
+5102 y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 0 5102 a 0 5102 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 0 5102 a 0 5102 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 0 5102 a 1905
+5381 a Fq(40)p eop
+%%Page: 41 42
+41 41 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 32 a 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 0 32 a 0
+32 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 0 32 a 0 32 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 0 32 a 91 x Fn(4.5)119 b(W)-8 b(ell-Kno)o(wn)31
+b(Options)0 369 y Fq(While)g(most)h(back)o(end)h(options)g(are)e
+(completely)i(self-describing,)k(there)32 b(are)g(cases)g(where)f(a)g
+(user)g(interf)o(ace)j(might)0 482 y(w)o(ant)24 b(to)g(special-case)k
+(the)c(handling)j(of)d(certain)i(options.)32 b(F)o(or)24
+b(e)o(xample,)h(the)f(scan)h(area)g(is)f(typically)i(de\002ned)f(by)g
+(four)0 595 y(options)35 b(that)e(specify)h(the)f(top-left)i(and)e
+(bottom-right)j(corners)e(of)f(the)g(area.)57 b(W)l(ith)33
+b(a)f(graphical)j(user)e(interf)o(ace,)k(it)0 708 y(w)o(ould)25
+b(be)g(tedious)i(to)d(force)i(the)f(user)h(to)e(type)i(in)f(these)g
+(four)h(numbers.)34 b(Instead,)26 b(most)f(such)h(interf)o(aces)h(will)
+d(w)o(ant)h(to)0 821 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g
+(\(lo)n(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h
+(or)d(a)h(high\(er\))h(resolution)i(scan)d(of)0 934 y(a)h(subpart)i(of)
+e(the)g(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f
+(scan)h(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0
+1047 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g
+(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n
+(v)o(e)h(well-de\002ned)0 1160 y(meanings.)0 1440 y Fm(4.5.1)99
+b(Option)25 b(Number)h(Count)0 1654 y Fq(Option)e(number)h(0)e(has)h
+(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g
+(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 1654
+28 4 v 30 w(TYPE)p 3556 1654 V 31 w(INT)d Fq(and)0 1767
+y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n
+(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g
+(includes)i(option)e(number)h(0\).)0 1880 y(This)23 b(means)h(that)f
+(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f
+(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o
+(ycle)0 1993 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h
+(until)h Fp(sane)p 1963 1993 V 31 w(get)p 2159 1993 V
+31 w(option)p 2520 1993 V 30 w(descriptor\(\))17 b Fq(returns)25
+b Fp(NULL)p Fq(,)c(or)j(a)0 2105 y(frontend)i(can)e(directly)h(read)f
+(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 2386
+y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 2468
+y
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 2468 a 0 2468 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 2468 a 132 x Fq(Option)33 b Fp(resolution)28
+b Fq(is)k(used)i(to)f(select)g(the)g(resolution)j(at)c(which)i(an)e
+(image)h(should)i(be)d(acquired.)59 b(When)33 b(the)0
+2713 y(back)o(end)25 b(w)o(ants)e(to)f(allo)n(w)g(dif)n(ferent)j(v)n
+(alues)f(for)e(x-)h(and)g(y-resolution)j(it)c(has)h(to)f(de\002ne)h
+(the)g(options)h Fp(x)p 3327 2713 28 4 v 33 w(resolution)0
+2825 y Fq(and)40 b Fp(y)p 230 2825 V 33 w(resolution)p
+Fq(.)72 b(Note)39 b(that)i(only)f(the)g(option)i Fp(resolution)34
+b Fr(or)40 b Fq(the)g(options)i Fp(x)p 3142 2825 V 32
+w(resolution)34 b Fr(and)0 2938 y Fp(y)p 60 2938 V 32
+w(resolution)18 b Fq(may)24 b(be)f(acti)n(v)o(e.)0 3091
+y(The)k(type)h(of)g(this)g(option)h(is)e(either)i Fp(SANE)p
+1417 3091 V 31 w(TYPE)p 1668 3091 V 31 w(INT)c Fq(or)j
+Fp(SANE)p 2212 3091 V 31 w(TYPE)p 2463 3091 V 31 w(FIXED)p
+Fq(.)c(The)j(unit)h(is)g Fp(SANE)p 3460 3091 V 30 w(UNIT)p
+3710 3091 V 31 w(DPI)0 3204 y Fq(\(dots/inch\).)0 3356
+y(This)e(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g
+(back)o(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h
+(a)e(manner)i(consistent)0 3469 y(with)c(the)h(abo)o(v)o(e)g
+(de\002nition.)955 3469 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 955 3469 a 955 3469 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 955 3469
+a 955 3469 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 955 3469 a 0 3749 a Fm(4.5.3)99 b(Pr)n(e)o(view)25
+b(Mode)g(Option)0 3963 y Fq(The)g(boolean)j(option)f
+Fp(preview)22 b Fq(is)j(used)i(by)f(a)f(frontend)j(to)e(inform)g(the)g
+(back)o(end)i(when)e(image)g(acquisition)j(should)0 4076
+y(be)e(optimized)i(for)e(speed,)i(rather)g(than)e(quality)i(\(\223pre)n
+(vie)n(w)f(mode\224\).)41 b(When)27 b(set)g(to)g Fp(SANE)p
+3003 4076 28 4 v 31 w(TRUE)p Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0
+4189 y(in)e(ef)n(fect,)g(when)g(set)g(to)g Fp(SANE)p
+1012 4189 V 31 w(FALSE)d Fq(image)j(acquisition)j(should)f(proceed)f
+(in)f(normal)h(quality)g(mode.)33 b(The)25 b(setting)0
+4302 y(of)c(this)h(option)h Fl(must)f(not)h Fq(af)n(fect)g(an)o(y)e
+(other)i(option.)29 b(That)22 b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h
+(options)g(are)f(concerned,)i(the)e(pre)n(vie)n(w)0 4415
+y(mode)i(is)g(completely)i(side)e(ef)n(fect)h(free.)30
+b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g(frontend)i(will)e
+(tak)o(e)g(care)h(of)e(appropriately)0 4528 y(setting)i(the)e(scan)h
+(resolution)i(for)d(pre)n(vie)n(w)h(mode)f(\(through)j(option)e
+Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e(free)h(to)f(o)o(v)o
+(erride)0 4640 y(the)j Fp(resolution)21 b Fq(v)n(alue)27
+b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h(mode,)f(b)n(ut)g
+(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)g(to)f(the)0
+4753 y(frontend)35 b(where)n(v)o(er)e(possible.)1081
+4674 y
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 1081 4674 a 1081 4674 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 1081 4674 a 79 x Fq(When)f(the)h
+Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f
+(transfer)g(the)f(image)f(in)0 4866 y(frame)24 b(type)g
+Fp(SANE)p 639 4866 28 4 v 31 w(FRAME)p 945 4866 V 30
+w(RAW)e Fq(if)h(possible.)1584 4866 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 1584 4866 a 1584
+4866 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 1584 4866 a 1584 4866 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 1584 4866 a 0 5019 a Fq(This)j(option)i
+(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 5132 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)1905
+5381 y(41)p eop
+%%Page: 42 43
+42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221
+@urx 205 @ury 1836 @rhi @setspecial
+%%BeginDocument: figs/area.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: area.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Wed Dec 4 19:19:37 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 221 205
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-59.0 231.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr
+/Helvetica findfont 180.00 scalefont setfont
+2550 2302 m
+gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+7.500 slw
+% Polyline
+n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3375 3150 m
+gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1500 m
+gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2700 1050 m
+gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1050 3600 m
+gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+4425 525 m
+gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1080 585 m
+gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 1725 1650 m 1725 1800 l gs col-1 s gr
+% Polyline
+n 1650 1725 m 1800 1725 l gs col-1 s gr
+% Polyline
+n 3375 2700 m 3375 2850 l gs col-1 s gr
+% Polyline
+n 3300 2775 m 3450 2775 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23
+b(area)h(options)0 2124 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0
+2351 y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g
+(are)f(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29
+b(The)22 b(scan)i(area)f(is)f(de\002ned)0 2464 y(by)h(tw)o(o)f(points)j
+(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e
+(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0
+2577 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e
+(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e
+(the)h(scan)g(surf)o(ace)h(as)0 2690 y(seen)25 b(by)g(the)g(sensor)h
+(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i
+(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24
+b(this)h(reason,)0 2803 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i
+(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f
+(simultaneously)k(the)c Fl(smallest)0 2916 y Fq(and)f(the)f
+(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h
+(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0
+3029 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f
+(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g
+(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0
+3141 y(necessary)i(con)l(v)o(ersions.)0 3307 y(The)d(names)h(of)g(the)f
+(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o
+(en)g(in)f(the)h(table)h(belo)n(w:)1200 3529 y Fr(Name)100
+b(Description)1200 3642 y Fp(tl-x)107 b Fq(T)-7 b(op-left)24
+b Fh(x)f Fq(coordinate)j(v)n(alue)1200 3755 y Fp(tl-y)107
+b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n(alue)1200
+3868 y Fp(br-x)107 b Fq(Bottom-right)25 b Fh(x)e Fq(coordinate)j(v)n
+(alue)1200 3981 y Fp(br-y)107 b Fq(Bottom-right)25 b
+Fh(y)h Fq(coordinate)g(v)n(alue)0 4200 y(There)e(are)f(se)n(v)o(eral)i
+(rules)f(that)h(should)g(be)e(follo)n(wed)i(by)f(front)g(and)g(back)o
+(ends)i(re)o(garding)f(these)g(options:)136 4428 y Fk(\017)46
+b Fq(Back)o(ends)25 b(must)f(attach)h(a)e(unit)h(of)f(either)i(pix)o
+(els)g(\()p Fp(SANE)p 2091 4428 28 4 v 31 w(UNIT)p 2342
+4428 V 31 w(PIXEL)p Fq(\))20 b(or)k(millimeters)h(\()p
+Fp(SANE)p 3484 4428 V 31 w(UNIT)p 3735 4428 V 31 w(MM)p
+Fq(\))227 4541 y(to)f(these)g(options.)31 b(The)23 b(unit)h(of)g(all)f
+(four)h(options)i(must)d(be)h(identical.)136 4723 y Fk(\017)46
+b Fq(Whene)n(v)o(er)25 b(meaningful,)g(a)f(back)o(end)h(should)g
+(attach)g(a)e(range)i(or)e(a)h(w)o(ord-list)h(constraint)h(to)d(these)i
+(options.)136 4906 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)
+i(the)f(size)g(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j
+(that)d(the)h(options)h(ha)n(v)o(e)f(range)227 5019 y(constraints)i
+(associated.)51 b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i
+(e)o(xist,)f(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227
+5132 y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g
+(y)f(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h
+(surf)o(ace)g(size.)1905 5381 y(42)p eop
+%%Page: 43 44
+43 43 bop 136 123 a Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o(ork)g
+(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i(missing.)
+0 143 y
+ -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch
+pop /CBarY65 exch def
+ 0 143 a 0 143 a
+ 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint
+exch pop /CBarY66 exch def
+ 0 143 a 136 310 a Fk(\017)46
+b Fq(A)21 b(frontend)i(may)f(temporarily)i(set)d(the)h(v)n(alues)h(in)e
+(a)g(w)o(ay)h(that)g Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f
+Fp(br-x)d Fq(and)j Fp(tl-y)d Fq(is)j(lar)n(ger)227 423
+y(than)j Fp(br-y)p Fq(.)676 423 y
+ -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch
+pop /CBarY67 exch def
+ 676 423 a 676 423 a
+ 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint
+exch pop /CBarY68 exch def
+
+676 423 a 676 423 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore
+ 676 423 a 0 731 a Fm(4.5.5)99 b(Depth)26
+b(option)0 813 y
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 813 a 0 813 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 813 a 151 x Fq(Option)20
+b Fp(depth)c Fq(is)j(used)h(to)f(select)h(the)g(image)f(depth)h(in)g
+(bits/sample)h(in)e(multi)g(bit)h(mode)f(-)g(\(this)h(means)f(for)h(24)
+f(bit)g(RGB)0 1077 y(mode)j(this)h(v)n(alue)g(must)f(be)g(8\).)28
+b(The)22 b(type)h(of)f(this)g(option)i(is)e Fp(SANE)p
+2174 1077 28 4 v 31 w(TYPE)p 2425 1077 V 31 w(INT)p Fq(.)d(The)j(unit)h
+(is)f Fp(SANE)p 3291 1077 V 31 w(UNIT)p 3542 1077 V 30
+w(BIT)p Fq(.)e(F)o(or)0 1190 y(1)30 b(bit)h(modes)g(\(Lineart)h(or)e
+(Halftone\))i(this)f(option)h(has)f(to)g(be)f(inacti)n(v)o(e.)52
+b(F)o(or)29 b(selection)k(of)e(1)f(bit)h(modes)g(\(Lineart)g(or)0
+1303 y(Halftone\))25 b(the)f(back)o(end)i(should)f(use)f(the)g
+(well-kno)n(wn)g(option)h Fp(mode)p Fq(.)0 1588 y(This)h(option)i(is)e
+(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 1700 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0
+1813 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 1813 a 0 1813 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 1813 a 0 1813 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 1813 a 308
+x Fm(4.5.6)99 b(Gamma)24 b(table)h(options)0 2203 y
+ -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch
+pop /CBarY73 exch def
+ 0
+2203 a 0 2203 a
+ 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint
+exch pop /CBarY74 exch def
+ 0 2203 a 151 x Fq(The)30 b Fp(gamma-table)24
+b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 2354
+28 4 v 31 w(CONSTRAINT)p 2225 2354 V 29 w(RANGE)d Fq(of)j(the)h(type)g
+Fp(SANE)p 3208 2354 V 31 w(TYPE)p 3459 2354 V 31 w(INT)d
+Fq(which)0 2467 y(represents)22 b(the)d(gamma)g(correction)j(table)e
+(for)g(gray)-6 b(.)28 b(In)19 b(color)h(mode)g(the)f
+Fp(gamma-table)14 b Fq(may)19 b(be)g(used)h(to)f(set)g(a)g(com-)0
+2580 y(mon)f(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28
+b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12
+b Fp(green-gamma-tab)o(le)0 2693 y Fq(and)32 b Fp(blue-gamma-table)24
+b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g
+(correction)k(for)d(each)h(color)g(separately)-6 b(.)0
+2806 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h
+(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f
+Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 2919 y Fp(blue-gamma-tabl)o(e)19
+b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options)
+h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0
+3032 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f
+(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h
+(reduce)g(\(if)0 3145 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g
+(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45
+b(This)29 b(should)h(e.g.)44 b(look)0 3258 y(lik)o(e)24
+b(this:)0 3504 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o
+(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 3617 y(green_value)c(=)k
+(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\))
+o(\))0 3730 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o
+(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 3976 y Fq(The)24
+b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e
+(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h
+(shado)n(w)-6 b(,)0 4089 y(contrast,)24 b(brightness,)i(threshold,)f
+(analog)p 1379 4089 V 35 w(gamma.)j(These)22 b(functions)j(are)e
+(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0
+4202 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0
+4486 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 4599
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4712 y
+ -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch
+pop /CBarY75 exch def
+ 0
+4712 a 0 4712 a
+ 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint
+exch pop /CBarY76 exch def
+ 0 4712 a 0 4712 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore
+ 0 4712 a 1905 5381
+a Fq(43)p eop
+%%Page: 44 45
+44 44 bop 0 123 a Fm(4.5.7)99 b(Scan)26 b(Mode)f(options)0
+204 y
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 204 a 0 204 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 204 a 152 x Fq(The)d(option)i
+Fp(mode)19 b Fq(de\002nes)k(a)f Fp(SANE)p 1222 356 28
+4 v 31 w(CONSTRAINT)p 1803 356 V 28 w(STRING)p 2161 356
+V 30 w(LIST)e Fq(of)i(type)h Fp(SANE)p 2926 356 V 31
+w(TYPE)p 3177 356 V 31 w(STRING)p Fq(.)18 b(It)k(is)g(used)0
+469 y(to)34 b(select)i(the)e(scanmode)i(\(e.g.)61 b(Color)34
+b(or)g(Gray\).)61 b(W)-7 b(ell)34 b(kno)n(wn)h(modes)g(are:)50
+b Fp(Color)p Fq(,)34 b Fp(Gray)p Fq(,)g Fp(Halftone)c
+Fq(and)0 582 y Fp(Lineart)p Fq(.)46 b Fp(Color)27 b Fq(and)k
+Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g(or)f(16)h
+(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 b Fp(Lineart)c
+Fq(are)0 695 y(single)e(bit)f(modes.)0 807 y(This)f(w)o(ay)h(a)f
+(frontend)i(can)f(select)h(e.g)e(the)h(mode)g Fp(Gray)d
+Fq(for)j(scanning)h(a)f(f)o(ax.)0 1092 y(This)i(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+1205 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1318
+y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 1318 a 0 1318 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 1318 a 0 1318 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 1318 a 308 x
+Fm(4.5.8)99 b(Scan)26 b(Sour)n(ce)g(options)0 1707 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+
+0 1707 a 0 1707 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 1707 a 152 x Fq(The)35 b(option)h
+Fp(source)c Fq(is)j(used)h(to)f(select)h(the)g(scan)f(source)i(\(e.g.)
+63 b(Automatic)37 b(Document)f(Feeder\).)64 b(It)35 b(de\002nes)h(a)0
+1972 y Fp(SANE)p 225 1972 28 4 v 31 w(CONSTRAINT)p 806
+1972 V 28 w(STRING)p 1164 1972 V 30 w(LIST)20 b Fq(of)j(type)g
+Fp(SANE)p 1930 1972 V 31 w(TYPE)p 2181 1972 V 31 w(STRING)p
+Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b
+Fp(Flatbed)p Fq(,)0 2085 y Fp(Transparancy)49 b(Adapter)20
+b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0
+2369 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 2482
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 2595 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 0
+2595 a 0 2595 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 0 2595 a 0 2595 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 0 2595 a 308 x Fm(4.5.9)99
+b(Thr)n(eshold)0 2966 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 2966 a 0 2966 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 2966 a 170
+x Fq(The)31 b(option)i Fp(threshold)27 b Fq(is)k(used)i(to)e(de\002ne)h
+(the)g(threshold)i(for)d(Lineart)i(and)f(maybe)g(Halftone)h(mode.)53
+b(In)31 b(multi)0 3249 y(bit)36 b(modes)g(this)g(option)i(should)f(be)f
+(set)g(inacti)n(v)o(e.)67 b(The)35 b(type)h(of)g(this)g(option)i(is)d
+Fp(SANE)p 2975 3249 28 4 v 31 w(TYPE)p 3226 3249 V 31
+w(FIXED)p Fq(.)d(The)k(unit)0 3362 y(is)g Fp(SANE)p 321
+3362 V 31 w(UNIT)p 572 3362 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i
+(range)g(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68
+b(It)36 b(de\002nes)g(the)g(minimum)0 3474 y(intensity)27
+b(to)d(get)g(a)g(white)g(point)i(/)d(full)i(intensity)i(\(image)d(data)
+h(bit)g(=)e(0\).)31 b(The)24 b(back)o(end)i(has)f(to)f(scale)h(the)f(v)
+n(alues)i(in)e(the)0 3587 y(follo)n(wing)h(w)o(ay:)0
+3700 y(A)h(v)n(alue)i(of)g(0.0)f(means)h(all)f(pix)o(els)h(get)g(white)
+g(/full)g(intensity)h(\(all)f(image)g(data)g(bits)g(are)f(0\).)40
+b(A)27 b(v)n(alue)h(of)f(50.0)h(means)0 3813 y(intensities)e(brighter)g
+(than)e(medium)f(gray)h(get)g(white)g(/)e(full)i(intensity)i(\(bit)e
+(0\).)k(A)23 b(v)n(alue)h(of)f(100.0)h(means)g(all)g(pix)o(els)g(get)0
+3926 y(black)g(\(all)f(image)g(data)h(bits)f(are)g(1\).)29
+b(If)22 b(the)i(scanner)g(is)f(not)g(able)h(to)e(co)o(v)o(er)i(the)f
+(full)g(range)h(the)f(back)o(end)i(has)f(to)e(de\002ne)i(a)0
+4039 y(reduced)h(v)n(alue)g(range)f(\(e.g.)29 b(30.)14
+b(.)g(.)g(70)23 b(percent\).)0 4211 y(This)j(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+4324 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 4436
+y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 4436 a 0 4436 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 4436 a 0 4436 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 4436 a 308 x
+Fm(4.5.10)99 b(Analog)24 b(gamma)0 4826 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 4826 a 0
+4826 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 4826 a 151 x Fq(The)37 b(option)i Fp(analog-gamma)31
+b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h
+(analog)h(gamma)e(function)i(of)f(the)0 5090 y(scanner)33
+b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g
+(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31
+b(type)h(of)f(this)h(option)g(is)0 5110 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 5110 a 0
+5110 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 5110 a 0 5110 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 5110 a 1905 5381 a Fq(44)p
+eop
+%%Page: 45 46
+45 45 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 32 a 91 x Fp(SANE)p
+225 123 28 4 v 31 w(TYPE)p 476 123 V 31 w(FIXED)p Fq(.)27
+b(The)k(unit)g(is)g Fp(SANE)p 1486 123 V 30 w(UNIT)p
+1736 123 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g
+(de\002ned)g(by)g(the)g(back)o(end)i(as)0 236 y(supported.)38
+b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37
+b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f
+(correction)k(has)d(no)0 349 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n
+(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29
+b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0
+462 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g
+Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n
+(wed)g(to)g(em-)0 574 y(ulate)29 b(an)e(analog)i(gamma)e(function)j(by)
+e(a)f(digital)i(gamma)e(table.)42 b(The)27 b(back)o(end)j(has)e(to)f
+(disable)j(\(or)d(not)h(de\002ne\))h(this)0 687 y(option)c(when)f(the)g
+(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(gamma)d(function.)0 848 y(When)37 b(analog)i(gamma,)h(highlight)f(and)
+f(shado)n(w)f(functions)j(are)d(a)n(v)n(ailable)j(at)d(the)g(same)g
+(time)g(then)h(the)f(back)o(end)0 961 y(author)32 b(has)g(to)e(care)i
+(about)g(the)f(order)h(in)e(which)i(the)f(functions)i(are)e
+(implemented)i(in)e(the)g(scanner)i(hardw)o(are.)52 b(The)0
+1074 y(SANE)26 b(standard)31 b(e)o(xpects)f(that)f(changing)i(the)e
+(analog)h(gamma)e(v)n(alue)i(has)f(no)f(ef)n(fect)i(on)e(the)h(shado)n
+(w)h(and)f(highlight)0 1187 y(function.)59 b(When)33
+b(the)g(analog)i(gamma)d(function)j(is)e(e)o(x)o(ecuted)i(in)d(the)i
+(scanner)g(hardw)o(are)h(before)f(the)f(shado)n(w)h(and)0
+1299 y(highlight)d(functions)g(then)e(the)g(back)o(end)i(should)f(do)e
+(a)g(compensation.)47 b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g
+(highlight)i(v)n(alues)0 1412 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g
+(corrected)j(with)d(the)h(rele)n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0
+1573 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 1686
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1799 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0
+1799 a 0 1799 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 1799 a 0 1799 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 1799 a 291 x Fm(4.5.11)99
+b(Shado)o(w)0 2154 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 2154 a 0 2154 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 2154 a 158 x
+Fq(The)36 b(option)j Fp(shadow)33 b Fq(is)k(used)g(to)g(de\002ne)g(the)
+g(shado)n(w)h(le)n(v)o(el)f(/)f(black)i(point)g(le)n(v)o(el.)69
+b(The)36 b(type)i(of)f(this)g(option)h(is)0 2425 y Fp(SANE)p
+225 2425 28 4 v 31 w(TYPE)p 476 2425 V 31 w(FIXED)p Fq(.)26
+b(The)k(unit)g(is)g Fp(SANE)p 1482 2425 V 30 w(UNIT)p
+1732 2425 V 31 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i(range)g(should)g(be)
+f(0.0.)14 b(.)g(.)g(100.0)29 b(if)g(pos-)0 2538 y(sible.)47
+b(It)29 b(is)h(used)g(to)f(de\002ne)h(the)g(maximum)f(intensity)j(le)n
+(v)o(el)e(that)g(creates)h(an)e(image)h(data)g(v)n(alue)g(of)g(0)f
+(\(black\).)48 b(The)0 2651 y(back)o(end)26 b(has)e(to)f(scale)i(the)e
+(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0 2764
+y(A)32 b(v)n(alue)i(of)g(0.0)f(means)h(that)g(the)f(sensiti)n(vity)k
+(range)d(is)f(not)h(reduced,)k(only)c(the)f(minimum)h(intensity)h
+(produces)h(an)0 2877 y(image)30 b(data)g(v)n(alue)h(of)e(0)h
+(\(black\).)48 b(A)29 b(v)n(alue)h(of)g(50.0)g(means)g(that)g(that)g(a)
+f(medium)h(intensity)i(and)e(e)n(v)o(erything)i(that)e(is)0
+2990 y(dark)o(er)e(produces)h(an)e(image)g(data)h(v)n(alue)f(of)g(0)f
+(\(black\).)41 b(A)25 b(v)n(alue)j(of)e(100.0)i(means)f(the)g(sensiti)n
+(vity)j(range)e(is)e(reduced)0 3103 y(to)i(0,)g(all)g(image)g(data)g(v)
+n(alues)h(are)f(0)g(\(black\).)43 b(If)28 b(the)g(scanner)h(is)f(not)g
+(able)h(to)e(co)o(v)o(er)h(the)h(full)f(range)h(the)f(back)o(end)i(has)
+0 3215 y(to)25 b(de\002ne)h(a)g(reduced)h(v)n(alue)f(range)h(\(e.g.)35
+b(30.)14 b(.)g(.)g(70)25 b(percent\).)36 b(In)26 b(color)h(mode)e
+(there)i(can)f(be)f(options)j Fp(shadow-red)p Fq(,)0
+3328 y Fp(shadow-green)22 b Fq(and)29 b Fp(shadow-blue)p
+Fq(,)24 b(in)k(this)h(case)h(the)e Fp(shadow)d Fq(function)31
+b(has)e(to)f(be)h(disabled.)46 b(It)28 b(is)g(not)h(al-)0
+3441 y(lo)n(wed)f(to)g(emulate)h(a)f(shado)n(w)h(function)h(by)e(a)g
+(digital)h(gamma)f(table.)43 b(The)27 b(back)o(end)k(has)d(to)g
+(disable)i(\(or)e(not)h(de\002ne\))0 3554 y(this)24 b(option)h(when)f
+(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(shado)n(w)e(function.)0 3715 y(This)i(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3827 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 3940
+y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0 3940 a 0 3940 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 3940 a 0 3940 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 3940 a 292 x
+Fm(4.5.12)99 b(Highlight)0 4314 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 4314 a 0 4314 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0
+4314 a 140 x Fq(The)26 b(option)i Fp(highlight)21 b Fq(is)26
+b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f(white)g
+(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g(is)0
+4567 y Fp(SANE)p 225 4567 28 4 v 31 w(TYPE)p 476 4567
+V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p
+1461 4567 V 31 w(UNIT)p 1712 4567 V 31 w(PERCENT)p Fq(.)d(The)j(v)n
+(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24
+b(if)h(possi-)0 4680 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h
+(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e
+(maximum)h(possible)h(image)f(data)g(v)n(alue)0 4793
+y(\(white/full)c(intensity\).)31 b(The)23 b(back)o(end)j(has)e(to)f
+(scale)i(the)e(v)n(alues)i(in)f(the)f(follo)n(wing)i(w)o(ay:)0
+4906 y(A)e(v)n(alue)i(of)f(0.0)g(means)g(the)h(sensiti)n(vity)i(range)e
+(is)f(reduced)i(to)e(0,)f(all)i(image)f(data)h(ha)n(v)o(e)g(maximum)f
+(v)n(alue)h(\(white)f(/)g(full)0 5019 y(intensity\).)31
+b(A)23 b(v)n(alue)h(of)f(50.0)h(means)g(that)g(a)f(medium)h(intensity)i
+(and)e(e)n(v)o(erything)i(that)e(is)f(brighter)j(produces)f(the)f(max-)
+0 5132 y(imum)f(possible)j(image)e(data)g(v)n(alue)h(\(white)f(/)f
+(full)h(intensity\).)32 b(A)22 b(v)n(alue)j(of)e(100.0)i(means)f(that)g
+(the)g(sensiti)n(vity)j(range)d(is)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 5151 a
+0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(45)p
+eop
+%%Page: 46 47
+46 46 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 32 a 91 x Fq(not)21
+b(reduced,)j(only)d(the)h(maximum)f(intensity)i(produces)h(an)d(image)g
+(data)h(with)f(maximum)g(possible)i(v)n(alue)f(\(white)f(/)g(full)0
+236 y(intensity\).)36 b(If)25 b(the)g(scanner)i(is)e(not)h(able)g(to)f
+(co)o(v)o(er)g(the)h(full)f(range)i(the)e(back)o(end)i(has)f(to)f
+(de\002ne)g(a)g(reduced)i(v)n(alue)f(range)0 349 y(\(e.g.)35
+b(30.)14 b(.)g(.)g(70)25 b(percent\).)38 b(In)25 b(color)i(mode)f
+(there)h(can)f(be)g(options)h Fp(highlight-red)p Fq(,)20
+b Fp(highlight-gree)o(n)f Fq(and)0 462 y Fp(highlight-blue)p
+Fq(,)g(in)26 b(this)h(case)g Fp(highlight)21 b Fq(has)26
+b(to)g(be)g(disabled.)39 b(It)26 b(is)g(not)g(allo)n(wed)h(to)f
+(emulate)h(a)f(highlight)0 574 y(function)h(by)f(a)f(digital)i(gamma)d
+(table.)35 b(The)25 b(back)o(end)j(has)d(to)g(disable)j(\(or)d(not)h
+(de\002ne\))g(this)g(option)g(when)g(the)f(scanner)0
+687 y(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h(highlight)
+g(function.)0 859 y(This)g(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+972 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)0 1085
+y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 1085 a 0 1085 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 1085 a 0 1085 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 1085 a 308 x
+Fm(4.5.13)99 b(T)-9 b(ur)o(n)25 b(lamp)g(on)g(and)h(off)0
+1474 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 1474 a 0 1474 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 1474 a 152 x Fq(The)18 b(option)h
+Fp(lamp-on)14 b Fq(is)k(used)h(to)f(turn)h(the)f(lamp)g(of)g(the)h
+(scanner)h(on.)27 b(The)17 b(type)i(of)f(this)h(option)g(is)f
+Fp(SANE)p 3431 1626 28 4 v 31 w(TYPE)p 3682 1626 V 31
+w(BUTTON)p Fq(.)0 1739 y(The)23 b(unit)h(is)g Fp(SANE)p
+637 1739 V 31 w(UNIT)p 888 1739 V 30 w(NONE)p Fq(.)d(When)j(the)g
+(option)h(is)e(set)h(then)g(the)g(lamp)g(of)f(the)h(scanner)h(is)f
+(turned)h(on.)0 1910 y(The)18 b(option)h Fp(lamp-off)14
+b Fq(is)k(used)h(to)f(turn)g(the)h(lamp)f(of)g(the)g(scanner)i(of)n(f.)
+27 b(The)18 b(type)g(of)g(this)h(option)h(is)e Fp(SANE)p
+3499 1910 V 31 w(TYPE)p 3750 1910 V 30 w(BUTTON)p Fq(.)0
+2023 y(The)23 b(unit)h(is)g Fp(SANE)p 637 2023 V 31 w(UNIT)p
+888 2023 V 30 w(NONE)p Fq(.)d(When)j(the)g(option)h(is)e(set)h(then)g
+(the)g(lamp)g(of)f(the)h(scanner)h(is)f(turned)h(of)n(f.)0
+2195 y(These)h(options)h(are)f(not)g(mandatory)-6 b(,)27
+b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i(them,)d(it)h(must)f
+(implement)i(them)e(in)g(a)g(manner)0 2308 y(consistent)h(with)e(the)g
+(abo)o(v)o(e)g(de\002nition.)0 2421 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0 2421 a 0 2421
+a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 2421 a 0 2421 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 2421 a 308 x Fm(4.5.14)99 b(Scanner)26
+b(b)n(uttons)0 2792 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 2792 a 0 2792 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 2792 a 169
+x Fq(Some)31 b(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)e(state)h
+(can)f(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5
+b(.)54 b(It)31 b(is)h(necessary)i(to)e(implement)0 3074
+y(a)f(locking)i(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g
+(possible)i(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to)
+d(the)g(same)0 3187 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f
+(time.)50 b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h
+(w)o(ould)f(be)g(implemented:)0 3300 y(Fi)n(v)o(e)25
+b(people)i(ha)n(v)o(e)f(started)h(a)e(scanning)j(application)g(which)e
+(is)g(connected)i(via)e(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o
+(ant)f(to)0 3413 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i
+(put)e(a)f(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n
+(utton)j(on)d(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0
+3526 y(does)30 b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g
+(ask)o(ed)g(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n
+(utton\).)47 b(F)o(or)0 3639 y(three)24 b(people)i(the)d(image)h(is)g
+(sa)n(v)o(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g
+(that)g(your)g(frontend)i(did)e(scan)g(the)g(image.)0
+3923 y(A)e(back)o(end)k(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e
+(scanner)n(-b)n(uttons)29 b(has)24 b(to)f(implement)i(the)e(follo)n
+(wing)i(options:)0 4036 y Fp(scanner-buttons)o(-l)o(oc)o(k)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 1700 4036 28 4 v 31
+w(TYPE)p 1951 4036 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25
+b(=)e Fp(SANE)p 2813 4036 V 31 w(FALSE)0 4149 y(scanner-buttons)o(-s)o
+(ta)o(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809
+4149 V 31 w(TYPE)p 2060 4149 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0
+4262 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 4262 V 31 w(TYPE)p
+2442 4262 V 30 w(BUTTON)0 4375 y Fq(When)18 b(setting)i(these)f
+(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p
+2091 4375 V 31 w(INFO)p 2342 4375 V 31 w(RELOAD)p 2703
+4375 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 4375 V 31
+w(INFO)p 3696 4375 V 31 w(RELOAD)p 4057 4375 V 30 w(PARAMS)0
+4488 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 4660
+y(A)34 b(frontend)k(has)e(to)f(disable)j(the)d(usage)i(of)e(the)h
+(scanner)n(-b)n(uttons)41 b(by)36 b(def)o(ault.)66 b(This)35
+b(is)h(important)h(because)g(other)0 4773 y(frontends)26
+b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g
+(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25
+b(important)g(thing)0 4885 y(is)f(that)h(some)f(scanners)i(do)f(not)f
+(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g
+(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0
+4998 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g
+(scanner\).)0 5018 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 0 5018 a 0 5018 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 0 5018 a 0 5018
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 0 5018 a 1905 5381 a Fq(46)p eop
+%%Page: 47 48
+47 47 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fq(A)31 b(frontend)j(that)e(w)o(ants)g(to)g(read)h(the)f(b)n(utton)h
+(status)g(has)f(to)g(lock)h(the)f(b)n(utton)h(functions)h(at)e
+(\002rst.)53 b(F)o(or)31 b(this)h(it)227 236 y(does)d(set)g(the)f
+(option)i Fp(scanner-buttons)o(-lo)o(ck)21 b Fq(to)28
+b Fp(SANE)p 2390 236 28 4 v 31 w(TRUE)p Fq(.)d(While)k(setting)h(the)e
+(v)n(alue)h(of)g(option)227 349 y Fp(scanner-buttons)o(-lo)o(ck)20
+b Fq(to)27 b Fp(SANE)p 1667 349 V 31 w(TRUE)e Fq(the)j(back)o(end)i
+(does)e(check)h(if)e(a)g(lock\002le)h(\(e.g.)41 b(\224back)o(end\224-)
+227 462 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45
+b(The)28 b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j
+(where)e(e)n(v)o(ery)g(user)g(has)g(read)h(and)227 574
+y(write)24 b(access)h(to.)336 787 y Fr(\226)46 b Fq(If)20
+b(the)h(lock\002le)g(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j
+(creates)f(the)e(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d
+(\(PID\))427 900 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27
+b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f
+(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 1013 y
+Fq(is)k(set)f(to)h Fp(SANE)p 953 1013 V 31 w(TRUE)336
+1159 y Fr(\226)46 b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h
+(the)f(back)o(end)h(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g
+(back)o(end)i(has)e(to)g(check)g(if)427 1272 y(the)f(process)i(with)d
+(the)h(PID)f(stored)i(in)e(the)h(lock\002le)h(still)f(is)g(running.)46
+b(If)28 b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427
+1385 y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j
+Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g
+Fp(SANE)p 3340 1385 V 31 w(FALSE)p Fq(.)c(If)k(not)427
+1498 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of)
+h(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g
+(access)427 1611 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e
+(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23
+b(set)h(to)g Fp(SANE)p 3194 1611 V 30 w(TRUE)136 1823
+y Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i
+(of)e(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37
+b(If)28 b(it)g(is)h Fp(SANE)p 3472 1823 V 31 w(TRUE)c
+Fq(then)227 1936 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h
+(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 1936
+V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136
+2124 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n
+(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f
+(once)g(per)g(second)g(\(while)g(not)227 2237 y(scanning\):)336
+2424 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h
+Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o
+Fq(.)35 b(The)27 b(back)o(end)j(checks)427 2537 y(if)37
+b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i
+(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427
+2650 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h
+(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option)
+427 2763 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20
+b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f
+(means)g(the)h(b)n(utton)h(is)427 2876 y(not)23 b(pressed,)h(a)d(v)n
+(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30
+b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427
+2989 y(must)27 b(not)h(w)o(ait,)f(it)g(has)g(to)g(return)i(immedeatly)f
+(and)g(the)f(b)n(utton)i(state)f(k)o(eeps)g(unchanged.)42
+b(The)27 b(back)o(end)427 3102 y(has)c(to)f(implement)h(a)f(timeout)h
+(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h
+(within)f(a)e(prede\002ned)j(time)427 3215 y(\(e.g.)50
+b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50
+b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427
+3328 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b
+Fp(SANE)p 1862 3328 V 31 w(FALSE)d Fq(and)j(does)h(set)f
+Fp(SANE)p 2881 3328 V 31 w(INFO)p 3132 3328 V 31 w(RELOAD)p
+3493 3328 V 30 w(OPTIONS)427 3440 y Fq(to)20 b(inform)g(the)g(frontend)
+i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n
+(-b)n(utton)k(functions.)30 b(If)20 b(access)427 3553
+y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o
+(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 3699 y Fr(\226)46
+b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i
+Fp(scanner-buttons-)o(st)o(at)o(us)136 3887 y Fk(\017)46
+b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g
+(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g
+Fp(scanner-buttons-)o(lo)o(ck)227 4000 y Fq(to)34 b Fp(SANE)p
+556 4000 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g
+(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f
+(same.)227 4113 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es)
+g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g
+Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 4226 y Fp(SANE)p
+452 4226 V 31 w(FALSE)p Fq(.)227 4376 y Fp(sane)p 452
+4376 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g
+(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11
+b Fq(to)18 b Fp(SANE)p 3601 4376 V 31 w(FALSE)p Fq(.)0
+4495 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 0 4495 a 0 4495 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 0 4495 a 0 4495 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 0 4495 a 1905
+5381 a Fq(47)p eop
+%%Page: 48 49
+48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51
+b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g
+(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h
+(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895
+y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e
+(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f
+(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h
+(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e
+(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h
+(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367
+y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e
+(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5
+b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480
+y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g
+(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i
+(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h
+(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g
+(access)g(to)g(the)g(system.)227 2743 y(Controlling)34
+b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e)
+n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227
+2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges)
+i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i
+(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36
+b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d
+(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47
+b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n
+(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227
+3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i
+(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g
+(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that)
+g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f
+(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g
+(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i
+(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24
+b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n
+(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22
+b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l
+(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f
+(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834
+y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h
+(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h
+(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19
+b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e
+(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws)
+227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices)
+h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44
+b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24
+b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g
+(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i
+(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g
+(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740
+y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i
+(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114
+4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client)
+h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o
+(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p
+eop
+%%Page: 49 50
+49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f
+(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e
+(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i
+(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45
+b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h
+(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227
+536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k
+(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o
+(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0
+896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h
+(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h
+(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0
+1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0
+1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7
+b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g
+(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0
+2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44
+b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28
+b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h
+(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n
+(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44
+b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30
+b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c
+(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).)
+0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29
+b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10
+b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227
+2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g
+(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h
+(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43
+b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g
+Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37
+b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227
+3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e
+Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6
+b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43
+b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40
+b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f
+(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g
+(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d
+(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227
+3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o
+(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues)
+g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f
+(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g
+(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47
+b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0
+4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378
+y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C)
+e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e
+(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737
+y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w)
+o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g
+(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28
+b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g
+(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f
+(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h
+(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop
+%%Page: 50 51
+50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded)
+j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g
+(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227
+236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29
+b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f
+(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0
+525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by)
+e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g
+(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j
+(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b
+Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e
+(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i
+(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30
+b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j
+(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g
+(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25
+b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e
+(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f
+(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g
+(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of)
+d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518
+y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h
+(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h
+(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h
+(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g
+(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\))
+f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h
+(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back)
+o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0
+2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p
+545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838
+y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e
+(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20
+b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0
+2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g
+(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g
+(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744
+3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p
+1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52
+b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p
+1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52
+b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32
+b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35
+b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36
+b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687
+y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39
+b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i
+(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v)
+o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h
+(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0
+3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f
+(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e
+(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o
+(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g
+(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31
+w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h
+(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59
+b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26
+b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e
+Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h
+(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n
+(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o
+(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5
+b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o
+(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0
+4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g
+(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748
+y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28
+b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw)
+o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g
+(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n
+(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p
+0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19
+b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak)
+g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5
+b(.)1905 5381 y Fq(50)p eop
+%%Page: 51 52
+51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0
+356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f
+(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055
+596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196
+b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822
+y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822
+V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h
+(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6
+b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344
+V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has)
+g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p
+2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0
+1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f
+Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765
+y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p
+760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open)
+i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760
+2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p
+985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V
+30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071
+2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577
+y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y
+Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k
+(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0
+2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099
+V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has)
+e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d
+Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23
+b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31
+b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j
+(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p
+Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g
+(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0
+3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g
+(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0
+3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p
+760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077
+4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p
+1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252
+4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d
+Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h
+(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905
+5381 y(51)p eop
+%%Page: 52 53
+52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p
+1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h
+(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706
+705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97
+b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28
+w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h
+(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29
+b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h
+(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50
+b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n
+(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)
+o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445
+1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336
+1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30
+4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V
+34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i
+(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i
+(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694
+y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p
+1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187
+2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040
+2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31
+w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294
+b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033
+V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p
+1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52
+b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040
+3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52
+b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371
+V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e
+Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f
+(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23
+b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)
+g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34
+b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40
+b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75
+b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c
+Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945
+y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080
+3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p
+1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h
+Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p
+Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V
+31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058
+V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28
+b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g
+(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f
+(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n
+(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c
+Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31
+b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h
+Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32
+b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v)
+o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37
+b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g
+(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f
+(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o
+(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622
+y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24
+b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g
+(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call)
+0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p
+Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)
+h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f
+(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26
+b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36
+b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f
+Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p
+Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h
+(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p
+eop
+%%Page: 53 54
+53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on)
+d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i
+(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0
+236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f
+(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946
+236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V
+31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h
+(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28
+b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462
+y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply)
+i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i
+(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28
+b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that)
+f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0
+687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545
+995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V
+35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886
+1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p
+1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061
+1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061
+1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b
+Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e
+(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0
+2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40
+b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g
+(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j
+Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g
+(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750
+30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).)
+940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y
+Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p
+2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p
+2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116
+3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891
+3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913
+y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g
+(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h
+(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23
+b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19
+b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e
+(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33
+b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g
+(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section)
+g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d
+(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31
+b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0
+4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073
+4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28
+b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n
+(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27
+b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data)
+g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0
+4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g
+(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5
+b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g
+(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50
+b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.)
+0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence)
+j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted)
+j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j
+(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f
+(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905
+5381 y(53)p eop
+%%Page: 54 55
+54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25
+b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g
+(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31
+w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j
+(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f
+(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0
+349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g
+(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i
+(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18
+b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g
+(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35
+b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36
+b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33
+b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742
+y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g
+(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j
+(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i
+(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o
+(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0
+968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31
+b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6
+b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v)
+o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i
+(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0
+1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j
+(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i
+(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h
+(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609
+30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f
+(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635
+b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30
+w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53
+b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f
+(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0
+2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p
+810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h
+(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854
+b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31
+w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53
+b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967
+3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006
+y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g
+(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31
+b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string)
+h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24
+b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j
+(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17
+b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j
+(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0
+4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512
+y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o
+(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n
+(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g
+(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo)
+n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0
+4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g
+(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i
+(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22
+b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e
+(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0
+5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905
+5381 y(54)p eop
+%%Page: 55 56
+55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b
+Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20
+b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30
+b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f
+(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j
+(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0
+349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26
+b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f
+(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f
+(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31
+w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p
+Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v
+35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g
+(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5
+b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i
+(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h
+(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o
+(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y
+Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e
+Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop
+%%Page: 56 57
+56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51
+b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28
+b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.)
+35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0
+1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g
+(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h
+(address.)227 2141 y Fp(majordomo@mosta)o(ng.)o(co)o(m)0
+2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)g(the)h
+(body)h(\223)p Fp(subscribe)51 b(sane-devel)p Fq(\224)18
+b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559 y(A)e(complete)j(list)e
+(of)g(commands)i(supported)h(can)d(be)h(obtained)h(by)e(sending)j(a)c
+(mail)i(with)f(a)f(subject)j(of)e(\223)p Fp(help)p Fq(\224)f(to)h(the)0
+2672 y(abo)o(v)o(e)g(address.)31 b(The)23 b(mailing)h(list)g(is)g
+(archi)n(v)o(ed)h(and)f(a)n(v)n(ailable)h(through)h(the)e(SANE)d(home)j
+(page)g(at)f(URL:)227 2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o
+(an)o(e/)1905 5381 y Fq(56)p eop
+%%Page: 57 58
+57 57 bop 0 586 a Fs(Index)0 1012 y Fq(analog)25 b(gamma)e(option,)i
+(44)0 1125 y(array)-6 b(,)24 b(50)0 1321 y(bit)g(depth)g(option,)h(43)0
+1434 y(br)n(-x,)f(42)0 1547 y(br)n(-y)-6 b(,)24 b(42)0
+1742 y(code)g(\003o)n(w)-6 b(,)22 b(37)0 1938 y(de)n(vice-name,)k(18)0
+2051 y(domain,)e(26)0 2247 y(enumeration)i(types,)f(49)0
+2443 y(gamma)e(table)h(options,)i(43)0 2639 y(hightlight)g(options,)g
+(45)0 2835 y(image)e(data)g(format,)g(10)0 3031 y(lamp-of)n(f)h
+(option,)f(46)0 3144 y(lamp-on)h(option,)g(46)0 3340
+y(mailing)g(list,)e(56)0 3453 y(mode)h(options,)h(44)0
+3649 y(netw)o(ork)g(authorization,)i(54)0 3762 y(NUL,)21
+b(16)0 3957 y(option)k(count,)g(41)0 4070 y(Option)p
+256 4070 28 4 v 34 w(Descriptor)p 671 4070 V 36 w(Array)-6
+b(,)23 b(52)0 4266 y(passw)o(ord,)i(26)0 4379 y(pointer)l(,)g(49)0
+4492 y(pre)n(vie)n(w)f(mode,)f(41)0 4688 y(resolution)j(option,)f(41)0
+4884 y(SANE)p 244 4884 V 31 w(Action,)f(29)0 4997 y(SANE)p
+244 4997 V 31 w(A)l(CTION)p 616 4997 V 32 w(GET)p 826
+4997 V 31 w(V)-12 b(ALUE,)20 b(29)0 5110 y(SANE)p 244
+5110 V 31 w(A)l(CTION)p 616 5110 V 32 w(SET)p 811 5110
+V 31 w(A)-5 b(UT)n(O,)21 b(29)2095 1012 y(SANE)p 2339
+1012 V 31 w(A)l(CTION)p 2711 1012 V 32 w(SET)p 2906 1012
+V 31 w(V)-12 b(ALUE,)20 b(29)2095 1125 y(SANE)p 2339
+1125 V 31 w(Authorization)p 2871 1125 V 37 w(Callback,)25
+b(26)2095 1238 y(SANE)p 2339 1238 V 31 w(Bool,)f(15)2095
+1351 y(SANE)p 2339 1351 V 31 w(Byte,)g(14,)f(49)2095
+1463 y(sane)p 2260 1463 V 35 w(cancel,)h(35)2095 1576
+y(SANE)p 2339 1576 V 31 w(CAP)p 2548 1576 V 32 w(AD)l(V)-12
+b(ANCED,)19 b(23)2095 1689 y(SANE)p 2339 1689 V 31 w(CAP)p
+2548 1689 V 32 w(A)-5 b(UT)n(OMA)-10 b(TIC,)20 b(23)2095
+1802 y(SANE)p 2339 1802 V 31 w(CAP)p 2548 1802 V 32 w(EMULA)-10
+b(TED,)19 b(23)2095 1915 y(SANE)p 2339 1915 V 31 w(CAP)p
+2548 1915 V 32 w(HARD)p 2839 1915 V 31 w(SELECT)-7 b(,)20
+b(23)2095 2028 y(SANE)p 2339 2028 V 31 w(CAP)p 2548 2028
+V 32 w(IN)m(A)l(CTIVE,)h(23)2095 2141 y(SANE)p 2339 2141
+V 31 w(CAP)p 2548 2141 V 32 w(SOFT)p 2804 2141 V 31 w(DETECT)-7
+b(,)20 b(23)2095 2254 y(SANE)p 2339 2254 V 31 w(CAP)p
+2548 2254 V 32 w(SOFT)p 2804 2254 V 31 w(SELECT)-7 b(,)20
+b(23)2095 2367 y(SANE)p 2339 2367 V 31 w(Char)l(,)k(16,)f(49)2095
+2480 y(sane)p 2260 2480 V 35 w(close,)h(28)2095 2593
+y(SANE)p 2339 2593 V 31 w(CONSTRAINT)p 2949 2593 V 30
+w(NONE,)d(24)2095 2705 y(SANE)p 2339 2705 V 31 w(CONSTRAINT)p
+2949 2705 V 30 w(RANGE,)f(24)2095 2818 y(SANE)p 2339
+2818 V 31 w(CONSTRAINT)p 2949 2818 V 30 w(STRING)p 3309
+2818 V 31 w(LIST)-7 b(,)21 b(24)2095 2931 y(SANE)p 2339
+2931 V 31 w(Constraint)p 2746 2931 V 36 w(T)-7 b(ype,)23
+b(22)2095 3044 y(SANE)p 2339 3044 V 31 w(CONSTRAINT)p
+2949 3044 V 30 w(W)o(ORD)p 3257 3044 V 31 w(LIST)-7 b(,)22
+b(24)2095 3157 y(sane)p 2260 3157 V 35 w(control)p 2550
+3157 V 35 w(option,)j(29)2095 3270 y(SANE)p 2339 3270
+V 31 w(CURRENT)p 2797 3270 V 30 w(MAJOR,)d(13)2095 3383
+y(SANE)p 2339 3383 V 31 w(De)n(vice,)i(17)2095 3496 y(sane)p
+2260 3496 V 35 w(e)o(xit,)f(27)2095 3609 y(SANE)p 2339
+3609 V 31 w(F)-7 b(ALSE,)21 b(15)2095 3722 y(SANE)p 2339
+3722 V 31 w(FIX,)h(16)2095 3835 y(SANE)p 2339 3835 V
+31 w(Fix)o(ed,)i(15)2095 3948 y(SANE)p 2339 3948 V 31
+w(FIXED)p 2639 3948 V 32 w(SCALE)p 2961 3948 V 30 w(SHIFT)-7
+b(,)22 b(15)2095 4060 y(SANE)p 2339 4060 V 31 w(Frame,)h(31)2095
+4173 y(SANE)p 2339 4173 V 31 w(FRAME)p 2685 4173 V 31
+w(BLUE,)e(10,)i(31)2095 4286 y(SANE)p 2339 4286 V 31
+w(FRAME)p 2685 4286 V 31 w(GRA)-10 b(Y)e(,)22 b(10,)h(31)2095
+4399 y(SANE)p 2339 4399 V 31 w(FRAME)p 2685 4399 V 31
+w(GREEN,)e(10,)i(31)2095 4512 y(SANE)p 2339 4512 V 31
+w(FRAME)p 2685 4512 V 31 w(MIME,)f(10,)i(12,)f(31)2095
+4625 y(SANE)p 2339 4625 V 31 w(FRAME)p 2685 4625 V 31
+w(RA)-8 b(W)g(,)21 b(10,)j(31)2095 4738 y(SANE)p 2339
+4738 V 31 w(FRAME)p 2685 4738 V 31 w(RED,)e(10,)h(31)2095
+4851 y(SANE)p 2339 4851 V 31 w(FRAME)p 2685 4851 V 31
+w(RGB,)f(10,)h(31)2095 4964 y(sane)p 2260 4964 V 35 w(get)p
+2405 4964 V 33 w(de)n(vices,)i(27)2095 5077 y(sane)p
+2260 5077 V 35 w(get)p 2405 5077 V 33 w(option)p 2668
+5077 V 35 w(descriptor)l(,)i(28)1905 5381 y(57)p eop
+%%Page: 58 59
+58 58 bop 0 123 a Fq(sane)p 165 123 28 4 v 34 w(get)p
+309 123 V 34 w(parameters,)25 b(31)0 236 y(sane)p 165
+236 V 34 w(get)p 309 236 V 34 w(select)p 548 236 V 35
+w(fd,)e(36)0 349 y(SANE)p 244 349 V 31 w(Handle,)h(17,)f(49)0
+462 y(SANE)p 244 462 V 31 w(INFO)p 488 462 V 32 w(INEXA)l(CT)-7
+b(,)21 b(30)0 574 y(SANE)p 244 574 V 31 w(INFO)p 488
+574 V 32 w(RELO)m(AD)p 888 574 V 30 w(OPTIONS,)f(30,)k(34)0
+687 y(SANE)p 244 687 V 31 w(INFO)p 488 687 V 32 w(RELO)m(AD)p
+888 687 V 30 w(P)-8 b(ARAMS,)20 b(30)0 800 y(sane)p 165
+800 V 34 w(init,)k(26)0 913 y(SANE)p 244 913 V 31 w(Int,)g(15)0
+1026 y(SANE)p 244 1026 V 31 w(NET)p 453 1026 V 32 w(A)-5
+b(UTHORIZE,)19 b(54)0 1139 y(SANE)p 244 1139 V 31 w(NET)p
+453 1139 V 32 w(CANCEL,)h(54)0 1252 y(SANE)p 244 1252
+V 31 w(NET)p 453 1252 V 32 w(CLOSE,)g(51)0 1365 y(SANE)p
+244 1365 V 31 w(NET)p 453 1365 V 32 w(CONTR)l(OL)p 913
+1365 V 30 w(OPTION,)h(52)0 1478 y(SANE)p 244 1478 V 31
+w(NET)p 453 1478 V 32 w(EXIT)-7 b(,)21 b(55)0 1591 y(SANE)p
+244 1591 V 31 w(NET)p 453 1591 V 32 w(GET)p 663 1591
+V 31 w(DEVICES,)f(51)0 1704 y(SANE)p 244 1704 V 31 w(NET)p
+453 1704 V 32 w(GET)p 663 1704 V 31 w(OPTION)p 1029 1704
+V 31 w(DESCRIPT)n(ORS,)f(52)0 1817 y(SANE)p 244 1817
+V 31 w(NET)p 453 1817 V 32 w(GET)p 663 1817 V 31 w(P)-8
+b(ARAMETERS,)18 b(53)0 1929 y(SANE)p 244 1929 V 31 w(NET)p
+453 1929 V 32 w(INIT)-7 b(,)22 b(50)0 2042 y(SANE)p 244
+2042 V 31 w(NET)p 453 2042 V 32 w(OPEN,)e(51)0 2155 y(SANE)p
+244 2155 V 31 w(NET)p 453 2155 V 32 w(ST)-8 b(AR)j(T)e(,)19
+b(53)0 2268 y(sane)p 165 2268 V 34 w(open,)24 b(27)0
+2381 y(SANE)p 244 2381 V 31 w(Option)p 526 2381 V 34
+w(Descriptor)l(,)i(19)0 2494 y(SANE)p 244 2494 V 31 w(OPTION)p
+610 2494 V 31 w(IS)p 722 2494 V 33 w(A)l(CTIVE,)21 b(22)0
+2607 y(SANE)p 244 2607 V 31 w(OPTION)p 610 2607 V 31
+w(IS)p 722 2607 V 33 w(SETT)-8 b(ABLE,)18 b(22)0 2720
+y(SANE)p 244 2720 V 31 w(P)o(arameters,)24 b(31)0 2833
+y(SANE)p 244 2833 V 31 w(Range,)g(24)0 2946 y(sane)p
+165 2946 V 34 w(read,)g(35)0 3059 y(sane)p 165 3059 V
+34 w(set)p 299 3059 V 34 w(io)p 403 3059 V 33 w(mode,)g(36)0
+3171 y(sane)p 165 3171 V 34 w(start,)g(34)0 3284 y(SANE)p
+244 3284 V 31 w(Status,)g(17)0 3397 y(SANE)p 244 3397
+V 31 w(ST)-8 b(A)e(TUS)p 603 3397 V 30 w(A)l(CCESS)p
+975 3397 V 30 w(DENIED,)21 b(17)0 3510 y(SANE)p 244 3510
+V 31 w(ST)-8 b(A)e(TUS)p 603 3510 V 30 w(CANCELLED,)19
+b(17)0 3623 y(SANE)p 244 3623 V 31 w(ST)-8 b(A)e(TUS)p
+603 3623 V 30 w(CO)-5 b(VER)p 938 3623 V 31 w(OPEN,)21
+b(17)0 3736 y(SANE)p 244 3736 V 31 w(ST)-8 b(A)e(TUS)p
+603 3736 V 30 w(DEVICE)p 968 3736 V 31 w(B)o(USY)e(,)21
+b(17)0 3849 y(SANE)p 244 3849 V 31 w(ST)-8 b(A)e(TUS)p
+603 3849 V 30 w(EOF)j(,)21 b(17)0 3962 y(SANE)p 244 3962
+V 31 w(ST)-8 b(A)e(TUS)p 603 3962 V 30 w(GOOD,)21 b(17,)i(26)0
+4075 y(SANE)p 244 4075 V 31 w(ST)-8 b(A)e(TUS)p 603 4075
+V 30 w(INV)e(AL,)21 b(17)0 4188 y(SANE)p 244 4188 V 31
+w(ST)-8 b(A)e(TUS)p 603 4188 V 30 w(IO)p 729 4188 V 32
+w(ERR)l(OR,)21 b(17)0 4301 y(SANE)p 244 4301 V 31 w(ST)-8
+b(A)e(TUS)p 603 4301 V 30 w(J)-5 b(AMMED,)21 b(17)0 4413
+y(SANE)p 244 4413 V 31 w(ST)-8 b(A)e(TUS)p 603 4413 V
+30 w(NO)p 765 4413 V 32 w(DOCS,)21 b(17)0 4526 y(SANE)p
+244 4526 V 31 w(ST)-8 b(A)e(TUS)p 603 4526 V 30 w(NO)p
+765 4526 V 32 w(MEM,)21 b(17)0 4639 y(SANE)p 244 4639
+V 31 w(ST)-8 b(A)e(TUS)p 603 4639 V 30 w(UNSUPPOR)-5
+b(TED,)17 b(17)0 4752 y(SANE)p 244 4752 V 31 w(String,)24
+b(16,)f(49)0 4865 y(SANE)p 244 4865 V 31 w(String)p 496
+4865 V 34 w(Const,)h(16)0 4978 y(sane)p 165 4978 V 34
+w(strstatus,)i(37)0 5091 y(SANE)p 244 5091 V 31 w(TR)l(UE,)21
+b(15)2095 123 y(SANE)p 2339 123 V 31 w(TYPE)p 2599 123
+V 31 w(BOOL,)g(21)2095 236 y(SANE)p 2339 236 V 31 w(TYPE)p
+2599 236 V 31 w(B)o(UTT)n(ON,)g(21)2095 349 y(SANE)p
+2339 349 V 31 w(TYPE)p 2599 349 V 31 w(FIXED,)g(21)2095
+462 y(SANE)p 2339 462 V 31 w(TYPE)p 2599 462 V 31 w(GR)l(OUP)-10
+b(,)21 b(21)2095 574 y(SANE)p 2339 574 V 31 w(TYPE)p
+2599 574 V 31 w(INT)-7 b(,)23 b(21)2095 687 y(SANE)p
+2339 687 V 31 w(TYPE)p 2599 687 V 31 w(STRING,)e(21)2095
+800 y(SANE)p 2339 800 V 31 w(Unit,)i(20)2095 913 y(SANE)p
+2339 913 V 31 w(UNFIX,)f(16)2095 1026 y(SANE)p 2339 1026
+V 31 w(UNIT)p 2588 1026 V 32 w(BIT)-7 b(,)22 b(21)2095
+1139 y(SANE)p 2339 1139 V 31 w(UNIT)p 2588 1139 V 32
+w(DPI,)g(21)2095 1252 y(SANE)p 2339 1252 V 31 w(UNIT)p
+2588 1252 V 32 w(MICR)l(OSECOND,)e(21)2095 1365 y(SANE)p
+2339 1365 V 31 w(UNIT)p 2588 1365 V 32 w(MM,)i(21)2095
+1478 y(SANE)p 2339 1478 V 31 w(UNIT)p 2588 1478 V 32
+w(NONE,)f(21)2095 1591 y(SANE)p 2339 1591 V 31 w(UNIT)p
+2588 1591 V 32 w(PERCENT)-7 b(,)20 b(21)2095 1704 y(SANE)p
+2339 1704 V 31 w(UNIT)p 2588 1704 V 32 w(PIXEL,)h(21)2095
+1817 y(SANE)p 2339 1817 V 31 w(V)-10 b(alue)p 2576 1817
+V 34 w(T)j(ype,)23 b(20)2095 1929 y(SANE)p 2339 1929
+V 31 w(VERSION)p 2766 1929 V 31 w(CODE,)e(14)2095 2042
+y(SANE)p 2339 2042 V 31 w(VERSION)p 2766 2042 V 31 w(MAJOR,)h(14)2095
+2155 y(SANE)p 2339 2155 V 31 w(W)-7 b(ord,)24 b(14,)f(49)2095
+2268 y(scan)i(area)f(options,)h(42)2095 2381 y(scan)g(resolution,)h(41)
+2095 2494 y(scanner)g(b)n(utton)f(options,)g(46)2095
+2607 y(shado)n(w)f(options,)i(45)2095 2720 y(source)f(options,)g(44)
+2095 2833 y(structure,)h(50)2095 3029 y(threshold)g(option,)f(44)2095
+3142 y(tl-x,)f(42)2095 3254 y(tl-y)-6 b(,)24 b(42)2095
+3367 y(T)-7 b(ype)24 b(Strings,)g(18)2095 3563 y(union,)h(50)2095
+3676 y(username,)g(26)2095 3872 y(V)-10 b(endor)25 b(Strings,)f(18)2095
+4068 y(well-kno)n(wn)h(options,)g(41)1905 5381 y(58)p
+eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/sane2/0.07/sane2-0.07.tex b/sane2/0.07/sane2-0.07.tex
new file mode 100644
index 00000000..c3afa7d0
--- /dev/null
+++ b/sane2/0.07/sane2-0.07.tex
@@ -0,0 +1,2632 @@
+\documentclass[11pt,DVIps]{report}
+
+\usepackage{times,epsfig,changebar,html}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex}
+\setlength{\textwidth}{6.5in}
+\setlength{\textheight}{8.5in}
+\setlength{\marginparwidth}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\marginparsep}{0pt}
+\addtolength{\topmargin}{-0.75in}
+
+\title{\huge SANE Standard Version 2.0 proposal 0.07 - rauch/beck}
+\author{}
+\date{Dec 5, 2002}
+
+\makeindex
+
+\begin{document}
+
+\newcommand{\filename}[1]{{\tt #1}}
+\newcommand{\code}[1]{{\tt #1}}
+\newcommand{\var}[1]{{\it #1}}
+\newcommand{\defn}[1]{#1\index{#1}}
+
+\begin{latexonly}
+ \setcounter{changebargrey}{0} % black change bars
+\end{latexonly}
+
+\maketitle
+\tableofcontents
+\listoffigures
+\listoftables
+
+
+\chapter{Preface}
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+\ref{chap:contact}.
+
+The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+\section{About This Document}
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+The remainder of this document is organized as follows.
+Chapter~\ref{chap:intro} provides introductional material.
+Chapter~\ref{chap:environ} presents the environment SANE is designed
+for. Chapter~\ref{chap:api} details the SANE Application Programmer
+Interface. Chapter~\ref{chap:net} specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter~\ref{chap:contact} gives information on how
+to join the SANE development process.
+
+\subsection{Typographic Conventions}
+
+Changes since the last revision of this document are highlighted
+like this:
+
+\begin{changebar}
+ Paragraphs that changed since the last revision of the documention
+ are marked like this paragraph.
+\end{changebar}
+
+\chapter{Introduction}\label{chap:intro}
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+\section{Terminology}
+
+An application that uses the SANE interface is called a SANE {\em
+ frontend}. A driver that implements the SANE interface is called a
+SANE {\em backend}. A {\em meta backend\/} provides some means to
+manage one or more other backends.
+
+
+\chapter{The SANE Environment}\label{chap:environ}
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE {\em option\/}. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+\code{brightness} whose value is an integer in the range from 0 to
+255.
+
+With self-describing options, a backend need not be concerned with
+{\em presentation\/} issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the {\em meaning\/} of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+\section{Attaching to a SANE backend}
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+\begin{itemize}
+
+\item {\bf Static linking:} A SANE backend may be linked directly into
+ a frontend. While the simplest method of attaching to a backend, it
+ is somewhat limited in functionality since the available devices is
+ limited to the ones for which support has been linked in when the
+ frontend was built. But even so static linking can be quite useful,
+ particularly when combined with a backend that can access scanners
+ via a network. Also, it is possible to support multiple backends
+ simultaneously by implementing a meta backend that manages several
+ backends that have been compiled in such a manner that they export
+ unique function names. For example, a backend called \code{be}
+ would normally export a function called \code{sane\_read()}. If
+ each backend would provide such a function, static linking would
+ fail due to multiple conflicting definitions of the same symbol.
+ This can be resolved by having backend \code{be} include a
+ header file that has lines of the form:
+ \begin{quote}
+\begin{verbatim}
+#define sane_read be_sane_read
+\end{verbatim}
+ \end{quote}
+ With definitions of this kind, backend \code{be} will export
+ function name \code{be\_sane\_read()}. Thus, all backends will
+ export unique names. As long as a meta backend knows about these
+ names, it is possible to combine several backends at link time and
+ select and use them dynamically at runtime.
+
+\item {\bf Dynamic linking:} A simpler yet more powerful way to
+ support multiple backends is to exploit dynamic linking on platforms
+ that support it. In this case, a frontend is linked against a
+ shared library that implements any SANE backend. Since each
+ dynamically linked backend exports the same set of global symbols
+ (all starting with the prefix \code{sane\_}), the dynamic library
+ that gets loaded at runtime does not necessarily have to be the same
+ one as one the frontend got linked against. In other words, it is
+ possible to switch the backend by installing the appropriate backend
+ dynamic library.
+
+ More importantly, dynamic linking makes it easy to implement a meta
+ backend that loads other backends {\em on demand}. This is a
+ powerful mechanism since it allows adding new backends merely by
+ installing a shared library and updating a configuration file.
+
+\item {\bf Network connection:} Arguably the ultimate way to attach to
+ a scanner is by using the network to connect to a backend on a
+ remote machine. This makes it possible to scan images from any host
+ in the universe, as long as there is a network connection to that
+ host and provided the user is permitted to access that scanner.
+
+\end{itemize}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth}
+ \caption{Example SANE Hiearchy}
+ \label{fig:hierarchy}
+ \end{center}
+\end{figure}
+
+The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine
+A uses a dynamic-linking based meta backend called \code{dll} to
+access the backends called \code{pnm}, \code{mustek}, and \code{net}.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called \code{saned}. The \code{saned} in
+turn has access to the \code{hp} and \code{autolum} backends through
+another instance of the \code{dll} backend. The \code{autolum} meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called \code{qcam}.
+
+Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+\section{Image Data Format}\label{sec:imageformat}\index{image data format}
+
+Arguably the most important aspect of an image acquisition system is how
+images are represented. The SANE approach is to define a simple yet powerful
+representation that is sufficient for vast majority of applications and
+devices. While the representation is simple, the interface has been defined
+carefully to allow extending it in the future without breaking backwards
+compatibility. Thus, it will be possible to accommodate future applications or
+devices that were not anticipated at the time this standard was created.
+
+A SANE image is a rectangular area. The rectangular area is subdivided into a
+number of rows and columns. At the intersection of each row and column is a
+(preferable quadratic) pixel. A pixel consists of one or more sample values.
+Each sample value represents one channel (e.g., the red channel).
+
+The SANE API transmits an image as a sequence of frames. Each frame covers
+the same rectangular area as the entire image, but may contain only a subset
+of the channels in the final image. For example, a red/green/blue image could
+either be transmitted as a single frame that contains the sample values for
+all three channels or it could be transmitted as a sequence of three frames:
+the first frame containing the red channel, the second the green channel, and
+the third the blue channel.
+
+When transmitting an image frame by frame, the frontend needs to know what
+part of the image a frame represents (and how many frames it should expect).
+For that purpose, the SANE API tags every frame with a type and a format
+descriptor.
+
+\begin{changebar}
+ There are two different types of frames: pixel oriented frames
+ \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames
+ \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the
+ following sections. The frame types used by version~1 of this standard
+ (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}},
+ \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and
+ \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by
+ \code{\defn{SANE\_FRAME\_RAW}}.
+
+ \subsection{Pixel oriented frames}
+
+ The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The
+ frame contains one or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the individual pixels that
+ is subject to further description in the \code{format\_desc} member of the
+ \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparameters}
+ on page~\pageref{sec:sanegetparameters} for details about the format
+ descriptions.
+\end{changebar}
+
+ Each sample value has a certain bit depth. The bit depth is fixed for the
+ entire image and can be as small as one bit. Valid bit depths are 1, 8, or
+ 16 bits per sample. If a device's natural bit depth is something else, it is
+ up to the driver to scale the sample values appropriately (e.g., a 4 bit
+ sample could be scaled by a factor of four to represent a sample value of
+ depth 8).
+
+\begin{changebar}
+ The complete image may consist of several different channels. The number of channels
+ is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}.
+ The image may be transmitted in an arbitary number of frames which can be
+ determined by watching the \code{SANE\_PFLAG\_LAST\_FRAME} flag in said type (or by
+ counting the channels). Note: This frame type replaces all frame types of
+ the SANE standard version 1.
+\end{changebar}
+
+Conceptually, each pixel oriented frame is transmitted a byte at a time. Each
+byte may contain 8 sample values (for an image bit depth of 1), one full
+sample value (for an image bit depth of 8), or a partial sample value (for an
+image bit depth of 16 or bigger). In the latter case, the bytes of each
+sample value are transmitted in the machine's native byte order.
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+\end{quote}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/xfer.eps,width=0.5\textwidth}
+ \caption{Transfer order of image data bytes}
+ \label{fig:xfer}
+ \end{center}
+\end{figure}
+
+The order in which the sample values in a frame are transmitted is illustrated
+in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by
+row and each row is transmitted from left-most to right-most column. The
+left-to-right, top-to-bottom transmission order applies when the image is
+viewed in its normal orientation (as it would be displayed on a screen, for
+example).
+
+If a frame contains multiple channels, then the channels are transmitted in an
+interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case
+where a frame contains a complete red/green/blue image with a bit-depth of 8.
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/image-data.eps,width=0.8\textwidth}
+ \caption{Bit and byte order of image data}
+ \label{fig:pixels}
+ \end{center}
+\end{figure}
+
+For a bit depth of 1, each byte contains 8 sample values of a {\em single\/}
+channel. In other words, a bit depth 1 frame is transmitted in a byte
+interleaved fashion. The first sample of each byte is represented by the most
+significant bit.
+
+\begin{changebar}
+For gray channels at a bit depth of 1 only two sample values are possible: 1
+represents minimum intensity (black) and 0 represents maximum intensity
+(white). For all other channel types and bit depths a sample value of 0
+represents minimum intensity and larger values represent increasing intensity.
+
+\subsection{Arbitrary data frames}
+
+It also is possible to transmit arbitrary (not necessaryly pixel oriented)
+data. This allows transmission of compressed images like jpeg, tiff, etc.
+
+The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}.
+The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is
+given in the \code{format\_desc} member of the \code{SANE\_Parameters}
+structured type (see See section~\ref{sec:sanegetparameters} on
+page~\pageref{sec:sanegetparameters}). As such, it is assumed to be
+incomprehensible to the frontend, except for selected types the frontend is
+specifically capable of handling internally. The frontend is free to ignore
+those frames, or employ any appropriate means to otherwise handle this data
+(like saving them to disk or spawning an external viewer).
+\end{changebar}
+
+\chapter{The SANE Application Programmer Interface (API)}\label{chap:api}
+
+\begin{changebar}
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called \filename{sane/sane-2.h}. This file should
+normally be included via a C pre-processor directive of the form:
+\begin{verbatim}
+ #include
+\end{verbatim}
+\end{changebar}
+
+
+\section{Version Control}
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+The SANE API provides the following five macros to manage version
+numbers.
+\begin{quote}
+ \begin{description}
+ \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+ \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:]
+ \label{sec:saneversioncode}
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (\var{maj}), the minor version number \var{min},
+ and the build revision of a backend (\var{bld}). The major and
+ minor version numbers must be in the range 0\ldots255 and the
+ build revision must be in the range 0\ldots65535.
+
+ Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the
+ major version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the
+ minor version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the
+ build revision component of the version code passed in argument
+ \var{vc}.
+ \end{description}
+\end{quote}
+
+
+\section{Data Types}
+
+\subsection{Base Types}
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+\begin{quote}
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};}
+\end{quote}
+\verb|SANE_Byte| must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. \verb|SANE_Word| must be
+capable of holding any of the following:
+\begin{itemize}
+ \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE|
+ \item signed integers in the range $-2^{31}\ldots2^{31}-1$
+ \item fixed point values in the range $-32768\ldots32767.9999$ with
+ a resolution of $1/65536$
+ \item 32 bits (for bit sets)
+\end{itemize}
+Note that the SANE standard does not define what C type
+\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some
+platforms, the latter may map to \verb|long int| whereas on others it
+may map to \verb|int|. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+\subsection{Boolean Type}
+
+\code{\defn{SANE\_Bool}} is used for variables that can take one of
+the two truth values \code{\defn{SANE\_FALSE}} and
+\code{\defn{SANE\_TRUE}}. The former value is defined to be 0,
+whereas the latter is 1.\footnote{This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.} The C
+declarations for this type are given below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Bool| whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+\subsection{Integer Type}
+
+\code{\defn{SANE\_Int}} is used for variables that can take integer
+values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is
+given below.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Word SANE_Int;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Int| whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+\subsection{Fixed-point Type}
+
+\code{\defn{SANE\_Fixed}} is used for variables that can take fixed
+point values in the range $-32768$ to $32767.9999$ with a resolution
+of $1/65535$. The C declarations relating to this type are given
+below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+\end{verbatim}
+\end{quote}
+The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of $1/65536$.
+
+Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Fixed| whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE
+ fixed-point value that is smaller than the double value \var{d}.
+ No range checking is performed. If the value of \var{d} is out of
+ range, the result is undefined.
+
+ \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest
+ double machine number that corresponds to fixed-point value
+ \var{w}.
+
+ \end{description}
+\end{quote}
+SANE does {\em not\/} require that the following two expressions hold
+true (even if the values of \var{w} and \var{d} are in range):
+\begin{quote}
+\begin{verbatim}
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+\end{verbatim}
+\end{quote}
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+\subsection{Text}
+
+\subsubsection{Character Type}
+
+Type \code{\defn{SANE\_Char}} represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+\verb|char| type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+\verb|sizeof(SANE_Char)==sizeof(char)|.
+\begin{quote}
+\begin{verbatim}
+typedef char SANE_Char;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{String Type}
+
+Type \code{\defn{SANE\_String}} represents a text string as a sequence
+of C \verb|char| values. The end of the sequence is indicated by a
+\verb|'\0'| (\defn{NUL}) character.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+\end{verbatim}
+\end{quote}
+The type \code{\defn{SANE\_String\_Const}} is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+\begin{quote}
+\begin{verbatim}
+const SANE_String str;
+\end{verbatim}
+\end{quote}
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+\subsection{Scanner Handle Type}
+
+Access to a scanner is provided through an opaque type called
+\code{\defn{SANE\_Handle}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef void *SANE_Handle;
+\end{verbatim}
+\end{quote}
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a \verb|SANE_Handle|. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+\subsection{Status Type}
+
+Most SANE operations return a value of type \code{\defn{SANE\_Status}}
+to indicate whether the completion status of the operation. If an
+operation completes successfully, \verb|SANE_STATUS_GOOD| is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table \ref{tab:status}. It is recommended to use function
+\code{sane\_strstatus()} to convert status codes into a legible
+string.
+
+\begin{table}[htbp]
+ \begin{center}
+ \begin{tabular}{|l|r|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} &
+ \multicolumn{1}{c|}{\bf Description} \\
+ \hline\hline
+\code{\defn{SANE\_STATUS\_GOOD}}
+ & 0 & Operation completed succesfully. \\
+\code{\defn{SANE\_STATUS\_UNSUPPORTED}}
+ & 1 & Operation is not supported. \\
+\code{\defn{SANE\_STATUS\_CANCELLED}}
+ & 2 & Operation was cancelled. \\
+\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}}
+ & 3 & Device is busy---retry later. \\
+\code{\defn{SANE\_STATUS\_INVAL}}
+ & 4 & Data or argument is invalid. \\
+\code{\defn{SANE\_STATUS\_EOF}}
+ & 5 & No more data available (end-of-file). \\
+\code{\defn{SANE\_STATUS\_JAMMED}}
+ & 6 & Document feeder jammed. \\
+\code{\defn{SANE\_STATUS\_NO\_DOCS}}
+ & 7 & Document feeder out of documents. \\
+\code{\defn{SANE\_STATUS\_COVER\_OPEN}}
+ & 8 & Scanner cover is open. \\
+\code{\defn{SANE\_STATUS\_IO\_ERROR}}
+ & 9 & Error during device I/O. \\
+\code{\defn{SANE\_STATUS\_NO\_MEM}}
+ & 10 & Out of memory. \\
+\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}}
+ & 11 & Access to resource has been denied. \\
+ \hline
+ \end{tabular}
+ \caption{Status Codes}\label{tab:status}
+ \end{center}
+\end{table}
+
+
+\subsection{Device Descriptor Type}
+\begin{changebar}
+
+Each SANE device is represented by a structure of type
+\code{\defn{SANE\_Device}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const backend_website;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+\index{device-name}
+The structure provides the unique name of the scanner in member
+\code{name}. It is this unique name that should be passed in a call
+to \code{sane\_open()}. The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is {\em recommended\/} that backends keep
+unique names below 32 characters in length. However, applications
+{\em must\/} be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members \code{vendor}, \code{model}, and \code{type} are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \hspace{\fill}
+ \begin{tabular}[t]{|ll|}
+ \hline
+ \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\
+ \hline\hline
+ \code{AGFA} & \code{Microtek} \\
+ \code{Abaton} & \code{Minolta} \\
+ \code{Acer} & \code{Mustek} \\
+ \code{Apple} & \code{NEC} \\
+ \code{Artec} & \code{Nikon} \\
+ \code{Avision} & \code{Plustek} \\
+ \code{CANON} & \code{Polaroid} \\
+ \code{Connectix} & \code{Ricoh} \\
+ \code{Epson} & \code{Sharp} \\
+ \code{Fujitsu} & \code{Siemens} \\
+ \code{Hewlett-Packard} & \code{Tamarack} \\
+ \code{IBM} & \code{UMAX} \\
+ \code{Kodak} & \code{Noname} \\
+ \code{Logitech} & \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \begin{tabular}[t]{|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\
+ \hline\hline
+ \code{film scanner} \\
+ \code{flatbed scanner} \\
+ \code{frame grabber} \\
+ \code{handheld scanner} \\
+ \code{multi-function peripheral} \\
+ \code{sheetfed scanner} \\
+ \code{still camera} \\
+ \code{video camera} \\
+ \code{virtual device} \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \caption{Predefined Device Information Strings}
+ \label{tab:devinfo}
+ \end{center}
+\end{table}
+Note that vendor string \code{Noname} can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+\begin{changebar}
+The backend has to set up the string \code{email\_backend\_author}
+with the name and the email address of the backend author or a contact person
+in the format:
+\begin{verbatim}
+Firstname Lastname
+\end{verbatim}
+
+The string \code{backend\_website} has to be set up by the backend
+with the website or ftp address of the backend in the format:
+\begin{verbatim}
+http://www.domain.org/sane-hello/index.html
+\end{verbatim}
+
+The backend should fill the string \code{device\_location} with a
+text that describes where a user can find this device, the text
+should be read from the backend config file. This could e.g. look
+like this:
+\begin{verbatim}
+building 93, 2nd plane, room 2124
+\end{verbatim}
+
+The string \code{comment} can be used to display any comment to the user,
+the text should be read from the backend config file.
+
+The string \code{reserved\_string} is planed for future use, the backend
+has to set this string to "".
+
+With member \code{backend\_version\_code} a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+The member \code{backend\_capability\_flags} contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+The member \code{reserved\_int} is planned for future use, the backend has
+to set the value of the integer to 0.
+\end{changebar}
+
+\subsection{Option Descriptor Type}\label{sec:odesc}
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+\code{\defn{SANE\_Option\_Descriptor}} type is given below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{Option Name}
+
+Member \code{name} is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (\code{a}--\code{z}),
+digits (\code{0}--\code{9}), or the dash character (\code{-}) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+\subsubsection{Option Title}
+
+Member \code{title} is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+\subsubsection{Option Description}
+
+Member \code{desc} is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+\subsubsection{Option Value Type}
+
+Member \code{type} specifies the type of the option value. The
+possible values for type \code{\defn{SANE\_Value\_Type}} are described
+in Table \ref{tab:valuetype}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|p{0.6\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type
+ \verb|SANE_Bool|. \\
+
+\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type
+ \verb|SANE_Int|. \\
+
+\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type
+ \verb|SANE_Fixed|. \\
+
+\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type
+ \verb|SANE_String|. \\
+
+\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. \\
+
+\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members \code{title} and
+\code{type} are valid in the option descriptor. \\
+
+ \hline
+ \end{tabular}
+ \caption{Option Value Types (\code{SANE\_Value\_Type})}
+ \label{tab:valuetype}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Unit}
+
+Member \code{unit} specifies what the physical unit of the option
+value is. The possible values for type \code{\defn{SANE\_U\-nit}} are
+described in Table \ref{tab:units}. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\
+\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\
+\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\
+\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\
+\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\
+\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\
+\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\
+
+\hline
+ \end{tabular}
+ \caption{Physical Units (\code{SANE\_Unit})}
+ \label{tab:units}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Size}\label{sec:valuesize}
+
+Member \code{size} specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+\begin{quote}
+ \begin{description}
+ \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating \code{NUL} character is considered to be part of the
+ string. Note that the terminating \code{NUL} character must
+ always be present in string option values.
+ \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size
+ must be a positive integer multiple of the size of a
+ \verb|SANE_Word|. The option value is a vector of length
+ \[ \code{size}/\code{sizeof(SANE\_Word)}. \]
+ \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to
+ \code{sizeof(SANE\_Word)}.
+ \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The
+ option size is ignored.
+ \end{description}
+\end{quote}
+
+\subsubsection{Option Capabilities}
+
+Member \code{cap} describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table \ref{tab:capabilities}. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro
+ returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is currently active.
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This
+ macro returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is software settable.
+ \end{description}
+\end{quote}
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.59\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option
+ value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\
+
+\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both
+ simultaneously). \\
+
+\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option
+ value can be detected by software. If
+ \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/}
+ be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability
+ may or may not be set. If this capability is set but neither
+ \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT}
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. \\
+
+\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. \\
+
+\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling \code{sane\_control\_option()}
+ with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\
+
+\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). \\
+
+\code{\defn{SANE\_CAP\_ADVANCED}} & 64 &
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option.'' A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ \\
+
+\hline
+ \end{tabular}
+ \caption{Option Capabilities}
+ \label{tab:capabilities}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Constraints}
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member \code{constraint\_type} indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member \code{constraint}. The possible values of type
+\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the
+\code{constraint} union is described in Table~\ref{tab:constraints}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. \\
+
+ \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member \code{constraint.range} points to
+ a range of the type \code{\defn{SANE\_Range}}. This type is illustrated
+ below:
+ \begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+\end{verbatim}
+ \end{quote}
+ All three members in this structure are interpreted according to the
+ option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|).
+ Members \code{min} and \code{max} specify the minimum and maximum
+ values, respectively. If member \code{quant} is non-zero, it
+ specifies the quantization value. If $l$ is the minimum value, $u$
+ the maximum value and $q$ the (non-zero) quantization of a range,
+ then the legal values are $v=k\cdot q+l$ for all non-negative
+ integer values of $k$ such that $v<=u$. \\
+
+\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ \code{constraint.word\_list} points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (\verb|SANE_Int|) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\
+
+\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated
+ list of strings that enumerate the legal values for the option
+ value.
+\\\hline
+ \end{tabular}
+ \caption{Option Value Constraints}
+ \label{tab:constraints}
+ \end{center}
+\end{table}
+
+
+\subsection{Internationalization}\label{sec:i18n}
+\begin{changebar}
+All backend texts should be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+\subsubsection{How is a text marked for translation}
+
+The keyword \code{SANE\_I18N} is used to mark a text for translation.
+\code{SANE\_I18N} has to be defined as a dummy prototype:
+
+ \begin{quote}
+\begin{verbatim}
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+\end{verbatim}
+ \end{quote}
+
+You should not mark prototypes or variables with \code{SANE\_I18N}
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and
+variables (\verb|SANE_I18N(option[7].name)|).
+
+A correct marked text can look like this:\\
+\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\
+or\\
+\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\
+It also is allowed to mark texts in structs because the
+prototype \code{SANE\_I18N} has no effect to the compiler.
+
+\subsubsection{Which texts shall be marked for translation?}
+All option texts that are visible for the user should be marked for
+translation. This is:
+\begin{itemize}
+\item
+member \code{title}
+\item
+member \code{desc}
+\item
+member \code{string\_list}
+\end{itemize}
+of \code{SANE\_Option\_Descriptor}.
+
+It is not allowed to mark/translate member \code{name}.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+\subsubsection{File formats and translation functions}
+The recommended file formats for translation tables are the \code{po} files
+and \code{mo} or \code{gmo} files.
+The po file contains the original text marked with the keyword \code{msgid}
+and the translated text marked with the keyword \code{msgstr}.
+A \code{po} file that contains all needed \code{msgid}s can be created
+e.g. by the gnu gettext tool \verb|xgettext| with the option
+\verb|-k SANE_I18N|.
+The translator adds the translated texts to the \code{po} files.
+The gettext tool \code{msgfmt} converts the \code{po} files to the
+\code{mo} or \code{gmo} files.\\
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function \code{gettext}
+to translate the texts. This e.g. can look like this:\\
+\verb|snprintf(buf, sizeof(buf), gettext("english text"));|
+
+If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the \code{po} files to create its
+own translation tables from it.\\
+
+Note that it is strongly recommended to use the gettext tools.
+\end{changebar}
+
+
+\section{Operations}
+
+\subsection{\code{sane\_init}}
+
+This function must be called before any other SANE function can be called.
+The behavior of a SANE backend is undefined if this function is not called
+first or if the status code returned by \code{sane\_init} is different from
+\code{\defn{SANE\_STATUS\_GOOD}}. The version code of the backend is returned
+in the value pointed to by \code{version\_code}. If that pointer is
+\code{NULL}, no version code is returned. Argument \code{authorize} is either
+a pointer to a function that is invoked when the backend requires
+authentication for a specific resource or \code{NULL} if the frontend does not
+support authentication.
+\begin{quote}\index{sane\_init}
+\begin{verbatim}
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+\end{verbatim}
+\end{quote}
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+\begin{quote}
+ \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start}
+\end{quote}
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+\begin{quote}\index{SANE\_Authorization\_Callback}
+ \index{domain}\index{username}\index{password}
+\begin{verbatim}
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+\end{verbatim}
+\end{quote}
+Three arguments are passed to the authorization function:
+\code{resource} is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The \code{username}
+and \code{password} arguments are (pointers to) an array of
+\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN}
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+{\em must\/} be ASCII-NUL terminated.
+
+\subsection{\code{sane\_exit}}
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to \code{sane\_clo\-se()}, but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than \code{sane\_init()} may be called (regardless
+of the status value returned by \code{sane\_exit()}. Neglecting to
+call this function may result in some resources not being released
+properly.
+\begin{quote}\index{sane\_exit}
+\begin{verbatim}
+void sane_exit (void);
+\end{verbatim}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_devices}}
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a \code{NULL} terminated array of pointers to \verb|SANE_Device|
+structures in \code{*device\_list}. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to \code{sane\_exit()} is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument \code{local\_only} is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+\begin{quote}\index{sane\_get\_devices}
+\begin{verbatim}
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+\end{verbatim}
+\end{quote}
+
+This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an
+insufficient amount of memory is available.
+
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ SANE does not require that this function is called before a
+ \code{sane\_open()} call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+\begin{changebar}
+ The same information about
+ a device has to be returned when \code{sane\_open} is called.
+\end{changebar}
+\end{quote}
+
+
+\subsection{\code{sane\_open}}
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+\code{name}. If the call completes successfully, a handle for the
+device is returned in \code{*h}.
+\begin{changebar}
+The description of the device
+is returned in \code{**device\_description}. This is the
+same description that is returned in the list by \code{sane\_get\_devices}.
+The returned data \code{*h} and \code{*device\_description} is guaranteed
+to remain unchanged and valid until a call to \code{sane\_close()}
+is performed.
+\end{changebar}
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+\begin{quote}\index{sane\_open}
+\begin{verbatim}
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+\end{verbatim}
+\end{quote}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently
+ busy (in use by somebody else).
+\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_close}}
+
+This function terminates the association between the device handle
+passed in argument \code{h} and the device it represents. If the
+device is presently active, a call to \code{sane\_cancel()} is
+performed first. After this function returns, handle \code{h} must
+not be used anymore.
+
+\begin{quote}\index{sane\_close}
+\begin{verbatim}
+void sane_close (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_get\_option\_descriptor}}
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number \code{n} of the device
+represented by handle \code{h}. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle \code{h} (the count
+includes option 0). If $n$ is not a valid option index, the function
+returns \code{NULL}. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+\begin{quote}\index{sane\_get\_option\_descriptor}
+\begin{verbatim}
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_control\_option}}\label{sec:control}
+
+This function is used to set or inquire the current value of option
+number \code{n} of the device represented by handle \code{h}. The
+manner in which the option is controlled is specified by parameter
+\code{a}. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+\code{v}. It is a pointer to the memory that holds the option value.
+The memory area pointed to by \code{v} must be big enough to hold the
+entire option value (determined by member \code{size} in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument \code{v} may be shorter since the backend will stop
+reading the option value upon encountering the first \code{NUL}
+terminator in the string. If argument \code{i} is not \code{NULL},
+the value of \code{*i} will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+\begin{quote}\index{sane\_control\_option}
+\begin{verbatim}
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+\end{verbatim}
+\end{quote}
+
+The way the option is affected by a call to this function is
+controlled by parameter \code{a} which is a value of type
+\code{\defn{SANE\_Action}}. The possible values and their meaning is
+described in Table~\ref{tab:actions}.
+
+\begin{table}[h]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\
+
+\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The
+ option value passed through argument \code{v} may be modified by the
+ backend if the value cannot be set exactly. \\
+
+\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter \code{v} is completely ignored in this case and
+ may be \code{NULL}. \\
+
+\hline
+ \end{tabular}
+ \caption{Action Values (\code{SANE\_Action})}
+ \label{tab:actions}
+ \end{center}
+\end{table}
+
+After setting a value via an action value of
+\verb|SANE_ACTION_SET_VALUE|, additional information on how well the
+request has been met is returned in \code{*i} (if \code{i} is
+non-\code{NULL}). The returned value is a bitset that may contain any
+combination of the values described in Table~\ref{tab:info}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in \code{*i} has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 & The setting of an
+ option may affect the value or availability of one or more {\em
+ other\/} options. When this happens, the SANE backend sets this
+ member in \code{*i} to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 & The setting of an option may
+ affect the parameter values (see \code{sane\_get\_parameters()}).
+ If setting an option affects the parameter values, this member will
+ be set in \code{*i}. Note that this member may be set even if the
+ parameters did not actually change. However, it is guaranteed that
+ the parameters never change without this member being set. \\
+
+\hline
+ \end{tabular}
+ \caption{Additional Information Returned When Setting an Option}
+ \label{tab:info}
+ \end{center}
+\end{table}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not
+ supported for the specified handle and option number.
+\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+
+\subsection{\code{sane\_get\_parameters}\label{sec:sanegetparameters}}
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (\code{sane\_start()} has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+\code{sane\_start()} gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle \code{h} of the device for which the
+parameters should be obtained and a pointer \code{p} to a parameter
+structure. The parameter structure is described in more detail below.
+
+\begin{quote}\index{sane\_get\_parameters}
+\begin{verbatim}
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+\end{verbatim}
+\end{quote}
+
+The scan parameters are returned in a structure of type
+\code{\defn{SANE\_Parameters}}. The C declaration of this structure
+is given below.
+\begin{changebar}
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String format_desc;
+ SANE_String proposed_filename;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+
+\begin{changebar}
+Member \code{format} specifies the format of the next frame to be
+returned. The possible values for type \code{\defn{SANE\_Frame}} are
+described in Table~\ref{tab:frameformat}. The meaning of these
+values is described in more detail in Section~\ref{sec:imageformat}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|c|c|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf SANE standard} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_FRAME\_GRAY}} & 0 & version 1 & Band covering human visual range. \\
+\code{\defn{SANE\_FRAME\_RGB}} & 1 & version 1 & Pixel-interleaved red/green/blue bands. \\
+\code{\defn{SANE\_FRAME\_RED}} & 2 & version 1 & Red band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_GREEN}} & 3 & version 1 & Green band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_BLUE}} & 4 & version 1 & Blue band of a red/green/blue image. \\
+\code{\defn{SANE\_FRAME\_RAW}} & 5 & version 2 & Arbitrary pixel property transmission. \\
+\code{\defn{SANE\_FRAME\_MIME}} & 6 & version 2 & Data described by a mime descriptor. \\
+
+\hline
+ \end{tabular}
+ \caption{Frame Format (\code{SANE\_Frame})}
+ \label{tab:frameformat}
+ \end{center}
+\end{table}
+
+The \code{flags} member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+\begin{itemize}
+
+\item
+\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image). Note, that it is possible to transmit
+multiple images in succession.
+
+\item
+\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. It is permissible to set that value to 1 "in good
+faith", as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer. E.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at \code{sane\_start()}.
+
+\item
+\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+\item
+\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tells if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+\end{itemize}
+
+Note, that \code{flags} is compatible to member \code{last\_frame} of
+\code{SANE\_Parameters} of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+
+
+
+Member \code{lines} specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call \code{sane\_read()} until it
+returns a status of \code{SANE\_STATUS\_EOF}.
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+
+Member \code{bytes\_per\_line} specifies the number of bytes that
+comprise one scan line.
+If \code{bytes\_per\_line} is set to 0, which can currently only be the case for
+\code{SANE\_FRAME\_MIME}, the frontend shall not assume a constant line
+length. Instead it should simply try to read until \code{SANE\_STATUS\_EOF}
+with an arbitrary block length.
+
+Member \code{depth} specifies the number of bits per sample.
+Note, that only 0 (for not applicable), 1, and n*8 are allowed
+values. Data with other depths has to be scaled up accordingly.
+
+Member \code{pixels\_per\_line} specifies the number of pixels that
+comprise one scan line.
+
+Assume $B$ is the number of channels in the frame, then the bit depth
+$d$ (as given by member \code{depth}) and the number of pixels per
+line $n$ (as given by this member \code{pixels\_per\_line}) are
+related to $c$, the number of bytes per line (as given by member
+\code{bytes\_per\_line}) as follows:
+\[
+ c >= \left\{
+ \begin{array}{ll}
+ \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\
+ B\cdot n \cdot \lceil (d + 7)/8 \rceil & \mbox{if $d>1$}
+ \end{array}
+ \right.
+\]
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+Member \code{channels\_per\_image} specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+\code{channels\_per\_image} has to be the same for all frames for this image.
+
+Member \code{format\_desc} is used for the new frametypes
+\code{SANE\_FRAME\_RAW} and \code{SANE\_FRAME\_MIME}. Its meaning differs
+between the two types:
+
+\begin{itemize}
+\item
+\code{SANE\_FRAME\_RAW}:
+The \code{format\_desc} contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+A plane is descibed by one channel, e.g. "\code{gray}" or "\code{gray:12}".
+
+Channel interleaved data is described by a comma separated list of channel descriptions,
+for example "\code{red,green,blue}" or "\code{red:8,green:8,blue:8}",
+the channel data is sent in the given order.
+
+The depth information does {\bf not} define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member \code{depth}.
+
+Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be \code{infrared} or
+a wavelength description like \code{1100nm}, but be aware that a
+frontend may not be able to display such channels with useful colors.
+
+Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member \code{channels\_per\_image}.
+
+\item
+\code{SANE\_FRAME\_MIME}:
+The \code{format\_desc} contains the MIME type/subtype *(;parameter)
+fields as described in RFC 1521, 4. The Content-Type header field,
+without the prefixing "Content-Type:".
+Note, that it is discouraged to transfer proprietary file formats over
+SANE. If at all possible, please stick to the IANA assigned MIME types,
+and make sure the data stream is compliant with the corresponding
+specification.
+When data is transmitted with the frame type \code{SANE\_FRAME\_MIME}
+all data has to be transmitted within one frame, multiple frames
+are not allowed (so the flag \code{last\_frame} has to be set
+when using this frame type).
+A fully compliant SANE backend is required to transmit in either
+SANE native frametypes, or in a MIME type, for which a converting
+meta backend exists and is freely available for all platforms.
+
+Other formats may be transmitted, but the only thing the average
+frontend can do with them, is save them. This is not considered a
+good option, as it does not facilitate transmitting the data to a
+client application that may be running the frontend.
+However, if the data transferred by the backend is not an image in
+nature, it wouldn't make sense to try converting it anyway, so it is
+acceptable to use a simple \code{SANE\_FRAME\_MIME} transfer for that
+case. But even then, try to stick to well known stuff with freely
+existing standards and viewers as well.
+\end{itemize}
+
+The member \code{proposed\_filename} can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to "".
+
+In the case of raw frames, \code{proposed\_filename} is expected to hold
+the basename for the image, with the extension determined by the save function
+of the frontend, as the frontend can fully understand the data and is thus
+able to encode it in any format it wishes.
+
+For MIME frames \code{proposed\_filename} can contain either:
+
+\begin{itemize}
+\item
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+\item
+A complete filename, including extension.
+\end{itemize}
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+In any case, if the frontend makes use of this field, the frontend
+must mangle this proposal or the final filename it produces with
+its help to suit local filesystem restrictions.
+
+Special care should be taken not to cause security flaws this way.
+For Unix, that means killing out all path separators (/) [to avoid
+to save away stuff in obscure places or create critical files like
+/etc/hosts.allow] and avoiding to overwrite existing files.
+(Creating of leading dot files - like .rhosts - is not an issue here,
+because that's only a proposed filename extension as mentioned above.
+
+The string \code{proposed\_comment} can be used to transmit additional
+image data, that can be stored in the comment areas several fileformats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc.
+
+The members \code{dpi\_x, dpi\_y} encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different
+resolutions of each image. It is not permissible to change resolution
+between frames of the same image.
+
+The member \code{reserved} is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+\end{changebar}
+
+
+\subsection{\code{sane\_start}}
+
+This function initiates aquisition of an image from the device
+represented by handle \code{h}.
+\begin{quote}\index{sane\_start}
+\begin{verbatim}
+SANE_Status sane_start (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The
+ operation should be retried later.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_INVAL}:] The scan cannot be started with the current
+ set of options. The frontend should reload the option descriptors, as if
+ \code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} had been returned from a call to
+ \code{sane\_control\_option()}, since the device's capabilities may have
+ changed.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_read}}
+
+This function is used to read image data from the device represented
+by handle \code{h}. Argument \code{buf} is a pointer to a memory area
+that is at least \code{maxlen} bytes long. The number of bytes
+returned is stored in \code{*len}. A backend must set this to zero
+when a status other than \code{SANE\_STA\-TUS\_GOOD} is returned).
+When the call succeeds, the number of bytes returned can be anywhere in
+the range from 0 to \code{maxlen} bytes.
+\begin{quote}\index{sane\_read}
+\begin{verbatim}
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+\end{verbatim}
+\end{quote}
+For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle \code{h}.
+\begin{enumerate}
+\item If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+\item If the device is in non-blocking I/O mode, the call returns
+ immediately with status \code{SANE\_STA\-TUS\_GOOD} and with
+ \code{*len} set to zero.
+\end{enumerate}
+The I/O mode of handle \code{h} can be set via a call to
+\code{sane\_set\_io\_mode()}.
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the
+ current frame. If \code{sane\_read} sends back any image data it
+is not allowed to return with \code{SANE\_STATUS\_EOF}.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_cancel}}
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+\code{h}.
+\begin{quote}\index{sane\_cancel}
+\begin{verbatim}
+void sane_cancel (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function can be called at any time (as long as handle \code{h} is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does {\em not\/} imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been {\em initiated}. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must {\em not\/} call any other operation until the
+cancelled operation has returned.
+
+
+\subsection{\code{sane\_set\_io\_mode}}
+
+This function is used to set the I/O mode of handle \code{h}. The I/O mode
+can be either blocking or non-blocking. If argument \code{m} is
+\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise it's set to
+blocking mode. This function can be called only after a call to
+\code{sane\_start()} has been performed.
+\begin{quote}\index{sane\_set\_io\_mode}
+\begin{verbatim}
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+\end{verbatim}
+\end{quote}
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+the requested I/O mode.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_select\_fd}}
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle \code{h} that is readable if and only if image data is
+available (i.e., when a call to \code{sane\_read()} will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in \code{*fd}.
+\begin{quote}\index{sane\_get\_select\_fd}
+\begin{verbatim}
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+\end{verbatim}
+\end{quote}
+This function can be called only after a call to \code{sane\_start()}
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until \code{sane\_cancel()} or \code{sane\_start()} get called again
+or until \code{sane\_read()} returns with status
+\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call \code{sane\_read()}.
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+\code{SANE\_STATUS\_UNSUPPORTED}.
+
+Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using \code{select()}
+or \code{poll()} under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to \code{sane\_read()} is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_strstatus}}
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return \code{NULL}.
+The returned pointer is valid at least until the next call to this
+function is performed.
+\begin{quote}\index{sane\_strstatus}
+\begin{verbatim}
+const SANE_String_Const sane_strstatus (SANE_Status status);
+\end{verbatim}
+\end{quote}
+
+\section{Code Flow}\index{code flow}
+
+The code flow for the SANE API is illustrated in
+Figure~\ref{fig:flow}. Functions \code{sane\_init()} and
+\code{sane\_exit()} initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+\begin{figure}[htb]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/flow.eps,height=0.5\textheight}
+ \caption{Code flow}
+ \label{fig:flow}
+ \end{center}
+\end{figure}
+
+Function \code{sane\_get\_devices()} can be called any time after
+\code{sane\_init()} has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+Once a device has been chosen, it is opened using a call to
+\code{sane\_open()}. Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+An opened device can be setup through the corresponding device handle
+using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and
+\code{sane\_control\_option()}. While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle. However, as options are set, other options
+may become active or inactive. Thus, after setting an option, it
+may be necessary to re-read some or all option descriptors. While
+setting up the device, it is also admissible to call
+\code{sane\_get\_parameters()} to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+The device handle can be put in blocking or non-blocking mode by a
+call to \code{sane\_set\_io\_mode()}. Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+After the device is setup properly, image acquisition can be started
+by a call to \code{sane\_start()}. The backend calculates the exact
+image parameters at this point. So future calls to
+\code{sane\_get\_parameters()} will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to \code{sane\_read()} is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+\begin{changebar}
+Image data is collected by repeatedly calling \code{sane\_read()}
+until this function will return an end-of-file status
+(\code{SANE\_STATUS\_EOF}). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels of a red/green/blue image or multiple images),
+it can call \code{sane\_start()} again.
+If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the
+current image is complete. In this case, it should be tested, if
+\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set.
+If yes, further calls to \code{sane\_start()} can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on
+and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other
+than \code{SANE\_STATUS\_EOF} occurs in a SANE function.
+Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling \code{sane\_start} again, which will get
+you to the next frame, without having to read and discard the current one.
+
+In order to prematurely stop scanning and to reset the backend state,
+\code{sane\_cancel()} can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+
+When done using the device, the handle should be closed by a call to
+\code{sane\_close()}. Finally, before exiting the application,
+function \code{sane\_exit()} must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+The following C sample code implements a reference loop for acquiring
+multiple images:
+
+\begin{verbatim}
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+{
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status=sane_start(handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now let us see what the next frame brings. */
+ status=sane_get_parameters(handle,&parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD) break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if ( do_i_like_that(&parms) == NO ) continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer(...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while( SANE_STATUS_GOOD == ( status=sane_read(...) ) )
+ read_in_and_process_data_as_required();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF) {
+ break;
+ }
+
+ /* Now loop until we have all frames of an image. */
+ } while(!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+/* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+/* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+} while(parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel(handle);
+\end{verbatim}
+
+\end{changebar}
+
+
+\section{Well-Known Options}\index{well-known options}
+
+While most backend options are completely self-describing, there are
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+\subsection{Option Number Count}\index{option count}
+
+Option number 0 has an empty string as its name. The value of this
+option is of type \code{SANE\_TYPE\_INT} and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a
+frontend can directly read out the value of option number 0.
+
+\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option}
+
+\begin{changebar}
+Option \code{resolution} is used to select the resolution at which an
+image should be acquired. When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+\code{x\_resolution} and \code{y\_resolution}. Note that only
+the option \code{resolution} {\bf or} the options
+\code{x\_resolution} {\bf and} \code{y\_resolution} may be active.
+
+The type of this option is either \code{SANE\_TYPE\_INT} or
+\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\subsection{Preview Mode Option}\index{preview mode}
+
+The boolean option \code{preview} is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to \code{SANE\_TRUE},
+preview mode is in effect, when set to \code{SANE\_FALSE} image
+acquisition should proceed in normal quality mode. The setting of
+this option \emph{must not\/} affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option \code{resolution}). A backend is free to override the
+\code{resolution} value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+\begin{changebar}
+When the \code{preview} option is set the backend should transfer
+the image in frame type \code{SANE\_FRAME\_RAW} if possible.
+\end{changebar}
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+\subsection{Scan Area Options}\index{scan area options}
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure~\ref{fig:area}. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the {\em smallest} and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the {\em largest}. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+\begin{figure}[tbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/area.eps,height=0.3\textheight}
+ \caption{Scan area options}
+ \label{fig:area}
+ \end{center}
+\end{figure}
+
+The names of the four options that define the scan area are given in
+the table below:
+\begin{center}
+\begin{tabular}{ll}
+{\bf Name} & {\bf Description} \\
+\code{\defn{tl-x}} & Top-left $x$ coordinate value \\
+\code{\defn{tl-y}} & Top-left $y$ coordinate value \\
+\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\
+\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\
+\end{tabular}
+\end{center}
+There are several rules that should be followed by front and backends
+regarding these options:
+\begin{itemize}
+
+\item Backends must attach a unit of either pixels
+ (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to
+ these options. The unit of all four options must be identical.
+
+\item Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+\item A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+\item A frontend must work properly with any or all of these options
+ missing.
+
+\begin{changebar}
+\item A frontend may temporarily set the values in a way that
+\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than
+\code{br-y}.
+\end{changebar}
+
+\end{itemize}
+
+\subsection{Depth option}\index{bit depth option}
+\begin{changebar}
+Option \code{depth} is used to select the image depth in bits/sample
+in multi bit mode - (this means for 24 bit RGB mode this value must be 8).
+The type of this option is \code{SANE\_TYPE\_INT}.
+The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option \code{mode}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Gamma table options}\index{gamma table options}
+\begin{changebar}
+The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE}
+of the type \code{SANE\_TYPE\_INT} which represents the gamma correction
+table for gray. In color mode the \code{gamma-table} may be used to set
+a common gamma correction for red, green and blue. The options
+\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table}
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+\code{gamma-table} option, only the \code{red-}, \code{green-} and
+\code{blue-gamma-table} or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+\begin{verbatim}
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+\end{verbatim}
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog\_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Mode options}\index{mode options}
+\begin{changebar}
+The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: \code{Color}, \code{Gray}, \code{Halftone}
+and \code{Lineart}. \code{Color} and \code{Gray} are multi bit
+modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart}
+are single bit modes.\\
+This way a frontend can select e.g the mode \code{Gray}
+for scanning a fax.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+\subsection{Scan Source options}\index{source options}
+\begin{changebar}
+The option \code{source} is used to select the scan source
+(e.g. Automatic Document Feeder).
+It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and
+\code{Automatic Document Feeder}.\\
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Threshold}\index{threshold option}
+\begin{changebar}
+The option \code{threshold} is used to define the threshold
+for Lineart and maybe Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity
+(image data bit = 0). The backend has to
+scale the values in the following way:\\
+A value of 0.0 means all pixels get white /full intensity (all image data
+bits are 0). A value of 50.0 means intensities brighter than medium gray
+get white / full intensity (bit 0). A value of 100.0 means all pixels get
+black (all image data bits are 1). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Analog gamma}\index{analog gamma option}
+\begin{changebar}
+The option \code{analog-gamma} is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_NONE}. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options \code{analog-gamma-red},
+\code{analog-gamma-green} and \code{analog-gamma-blue}.
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect on the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Shadow}\index{shadow options}
+\begin{changebar}
+The option \code{shadow} is used to define the shadow level / black point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black). The backend has to scale the values in the following way:\\
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{shadow-red}, \code{shadow-green}
+and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Highlight}\index{hightlight options}
+\begin{changebar}
+The option \code{highlight} is used to define the highlight level / white point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity). The backend has to scale the values in the
+following way:\\
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{highlight-red}, \code{highlight-green}
+and \code{highlight-blue}, in this case \code{highlight} has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Turn lamp on and off}\index{lamp-on option}\index{lamp-off option}
+\begin{changebar}
+The option \code{lamp-on} is used to turn the lamp of the scanner on.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned on.
+
+The option \code{lamp-off} is used to turn the lamp of the scanner off.
+The type of this option is \code{SANE\_TYPE\_BUTTON}.
+The unit is \code{SANE\_UNIT\_NONE}. When the option is set
+then the lamp of the scanner is turned off.
+
+These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.\\
+\end{changebar}
+
+
+\subsection{Scanner buttons}\index{scanner button options}
+\begin{changebar}
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.\\
+
+A backend that does make available the scanner-buttons has to
+implement the following options:\\
+\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\
+\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\
+\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\
+When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS}
+or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined.
+
+A frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+\begin{itemize}
+
+\item
+A frontend that wants to read the button status has to lock the
+button functions at first. For this it does set the option
+\code{scanner-buttons-lock} to \code{SANE\_TRUE}.
+While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE}
+the backend does check if a lockfile (e.g. "backend"-buttons.lock) does exist.
+The lockfile has to be placed in a directory where every user has read and write access to.
+
+ \begin{itemize}
+ \item
+ If the lockfile does not exist then the backend creates the lockfile and writes the
+ process ID (PID) of the backend to the file. Button access is allowed: the value
+ of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \item
+ If the file does exist and the backend PID is not the file PID then the
+ backend has to check if the process with the PID stored in the lockfile
+ still is running. If yes then the button access is not allowed: the value of
+ option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile
+ is recreated and the PID of the backend is stored in the lockfile, button
+ access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \end{itemize}
+
+\item
+The frontend does read the value of option \code{scanner-buttons-lock}. If
+it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons.
+If it is \code{SANE\_FALSE} then access has been denied.
+
+\item
+If the button access is allowed the frontend has to do the following about
+once per second (while not scanning):
+ \begin{itemize}
+ \item
+ The frontend does set option \code{scanner-buttons-status-update}.
+ The backend checks if access to the buttons is allowed by comparing
+ the backend PID with the lockfile PID. If access is allowed it
+ does read the button status from the scanner and stores it in
+ the option \code{scanner-buttons-status}, each bit represents a button, a
+ value of 0 means the button is not pressed, a value of 1 means that the button
+ is pressed. When the scanner is busy the backend must not wait, it has to
+ return immedeatly and the button state keeps unchanged.
+ The backend has to implement a timeout function. When no button has been pressed
+ within a predefined time (e.g. 15 minutes) then the access permission is lost.
+ In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}
+ and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has
+ lost permission to access the scanner-button functions.
+ If access is not allowed it does set the \code{scanner-buttons-status} to 0.
+
+ \item
+ The frontend does read the value of option \code{scanner-buttons-status}
+ \end{itemize}
+
+\item
+When the frontend does exit or it does not want to use the buttons
+it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+The backend does check if the backend PID and the lockfile PID are
+the same. If this is true then it removes the lockfile and sets the value
+of \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\code{sane\_close()} should do the same as setting option
+\code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\end{itemize}
+\end{changebar}
+
+
+
+\input{net.tex}
+
+\chapter{Contact Information}\label{chap:contact}
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+\begin{quote}\index{mailing list}
+\begin{verbatim}
+majordomo@mostang.com
+\end{verbatim}
+\end{quote}
+To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``\code{help}'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+\begin{quote}
+\url{http://www.mostang.com/sane/}
+\end{quote}
+
+\newpage
+\input{sane.ind}
+
+\end{document}
diff --git a/sane2/0.08/doc000.html b/sane2/0.08/doc000.html
new file mode 100644
index 00000000..644c2e05
--- /dev/null
+++ b/sane2/0.08/doc000.html
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+Contents
+Contents
+
+
+
+List of Figures
+
+
+
+
+
+List of Tables
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc001.html b/sane2/0.08/doc001.html
new file mode 100644
index 00000000..4c024a9b
--- /dev/null
+++ b/sane2/0.08/doc001.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+./sane
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SANE Standard Version 2.0 proposal 0.08 - rauch/beck
+
+Dec 8, 2002
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc002.html b/sane2/0.08/doc002.html
new file mode 100644
index 00000000..fb16c3d7
--- /dev/null
+++ b/sane2/0.08/doc002.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+Preface
+
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+6.
+
+ The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc003.html b/sane2/0.08/doc003.html
new file mode 100644
index 00000000..c6872c9c
--- /dev/null
+++ b/sane2/0.08/doc003.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+About This Document
+
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+ The remainder of this document is organized as follows.
+Chapter 2 provides introductional material.
+Chapter 3 presents the environment SANE is designed
+for. Chapter 4 details the SANE Application Programmer
+Interface. Chapter 5 specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter 6 gives information on how
+to join the SANE development process.
+
+
+
+Changes since the last revision of this document are highlighted
+like this:
+
+
+ Paragraphs that changed since the last revision of the documention
+ are marked like this paragraph.
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc004.html b/sane2/0.08/doc004.html
new file mode 100644
index 00000000..132e99aa
--- /dev/null
+++ b/sane2/0.08/doc004.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+Introduction
+
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+ SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc005.html b/sane2/0.08/doc005.html
new file mode 100644
index 00000000..1fbad177
--- /dev/null
+++ b/sane2/0.08/doc005.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+Terminology
+
+
+An application that uses the SANE interface is called a SANE
+ frontend. A driver that implements the SANE interface is called a
+SANE backend. A meta backend provides some means to
+manage one or more other backends.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc006.html b/sane2/0.08/doc006.html
new file mode 100644
index 00000000..86d60331
--- /dev/null
+++ b/sane2/0.08/doc006.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+The SANE Environment
+
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+ Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE option. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+brightness whose value is an integer in the range from 0 to
+255.
+
+ With self-describing options, a backend need not be concerned with
+presentation issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the meaning of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc007.html b/sane2/0.08/doc007.html
new file mode 100644
index 00000000..d088ed3d
--- /dev/null
+++ b/sane2/0.08/doc007.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+Attaching to a SANE backend
+
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+
+
+
+
+
+
+ Figure 1: Example SANE Hiearchy
+
+
+
+
+ The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure 1. The figure shows that machine
+A uses a dynamic-linking based meta backend called dll to
+access the backends called pnm, mustek, and net.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called saned. The saned in
+turn has access to the hp and autolum backends through
+another instance of the dll backend. The autolum meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called qcam.
+
+ Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc008.html b/sane2/0.08/doc008.html
new file mode 100644
index 00000000..293501f9
--- /dev/null
+++ b/sane2/0.08/doc008.html
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+Image Data Format
+
+
+Arguably the most important aspect of an image acquisition system is how
+images are represented. The SANE approach is to define a simple yet powerful
+representation that is sufficient for vast majority of applications and
+devices. While the representation is simple, the interface has been defined
+carefully to allow extending it in the future without breaking backwards
+compatibility. Thus, it will be possible to accommodate future applications or
+devices that were not anticipated at the time this standard was created.
+
+ A SANE image is a rectangular area. The rectangular area is subdivided into a
+number of rows and columns. At the intersection of each row and column is a
+(preferable quadratic) pixel. A pixel consists of one or more sample values.
+Each sample value represents one channel (e.g., the red channel).
+
+ The SANE API transmits an image as a sequence of frames. Each frame covers
+the same rectangular area as the entire image, but may contain only a subset
+of the channels in the final image. For example, a red/green/blue image could
+either be transmitted as a single frame that contains the sample values for
+all three channels or it could be transmitted as a sequence of three frames:
+the first frame containing the red channel, the second the green channel, and
+the third the blue channel.
+
+ When transmitting an image frame by frame, the frontend needs to know what
+part of the image a frame represents (and how many frames it should expect).
+For that purpose, the SANE API tags every frame with a type and a format
+descriptor.
+
+
+ There are two different types of frames: pixel oriented frames
+ SANE_FRAME_RAW and arbitrary data frames
+ SANE_FRAME_MIME. These types are discussed in detail in the
+ following sections. The frame types used by the previous version 1 of this
+ standard (SANE_FRAME_GRAY, SANE_FRAME_RGB,
+ SANE_FRAME_RED, SANE_FRAME_GREEN, and
+ SANE_FRAME_BLUE) are obsolete and superseded by
+ SANE_FRAME_RAW.
+
+
+
+ The type of pixel oriented frames is SANE_FRAME_RAW. The
+ frame contains one or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the individual pixels that
+ is subject to further description in the format_desc member of the
+ SANE_Parameters structured type. See section 4.3.8
+ on page 4.3.8 for details about the format
+ descriptions.
+
+
+ Each sample value has a certain bit depth. The bit depth is fixed for the
+ entire image and can be as small as one bit. Valid bit depths are 1, 8, or
+ 16 bits per sample. If a device's natural bit depth is something else, it is
+ up to the driver to scale the sample values appropriately (e.g., a 4 bit
+ sample could be scaled by a factor of four to represent a sample value of
+ depth 8).
+
+
+ The complete image may consist of several different channels. The number of channels
+ is defined by member channels_per_image of SANE_Parameters.
+ The image may be transmitted in an arbitrary number of frames which can be
+ determined by watching the SANE_PFLAG_LAST_FRAME flag in said type (or by
+ counting the channels). Note: This frame type replaces all frame types of
+ the SANE standard version 1.
+
+
+ Conceptually, each pixel oriented frame is transmitted a byte at a time. Each
+byte may contain 8 sample values (for an image bit depth of 1), one full
+sample value (for an image bit depth of 8), or a partial sample value (for an
+image bit depth of 16 or bigger). In the latter case, the bytes of each
+sample value are transmitted in the machine's native byte order.
+
+
+ Backend Implementation Note
+
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+
+
+
+
+
+
+ Figure 2: Transfer order of image data bytes
+
+
+
+
+ The order in which the sample values in a frame are transmitted is illustrated
+in Figure 2. As can be seen, the values are transmitted row by
+row and each row is transmitted from left-most to right-most column. The
+left-to-right, top-to-bottom transmission order applies when the image is
+viewed in its normal orientation (as it would be displayed on a screen, for
+example).
+
+ If a frame contains multiple channels, then the channels are transmitted in an
+interleaved fashion. Figure 3 illustrates this for the case
+where a frame contains a complete red/green/blue image with a bit-depth of 8.
+
+
+
+
+
+ Figure 3: Bit and byte order of image data
+
+
+
+
+ For a bit depth of 1, each byte contains 8 sample values of a single
+channel. In other words, a bit depth 1 frame is transmitted in a byte
+interleaved fashion. The first sample of each byte is represented by the most
+significant bit.
+
+
+For gray channels at a bit depth of 1 only two sample values are possible: 1
+represents minimum intensity (black) and 0 represents maximum intensity
+(white). For all other channel types and bit depths a sample value of 0
+represents minimum intensity and larger values represent increasing intensity.
+
+
+
+It also is possible to transmit arbitrary (not necessaryly pixel oriented)
+data. This allows transmission of compressed images like jpeg, tiff, etc.
+
+ The type of arbitrary data frames is SANE_FRAME_MIME.
+The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is
+given in the format_desc member of the SANE_Parameters
+structured type (see section 4.3.8 on
+page 4.3.8). As such, it is assumed to be
+incomprehensible to the frontend, except for selected types the frontend is
+specifically capable of handling internally. The frontend is free to ignore
+those frames, or employ any appropriate means to otherwise handle this data
+(like saving them to disk or spawning an external viewer).
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc009.html b/sane2/0.08/doc009.html
new file mode 100644
index 00000000..43cd21b4
--- /dev/null
+++ b/sane2/0.08/doc009.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+The SANE Application Programmer Interface (API)
+
+
+
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called sane/sane-2.h. This file should
+normally be included via a C pre-processor directive of the form:
+
+ #include <sane/sane-2.h>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc010.html b/sane2/0.08/doc010.html
new file mode 100644
index 00000000..8bb6685b
--- /dev/null
+++ b/sane2/0.08/doc010.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+Version Control
+
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+ SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+ The SANE API provides the following five macros to manage version
+numbers.
+
+
+ - SANE_CURRENT_MAJOR:
- The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+
- SANE_VERSION_CODE(maj,min,bld):
-
+
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (maj), the minor version number min,
+ and the build revision of a backend (bld). The major and
+ minor version numbers must be in the range 0...255 and the
+ build revision must be in the range 0...65535.
+
+
Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ - SANE_VERSION_MAJOR(vc):
- This macro returns the
+ major version number component of the version code passed in
+ argument vc.
+
- SANE_VERSION_MINOR(vc):
- This macro returns the
+ minor version number component of the version code passed in
+ argument vc.
+
- SANE_VERSION_BUILD(vc):
- This macro returns the
+ build revision component of the version code passed in argument
+ vc.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc011.html b/sane2/0.08/doc011.html
new file mode 100644
index 00000000..9576b8f8
--- /dev/null
+++ b/sane2/0.08/doc011.html
@@ -0,0 +1,1039 @@
+
+
+
+
+
+
+
+
+Data Types
+
+
+
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+
+ typedef some-scalar-type SANE_Byte;
+ typedef some-scalar-type SANE_Word;
+
+SANE_Byte must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. SANE_Word must be
+capable of holding any of the following:
+
+ - the truth values SANE_FALSE and SANE_TRUE
+
- signed integers in the range -231...231-1
+
- fixed point values in the range -32768...32767.9999 with
+ a resolution of 1/65536
+
- 32 bits (for bit sets)
+
+Note that the SANE standard does not define what C type
+SANE_Byte and SANE_Word map to. For example, on some
+platforms, the latter may map to long int whereas on others it
+may map to int. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+
+
+SANE_Bool is used for variables that can take one of
+the two truth values SANE_FALSE and
+SANE_TRUE. The former value is defined to be 0,
+whereas the latter is 1.1 The C
+declarations for this type are given below.
+
+
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+
+
+Note that SANE_Bool is simply an alias of SANE_Word. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Bool whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+
+
+SANE_Int is used for variables that can take integer
+values in the range -232 to 231-1. Its C declaration is
+given below.
+
+
+typedef SANE_Word SANE_Int;
+
+
+Note that SANE_Int is simply an alias of SANE_Word. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Int whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+
+SANE_Fixed is used for variables that can take fixed
+point values in the range -32768 to 32767.9999 with a resolution
+of 1/65535. The C declarations relating to this type are given
+below.
+
+
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+
+
+The macro SANE_FIXED_SCALE_SHIFT gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of 1/65536.
+
+Note that SANE_Fixed is simply an alias of SANE_Word.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+SANE_Fixed whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+ For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+
+
+
+ - SANE_FIX(d):
- Returns the largest SANE
+ fixed-point value that is smaller than the double value d.
+ No range checking is performed. If the value of d is out of
+ range, the result is undefined.
+
+
- SANE_UNFIX(w):
- Returns the nearest
+ double machine number that corresponds to fixed-point value
+ w.
+
+
+
+SANE does not require that the following two expressions hold
+true (even if the values of w and d are in range):
+
+
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+
+
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+
+
+
+Type SANE_Char represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+char type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+sizeof(SANE_Char)==sizeof(char).
+
+
+typedef char SANE_Char;
+
+
+
+
+
+Type SANE_String represents a text string as a sequence
+of C char values. The end of the sequence is indicated by a
+'\0' (NUL) character.
+
+
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+
+
+The type SANE_String_Const is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+
+
+const SANE_String str;
+
+
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+
+Access to a scanner is provided through an opaque type called
+SANE_Handle. The C declaration of this type is given
+below.
+
+
+typedef void *SANE_Handle;
+
+
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a SANE_Handle. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+
+Most SANE operations return a value of type SANE_Status
+to indicate whether the completion status of the operation. If an
+operation completes successfully, SANE_STATUS_GOOD is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table 1. It is recommended to use function
+sane_strstatus() to convert status codes into a legible
+string.
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+SANE_STATUS_GOOD
+ |
+ 0 |
+ Operation completed succesfully. |
+
+
+SANE_STATUS_UNSUPPORTED
+ |
+ 1 |
+ Operation is not supported. |
+
+
+SANE_STATUS_CANCELLED
+ |
+ 2 |
+ Operation was cancelled. |
+
+
+SANE_STATUS_DEVICE_BUSY
+ |
+ 3 |
+ Device is busy---retry later. |
+
+
+SANE_STATUS_INVAL
+ |
+ 4 |
+ Data or argument is invalid. |
+
+
+SANE_STATUS_EOF
+ |
+ 5 |
+ No more data available (end-of-file). |
+
+
+SANE_STATUS_JAMMED
+ |
+ 6 |
+ Document feeder jammed. |
+
+
+SANE_STATUS_NO_DOCS
+ |
+ 7 |
+ Document feeder out of documents. |
+
+
+SANE_STATUS_COVER_OPEN
+ |
+ 8 |
+ Scanner cover is open. |
+
+
+SANE_STATUS_IO_ERROR
+ |
+ 9 |
+ Error during device I/O. |
+
+
+SANE_STATUS_NO_MEM
+ |
+ 10 |
+ Out of memory. |
+
+
+SANE_STATUS_ACCESS_DENIED
+ |
+ 11 |
+ Access to resource has been denied. |
+
+
+
+ |
+
+ Table 1: Status Codes
+
+
+
+
+
+
+Each SANE device is represented by a structure of type
+SANE_Device. The C declaration of this type is given
+below.
+
+
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const backend_website;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+
+
+
+
+The structure provides the unique name of the scanner in member
+name. It is this unique name that should be passed in a call
+to sane_open(). The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is recommended that backends keep
+unique names below 32 characters in length. However, applications
+must be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members vendor, model, and type are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+
+
+
+
+
+
+Vendor Strings |
+
+
+
+ AGFA |
+ Microtek |
+
+
+ Abaton |
+ Minolta |
+
+
+ Acer |
+ Mustek |
+
+
+ Apple |
+ NEC |
+
+
+ Artec |
+ Nikon |
+
+
+ Avision |
+ Plustek |
+
+
+ CANON |
+ Polaroid |
+
+
+ Connectix |
+ Ricoh |
+
+
+ Epson |
+ Sharp |
+
+
+ Fujitsu |
+ Siemens |
+
+
+ Hewlett-Packard |
+ Tamarack |
+
+
+ IBM |
+ UMAX |
+
+
+ Kodak |
+ Noname |
+
+
+ Logitech |
+ |
+
+
+
+ |
+
+
+
+
+Type Strings |
+
+
+
+ film scanner |
+
+
+ flatbed scanner |
+
+
+ frame grabber |
+
+
+ handheld scanner |
+
+
+ multi-function peripheral |
+
+
+ sheetfed scanner |
+
+
+ still camera |
+
+
+ video camera |
+
+
+ virtual device |
+
+
+
+ |
+
+
+ Table 2: Predefined Device Information Strings
+
+
+
+Note that vendor string Noname can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+
+The backend has to set up the string email_backend_author
+with the name and the email address of the backend author or a contact person
+in the format:
+
+Firstname Lastname <name@domain.org>
+
+
+The string backend_website should be set up by the backend
+with the website or ftp address of the backend in the format:
+
+http://www.domain.org/sane-hello/index.html
+
+
+The backend should fill the string device_location with a
+text that describes where a user can find this device. The text
+should be configurable by the administrator. This could e.g. look
+like this:
+
+building 93, 2nd plane, room 2124
+
+
+The string comment can be used to display any comment about the device
+to the user. The text should be configurable by the administrator.
+
+ The string reserved_string is unused currently but planned for
+future use.
+
+ All unused strings must be set to ``'' by the backend.
+
+ With member backend_version_code a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+ The member backend_capability_flags contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+ The member reserved_int is planned for future use, the backend has
+to set the value of the integer to 0.
+
+
+
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+SANE_Option_Descriptor type is given below.
+
+
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+
+
+
+
+
+Member name is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (a--z),
+digits (0--9), or the dash character (-) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+
+
+Member title is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+
+
+Member desc is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+
+
+Member type specifies the type of the option value. The
+possible values for type SANE_Value_Type are described
+in Table 3.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+ SANE_TYPE_BOOL |
+ 0 |
+ Option value is of type
+ SANE_Bool. |
+
+
+
+ SANE_TYPE_INT |
+ 1 |
+ Option value is of type
+ SANE_Int. |
+
+
+
+ SANE_TYPE_FIXED |
+2 |
+ Option value is of type
+ SANE_Fixed. |
+
+
+
+ SANE_TYPE_STRING |
+3 |
+ Option value is of type
+ SANE_String. |
+
+
+
+ SANE_TYPE_BUTTON |
+ 4 |
+ An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. |
+
+
+
+ SANE_TYPE_GROUP |
+ 5 |
+ An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members title and
+type are valid in the option descriptor. |
+
+
+
+
+ |
+
+ Table 3: Option Value Types (SANE_Value_Type)
+
+
+
+
+
+
+Member unit specifies what the physical unit of the option
+value is. The possible values for type SANE_Unit are
+described in Table 4. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_UNIT_NONE |
+ 0 |
+ Value is unit-less (e.g., page count). |
+
+
+SANE_UNIT_PIXEL |
+ 1 |
+ Value is in number of pixels. |
+
+
+SANE_UNIT_BIT |
+ 2 |
+ Value is in number of bits. |
+
+
+SANE_UNIT_MM |
+ 3 |
+ Value is in millimeters. |
+
+
+SANE_UNIT_DPI |
+ 4 |
+ Value is a resolution in dots/inch. |
+
+
+SANE_UNIT_PERCENT |
+ 5 |
+ Value is a percentage. |
+
+
+SANE_UNIT_MICROSECOND |
+ 6 |
+ Value is time in µ-seconds. |
+
+
+
+
+ |
+
+ Table 4: Physical Units (SANE_Unit)
+
+
+
+
+
+
+Member size specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+
+
+ - SANE_TYPE_STRING:
- The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating NUL character is considered to be part of the
+ string. Note that the terminating NUL character must
+ always be present in string option values.
+
- SANE_TYPE_INT, SANE_TYPE_FIXED:
- The size
+ must be a positive integer multiple of the size of a
+ SANE_Word. The option value is a vector of length
+
+
+
+ size/sizeof(SANE_Word).
+
+ - SANE_TYPE_BOOL:
- The size must be set to
+ sizeof(SANE_Word).
+
- SANE_TYPE_BUTTON, SANE_TYPE_GROUP:
- The
+ option size is ignored.
+
+
+
+
+
+Member cap describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table 5. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+
+
+
+ - SANE_OPTION_IS_ACTIVE(cap):
- This macro
+ returns SANE_TRUE if and only if the option with the
+ capability set cap is currently active.
+
+
- SANE_OPTION_IS_SETTABLE(cap):
- This
+ macro returns SANE_TRUE if and only if the option with the
+ capability set cap is software settable.
+
+
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+ SANE_CAP_SOFT_SELECT |
+ 1 |
+ The option
+ value can be set by a call to sane_control_option(). |
+
+
+
+ SANE_CAP_HARD_SELECT |
+ 2 |
+ The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE_CAP_SOFT_SELECT (either one of them can be set, but not both
+ simultaneously). |
+
+
+
+ SANE_CAP_SOFT_DETECT |
+ 4 |
+ The option
+ value can be detected by software. If
+ SANE_CAP_SOFT_SELECT is set, this capability must
+ be set. If SANE_CAP_HARD_SELECT is set, this capability
+ may or may not be set. If this capability is set but neither
+ SANE_CAP_SOFT_SELECT nor SANE_CAP_HARD_SELECT
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. |
+
+
+
+ SANE_CAP_EMULATED |
+ 8 |
+ If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. |
+
+
+
+ SANE_CAP_AUTOMATIC |
+ 16 |
+ If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling sane_control_option()
+ with an action value of SANE_ACTION_SET_AUTO. |
+
+
+
+ SANE_CAP_INACTIVE |
+ 32 |
+ If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). |
+
+
+
+ SANE_CAP_ADVANCED |
+ 64 |
+
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option''.
+
+ If this capability is set for an option of type
+ SANE_TYPE_GROUP, all options belonging to the group are also
+ advanced, even if they don't set the capabilty themselves.
+
+ A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ |
+
+
+
+ SANE_CAP_HIDDEN |
+ 128 |
+
+
+ If set, this capability indicates that the option shouldn't be
+ displayed to and used by the user directly. Instead a hidden option
+ is supposed to be automatically used by the frontend, like e.g. the
+ ``preview'' option.
+ If this capability is set for an option of type
+ SANE_TYPE_GROUP, all options belonging to the group are also
+ hidden, even if they don't set the capabilty themselves.
+ A frontend typically doesn't display such options by default but there
+ should be a way to override this default behaviour.
+
+ |
+
+
+
+ SANE_CAP_ALWAYS_SETTABLE |
+ 256 |
+
+
+ If set, this capability indicates that the option may be at any time between
+ sane_open() and sane_close(). I.e. it's allowed to set it
+ even while an image is acquired.
+
+ |
+
+
+
+
+ |
+
+ Table 5: Option Capabilities
+
+
+
+
+
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member constraint_type indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member constraint. The possible values of type
+SANE_Constraint_Type and the interpretation of the
+constraint union is described in Table 6.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_CONSTRAINT_NONE |
+ 0 |
+ The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. |
+
+
+
+ SANE_CONSTRAINT_RANGE |
+ 1 |
+ This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member constraint.range points to
+ a range of the type SANE_Range. This type is illustrated
+ below:
+
+
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+
+
+ All three members in this structure are interpreted according to the
+ option value type (SANE_TYPE_INT or SANE_TYPE_FIXED).
+ Members min and max specify the minimum and maximum
+ values, respectively. If member quant is non-zero, it
+ specifies the quantization value. If l is the minimum value, u
+ the maximum value and q the (non-zero) quantization of a range,
+ then the legal values are v=k*q+l for all non-negative
+ integer values of k such that v<=u. |
+
+
+
+ SANE_CONSTRAINT_WORD_LIST |
+ 2 |
+ This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ constraint.word_list points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (SANE_Int) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (SANE_TYPE_INT or SANE_TYPE_FIXED). |
+
+
+
+ SANE_CONSTRAINT_STRING_LIST |
+ 3 |
+ This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ constraint.string_list points to a NULL terminated
+ list of strings that enumerate the legal values for the option
+ value.
+ |
+
+
+ |
+
+ Table 6: Option Value Constraints
+
+
+
+
+
+
+All backend texts should be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+
+
+The keyword SANE_I18N is used to mark a text for translation.
+SANE_I18N has to be defined as a dummy prototype:
+
+
+
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+
+
+
+You should not mark prototypes or variables with SANE_I18N
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (SANE_I18N(START_SCAN_TEXT)) and
+variables (SANE_I18N(option[7].name)).
+
+ A correct marked text can look like this:
+snprintf(buf, sizeof(buf), SANE_I18N("Start scan")
+or
+#define START_SCAN_TEXT SANE_I18N("Start scan").
+It also is allowed to mark texts in structs because the
+prototype SANE_I18N has no effect to the compiler.
+
+
+All option texts that are visible for the user should be marked for
+translation. This is:
+
+-
+member title
+
-
+member desc
+
-
+member string_list
+
+of SANE_Option_Descriptor.
+
+It is not allowed to mark/translate member name.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+
+The recommended file formats for translation tables are the po files
+and mo or gmo files.
+The po file contains the original text marked with the keyword msgid
+and the translated text marked with the keyword msgstr.
+A po file that contains all needed msgids can be created
+e.g. by the gnu gettext tool xgettext with the option
+-k SANE_I18N.
+The translator adds the translated texts to the po files.
+The gettext tool msgfmt converts the po files to the
+mo or gmo files.
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function gettext
+to translate the texts. This e.g. can look like this:
+snprintf(buf, sizeof(buf), gettext("english text"));
+
+ If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the po files to create its
+own translation tables from it.
+
+ Note that it is strongly recommended to use the gettext tools.
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc012.html b/sane2/0.08/doc012.html
new file mode 100644
index 00000000..ba52c800
--- /dev/null
+++ b/sane2/0.08/doc012.html
@@ -0,0 +1,871 @@
+
+
+
+
+
+
+
+
+Operations
+
+
+
+
+This function must be called before any other SANE function can be called.
+The behavior of a SANE backend is undefined if this function is not called
+first or if the status code returned by sane_init is different from
+SANE_STATUS_GOOD. The version code of the backend is returned
+in the value pointed to by version_code. If that pointer is
+NULL, no version code is returned. Argument authorize is either
+a pointer to a function that is invoked when the backend requires
+authentication for a specific resource or NULL if the frontend does not
+support authentication.
+
+
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+
+
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+
+ sane_open, sane_control_option, sane_start
+
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+
+
+
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+
+
+Three arguments are passed to the authorization function:
+resource is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The username
+and password arguments are (pointers to) an array of
+SANE_MAX_USERNAME_LEN and SANE_MAX_PASSWORD_LEN
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+must be ASCII-NUL terminated.
+
+
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to sane_close(), but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than sane_init() may be called (regardless
+of the status value returned by sane_exit(). Neglecting to
+call this function may result in some resources not being released
+properly.
+
+
+void sane_exit (void);
+
+
+
+
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a NULL terminated array of pointers to SANE_Device
+structures in *device_list. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to sane_exit() is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument local_only is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+
+
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+
+
+
+This function may fail with SANE_STATUS_NO_MEM if an
+insufficient amount of memory is available.
+
+
+
+ Backend Implementation Note
+
+ SANE does not require that this function is called before a
+ sane_open() call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+
+ The same information about
+ a device has to be returned when sane_open is called.
+
+
+
+
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+name. If the call completes successfully, a handle for the
+device is returned in *h.
+
+The description of the device
+is returned in **device_description. This is the
+same description that is returned in the list by sane_get_devices.
+The returned data *h and *device_description is guaranteed
+to remain unchanged and valid until a call to sane_close()
+is performed.
+
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+
+
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+
+
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_DEVICE_BUSY:
- The device is currently
+ busy (in use by somebody else).
+
- SANE_STATUS_INVAL:
- The device name is not valid.
+
- SANE_STATUS_IO_ERROR:
- An error occured while
+ communicating with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the device has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function terminates the association between the device handle
+passed in argument h and the device it represents. If the
+device is presently active, a call to sane_cancel() is
+performed first. After this function returns, handle h must
+not be used anymore.
+
+
+
+void sane_close (SANE_Handle h);
+
+
+
+
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number n of the device
+represented by handle h. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle h (the count
+includes option 0). If n is not a valid option index, the function
+returns NULL. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+
+
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+
+
+
+
+
+This function is used to set or inquire the current value of option
+number n of the device represented by handle h. The
+manner in which the option is controlled is specified by parameter
+a. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+v. It is a pointer to the memory that holds the option value.
+The memory area pointed to by v must be big enough to hold the
+entire option value (determined by member size in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument v may be shorter since the backend will stop
+reading the option value upon encountering the first NUL
+terminator in the string. If argument i is not NULL,
+the value of *i will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+
+
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+
+
+
+The way the option is affected by a call to this function is
+controlled by parameter a which is a value of type
+SANE_Action. The possible values and their meaning is
+described in Table 7.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_ACTION_GET_VALUE |
+ 0 |
+ Get current option value. |
+
+
+
+ SANE_ACTION_SET_VALUE |
+ 1 |
+ Set option value. The
+ option value passed through argument v may be modified by the
+ backend if the value cannot be set exactly. |
+
+
+
+ SANE_ACTION_SET_AUTO |
+ 2 |
+ Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter v is completely ignored in this case and
+ may be NULL. |
+
+
+
+
+ |
+
+ Table 7: Action Values (SANE_Action)
+
+
+
+
+ After setting a value via an action value of
+SANE_ACTION_SET_VALUE, additional information on how well the
+request has been met is returned in *i (if i is
+non-NULL). The returned value is a bitset that may contain any
+combination of the values described in Table 8.
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_INFO_INEXACT |
+ 1 |
+ This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in *i has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. |
+
+
+
+ SANE_INFO_RELOAD_OPTIONS |
+ 2 |
+
+The setting of an option may affect the
+
+ value, the availability, or the constraint of one or more
+ other options.
+
+ When this happens, the SANE backend sets this
+ member in *i to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. |
+
+
+
+ SANE_INFO_RELOAD_PARAMS |
+ 4 |
+
+The setting of an option may affect the parameter values (see
+sane_get_parameters()).
+If setting an option affects the parameter values, this member will
+be set in *i. Note that this member may be set even if the
+parameters did not actually change. However, it is guaranteed that
+the parameters never change without this member being set.
+ |
+
+
+
+ SANE_INFO_INVALIDATE_PREVIEW |
+ 8 |
+
+The setting of an option may affect the validity of the preview that
+was acquired by the frontend earlier. When the preview image would change
+significantly if it was scanned again, the SANE backend
+sets this member in *i to indicate that the application should inform the
+user of the invalidity of the preview. Examples for such option
+settings may include setting a different scan source or significantly
+changing the exposure.
+ |
+
+
+
+
+ |
+
+ Table 8: Additional Information Returned When Setting an Option
+
+
+
+
+ This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_UNSUPPORTED:
- The operation is not
+ supported for the specified handle and option number.
+
- SANE_STATUS_INVAL:
- The option value is not valid.
+
- SANE_STATUS_IO_ERROR:
- An error occured while
+ communicating with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the option has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (sane_start() has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+sane_start() gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle h of the device for which the
+parameters should be obtained and a pointer p to a parameter
+structure. The parameter structure is described in more detail below.
+
+
+
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+
+
+
+The scan parameters are returned in a structure of type
+SANE_Parameters. The C declaration of this structure
+is given below.
+
+
+
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String format_desc;
+ SANE_String proposed_filename;
+ SANE_String proposed_comment;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+
+
+
+
+
+Member format specifies the format of the next frame to be
+returned. The possible values for type SANE_Frame are
+described in Table 9. The meaning of these
+values is described in more detail in section 3.2.
+The frame types used by version 1 of this standard
+(SANE_FRAME_GRAY, SANE_FRAME_RGB,
+SANE_FRAME_RED, SANE_FRAME_GREEN, and
+SANE_FRAME_BLUE) are obsolete and superseded by the
+frame type SANE_FRAME_RAW.
+
+
+
+
+
+
+Symbol |
+Code |
+Description |
+
+
+
+
+
+ SANE_FRAME_RAW |
+ 5 |
+ Arbitrary pixel property transmission. |
+
+
+SANE_FRAME_MIME |
+ 6 |
+ Data described by a mime descriptor. |
+
+
+
+
+ |
+
+ Table 9: Frame Format (SANE_Frame)
+
+
+
+
+ The flags member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+
+
+-
+SANE_PFLAG_LAST_FRAME (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the only frame
+or the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image).
+
+
-
+SANE_PFLAG_MORE_IMAGES (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. The frontend is expected to call sane_start
+again after the end of the current scan to get more images, e.g.
+from an automatic document feeder. It is permissible to set that value to 1 ``in good
+faith'', as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer. E.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at sane_start().
+
+
-
+SANE_PFLAG_NEW_PAGE (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+
-
+SANE_PFLAG_BACKSIDE (bit 3, bitvalue 8) tells if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+
+
+Note, that flags is compatible to member last_frame of
+SANE_Parameters of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+
+
+ Member lines specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call sane_read() until it
+returns a status of SANE_STATUS_EOF.
+
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+
+
+ Member bytes_per_line specifies the number of bytes that comprise one
+scan line.
+
+If this value is not applicable for image data of type
+SANE_FRAME_MIME, it must be set to -1. In this case the frontend
+should just call sane_read until SANE_STATUS_EOF is returned.
+
+
+ Member depth specifies the number of bits per sample.
+
+Note, that only -1 (for not applicable), 1, and multiples of 8 are
+allowed values. Data with other depths has to be scaled up accordingly.
+Depth 1 is only allowed if the image consists of a single channel (lineart or
+halftone modes).
+
+
+ Member pixels_per_line specifies the number of pixels that
+comprise one scan line.
+
+If unavailable or not applicable, set to -1.
+
+
+ Assume B is the number of channels in the frame, then the bit depth
+d (as given by member depth) and the number of pixels per
+line n (as given by this member pixels_per_line) are
+related to c, the number of bytes per line (as given by member
+bytes_per_line) as follows:
+
+
+
+
+
+ c >= \left{
+ ll
+ \lceil B*n / 8\rceil if d=1
+ | (1) |
+
+ B*n *d / 8 if d>1
+
+ \right.
+
+
+
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+
+Member channels_per_image specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+channels_per_image has to be the same for all frames for this image.
+
+Member format_desc is used to describe the details of the frame
+formats. Its meaning differs between the two formats:
+
+
+-
+SANE_FRAME_RAW:
+The format_desc contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+
A plane is descibed by one channel, e.g. ``gray'' or ``gray:12''.
+
+ Channel interleaved data is described by a comma separated list of channel descriptions,
+for example ``red,green,blue'' or ``red:8,green:8,blue:8'',
+the channel data is sent in the given order.
+
+ The depth information does not define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member depth.
+
+ Well known channels are red, green, blue and gray.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be infrared or
+a wavelength description like 1100nm, but be aware that a
+frontend may not be able to display such channels with useful colors.
+
+ Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member channels_per_image.
+
+ -
+SANE_FRAME_MIME:
+
+
format_desc contains the MIME Content-Type: header field as described
+in RFC 1521 (section 4) without the prefixing "Content-Type:". MIME Types and
+subtypes should be either chosen from the RFC or from the list of
+IANA-approved values. The data stream must be compliant with the corresponding
+specification.
+
+ When data is transmitted with the frame type SANE_FRAME_MIME
+all data has to be transmitted within one frame, multiple frames
+are not allowed (so the flag last_frame has to be set
+when using this frame type).
+
+ A SANE backend must be able to at least optionally transmit
+SANE_FRAME_RAW (possibly with the help of a meta backend), if the
+hardware supports delivering image data at all. For data that doesn't
+comprise images, it's admisable to only provide MIME frames. As a
+general principle, if there are several choices in MIME types, the
+format that is most widely implemented should be used.
+
+
+The member proposed_filename can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to ``''.
+
+ In the case of raw frames, proposed_filename is expected to hold
+the basename for the image, with the extension determined by the save function
+of the frontend, as the frontend can fully understand the data and is thus
+able to encode it in any format it wishes.
+
+ For MIME frames proposed_filename can contain either:
+
+
+-
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+
-
+A complete filename, including extension.
+
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+ The string proposed_comment can be used to transmit additional
+image information, that can be stored in the comment areas several file formats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc. Set to ``'' if unused.
+
+ The members dpi_x and dpi_y encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different resolutions of
+each image. It is not permissible to change resolution between frames of the
+same image. If not applicable, set to -1.
+
+ The member reserved is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+
+
+
+
+This function initiates aquisition of an image from the device
+represented by handle h.
+
+
+SANE_Status sane_start (SANE_Handle h);
+
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_DEVICE_BUSY:
- The device is busy. The
+ operation should be retried later.
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_INVAL:
- The scan cannot be started with the current
+ set of options. The frontend should reload the option descriptors, as if
+ SANE_INFO_RELOAD_OPTIONS had been returned from a call to
+ sane_control_option(), since the device's capabilities may have
+ changed.
+
+
+
+
+
+This function is used to read image data from the device represented
+by handle h. Argument buf is a pointer to a memory area
+that is at least maxlen bytes long. The number of bytes
+returned is stored in *len. A backend must set this to zero
+when a status other than SANE_STATUS_GOOD is returned).
+When the call succeeds, the number of bytes returned can be anywhere in
+the range from 0 to maxlen bytes.
+
+
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+
+
+
+For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle h.
+
+- If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+
- If the device is in non-blocking I/O mode, the call returns
+ immediately with status SANE_STATUS_GOOD and with
+ *len set to zero.
+
+The I/O mode of handle h can be set via a call to
+sane_set_io_mode().
+
+This function may fail with one of the following status codes.
+
+
+- SANE_STATUS_CANCELLED:
- The operation was cancelled through
+ a call to sane_cancel.
+
- SANE_STATUS_EOF:
- No more data is available for the
+ current frame.
+
+If sane_read sends back any image data it
+is not allowed to return with SANE_STATUS_EOF.
+
+
- SANE_STATUS_JAMMED:
- The document feeder is jammed.
+
- SANE_STATUS_NO_DOCS:
- The document feeder is out of
+ documents.
+
- SANE_STATUS_COVER_OPEN:
- The scanner cover is open.
+
- SANE_STATUS_IO_ERROR:
- An error occurred while communicating
+ with the device.
+
- SANE_STATUS_NO_MEM:
- An insufficent amount of memory
+ is available.
+
- SANE_STATUS_ACCESS_DENIED:
- Access to the device has
+ been denied due to insufficient or invalid authentication.
+
+
+
+
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+h.
+
+
+void sane_cancel (SANE_Handle h);
+
+
+This function can be called at any time (as long as handle h is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does not imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been initiated. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of SANE_STATUS_CANCELLED). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must not call any other operation until the
+cancelled operation has returned.
+
+
+
+This function is used to set the I/O mode of handle h. The I/O mode
+can be either blocking or non-blocking. If argument m is
+SANE_TRUE, the mode is set to non-blocking mode, otherwise it's set to
+blocking mode. This function can be called only after a call to
+sane_start() has been performed.
+
+
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+
+
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value SANE_STATUS_UNSUPPORTED is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument m set to SANE_FALSE is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+the requested I/O mode.
+
+
+
+
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle h that is readable if and only if image data is
+available (i.e., when a call to sane_read() will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in *fd.
+
+
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+
+
+This function can be called only after a call to sane_start()
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until sane_cancel() or sane_start() get called again
+or until sane_read() returns with status
+SANE_STATUS_EOF). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+sane_read() call would return SANE_STATUS_EOF.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call sane_read().
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+SANE_STATUS_UNSUPPORTED.
+
+ Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using select()
+or poll() under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to sane_read() is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+ This function may fail with one of the following status codes:
+
+
+- SANE_STATUS_INVAL:
- No image acquisition is pending.
+
- SANE_STATUS_UNSUPPORTED:
- The backend does not support
+ this operation.
+
+
+
+
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return NULL.
+The returned pointer is valid at least until the next call to this
+function is performed.
+
+
+SANE_String_Const sane_strstatus (SANE_Status status);
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc013.html b/sane2/0.08/doc013.html
new file mode 100644
index 00000000..529a4c0a
--- /dev/null
+++ b/sane2/0.08/doc013.html
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+Code Flow
+
+
+The code flow for the SANE API is illustrated in
+Figure 4. Functions sane_init() and
+sane_exit() initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+
+
+
+
+ Figure 4: Code flow
+
+
+
+
+ Function sane_get_devices() can be called any time after
+sane_init() has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+ Once a device has been chosen, it is opened using a call to
+sane_open(). Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+ An opened device can be setup through the corresponding device handle
+using functions sane_get_option_descriptor() and
+sane_control_option(). While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle.
+
+ However, as options are set, other options may become active or inactive or
+ their constraint may change. Thus, after setting an option, it may be
+ necessary to re-read the descriptors.
+
+While
+setting up the device, it is also admissible to call
+sane_get_parameters() to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+ The device handle can be put in blocking or non-blocking mode by a
+call to sane_set_io_mode(). Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+ After the device is setup properly, image acquisition can be started
+by a call to sane_start(). The backend calculates the exact
+image parameters at this point. So future calls to
+sane_get_parameters() will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to sane_read() is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+sane_set_io_mode() and/or sane_get_select_fd() at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+
+Image data is collected by repeatedly calling sane_read()
+until this function will return an end-of-file status
+(SANE_STATUS_EOF). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels of a red/green/blue image or multiple images),
+it can call sane_start() again.
+If the SANE_PFLAG_LAST_FRAME bit is set in flags, the
+current image is complete. In this case, it should be tested, if
+flags has the SANE_PFLAG_MORE_IMAGES bit set.
+If yes, further calls to sane_start() can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+sane_start() return an error like SANE_STATUS_NO_DOCS.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with SANE_PFLAG_LAST_FRAME on
+and SANE_PFLAG_MORE_IMAGES off is encountered, or an error other
+than SANE_STATUS_EOF occurs in a SANE function.
+Note that SANE_STATUS_NO_DOCS also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling sane_start again, which will get
+you to the next frame, without having to read and discard the current one.
+
+ In order to prematurely stop scanning and to reset the backend state,
+sane_cancel() can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+
+
+ When done using the device, the handle should be closed by a call to
+sane_close(). Finally, before exiting the application,
+function sane_exit() must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+
+The following C sample code implements a reference loop for acquiring
+multiple images:
+
+
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+ {
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status = sane_start (handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD)
+ break;
+
+ /* Now let us see what the next frame brings. */
+ status = sane_get_parameters (handle, &parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD)
+ break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if (do_i_like_that (&parms) == NO)
+ continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer (...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while (SANE_STATUS_GOOD == (status = sane_read (...)))
+ read_in_and_process_data_as_required ();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF)
+ break;
+
+ /* Now loop until we have all frames of an image. */
+ }
+ while (!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+ /* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+ /* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+ }
+while (parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel (handle);
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc014.html b/sane2/0.08/doc014.html
new file mode 100644
index 00000000..893a7e6b
--- /dev/null
+++ b/sane2/0.08/doc014.html
@@ -0,0 +1,486 @@
+
+
+
+
+
+
+
+
+Well-Known Options
+
+
+While most backend options are completely self-describing, there are
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+
+
+Option number 0 has an empty string as its name. The value of this
+option is of type SANE_TYPE_INT and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+sane_get_option_descriptor() returns NULL, or a
+frontend can directly read out the value of option number 0.
+
+
+
+Option resolution is used to select the resolution at which an
+image should be acquired.
+
+When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+x-resolution and y-resolution. Note that only
+the option resolution or the options
+x-resolution and y-resolution may be active at the
+same time.
+
+
+ The type of this option is either SANE_TYPE_INT or
+SANE_TYPE_FIXED. The unit is SANE_UNIT_DPI (dots/inch).
+
+ These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+
+
+
+The boolean option preview is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to SANE_TRUE,
+preview mode is in effect, when set to SANE_FALSE image
+acquisition should proceed in normal quality mode. The setting of
+this option must not affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option resolution). A backend is free to override the
+resolution value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+
+When the preview option is set the backend should transfer
+the image in frame type SANE_FRAME_RAW if possible.
+
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure 5. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the smallest and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the largest. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+
+
+
+
+ Figure 5: Scan area options
+
+
+
+
+ The names of the four options that define the scan area are given in
+the table below:
+
+
+
+
+Name |
+ Description |
+
+
+tl-x |
+ Top-left x coordinate value |
+
+
+tl-y |
+ Top-left y coordinate value |
+
+
+br-x |
+ Bottom-right x coordinate value |
+
+
+br-y |
+ Bottom-right y coordinate value |
+
+
+ |
+
+
+There are several rules that should be followed by front and backends
+regarding these options:
+
+
+- Backends must attach a unit of either pixels
+ (SANE_UNIT_PIXEL) or millimeters (SANE_UNIT_MM) to
+ these options. The unit of all four options must be identical.
+
+
- Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+
- A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+
- A frontend must work properly with any or all of these options
+ missing.
+
+
+
- A frontend may temporarily set the values in a way that
+tl-x is larger than br-x and tl-y is larger than
+br-y.
+
+
+
+
+
+These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+
+
+
+
+Option depth is used to select the image depth in bits/sample
+in multi bit mode (e.g. for 24 bit RGB mode this value must be 8).
+The type of this option is SANE_TYPE_INT.
+The unit is SANE_UNIT_BIT. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option mode.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option mode defines a SANE_CONSTRAINT_STRING_LIST
+of type SANE_TYPE_STRING.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: Color, Gray, Halftone
+and Lineart. Color and Gray are multi bit
+modes (8 or 16 bits/sample), Halftone and Lineart
+are single bit modes. When well-known scan modes are used,
+a frontend is able to automatically decide which mode is appropriate
+for a specific task, e.g the mode Gray
+for scanning a fax.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option source is used to select the scan source
+(e.g. Automatic Document Feeder).
+It defines a SANE_CONSTRAINT_STRING_LIST
+of type SANE_TYPE_STRING.
+Well known sources are: Flatbed, Transparancy Adapter and
+Automatic Document Feeder.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option threshold is used to define the threshold
+for Lineart and maybe Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity.
+
+The backend has to scale the values in the following way:
+A value of 0.0 means all pixels get white / full intensity. A value of 50.0
+means intensities brighter than medium gray get white / full intensity. A
+value of 100.0 means all pixels get black. If the
+scanner is not able to cover the full range the backend has to define a
+reduced value range (e.g. 30...70 percent).
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The gamma-table option defines a SANE_CONSTRAINT_RANGE
+of the type SANE_TYPE_INT which represents the gamma correction
+table for gray. In color mode the gamma-table may be used to set
+a common gamma correction for red, green and blue. The options
+red-gamma-table, green-gamma-table and blue-gamma-table
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+gamma-table option, only the red-, green- and
+blue-gamma-table or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.
+
+ It is also discouraged to emulate gamma tables in the backend. The backend
+should disable (or not define) this option when the scanner does not support
+gamma tables in hardware.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option analog-gamma is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_NONE. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options analog-gamma-red,
+analog-gamma-green and analog-gamma-blue.
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect on the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option shadow is used to define the shadow level / black point level.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black).
+
+The backend has to scale the values in the following way:
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30...70 percent).
+In color mode there can be options shadow-red, shadow-green
+and shadow-blue, in this case the shadow function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+The option highlight is used to define the highlight level / white point level.
+The type of this option is SANE_TYPE_FIXED.
+The unit is SANE_UNIT_PERCENT. The value range
+should be 0.0...100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity).
+
+The backend has to scale the values in the following way:
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30...70 percent).
+In color mode there can be options highlight-red, highlight-green
+and highlight-blue, in this case highlight has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+ This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+
+
+
+
+The options lamp-on and lamp-off are button options
+(SANE_TYPE_BUTTON) and don't have a unit (SANE_UNIT_NONE).
+
+ Option lamp-on is used to turn on the lamp of the scanner while
+lamp-off turns it off.
+
+ These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+
+
+
+
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.
+
+A backend that does make available the scanner-buttons has to
+implement the following options:
+scanner-buttons-lock is of type SANE_TYPE_BOOL, default = SANE_FALSE
+scanner-buttons-status is of type SANE_TYPE_INT, default = 0
+scanner-buttons-status-update is of type SANE_TYPE_BUTTON
+When setting these options the backend does not set SANE_INFO_RELOAD_OPTIONS
+or SANE_INFO_RELOAD_PARAMS if not explictly defined.
+
+ A frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+
+
+
+
+
+
+The batch scan options can be used by a frontend to indicate that more than
+one image will be scanned in a batch. The backend can optimize for such scans
+by e.g. avoiding calibration and not moving home the sensor array in this case.
+The backend provides the options batch-scan,
+batch-scan-next-tl-x, batch-scan-next-tl-y,
+batch-scan-next-br-x, and batch-scan-next-br-y. The option
+batch-scan provides a string list with the values of No if
+batch scanning isn't used, Start for the first, End for the last
+and Loop for any other (intermediate) image. The batch-scan-next
+options specify the coordinates of the next scan and follow the same rules as
+the scan area options (see section 4.5.4).
+
+ These options are not mandatory, but if a backend does support them, it must
+implement them in a manner consistent with the above definition. In this
+case, all options must be implemented.
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc015.html b/sane2/0.08/doc015.html
new file mode 100644
index 00000000..9f831204
--- /dev/null
+++ b/sane2/0.08/doc015.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+Network Protocol
+
+
+The SANE interface has been designed to facilitate network access to
+image acquisition devices. In particular, most SANE implementations
+are expected to support a network backend (net client) and a
+corresponding network daemon (net server) that allows accessing image
+acquisition devices through a network connection. Network access is
+useful in several situations:
+
+
+- To provide controlled access to resources that are inaccessible
+ to a regular user. For example, a user may want to access a device
+ on a host where she has no account on. With the network protocol,
+ it is possible to allow certain users to access scanners without
+ giving them full access to the system.
+
+
Controlling access through the network daemon can be useful even in
+ the local case: for example, certain backends may require root
+ privileges to access a device. Rather than installing each frontend
+ as setuid-root, a system administrator could instead install the
+ SANE network daemon as setuid-root. This enables regular users to
+ access the privileged device through the SANE daemon (which,
+ presumably, supports a more fine-grained access control mechanism
+ than the simple setuid approach). This has the added benefit that
+ the system administrator only needs to trust the SANE daemon, not
+ each and every frontend that may need access to the privileged
+ device.
+
+ - Network access provides a sense of ubiquity of the available
+ image acquisition devices. For example, in a local area network
+ environment, this allows a user to log onto any machine and have
+ convenient access to any resource available to any machine on the
+ network (subject to permission constraints).
+
+
- For devices that do not require physical access when used (e.g.,
+ video cameras), network access allows a user to control and use
+ these devices without being in physical proximity. Indeed, if such
+ devices are connected to the Internet, access from any place in the
+ world is possible.
+
+
+
+The network protocol described in this chapter has been design with
+the following goals in mind:
+
+
+- Image transmission should be efficient (have low encoding
+ overhead).
+
+
- Accessing option descriptors on the client side must be
+ efficient (since this is a very common operation).
+
+
- Other operations, such as setting or inquiring the value of an
+ option are less performance critical since they typically require
+ explicit user action.
+
+
- The network protocol should be simple and easy to implement on
+ any host architecture and any programming language.
+
+
+The SANE protocol can be run across any transport protocol that
+provides reliable data delivery. While SANE does not specify a
+specific transport protocol, it is expected that TCP/IP will be among
+the most commonly used protocols.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc016.html b/sane2/0.08/doc016.html
new file mode 100644
index 00000000..687013ed
--- /dev/null
+++ b/sane2/0.08/doc016.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+Data Type Encoding
+
+
+
+
+The four primitive types of the SANE standard are encoded as follows:
+
+
+- SANE_Byte:
- A byte is encoded as an 8 bit value.
+ Since the transport protocol is assumed to be byte-orientd, the bit
+ order is irrelevant.
+
+
- SANE_Word:
- A word is encoded as 4 bytes (32
+ bits). The bytes are ordered from most-significant to
+ least-significant byte (big-endian byte-order).
+
+
- SANE_Char:
- A character is currently encoded as an 8-bit
+ ISO LATIN-1 value. An extension to support wider character sets (16 or 32
+ bits) is planned for the future, but not supported at this point.
+
+
- SANE_String:
- A string pointer is encoded as a
+ SANE_Char array. The trailing NUL byte is considered part
+ of the array and a NULL pointer is encoded as a zero-length
+ array.
+
+
- SANE_Handle:
- A handle is encoded like a word.
+ The network backend needs to take care of converting these integer
+ values to the opaque pointer values that are presented to the user
+ of the network backend. Similarly, the SANE daemon needs to take
+ care of converting the opaque pointer values it receives from its
+ backends into 32-bit integers suitable for use for network encoding.
+
+
- enumeration types:
- Enumeration types are encoded
+ like words.
+
+
+
+
+
+Closely following the type constructors of the C language, the SANE network
+protocol supports the following four constructors:
+
+
+- pointer:
- A pointer is encoded by a word that indicates
+ whether the pointer is a NULL-pointer which is then followed by the
+ value that the pointer points to (in the case of a non-NULL pointer;
+ in the case of a NULL pointer, no bytes are encoded for the pointer
+ value).
+
+
- array:
- An array is encoded by a word that indicates
+ the length of the array followed by the values of the elements in
+ the array. The length may be zero in which case no bytes are
+ encoded for the element values.
+
+
- structure:
- A structure is encoded by simply encoding the
+ structure members in the order in which they appear in the
+ corresponding C type declaration.
+
+
- union:
- A union must always be accompanied by a tag
+ value that indicates which of the union members is the currently the
+ active one. For this reason, the union itself is encoded simply by
+ encoding the value of the currently active member.
+
+
+
+Note that for type constructors, the pointer, element, or member
+values themselves may have a constructed type. Thus, the above rules
+should be applied recursively until a sequence of primitive types has
+been found.
+
+ Also SANE had no need for encoding of circular structures. This
+greatly simplifies the network protocol.
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc017.html b/sane2/0.08/doc017.html
new file mode 100644
index 00000000..036227a2
--- /dev/null
+++ b/sane2/0.08/doc017.html
@@ -0,0 +1,460 @@
+
+
+
+
+
+
+
+
+Remote Procedure Call Requests
+
+
+The SANE network protocol is a client/server-style remote procedure
+call (RPC) protocol. This means that all activity is initiated by the
+client side (the network backend)---a server is restricted to
+answering request by the client.
+
+
+
+This RPC establishes a connection to a particular SANE network daemon.
+It must be the first call in a SANE network session. The parameter
+and reply arguments for this call are shown in the table below:
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word version_code |
+ SANE_Word status |
+
+
+ SANE_String user_name |
+ SANE_Word version_code |
+
+
+ |
+
+
+The version_code argument in the request is the SANE
+version-code of the network backend that is contacting the network
+daemon (see Section 4.1). The
+``build-revision'' in the version code is used to hold the network
+protocol version. The SANE network daemon receiving such a request
+must make sure that the network protocol version corresponds to a
+supported version since otherwise the encoding of the network stream
+may be incompatible (even though the SANE interface itself may be
+compatible). The user_name argument is the name of the user
+on whose behalf this call is being performed. If the network backend
+cannot determine a user-name, it passes a NULL pointer for this
+argument. No trust should be placed in the authenticity of this
+user-name. The intent of this string is to provide more convenience
+to the user. E.g., it could be used as the default-user name in
+subsequent authentication calls.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values.2 The version_code argument returns the
+SANE version-code that the network daemon supports. See the comments
+in the previous paragraph on the meaning of the build-revision in this
+version code.
+
+
+
+This RPC is used to obtain the list of devices accessible by the SANE
+daemon.
+
+
+
+
+ request: |
+ reply: |
+
+
+ void |
+ SANE_Word status |
+
+
+ |
+ SANE_Device ***device_list |
+
+
+ |
+
+
+There are no arguments in the request for this call.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The device_list
+argument is a pointer to a NULL-terminated array of
+SANE_Device pointers.
+
+
+
+This RPC is used to open a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String device_name |
+ SANE_Word status |
+
+
+ |
+ SANE_Word handle |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The device_name argument specifies the name of the device to
+open.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The handle
+argument specifies the device handle that uniquely identifies the
+connection. The resource argument is used to request
+authentication. If it has a non-NULL value, the network
+backend should authenticate the specified resource and then retry this
+operation (see Section 5.2.10 for details on how to
+authorize a resource).
+
+
+
+This RPC is used to close a connection to a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection that should be
+closed.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+This RPC is used to obtain all the option descriptors for a
+remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ Option_Descriptor_Array odesc |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+descriptors should be obtained.
+
+In the reply, the odesc argument is used to return the array of
+option descriptors. The option descriptor array has the following
+structure:
+
+
+struct Option_Descriptor_Array
+ {
+ SANE_Word num_options;
+ SANE_Option_Descriptor **desc;
+ };
+
+
+
+
+
+This RPC is used to control (inquire, set, or set to automatic) a
+specific option of a remote SANE device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ SANE_Word option |
+ SANE_Word info |
+
+
+ SANE_Word action |
+ SANE_Word value_type |
+
+
+ SANE_Word value_type |
+ SANE_Word value_size |
+
+
+ SANE_Word value_size |
+ void *value |
+
+
+ void *value |
+ SANE_String *resource |
+
+
+ |
+
+
+The handle argument identifies the remote device whose option
+should be controlled. Argument option is the number (index) of
+the option that should be controlled. Argument action
+specifies what action should be taken (get, set, or set automatic).
+Argument value_type specifies the type of the option value
+(must be one of SANE_TYPE_BOOL, SANE_TYPE_INT,
+SANE_TYPE_FIXED, SANE_TYPE_STRING,
+SANE_TYPE_BUTTON). Argument value_size specifies
+the size of the option value in number of bytes (see
+Section 4.2.9.6 for the precise meaning of this value).
+Finally, argument value is a pointer to the option value. It
+must be a writeable area that is at least value_size bytes
+large. (Note that this area must be writable even if the action is to
+set the option value. This is because the backend may not be able to
+set the exact option value, in which case the option value is used to
+return the next best value that the backend has chosen.)
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has undefined
+values. The info argument returns the information on how well
+the backend was able to satisfy the request. For details, see the
+description of the corresponding argument in
+Section 4.3.7. Arguments value_type and
+value_size have the same values as the arguments by the same
+name in corresponding request. The values are repeated here to ensure
+that both the request and the reply are self-contained (i.e., they can
+be encoded and decoded independently). Argument value is holds
+the value of the option that has become effective as a result of this
+RPC.
+
+
+
+This RPC is used to obtain the scan parameters of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Parameters params |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device whose scan parameters should be returned.
+
+In the reply, status indicates the completion status. If the
+value is anything other than SANE_STATUS_SUCCESS, the
+remainder of the reply has undefined values. The argument
+params is used to return the scan parameters.
+
+
+
+This RPC is used to start image acquisition (scanning).
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Status status |
+
+
+ |
+ SANE_Word port |
+
+
+ |
+ SANE_Word byte_order |
+
+
+ |
+ SANE_String resource |
+
+
+ |
+
+
+The handle argument identifies the connection to the remote
+device from which the image should be acquired.
+
+In the reply, argument resource is set to the name of the
+resource that must be authorized before this call can be retried. If
+this value is non-NULL, all other arguments have undefined
+values (see Section 5.2.10 for details on how to
+authorize a resource). Argument, status indicates the
+completion status. If the value is anything other than
+SANE_STATUS_SUCCESS, the remainder of the reply has
+undefined values. The argument port returns the port number
+from which the image data will be available. To read the image data,
+a network client must connect to the remote host at the indicated port
+number. Through this port, the image data is transmitted as a
+sequence of data records. Each record starts with the data length in
+bytes. The data length is transmitted as a sequence of four bytes.
+These bytes should be interpreted as an unsigned integer in big-endian
+format. The four length bytes are followed by the number of data
+bytes indicated by the length. Except for byte-order, the data is in
+the same format as defined for sane_read(). Since some
+records may contain no data at all, a length value of zero is
+perfectly valid. The special length value of 0xffffffff is
+used to indicate the end of the data stream. That is, after receiving
+a record length of 0xffffffff, the network client should close
+the data connection and stop reading data.
+
+ Argument byte_order specifies the byte-order of the image
+data. A value of 0x1234 indicates little-endian format, a value of
+0x4321 indicates big-endian format. All other values are presently
+undefined and reserved for future enhancements of this protocol. The
+intent is that a network server sends data in its own byte-order and
+the client is responsible for adjusting the byte-order, if necessary.
+This approach causes no unnecessary overheads in the case where the
+server and client byte-order match and puts the extra burden on the
+client side when there is a byte-order mismatch. Putting the burden
+on the client-side improves the scalability properties of this
+protocol.
+
+
+
+This RPC is used to cancel the current operation of a remote SANE
+device.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_Word handle |
+ SANE_Word dummy |
+
+
+ |
+
+
+The handle argument identifies the connection whose operation
+should be cancelled.
+
+In the reply, the dummy argument is unused. Its purpose is to
+ensure proper synchronization (without it, a net client would not be
+able to determine when the RPC has completed).
+
+
+
+
+This RPC is used to pass authorization data from the net client to the
+net server.
+
+
+
+
+ request: |
+ reply: |
+
+
+ SANE_String resource |
+ SANE_Word dummy |
+
+
+ SANE_String username |
+ |
+
+
+ SANE_String password |
+ |
+
+
+ |
+
+
+The resource argument specifies the name of the resource to be
+authorized. This argument should be set to the string returned in the
+resource argument of the RPC reply that required this
+authorization call. The username and password are the
+name of the user that is accessing the resource and the password for
+the specified resource/user pair.
+
+Since the password is not encrypted during network transmission, it is
+recommended to use the following extension:
+
+ If the server adds the string `$MD5$' to the resource-name followed
+by a random string not longer then 128 bytes, the client may answer with the
+MD5 digest of the concatenation of the password and the random string. To
+differentiate between the MD5 digest and a strange password the client prepends
+the MD5 digest with the string `$MD5$'.
+
+ In the reply, dummy is completely unused. Note that there is
+no direct failure indication. This is unnecessary since a net client
+will retry the RPC that resulted in the authorization request until
+that call succeeds (or until the request is cancelled). The RPC that resulted
+in the authorization request continues after the reply from the client and may
+fail with SANE_STATUS_ACCESS_DENIED.
+
+
+
+This RPC is used to disconnect a net client from a net server. There
+are no request or reply arguments in this call. As a result of this
+call, the connection between the client and the server that was
+established by the SANE_NET_INIT call will be closed.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc018.html b/sane2/0.08/doc018.html
new file mode 100644
index 00000000..c5bd917d
--- /dev/null
+++ b/sane2/0.08/doc018.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+Contact Information
+
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+
+
+sane-devel-request@mostang.com
+
+
+To subscribe, send a mail with the body ``subscribe sane-devel'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``help'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+
+http://www.mostang.com/sane/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/doc019.html b/sane2/0.08/doc019.html
new file mode 100644
index 00000000..e904efe1
--- /dev/null
+++ b/sane2/0.08/doc019.html
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+Index
+
+
+
+analog gamma option
+array
+
+ Batch Scan Options
+bit depth option
+br-x
+br-y
+
+ code flow
+
+ device-name
+domain
+
+ enumeration types
+
+ gamma table options
+
+ hightlight options
+
+ image data format
+
+ lamp-off option
+lamp-on option
+
+ mailing list
+mode options
+
+ network authorization
+NUL
+
+ option count
+Option_Descriptor_Array
+
+ password
+pointer
+preview mode
+
+ resolution option
+
+ SANE_Action
+SANE_ACTION_GET_VALUE
+SANE_ACTION_SET_AUTO
+SANE_ACTION_SET_VALUE
+SANE_Authorization_Callback
+SANE_Bool
+SANE_Byte
+SANE_Byte
+sane_cancel
+SANE_CAP_ADVANCED
+SANE_CAP_ALWAYS_SETTABLE
+SANE_CAP_AUTOMATIC
+SANE_CAP_EMULATED
+SANE_CAP_HARD_SELECT
+SANE_CAP_HIDDEN
+SANE_CAP_INACTIVE
+SANE_CAP_SOFT_DETECT
+SANE_CAP_SOFT_SELECT
+SANE_Char
+SANE_Char
+sane_close
+SANE_CONSTRAINT_NONE
+SANE_CONSTRAINT_RANGE
+SANE_CONSTRAINT_STRING_LIST
+SANE_Constraint_Type
+SANE_CONSTRAINT_WORD_LIST
+sane_control_option
+SANE_CURRENT_MAJOR
+SANE_Device
+sane_exit
+SANE_FALSE
+SANE_FIX
+SANE_Fixed
+SANE_FIXED_SCALE_SHIFT
+SANE_Frame
+SANE_FRAME_BLUE
+SANE_FRAME_BLUE
+SANE_FRAME_GRAY
+SANE_FRAME_GRAY
+SANE_FRAME_GREEN
+SANE_FRAME_GREEN
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_MIME
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RAW
+SANE_FRAME_RED
+SANE_FRAME_RED
+SANE_FRAME_RGB
+SANE_FRAME_RGB
+sane_get_devices
+sane_get_option_descriptor
+sane_get_parameters
+sane_get_select_fd
+SANE_Handle
+SANE_Handle
+SANE_INFO_INEXACT
+SANE_INFO_INVALIDATE_PREVIEW
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_OPTIONS
+SANE_INFO_RELOAD_PARAMS
+sane_init
+SANE_Int
+SANE_NET_AUTHORIZE
+SANE_NET_AUTHORIZE
+SANE_NET_CANCEL
+SANE_NET_CANCEL
+SANE_NET_CLOSE
+SANE_NET_CLOSE
+SANE_NET_CONTROL_OPTION
+SANE_NET_CONTROL_OPTION
+SANE_NET_EXIT
+SANE_NET_EXIT
+SANE_NET_GET_DEVICES
+SANE_NET_GET_DEVICES
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_OPTION_DESCRIPTORS
+SANE_NET_GET_PARAMETERS
+SANE_NET_GET_PARAMETERS
+SANE_NET_INIT
+SANE_NET_INIT
+SANE_NET_OPEN
+SANE_NET_OPEN
+SANE_NET_START
+SANE_NET_START
+sane_open
+SANE_Option_Descriptor
+SANE_OPTION_IS_ACTIVE
+SANE_OPTION_IS_SETTABLE
+SANE_Parameters
+SANE_Range
+sane_read
+sane_set_io_mode
+sane_start
+SANE_Status
+SANE_STATUS_ACCESS_DENIED
+SANE_STATUS_CANCELLED
+SANE_STATUS_COVER_OPEN
+SANE_STATUS_DEVICE_BUSY
+SANE_STATUS_EOF
+SANE_STATUS_GOOD
+SANE_STATUS_GOOD
+SANE_STATUS_INVAL
+SANE_STATUS_IO_ERROR
+SANE_STATUS_JAMMED
+SANE_STATUS_NO_DOCS
+SANE_STATUS_NO_MEM
+SANE_STATUS_UNSUPPORTED
+SANE_String
+SANE_String
+SANE_String_Const
+sane_strstatus
+SANE_TRUE
+SANE_TYPE_BOOL
+SANE_TYPE_BUTTON
+SANE_TYPE_FIXED
+SANE_TYPE_GROUP
+SANE_TYPE_INT
+SANE_TYPE_STRING
+SANE_Unit
+SANE_UNFIX
+SANE_UNIT_BIT
+SANE_UNIT_DPI
+SANE_UNIT_MICROSECOND
+SANE_UNIT_MM
+SANE_UNIT_NONE
+SANE_UNIT_PERCENT
+SANE_UNIT_PIXEL
+SANE_Value_Type
+SANE_VERSION_CODE
+SANE_VERSION_MAJOR
+SANE_Word
+SANE_Word
+scan area options
+scan resolution
+scanner button options
+shadow options
+source options
+structure
+
+ threshold option
+tl-x
+tl-y
+Type Strings
+
+ union
+username
+
+ Vendor Strings
+
+ well-known options
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/footnotes.html b/sane2/0.08/footnotes.html
new file mode 100644
index 00000000..6478c6a8
--- /dev/null
+++ b/sane2/0.08/footnotes.html
@@ -0,0 +1,7 @@
+FootnotesFootnotes
+
+
1 This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.
+
2 The sane network
+ daemon should be careful not to leak information in the undefined
+ portion of the reply.
diff --git a/sane2/0.08/img000.gif b/sane2/0.08/img000.gif
new file mode 100644
index 00000000..2fb575aa
Binary files /dev/null and b/sane2/0.08/img000.gif differ
diff --git a/sane2/0.08/img001.gif b/sane2/0.08/img001.gif
new file mode 100644
index 00000000..a9482097
Binary files /dev/null and b/sane2/0.08/img001.gif differ
diff --git a/sane2/0.08/img002.gif b/sane2/0.08/img002.gif
new file mode 100644
index 00000000..f2b21a2b
Binary files /dev/null and b/sane2/0.08/img002.gif differ
diff --git a/sane2/0.08/img003.gif b/sane2/0.08/img003.gif
new file mode 100644
index 00000000..4d9e5454
Binary files /dev/null and b/sane2/0.08/img003.gif differ
diff --git a/sane2/0.08/img004.gif b/sane2/0.08/img004.gif
new file mode 100644
index 00000000..e8786b74
Binary files /dev/null and b/sane2/0.08/img004.gif differ
diff --git a/sane2/0.08/index.html b/sane2/0.08/index.html
new file mode 100644
index 00000000..4c024a9b
--- /dev/null
+++ b/sane2/0.08/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+./sane
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SANE Standard Version 2.0 proposal 0.08 - rauch/beck
+
+Dec 8, 2002
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sane2/0.08/sane2-0.08.dvi b/sane2/0.08/sane2-0.08.dvi
new file mode 100644
index 00000000..51048f48
Binary files /dev/null and b/sane2/0.08/sane2-0.08.dvi differ
diff --git a/sane2/0.08/sane2-0.08.ps b/sane2/0.08/sane2-0.08.ps
new file mode 100644
index 00000000..b094114f
--- /dev/null
+++ b/sane2/0.08/sane2-0.08.ps
@@ -0,0 +1,6060 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software
+%%Title: sane.dvi
+%%Pages: 59
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic
+%%+ Times-BoldItalic
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips sane.dvi -o sane.ps
+%DVIPSParameters: dpi=600, compressed
+%DVIPSSource: TeX output 2002.12.24:1538
+%%BeginProcSet: texc.pro
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
+1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
+0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
+sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
+rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
+gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
+/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
+/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
+A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
+get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
+ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
+fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
+{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
+chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
+1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
+forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: 8r.enc
+% @@psencodingfile@{
+% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
+% version = "0.6",
+% date = "1 July 1998",
+% filename = "8r.enc",
+% email = "tex-fonts@@tug.org",
+% docstring = "Encoding for TrueType or Type 1 fonts
+% to be used with TeX."
+% @}
+%
+% Idea is to have all the characters normally included in Type 1 fonts
+% available for typesetting. This is effectively the characters in Adobe
+% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
+%
+% Character code assignments were made as follows:
+%
+% (1) the Windows ANSI characters are almost all in their Windows ANSI
+% positions, because some Windows users cannot easily reencode the
+% fonts, and it makes no difference on other systems. The only Windows
+% ANSI characters not available are those that make no sense for
+% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
+% (173). quotesingle and grave are moved just because it's such an
+% irritation not having them in TeX positions.
+%
+% (2) Remaining characters are assigned arbitrarily to the lower part
+% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
+%
+% (3) Y&Y Lucida Bright includes some extra text characters; in the
+% hopes that other PostScript fonts, perhaps created for public
+% consumption, will include them, they are included starting at 0x12.
+%
+% (4) Remaining positions left undefined are for use in (hopefully)
+% upward-compatible revisions, if someday more characters are generally
+% available.
+%
+% (5) hyphen appears twice for compatibility with both
+% ASCII and Windows.
+%
+/TeXBase1Encoding [
+% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
+ /.notdef /dotaccent /fi /fl
+ /fraction /hungarumlaut /Lslash /lslash
+ /ogonek /ring /.notdef
+ /breve /minus /.notdef
+% These are the only two remaining unencoded characters, so may as
+% well include them.
+ /Zcaron /zcaron
+% 0x10
+ /caron /dotlessi
+% (unusual TeX characters available in, e.g., Lucida Bright)
+ /dotlessj /ff /ffi /ffl
+ /.notdef /.notdef /.notdef /.notdef
+ /.notdef /.notdef /.notdef /.notdef
+ % very contentious; it's so painful not having quoteleft and quoteright
+ % at 96 and 145 that we move the things normally found there to here.
+ /grave /quotesingle
+% 0x20 (ASCII begins)
+ /space /exclam /quotedbl /numbersign
+ /dollar /percent /ampersand /quoteright
+ /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
+% 0x30
+ /zero /one /two /three /four /five /six /seven
+ /eight /nine /colon /semicolon /less /equal /greater /question
+% 0x40
+ /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
+% 0x50
+ /P /Q /R /S /T /U /V /W
+ /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
+% 0x60
+ /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
+% 0x70
+ /p /q /r /s /t /u /v /w
+ /x /y /z /braceleft /bar /braceright /asciitilde
+ /.notdef % rubout; ASCII ends
+% 0x80
+ /.notdef /.notdef /quotesinglbase /florin
+ /quotedblbase /ellipsis /dagger /daggerdbl
+ /circumflex /perthousand /Scaron /guilsinglleft
+ /OE /.notdef /.notdef /.notdef
+% 0x90
+ /.notdef /.notdef /.notdef /quotedblleft
+ /quotedblright /bullet /endash /emdash
+ /tilde /trademark /scaron /guilsinglright
+ /oe /.notdef /.notdef /Ydieresis
+% 0xA0
+ /.notdef % nobreakspace
+ /exclamdown /cent /sterling
+ /currency /yen /brokenbar /section
+ /dieresis /copyright /ordfeminine /guillemotleft
+ /logicalnot
+ /hyphen % Y&Y (also at 45); Windows' softhyphen
+ /registered
+ /macron
+% 0xD0
+ /degree /plusminus /twosuperior /threesuperior
+ /acute /mu /paragraph /periodcentered
+ /cedilla /onesuperior /ordmasculine /guillemotright
+ /onequarter /onehalf /threequarters /questiondown
+% 0xC0
+ /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
+ /Egrave /Eacute /Ecircumflex /Edieresis
+ /Igrave /Iacute /Icircumflex /Idieresis
+% 0xD0
+ /Eth /Ntilde /Ograve /Oacute
+ /Ocircumflex /Otilde /Odieresis /multiply
+ /Oslash /Ugrave /Uacute /Ucircumflex
+ /Udieresis /Yacute /Thorn /germandbls
+% 0xE0
+ /agrave /aacute /acircumflex /atilde
+ /adieresis /aring /ae /ccedilla
+ /egrave /eacute /ecircumflex /edieresis
+ /igrave /iacute /icircumflex /idieresis
+% 0xF0
+ /eth /ntilde /ograve /oacute
+ /ocircumflex /otilde /odieresis /divide
+ /oslash /ugrave /uacute /ucircumflex
+ /udieresis /yacute /thorn /ydieresis
+] def
+
+%%EndProcSet
+%%BeginProcSet: texps.pro
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
+exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
+dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
+ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
+end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
+dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
+roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
+dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
+if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
+def end
+
+%%EndProcSet
+%%BeginProcSet: special.pro
+%!
+TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
+/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
+/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
+/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
+/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
+X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
+/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
+/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
+{userdict/md get type/dicttype eq{userdict begin md length 10 add md
+maxlength ge{/md md dup length 20 add dict copy def}if end md begin
+/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
+atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
+itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
+transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
+curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
+pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
+if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
+-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
+get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
+yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
+neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
+noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
+90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
+neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
+1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
+2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
+-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
+TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
+Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
+}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
+save N userdict maxlength dict begin/magscale true def normalscale
+currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
+/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
+psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
+psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
+TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
+psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
+roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
+moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
+begin/SpecialSave save N gsave normalscale currentpoint TR
+@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
+CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
+closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
+sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
+}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
+CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
+lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
+/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
+repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
+/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
+currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
+moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
+/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
+1 startangle endangle arc savematrix setmatrix}N end
+
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 600 600 (sane.dvi)
+@start /Fa 134[40 3[51 25 35 35 1[45 45 51 71 3[25 3[40
+1[40 1[45 97[{TeXBase1Encoding ReEncodeFont}13 90.9091
+/Times-BoldItalic rf
+%DVIPSBitmapFont: Fb cmex10 10 1
+/Fb 1 41 df40 D E
+%EndDVIPSBitmapFont
+/Fc 135[60 1[60 60 60 60 60 1[60 60 60 60 60 2[60 1[60
+60 60 60 60 1[60 6[60 1[60 1[60 60 60 60 60 1[60 60 60
+60 60 2[60 60 60 1[60 60 60 1[60 65[{TeXBase1Encoding ReEncodeFont}37
+99.6264 /Courier rf
+%DVIPSBitmapFont: Fd cmtt10 10.95 13
+/Fd 13 123 df<147F4A7EA2497FA4497F14F7A401077F14E3A3010F7FA314C1A2011F7F
+A490383F80FEA590387F007FA4498049133F90B6FCA34881A39038FC001F00038149130F
+A4000781491307A2D87FFFEB7FFFB56CB51280A46C496C130029397DB830>65
+D<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7FCA4157C15FEA490B5FCA6EBF800
+A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C16C02B387EB730>69
+D78 D<90390FF803C0D97FFF13E048B512C74814
+F74814FF5A381FF80F383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C
+91C7FC7F7FEA3FF0EA1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D900
+3F13C014019138007FE0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0F
+E06D131F01F8EB3FC001FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380
+253A7BB830>83 D
+87 D<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A4813
+03380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F00
+3F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C7
+13E0011F010313C0D907FCC8FC2C397DB730>100 D<49B4FC010713E0011F13F8017F7F
+90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814F049130712
+7F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D13
+07D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0
+252A7CA830>II<14E0EB03F8A2497EA36D5AA2EB00E0
+91C8FCA9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C02339
+7AB830>105 D<49B4FC010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC0
+4848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C
+14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01
+FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC272A7CA830>111
+D114 D<90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC
+4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F
+9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC
+03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC222A79A830>I<001FB612FC48
+15FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A
+5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A4948133E4890C7127F485A485A
+485A485A485A48B7FCB8FCA46C15FE28277DA630>122 D E
+%EndDVIPSBitmapFont
+/Fe 133[33 37 1[54 37 37 21 29 25 1[37 37 37 58 21 37
+1[21 37 37 25 33 37 33 37 33 11[54 46 42 50 3[54 4[25
+3[46 1[50 1[54 18[19 25 42[42 2[{TeXBase1Encoding ReEncodeFont}35
+74.7198 /Times-Roman rf /Ff 206[25 49[{TeXBase1Encoding ReEncodeFont}1
+49.8132 /Times-Roman rf /Fg 206[33 49[{TeXBase1Encoding ReEncodeFont}1
+66.4176 /Times-Roman rf
+%DVIPSBitmapFont: Fh cmmi10 10.95 16
+/Fh 16 122 df22 D<121EEA7F80A2EAFFC0A4EA7F80A2EA
+1E000A0A798919>58 D<183818FC1703EF0FF8EF3FE0EFFF80933803FE00EE0FF8EE3FE0
+EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FC
+EB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0F
+F8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED
+3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC
+17001838363678B147>60 DI<126012F8B4FCEA7FC0EA1FF0EA07FCEA01FF38007F
+C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED
+01FF9238007FC0EE1FF0EE07FCEE01FF9338007FC0EF1FF0EF07F8EF01FCA2EF07F8EF1F
+F0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED1FF0ED7FC04A48C8FCEC
+07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA07FCEA1FF0EA7FC048CB
+FC12FC1270363678B147>I<49B712F818FF19E090260001FEC7EA3FF0F007F84B6E7E72
+7E850203815D1A80A20207167F4B15FFA3020F17004B5C611803021F5E4B4A5A180FF01F
+E0023F4B5A4B4A5ADD01FEC7FCEF07F8027FEC7FE092B6C8FC18E092C7EA07F84AEC01FE
+4A6E7E727E727E13014A82181FA213034A82A301075F4A153FA261010F167F4A5E18FF4D
+90C7FC011F5E4A14034D5A013FED1FF04D5A4AECFFC0017F020790C8FCB812FC17F094C9
+FC413E7DBD45>66 D99 DI107 DI<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C0
+1F3B0E07C7800F80001CEBCF0002FE80003C5B00385B495A127800705BA200F049131F01
+1F5D00005BA2163F013F92C7FC91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8
+A203031307000103F013005B170E16E000035E49153C17385F0007913801F1E0496DB45A
+D801C0023FC7FC31297EA737>110 D<91381F800C9138FFE01C903903F0707C90390FC0
+387890391F801CF890383F000F137E4914F000011407485A485A16E0485A121F150F4848
+14C0A3007F141F491480A300FF143F90C71300A35D48147EA315FE007E495A1403A26C13
+074A5A381F801D000F13793807C1F33901FFC3F038007F03130014075DA3140F5DA3141F
+5DA2143F147F90381FFFFE5BA2263A7DA729>113 D<137C48B4EC03802603C7C0EB0FC0
+EA0703000F7F000E151F121C010715801238163FEA780F0070491400A2D8F01F5C5C0000
+157E133F91C712FEA2495C137E150113FE495CA215030001161C4914F0A21507173CEEE0
+38150F031F1378000016706D133F017C017313F0017E01E313E0903A3F03C1F1C0903A0F
+FF007F80D901FCEB1F002E297EA734>117 D<017E147848B4EB01FC2603C7C013FED807
+031303000F13E0120E121C0107130100381400167ED8780F143E00705B161EEAF01F4A13
+1C1200133F91C7123C16385B137E167801FE14705B16F016E0120149EB01C0A2ED0380A2
+ED0700A20000140E5D6D133C017C5B6D5B90381F03C0903807FF80D901FCC7FC27297EA7
+2C>I120 D<137C48B4EC03802603C7C0EB0FC0EA0703000F7F000E151F
+001C168013071238163FD8780F150000705BA2D8F01F5C4A137E1200133F91C712FE5E5B
+137E150113FE495CA2150300015D5BA215075EA2150F151F00005D6D133F017C137F017E
+13FF90393F03DF8090380FFF1FEB01FC90C7123F93C7FCA25DD80380137ED80FE013FE00
+1F5C4A5AA24848485A4A5A6CC6485A001C495A001E49C8FC000E137C380781F03803FFC0
+C648C9FC2A3B7EA72D>I E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fi cmr8 8 3
+/Fi 3 52 df<130C133C137CEA03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23
+>49 DII E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fj cmr10 10.95 12
+/Fj 12 62 df<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B1201
+5B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E
+123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB
+01C0EB00E014701430145A77C323>40 D<12C07E12707E7E121E7E6C7E7F12036C7E7F12
+007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A6
+14C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC12
+1E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9
+FCB3A915063C3C7BB447>43 D49 DII<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FC
+EB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C713
+800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015
+C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F
+90C7FCEB07F8243F7CBC2D>53 DI<
+1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D4814
+1E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A21301
+5C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C16
+7BA147>61 D E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fk cmsy10 10.95 5
+/Fk 5 102 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4
+EA7F80A2EA1E000A0A799B19>I15 D<387FFFFCB5FCA300F0C7FCB3B3B3B3AD1260165A71C328>100
+DI E
+%EndDVIPSBitmapFont
+/Fl 134[40 1[61 40 45 25 35 35 1[45 45 45 66 25 40 25
+25 45 45 25 40 45 40 45 45 51[30 45[{TeXBase1Encoding ReEncodeFont}24
+90.9091 /Times-Italic rf /Fm 133[44 50 50 72 50 55 33
+39 44 1[55 50 55 83 28 2[28 55 50 33 44 55 44 55 50 12[66
+55 72 1[61 78 72 94 66 2[39 78 78 61 1[72 72 66 72 7[50
+50 50 50 50 50 50 50 50 50 1[25 33 45[{TeXBase1Encoding ReEncodeFont}51
+99.6264 /Times-Bold rf /Fn 134[60 1[86 1[66 40 47 53
+66 66 60 66 100 33 66 1[33 66 60 1[53 66 53 66 60 9[120
+86 1[80 66 86 1[73 93 86 2[93 1[47 2[73 80 86 86 1[86
+11[60 60 60 60 60 2[30 40 45[{TeXBase1Encoding ReEncodeFont}43
+119.552 /Times-Bold rf /Fo 139[57 1[76 1[96 7[96 2[76
+3[86 29[124 12[86 86 86 86 86 86 49[{TeXBase1Encoding ReEncodeFont}13
+172.188 /Times-Bold rf /Fp 130[55 1[55 55 55 55 55 55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+55 55 55 1[55 1[55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 1[55
+55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
+1[55 55 55 55 55 1[55 55 55 55 33[{TeXBase1Encoding ReEncodeFont}86
+90.9091 /Courier rf /Fq 104[91 45 1[40 40 24[40 45 45
+66 45 45 25 35 30 45 45 45 45 71 25 45 25 25 45 45 30
+40 45 40 45 40 30 5[56 66 66 86 66 66 56 51 61 1[51 66
+66 81 56 66 35 30 66 66 51 56 66 61 61 66 3[51 1[25 25
+45 45 45 45 45 45 45 45 45 45 25 23 30 23 2[30 30 30
+35[51 51 2[{TeXBase1Encoding ReEncodeFont}78 90.9091
+/Times-Roman rf /Fr 105[45 27[40 45 45 66 45 51 30 35
+40 51 51 45 51 76 25 51 1[25 51 45 30 40 51 40 51 45
+9[91 66 66 61 51 2[56 71 66 4[35 71 1[56 61 66 66 61
+66 1[45 4[30 1[45 45 45 45 45 45 45 45 4[23 2[30 30 40[{
+TeXBase1Encoding ReEncodeFont}55 90.9091 /Times-Bold
+rf /Fs 135[103 149 103 115 69 80 92 1[115 103 115 172
+57 115 1[57 115 103 69 92 115 92 115 103 12[138 115 2[126
+1[149 1[138 2[80 2[126 138 1[149 1[149 23[69 69 40[{
+TeXBase1Encoding ReEncodeFont}34 206.559 /Times-Bold
+rf /Ft 154[44 1[44 30[72 11[50 5[50 1[50 3[25 44[{
+TeXBase1Encoding ReEncodeFont}7 99.6264 /Times-Roman
+rf /Fu 138[86 48 67 57 1[86 86 86 1[48 86 1[48 86 2[76
+86 76 86 76 10[124 2[96 4[124 8[105 3[124 8[86 5[86 1[86
+48 43 57 45[{TeXBase1Encoding ReEncodeFont}27 172.188
+/Times-Roman rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%PaperSize: A4
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop 44 1939 a Fu(SANE)44 b(Standard)g(V)-19 b(ersion)44
+b(2.0)f(proposal)i(0.08)e(-)g(rauch/beck)1708 2698 y
+Ft(Dec)25 b(8,)g(2002)p eop
+%%Page: 1 2
+1 1 bop 0 845 a Fs(Contents)0 1439 y Fr(1)91 b(Pr)n(eface)3430
+b(6)136 1610 y Fq(1.1)96 b(About)24 b(This)g(Document)h(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)345 1781 y(1.1.1)110 b(T)-7 b(ypographic)26
+b(Con)l(v)o(entions)92 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)128 b(6)0 2043 y Fr(2)91 b(Intr)n(oduction)3227
+b(7)136 2214 y Fq(2.1)96 b(T)-6 b(erminology)30 b(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)128 b(7)0 2476 y Fr(3)91
+b(The)23 b(SANE)e(En)l(vir)n(onment)2770 b(8)136 2647
+y Fq(3.1)96 b(Attaching)26 b(to)d(a)g(SANE)e(back)o(end)81
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)128
+b(8)136 2818 y(3.2)96 b(Image)24 b(Data)g(F)o(ormat)63
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 2989 y(3.2.1)110 b(Pix)o(el)24
+b(oriented)h(frames)44 b(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(10)345 3160 y(3.2.2)110 b(Arbitrary)25
+b(data)g(frames)37 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(12)0 3422 y Fr(4)91 b(The)23 b(SANE)e(A)n
+(pplication)i(Pr)n(ogrammer)i(Interface)g(\(API\))1639
+b(13)136 3593 y Fq(4.1)96 b(V)-10 b(ersion)25 b(Control)55
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(13)136 3764 y(4.2)96
+b(Data)24 b(T)-7 b(ypes)87 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(14)345 3935 y(4.2.1)110 b(Base)24 b(T)-7 b(ypes)64
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(14)345 4106 y(4.2.2)110 b(Boolean)25
+b(T)-7 b(ype)41 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345 4277 y(4.2.3)110
+b(Inte)o(ger)25 b(T)-7 b(ype)88 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(15)345
+4448 y(4.2.4)110 b(Fix)o(ed-point)26 b(T)-7 b(ype)57
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(15)345 4619 y(4.2.5)110 b(T)-6 b(e)o(xt)46
+b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(16)345 4790 y(4.2.6)110
+b(Scanner)25 b(Handle)f(T)-7 b(ype)39 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(17)345 4961
+y(4.2.7)110 b(Status)24 b(T)-7 b(ype)54 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)345 5132 y(4.2.8)110 b(De)n(vice)24 b(Descriptor)i(T)-7
+b(ype)91 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(17)1927 5381 y(1)p eop
+%%Page: 2 3
+2 2 bop 345 123 a Fq(4.2.9)110 b(Option)25 b(Descriptor)g(T)-7
+b(ype)26 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(19)345 294 y(4.2.10)65 b(Internationalizatio)q(n)44
+b(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(22)136 466 y(4.3)96 b(Operations)32 b(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)82 b(26)345 638 y(4.3.1)110 b Fp(sane)p 861
+638 28 4 v 31 w(init)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(26)345 809
+y(4.3.2)110 b Fp(sane)p 861 809 V 31 w(exit)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 981 y(4.3.3)110 b Fp(sane)p 861 981
+V 31 w(get)p 1057 981 V 32 w(devices)54 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(27)345 1153
+y(4.3.4)110 b Fp(sane)p 861 1153 V 31 w(open)75 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(27)345 1324 y(4.3.5)110 b Fp(sane)p 861
+1324 V 31 w(close)88 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(28)345 1496 y(4.3.6)110
+b Fp(sane)p 861 1496 V 31 w(get)p 1057 1496 V 32 w(option)p
+1419 1496 V 30 w(descriptor)74 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(28)345 1667 y(4.3.7)110 b Fp(sane)p 861 1667 V 31 w(control)p
+1277 1667 V 30 w(option)27 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(28)345 1839 y(4.3.8)110 b Fp(sane)p
+861 1839 V 31 w(get)p 1057 1839 V 32 w(parameters)25
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(29)345 2011 y(4.3.9)110 b Fp(sane)p 861 2011 V 31 w(start)88
+b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(34)345 2182 y(4.3.10)65 b Fp(sane)p
+861 2182 V 31 w(read)75 b Fq(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(34)345 2354
+y(4.3.11)65 b Fp(sane)p 861 2354 V 31 w(cancel)33 b Fq(.)45
+b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(35)345 2526 y(4.3.12)65 b Fp(sane)p 861 2526
+V 31 w(set)p 1057 2526 V 32 w(io)p 1199 2526 V 31 w(mode)78
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2697 y(4.3.13)65 b Fp(sane)p 861 2697 V 31 w(get)p
+1057 2697 V 32 w(select)p 1419 2697 V 30 w(fd)37 b Fq(.)45
+b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(36)345 2869 y(4.3.14)65 b Fp(sane)p 861 2869 V 31 w(strstatus)73
+b Fq(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(37)136 3040 y(4.4)96 b(Code)24 b(Flo)n(w)k(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 3212 y(4.5)96
+b(W)-7 b(ell-Kno)n(wn)24 b(Options)63 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(40)345 3384 y(4.5.1)110 b(Option)25 b(Number)e(Count)70
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3555 y(4.5.2)110 b(Scan)24 b(Resolution)i(Options)52
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3727 y(4.5.3)110 b(Pre)n(vie)n(w)23 b(Mode)h(Option)85
+b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(41)345 3899 y(4.5.4)110 b(Scan)24 b(Area)f(Options)65
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(42)345 4070 y(4.5.5)110 b(Depth)24 b(Option)50
+b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)82 b(43)345 4242 y(4.5.6)110 b(Scan)24
+b(Mode)g(Options)29 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(43)345 4413 y(4.5.7)110 b(Scan)24
+b(Source)g(Options)58 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(43)345 4585 y(4.5.8)110 b(Threshold)26
+b(Option)39 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)82 b(43)345 4757 y(4.5.9)110 b(Gamma)23
+b(T)-7 b(able)23 b(Options)68 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(44)345 4928 y(4.5.10)65
+b(Analog)25 b(Gamma)35 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(44)345 5100 y(4.5.11)65
+b(Shado)n(w)24 b(Option)49 b(.)c(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(45)1927 5381
+y(2)p eop
+%%Page: 3 4
+3 3 bop 345 123 a Fq(4.5.12)65 b(Highlight)26 b(Option)59
+b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)82 b(45)345 294 y(4.5.13)65 b(Lamp)23 b(Options)93
+b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)82 b(46)345 466 y(4.5.14)65 b(Scanner)25 b(Button)f(Options)
+83 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(46)345 638 y(4.5.15)65 b(Batch)24 b(Scan)g(Options)29
+b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)82 b(47)0 900 y Fr(5)91 b(Netw)o(ork)23 b(Pr)n(otocol)2989
+b(48)136 1072 y Fq(5.1)96 b(Data)24 b(T)-7 b(ype)23 b(Encoding)j(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)82 b(49)345 1243 y(5.1.1)110 b(Primiti)n(v)o(e)24
+b(Data)f(T)-7 b(ypes)53 b(.)45 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(49)345 1415 y(5.1.2)110 b(T)-7
+b(ype)24 b(Constructors)86 b(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(49)136 1587 y(5.2)96
+b(Remote)24 b(Procedure)h(Call)f(Requests)48 b(.)d(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(50)345 1758 y(5.2.1)110
+b Fp(SANE)p 861 1758 28 4 v 31 w(NET)p 1057 1758 V 32
+w(INIT)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)
+g(.)g(.)g(.)g(.)82 b(50)345 1930 y(5.2.2)110 b Fp(SANE)p
+861 1930 V 31 w(NET)p 1057 1930 V 32 w(GET)p 1254 1930
+V 31 w(DEVICES)62 b Fq(.)45 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(51)345 2102 y(5.2.3)110 b Fp(SANE)p 861 2102
+V 31 w(NET)p 1057 2102 V 32 w(OPEN)82 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345
+2273 y(5.2.4)110 b Fp(SANE)p 861 2273 V 31 w(NET)p 1057
+2273 V 32 w(CLOSE)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(51)345 2445 y(5.2.5)110
+b Fp(SANE)p 861 2445 V 31 w(NET)p 1057 2445 V 32 w(GET)p
+1254 2445 V 31 w(OPTION)p 1615 2445 V 30 w(DESCRIPTORS)28
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)82 b(52)345 2616 y(5.2.6)110 b
+Fp(SANE)p 861 2616 V 31 w(NET)p 1057 2616 V 32 w(CONTROL)p
+1474 2616 V 29 w(OPTION)36 b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+g(.)82 b(52)345 2788 y(5.2.7)110 b Fp(SANE)p 861 2788
+V 31 w(NET)p 1057 2788 V 32 w(GET)p 1254 2788 V 31 w(PARAMETERS)34
+b Fq(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345
+2960 y(5.2.8)110 b Fp(SANE)p 861 2960 V 31 w(NET)p 1057
+2960 V 32 w(START)27 b Fq(.)46 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(53)345 3131 y(5.2.9)110
+b Fp(SANE)p 861 3131 V 31 w(NET)p 1057 3131 V 32 w(CANCEL)41
+b Fq(.)k(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(54)345 3303 y(5.2.10)65 b Fp(SANE)p 861 3303 V 31 w(NET)p
+1057 3303 V 32 w(AUTHORIZE)80 b Fq(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)g(.)82 b(54)345 3475 y(5.2.11)65 b Fp(SANE)p
+861 3475 V 31 w(NET)p 1057 3475 V 32 w(EXIT)82 b Fq(.)46
+b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(55)0 3737 y Fr(6)91 b(Contact)24 b(Inf)n(ormation)2871
+b(56)1927 5381 y Fq(3)p eop
+%%Page: 4 5
+4 4 bop 0 846 a Fs(List)52 b(of)g(Figur)l(es)136 1349
+y Fq(3.1)96 b(Example)24 b(SANE)d(Hiearchy)36 b(.)45
+b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+128 b(9)136 1521 y(3.2)96 b(T)m(ransfer)25 b(order)f(of)g(image)g(data)
+g(bytes)64 b(.)45 b(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(11)136 1693 y(3.3)96 b(Bit)23 b(and)h(byte)h(order)f(of)g(image)g
+(data)70 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(12)136 1947 y(4.1)96 b(Code)24 b(\003o)n(w)53 b(.)45
+b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(37)136 2119 y(4.2)96
+b(Scan)24 b(area)g(options)61 b(.)46 b(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(42)1927 5381 y(4)p eop
+%%Page: 5 6
+5 5 bop 0 846 a Fs(List)52 b(of)g(T)-19 b(ables)136 1349
+y Fq(4.1)96 b(Status)24 b(Codes)h(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h
+(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(17)136 1521 y(4.2)96 b(Prede\002ned)25 b(De)n(vice)f(Information)i
+(Strings)47 b(.)f(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(18)136 1693 y(4.3)96 b(Option)25 b(V)-10 b(alue)23
+b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 1343 1693 28 4 v 31
+w(Value)p 1649 1693 V 31 w(Type)p Fq(\))75 b(.)45 b(.)g(.)h(.)f(.)g(.)g
+(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+g(.)g(.)82 b(21)136 1864 y(4.4)96 b(Physical)25 b(Units)f(\()p
+Fp(SANE)p 1151 1864 V 31 w(Unit)p Fq(\))k(.)45 b(.)g(.)g(.)g(.)g(.)h(.)
+f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(21)136 2036
+y(4.5)96 b(Option)25 b(Capabilities)62 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)
+g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82
+b(23)136 2208 y(4.6)96 b(Option)25 b(V)-10 b(alue)23
+b(Constraints)57 b(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(24)136 2379 y(4.7)96 b(Action)25
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 1136 2379 V 31 w(Action)p
+Fq(\))69 b(.)45 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)
+82 b(29)136 2551 y(4.8)96 b(Additional)26 b(Information)g(Returned)f
+(When)f(Setting)g(an)g(Option)j(.)45 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f
+(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)82 b(30)136 2722
+y(4.9)96 b(Frame)23 b(F)o(ormat)g(\()p Fp(SANE)p 1139
+2722 V 32 w(Frame)p Fq(\))52 b(.)45 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
+h(.)f(.)g(.)g(.)g(.)g(.)82 b(31)1927 5381 y(5)p eop
+%%Page: 6 7
+6 6 bop 0 804 a Fo(Chapter)44 b(1)0 1278 y Fs(Pr)l(eface)0
+1782 y Fq(The)25 b(SANE)e(standard)28 b(is)e(being)h(de)n(v)o(eloped)g
+(by)f(a)f(group)i(of)f(free-softw)o(are)i(de)n(v)o(elopers.)38
+b(The)25 b(process)i(is)f(open)g(to)g(the)0 1895 y(public)e(and)e
+(comments)h(as)f(well)g(as)g(suggestions)k(for)c(impro)o(v)o(ements)i
+(are)e(welcome.)29 b(Information)24 b(on)f(ho)n(w)e(to)h(join)h(the)0
+2008 y(SANE)e(de)n(v)o(elopment)26 b(process)f(can)f(be)g(found)g(in)g
+(Chapter)g(6.)0 2179 y(The)32 b(SANE)f(standard)k(is)e(intended)i(to)d
+(streamline)j(softw)o(are)f(de)n(v)o(elopment)h(by)e(pro)o(viding)j(a)c
+(standard)j(application)0 2292 y(programming)25 b(interf)o(ace)f(to)f
+(access)h(raster)g(scanner)g(hardw)o(are.)30 b(This)22
+b(should)i(reduce)g(the)f(number)h(of)e(dif)n(ferent)j(dri)n(v)o(er)0
+2405 y(implementations,)i(thereby)e(reducing)h(the)e(need)g(for)g
+(reimplementing)i(similar)e(code.)0 2756 y Fn(1.1)119
+b(About)31 b(This)f(Document)0 3022 y Fq(This)35 b(document)j(is)d
+(intended)j(for)d(de)n(v)o(elopers)j(who)e(are)f(creating)j(either)f
+(an)e(application)k(that)d(requires)h(access)g(to)0 3135
+y(raster)24 b(scanner)h(hardw)o(are)f(and)f(for)g(de)n(v)o(elopers)j
+(who)c(are)h(implementing)i(a)e(SANE)d(dri)n(v)o(er)-5
+b(.)29 b(It)23 b(does)h(not)f(co)o(v)o(er)g(speci\002c)0
+3248 y(implementations)35 b(of)c(SANE)f(components.)55
+b(Its)32 b(sole)g(purpose)i(is)d(to)h(describe)i(and)e(de\002ne)g(the)g
+(SANE)d(application)0 3361 y(interf)o(ace)g(that)f(will)f(enable)i(an)o
+(y)e(application)j(on)e(an)o(y)f(platform)h(to)f(interoperate)k(with)c
+(an)o(y)g(SANE)e(back)o(end)k(for)f(that)0 3474 y(platform.)0
+3645 y(The)c(remainder)i(of)e(this)g(document)i(is)e(or)n(ganized)j(as)
+d(follo)n(ws.)32 b(Chapter)25 b(2)f(pro)o(vides)i(introductional)i
+(material.)k(Chap-)0 3758 y(ter)24 b(3)f(presents)i(the)f(en)l
+(vironment)j(SANE)21 b(is)i(designed)j(for)-5 b(.)29
+b(Chapter)24 b(4)g(details)h(the)f(SANE)d(Application)26
+b(Programmer)0 3871 y(Interf)o(ace.)67 b(Chapter)36 b(5)f(speci\002es)i
+(the)e(netw)o(ork)i(protocol)h(that)d(can)h(be)g(used)g(to)f(implement)
+i(the)e(SANE)e(API)h(in)i(a)0 3984 y(netw)o(ork)30 b(transparent)i(f)o
+(ashion.)47 b(Finally)-6 b(,)31 b(Chapter)f(6)f(gi)n(v)o(es)h
+(information)h(on)e(ho)n(w)g(to)g(join)g(the)g(SANE)e(de)n(v)o
+(elopment)0 4097 y(process.)0 4405 y Fm(1.1.1)99 b(T)-7
+b(ypographic)25 b(Con)l(v)o(entions)0 4638 y Fq(Changes)g(since)f(the)g
+(last)g(re)n(vision)i(of)d(this)h(document)h(are)f(highlighted)j(lik)o
+(e)d(this:)0 4658 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0 4658 a 0 4658 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 4658 a 151 x
+Fq(P)o(aragraphs)h(that)f(changed)i(since)f(the)e(last)h(re)n(vision)i
+(of)d(the)h(documention)i(are)e(mark)o(ed)h(lik)o(e)f(this)g
+(paragraph.)3600 4809 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 3600 4809 a 3600 4809 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 3600
+4809 a 3600 4809 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 3600 4809 a 1927 5381 a Fq(6)p eop
+%%Page: 7 8
+7 7 bop 0 804 a Fo(Chapter)44 b(2)0 1278 y Fs(Intr)l(oduction)0
+1782 y Fq(SANE)22 b(is)i(an)g(application)k(programming)e(interf)o(ace)
+h(\(API\))c(that)i(pro)o(vides)h(standardized)i(access)e(to)e(an)o(y)g
+(raster)i(image)0 1895 y(scanner)e(hardw)o(are.)30 b(The)22
+b(standardized)27 b(interf)o(ace)e(allo)n(ws)d(to)h(write)g(just)g(one)
+g(dri)n(v)o(er)g(for)g(each)g(scanner)i(de)n(vice)e(instead)0
+2008 y(of)30 b(one)h(dri)n(v)o(er)f(for)h(each)g(scanner)h(and)e
+(application.)52 b(The)30 b(reduction)i(in)e(the)h(number)g(of)f
+(required)i(dri)n(v)o(ers)f(pro)o(vides)0 2120 y(signi\002cant)24
+b(sa)n(vings)h(in)d(de)n(v)o(elopment)j(time.)j(More)23
+b(importantly)-6 b(,)25 b(SANE)20 b(raises)j(the)g(le)n(v)o(el)g(at)f
+(which)h(applications)j(can)0 2233 y(w)o(ork.)i(As)21
+b(such,)h(it)g(will)f(enable)i(applications)i(that)d(were)g(pre)n
+(viously)i(unheard)f(of)f(in)f(the)h(UNIX)e(w)o(orld.)29
+b(While)22 b(SANE)0 2346 y(is)27 b(primarily)i(tar)n(geted)h(at)d(a)g
+(UNIX)e(en)l(vironment,)31 b(the)d(standard)h(has)f(been)g(carefully)i
+(designed)f(to)f(mak)o(e)f(it)g(possible)0 2459 y(to)c(implement)i(the)
+f(API)e(on)i(virtually)i(an)o(y)d(hardw)o(are)i(or)f(operating)i
+(system.)0 2631 y(SANE)20 b(is)j(an)g(acron)o(ym)h(for)f(\223Scanner)h
+(Access)f(No)n(w)f(Easy)-6 b(.)g(\224)28 b(Also,)23 b(the)g(hope)h(is)f
+(that)g(SANE)e(is)h(sane)i(in)f(the)g(sense)h(that)0
+2744 y(it)g(will)f(allo)n(w)h(easy)h(implementation)i(of)d(the)g(API)e
+(while)j(accommodating)i(all)d(features)h(required)i(by)d(today')-5
+b(s)25 b(scanner)0 2857 y(hardw)o(are)31 b(and)f(applications.)51
+b(Speci\002cally)-6 b(,)33 b(SANE)27 b(should)k(be)f(broad)h(enough)g
+(to)f(accommodate)i(de)n(vices)f(such)f(as)0 2970 y(scanners,)25
+b(digital)h(still)e(and)g(video)g(cameras,)h(as)e(well)g(as)h(virtual)h
+(de)n(vices)g(lik)o(e)f(image)g(\002le)f(\002lters.)0
+3321 y Fn(2.1)119 b(T)-11 b(erminology)0 3587 y Fq(An)21
+b(application)j(that)e(uses)g(the)g(SANE)d(interf)o(ace)k(is)f(called)g
+(a)f(SANE)e Fl(fr)l(ontend)p Fq(.)30 b(A)20 b(dri)n(v)o(er)i(that)g
+(implements)h(the)f(SANE)0 3700 y(interf)o(ace)31 b(is)d(called)i(a)f
+(SANE)d Fl(bac)n(k)o(end)p Fq(.)46 b(A)28 b Fl(meta)h(bac)n(k)o(end)k
+Fq(pro)o(vides)e(some)d(means)i(to)e(manage)i(one)f(or)f(more)h(other)0
+3812 y(back)o(ends.)1927 5381 y(7)p eop
+%%Page: 8 9
+8 8 bop 0 804 a Fo(Chapter)44 b(3)0 1278 y Fs(The)51
+b(SANE)g(En)-8 b(vir)l(onment)0 1781 y Fq(SANE)27 b(is)j(de\002ned)g
+(as)g(a)f(C-callable)j(library)f(interf)o(ace.)50 b(Accessing)32
+b(a)d(raster)i(scanner)g(de)n(vice)g(typically)h(consists)g(of)0
+1894 y(tw)o(o)c(phases:)39 b(\002rst,)29 b(v)n(arious)g(controls)h(of)e
+(the)h(scanner)g(need)g(to)f(be)g(setup)h(or)f(queried.)44
+b(In)28 b(the)g(second)i(phase,)g(one)e(or)0 2007 y(more)c(images)g
+(are)g(acquired.)0 2178 y(Since)33 b(the)f(de)n(vice)i(controls)g(are)f
+(widely)g(dif)n(ferent)h(from)e(de)n(vice)i(to)e(de)n(vice,)k(SANE)30
+b(pro)o(vides)k(a)e(generic)i(interf)o(ace)0 2291 y(that)25
+b(mak)o(es)g(it)f(easy)h(for)g(a)f(frontend)j(to)d(gi)n(v)o(e)h(a)f
+(user)h(access)g(to)g(all)f(controls)j(without)e(ha)n(ving)i(to)d
+(understand)k(each)d(and)0 2404 y(e)n(v)o(ery)g(de)n(vice)h(control.)34
+b(The)24 b(design)j(principle)g(used)e(here)g(is)g(to)g(abstract)h
+(each)g(de)n(vice)g(control)g(into)f(a)g(SANE)d Fl(option)p
+Fq(.)0 2517 y(An)28 b(option)j(is)d(a)h(self-describing)k(name/v)n
+(alue)e(pair)-5 b(.)45 b(F)o(or)28 b(e)o(xample,)j(the)e(brightness)j
+(control)e(of)f(a)f(camera)i(might)f(be)0 2630 y(represented)e(by)c(an)
+h(option)h(called)g Fp(brightness)18 b Fq(whose)24 b(v)n(alue)g(is)g
+(an)f(inte)o(ger)i(in)f(the)f(range)i(from)e(0)h(to)f(255.)0
+2801 y(W)l(ith)e(self-describing)k(options,)e(a)d(back)o(end)j(need)f
+(not)f(be)f(concerned)k(with)c Fl(pr)m(esentation)k Fq(issues:)30
+b(the)21 b(back)o(end)h(simply)0 2914 y(pro)o(vides)i(a)e(list)h(of)f
+(options)i(that)f(describe)i(all)d(the)h(controls)h(a)n(v)n(ailable)h
+(in)d(the)h(de)n(vice.)29 b(Similarly)-6 b(,)23 b(there)g(are)g
+(bene\002ts)g(to)0 3027 y(the)f(frontend:)31 b(it)22
+b(need)h(not)f(be)g(concerned)j(with)d(the)g Fl(meaning)h
+Fq(of)f(each)h(option.)30 b(It)21 b(simply)i(pro)o(vides)h(means)f(to)e
+(present)0 3140 y(and)j(alter)g(the)g(options)i(de\002ned)e(by)g(the)f
+(back)o(end.)0 3491 y Fn(3.1)119 b(Attaching)31 b(to)e(a)h(SANE)g(back)
+o(end)0 3757 y Fq(The)d(process)i(through)g(which)e(a)g(SANE)e
+(frontend)k(connects)h(to)d(a)f(back)o(end)k(is)d(platform)h
+(dependent.)42 b(Se)n(v)o(eral)28 b(possi-)0 3870 y(bilities)d(e)o
+(xist:)136 4115 y Fk(\017)46 b Fr(Static)25 b(linking:)31
+b Fq(A)24 b(SANE)e(back)o(end)27 b(may)e(be)g(link)o(ed)h(directly)h
+(into)e(a)f(frontend.)35 b(While)25 b(the)g(simplest)h(method)227
+4228 y(of)d(attaching)i(to)d(a)g(back)o(end,)j(it)d(is)g(some)n(what)h
+(limited)g(in)g(functionality)j(since)e(the)e(a)n(v)n(ailable)j(de)n
+(vices)f(is)e(limited)227 4341 y(to)34 b(the)g(ones)g(for)g(which)g
+(support)i(has)e(been)g(link)o(ed)i(in)d(when)h(the)g(frontend)i(w)o
+(as)d(b)n(uilt.)60 b(But)34 b(e)n(v)o(en)f(so)h(static)227
+4454 y(linking)k(can)e(be)f(quite)i(useful,)j(particularly)e(when)e
+(combined)i(with)d(a)g(back)o(end)j(that)e(can)g(access)h(scanners)227
+4567 y(via)30 b(a)g(netw)o(ork.)49 b(Also,)31 b(it)f(is)f(possible)k
+(to)c(support)j(multiple)f(back)o(ends)i(simultaneously)g(by)d
+(implementing)j(a)227 4680 y(meta)h(back)o(end)i(that)e(manages)h(se)n
+(v)o(eral)f(back)o(ends)i(that)e(ha)n(v)o(e)h(been)f(compiled)h(in)f
+(such)g(a)f(manner)i(that)f(the)o(y)227 4793 y(e)o(xport)29
+b(unique)g(function)g(names.)41 b(F)o(or)26 b(e)o(xample,)j(a)e(back)o
+(end)i(called)g Fp(be)c Fq(w)o(ould)j(normally)h(e)o(xport)f(a)f
+(function)227 4906 y(called)g Fp(sane)p 694 4906 28 4
+v 31 w(read\(\))p Fq(.)33 b(If)25 b(each)i(back)o(end)h(w)o(ould)f(pro)
+o(vide)g(such)g(a)f(function,)i(static)f(linking)h(w)o(ould)e(f)o(ail)h
+(due)227 5019 y(to)i(multiple)h(con\003icting)h(de\002nitions)f(of)f
+(the)g(same)g(symbol.)45 b(This)28 b(can)h(be)g(resolv)o(ed)i(by)d(ha)n
+(ving)j(back)o(end)g Fp(be)227 5132 y Fq(include)26 b(a)d(header)i
+(\002le)e(that)h(has)g(lines)g(of)g(the)f(form:)1927
+5381 y(8)p eop
+%%Page: 9 10
+9 9 bop 427 123 a Fp(#define)52 b(sane_read)e(be_sane_read)227
+310 y Fq(W)l(ith)30 b(de\002nitions)i(of)e(this)g(kind,)i(back)o(end)g
+Fp(be)c Fq(will)i(e)o(xport)h(function)h(name)d Fp(be)p
+2899 310 28 4 v 32 w(sane)p 3151 310 V 31 w(read\(\))p
+Fq(.)44 b(Thus,)31 b(all)227 423 y(back)o(ends)22 b(will)c(e)o(xport)i
+(unique)g(names.)28 b(As)18 b(long)h(as)g(a)g(meta)f(back)o(end)j(kno)n
+(ws)e(about)h(these)g(names,)g(it)e(is)h(possible)227
+536 y(to)24 b(combine)h(se)n(v)o(eral)f(back)o(ends)i(at)e(link)g(time)
+f(and)h(select)h(and)f(use)g(them)f(dynamically)j(at)e(runtime.)136
+724 y Fk(\017)46 b Fr(Dynamic)28 b(linking:)38 b Fq(A)27
+b(simpler)i(yet)f(more)h(po)n(werful)g(w)o(ay)f(to)g(support)i
+(multiple)f(back)o(ends)i(is)d(to)g(e)o(xploit)i(dy-)227
+837 y(namic)e(linking)i(on)e(platforms)h(that)f(support)i(it.)41
+b(In)28 b(this)g(case,)h(a)e(frontend)j(is)e(link)o(ed)h(against)g(a)e
+(shared)j(library)227 950 y(that)25 b(implements)h(an)o(y)e(SANE)d
+(back)o(end.)33 b(Since)24 b(each)h(dynamically)i(link)o(ed)f(back)o
+(end)g(e)o(xports)f(the)g(same)f(set)g(of)227 1063 y(global)30
+b(symbols)g(\(all)f(starting)i(with)e(the)g(pre\002x)g
+Fp(sane)p 2057 1063 V 30 w Fq(\),)h(the)f(dynamic)h(library)g(that)f
+(gets)g(loaded)i(at)d(runtime)227 1176 y(does)c(not)f(necessarily)j(ha)
+n(v)o(e)e(to)f(be)g(the)g(same)g(one)g(as)g(one)h(the)f(frontend)i(got)
+e(link)o(ed)i(against.)k(In)23 b(other)h(w)o(ords,)f(it)227
+1288 y(is)h(possible)h(to)f(switch)g(the)g(back)o(end)h(by)f
+(installing)i(the)e(appropriate)j(back)o(end)f(dynamic)e(library)-6
+b(.)227 1439 y(More)23 b(importantly)-6 b(,)25 b(dynamic)e(linking)i
+(mak)o(es)e(it)f(easy)h(to)g(implement)g(a)f(meta)g(back)o(end)j(that)e
+(loads)h(other)f(back-)227 1552 y(ends)37 b Fl(on)e(demand)p
+Fq(.)67 b(This)35 b(is)g(a)h(po)n(werful)g(mechanism)h(since)g(it)e
+(allo)n(ws)h(adding)i(ne)n(w)d(back)o(ends)j(merely)e(by)227
+1665 y(installing)26 b(a)e(shared)h(library)g(and)f(updating)i(a)d
+(con\002guration)j(\002le.)136 1852 y Fk(\017)46 b Fr(Netw)o(ork)30
+b(connection:)43 b Fq(Ar)n(guably)32 b(the)e(ultimate)h(w)o(ay)f(to)g
+(attach)i(to)e(a)f(scanner)j(is)e(by)g(using)i(the)e(netw)o(ork)h(to)
+227 1965 y(connect)f(to)e(a)f(back)o(end)k(on)d(a)f(remote)i(machine.)
+43 b(This)27 b(mak)o(es)i(it)f(possible)i(to)d(scan)i(images)g(from)f
+(an)o(y)g(host)g(in)227 2078 y(the)f(uni)n(v)o(erse,)h(as)e(long)h(as)g
+(there)g(is)f(a)g(netw)o(ork)h(connection)j(to)c(that)h(host)g(and)g
+(pro)o(vided)h(the)e(user)h(is)g(permitted)227 2191 y(to)d(access)h
+(that)f(scanner)-5 b(.)0 2479 y
+ currentpoint currentpoint translate 0.64821 0.64821 scale neg exch
+neg exch translate
+ 0 2479 a 0 2479 a
+ gsave currentpoint currentpoint translate 270 neg rotate neg exch
+neg exch translate
+ 0 2479
+a @beginspecial 0 @llx 0 @lly 355 @urx 722 @ury 3550
+@rwi @setspecial
+%%BeginDocument: figs/hierarchy.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hierarchy.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 2
+%%CreationDate: Thu Jan 30 22:02:12 1997
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%Magnification: 1.00
+%%Orientation: Landscape
+%%BoundingBox: 0 0 355 722
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-17.0 -17.0 translate
+ 90 rotate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+n 0 612 m 0 0 l 792 0 l 792 612 l cp clip
+ 0.06000 0.06000 sc
+% Polyline
+n 5700 3825 m 300 3825 l 300 300 l 5700 300 l cp gs 0.90 setgray ef gr
+% Polyline
+n 12300 5550 m 7200 5550 l 7200 300 l 12300 300 l cp gs 0.90 setgray ef gr
+15.000 slw
+% Polyline
+n 10650 4785 m 12150 4785 l 12150 5385 l 10650 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+11399 5182 m
+gs 1 -1 sc (qcam) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 7350 4785 m 8850 4785 l 8850 5385 l 7350 5385 l cp gs col-1 s gr
+/Helvetica ff 270.00 scf sf
+8099 5182 m
+gs 1 -1 sc (hp) dup sw pop 2 div neg 0 rm col-1 sh gr
+% Polyline
+n 2250 1185 m 3750 1185 l 3750 1785 l 2250 1785 l cp gs col-1 s gr
+% Polyline
+n 450 2985 m 1950 2985 l 1950 3585 l 450 3585 l cp gs col-1 s gr
+% Polyline
+n 2250 2985 m 3750 2985 l 3750 3585 l 2250 3585 l cp gs col-1 s gr
+% Polyline
+n 4050 2985 m 5550 2985 l 5550 3585 l 4050 3585 l cp gs col-1 s gr
+% Polyline
+n 8850 1185 m 10350 1185 l 10350 1785 l 8850 1785 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 2700 1800 m 1200 3000 l gs col-1 s gr
+% Polyline
+n 3000 1800 m 3000 3000 l gs col-1 s gr
+% Polyline
+n 3300 1800 m 4800 3000 l gs col-1 s gr
+% Polyline
+n 9600 1800 m 9600 2100 l gs col-1 s gr
+% Polyline
+n 9450 2700 m 8100 4800 l gs col-1 s gr
+% Polyline
+n 11400 4200 m 11400 4800 l gs col-1 s gr
+% Polyline
+n 1200 3600 m 1200 4200 l gs col-1 s gr
+% Polyline
+n 3000 3600 m 3000 4125 l gs col-1 s gr
+% Polyline
+n 7875 5400 m 7350 5850 l gs col-1 s gr
+% Polyline
+n 8250 5400 m 8775 5850 l gs col-1 s gr
+% Polyline
+n 11475 5400 m 11475 5850 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 8850 2100 m 10350 2100 l 10350 2700 l 8850 2700 l cp gs col-1 s gr
+% Polyline
+n 10650 3600 m 12150 3600 l 12150 4200 l 10650 4200 l cp gs col-1 s gr
+7.500 slw
+% Polyline
+n 9750 2700 m 11400 3600 l gs col-1 s gr
+% Interp Spline
+gs n 4800 3600 m
+ 4390.2 4024.4 4259.0 4249.4 4275 4500 curveto
+ 4300.2 4894.5 4554.6 5418.2 5025 5475 curveto
+ 5575.9 5541.5 5962.1 4914.2 6150 4575 curveto
+ 6573.5 3810.6 5758.1 2145.7 6525 1350 curveto
+ 7224.0 624.7 8573.7 446.9 9450 900 curveto
+ 9524.5 938.5 9562.0 1013.5 9600 1200 curveto
+ gs col-1 s gr
+ gr
+
+/Helvetica ff 270.00 scf sf
+1199 3382 m
+gs 1 -1 sc (pnm) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 3382 m
+gs 1 -1 sc (mustek) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+1200 4425 m
+gs 1 -1 sc (pnm files) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 4380 m
+gs 1 -1 sc (scanner) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+7350 6165 m
+gs 1 -1 sc (scanner 1) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+8925 6165 m
+gs 1 -1 sc (scanner 2) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+11475 6135 m
+gs 1 -1 sc (video camera) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+3000 600 m
+gs 1 -1 sc (machine A) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+9600 630 m
+gs 1 -1 sc (machine B) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica-Oblique ff 210.00 scf sf
+4725 5850 m
+gs 1 -1 sc (network connection) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+2999 1582 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+4799 3382 m
+gs 1 -1 sc (net) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 1582 m
+gs 1 -1 sc (saned) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+9599 2482 m
+gs 1 -1 sc (dll) dup sw pop 2 div neg 0 rm col-1 sh gr
+/Helvetica ff 270.00 scf sf
+11399 3982 m
+gs 1 -1 sc (autolum) dup sw pop 2 div neg 0 rm col-1 sh gr
+$F2psEnd
+rs
+
+%%EndDocument
+ @endspecial 2958 2479 a
+ currentpoint grestore moveto
+ 2958 2479 a 0 2479 a
+ currentpoint currentpoint translate 1 0.64821 div 1 0.64821 div scale
+neg exch neg exch translate
+ 0 2479
+a 1267 4550 a Fq(Figure)24 b(3.1:)29 b(Example)24 b(SANE)d(Hiearchy)0
+4881 y(The)27 b(abo)o(v)o(e)i(discussion)i(lists)e(just)f(a)f(fe)n(w)h
+(w)o(ays)g(for)g(frontends)i(to)e(attach)h(to)f(a)g(back)o(end.)44
+b(It)27 b(is)h(of)g(course)h(possible)h(to)0 4994 y(combine)d(these)g
+(solutions)i(to)c(pro)o(vide)j(an)e(entire)h(hierarchy)h(of)d(SANE)f
+(back)o(ends.)38 b(Such)26 b(a)g(hierarchy)h(is)f(depicted)i(in)0
+5107 y(Figure)k(3.1.)50 b(The)31 b(\002gure)g(sho)n(ws)g(that)h
+(machine)g(A)e(uses)h(a)g(dynamic-linking)k(based)d(meta)f(back)o(end)i
+(called)f Fp(dll)d Fq(to)1927 5381 y(9)p eop
+%%Page: 10 11
+10 10 bop 0 123 a Fq(access)28 b(the)f(back)o(ends)j(called)e
+Fp(pnm)p Fq(,)d Fp(mustek)p Fq(,)f(and)j Fp(net)p Fq(.)36
+b(The)27 b(\002rst)f(tw)o(o)g(are)h(real)h(back)o(ends,)i(whereas)d
+(the)g(last)h(one)0 236 y(is)i(a)g(meta)g(back)o(end)i(that)f(pro)o
+(vides)h(netw)o(ork)f(transparent)j(access)d(to)f(remote)h(scanners.)51
+b(In)30 b(the)g(\002gure,)i(machine)f(B)0 349 y(pro)o(vides)h
+(non-local)h(access)f(to)e(its)g(scanners)i(through)h(the)d(SANE)e
+(frontend)k(called)g Fp(saned)p Fq(.)45 b(The)30 b Fp(saned)d
+Fq(in)k(turn)0 462 y(has)23 b(access)h(to)e(the)h Fp(hp)e
+Fq(and)i Fp(autolum)18 b Fq(back)o(ends)25 b(through)g(another)f
+(instance)h(of)d(the)h Fp(dll)e Fq(back)o(end.)30 b(The)22
+b Fp(autolum)0 574 y Fq(meta)k(back)o(end)j(is)e(used)g(to)f
+(automatically)k(adjust)e(the)f(luminance)h(\(brightness\))i(of)d(the)f
+(image)h(data)h(acquired)g(by)f(the)0 687 y(camera)d(back)o(end)i
+(called)f Fp(qcam)p Fq(.)0 859 y(Note)f(that)g(a)g(meta)g(back)o(end)i
+(really)f(is)f(both)h(a)e(frontend)k(and)d(a)g(back)o(end)i(at)e(the)g
+(same)g(time.)30 b(It)23 b(is)h(a)g(frontend)i(from)e(the)0
+972 y(vie)n(wpoint)h(of)f(the)g(back)o(ends)j(that)d(it)g(manages)h
+(and)f(a)g(back)o(end)i(from)d(the)h(vie)n(wpoint)i(of)e(the)g
+(frontends)i(that)f(access)g(it.)0 1085 y(The)j(name)g(\223meta)h(back)
+o(end\224)h(w)o(as)e(chosen)i(primarily)g(because)g(the)e(SANE)e
+(standard)31 b(describes)f(the)f(interf)o(ace)h(from)0
+1198 y(the)24 b(vie)n(wpoint)h(of)e(a)g(\(real\))i(frontend.)0
+1549 y Fn(3.2)119 b(Image)29 b(Data)g(F)m(ormat)0 1815
+y Fq(Ar)n(guably)34 b(the)e(most)g(important)h(aspect)h(of)d(an)h
+(image)g(acquisition)k(system)c(is)g(ho)n(w)f(images)i(are)f
+(represented.)57 b(The)0 1928 y(SANE)34 b(approach)39
+b(is)e(to)f(de\002ne)h(a)g(simple)g(yet)g(po)n(werful)h(representation)
+j(that)c(is)f(suf)n(\002cient)i(for)f(v)n(ast)g(majority)h(of)0
+2041 y(applications)f(and)c(de)n(vices.)59 b(While)34
+b(the)f(representation)38 b(is)33 b(simple,)j(the)d(interf)o(ace)i(has)
+f(been)g(de\002ned)g(carefully)h(to)0 2154 y(allo)n(w)h(e)o(xtending)i
+(it)d(in)h(the)g(future)h(without)g(breaking)h(backw)o(ards)g
+(compatibility)-6 b(.)68 b(Thus,)39 b(it)c(will)h(be)f(possible)j(to)0
+2266 y(accommodate)26 b(future)e(applications)k(or)23
+b(de)n(vices)i(that)f(were)g(not)f(anticipated)k(at)c(the)h(time)g
+(this)g(standard)h(w)o(as)f(created.)0 2438 y(A)19 b(SANE)f(image)j(is)
+f(a)g(rectangular)k(area.)k(The)20 b(rectangular)j(area)e(is)f(subdi)n
+(vided)k(into)d(a)f(number)h(of)f(ro)n(ws)g(and)h(columns.)0
+2551 y(At)g(the)i(intersection)i(of)e(each)g(ro)n(w)e(and)i(column)g
+(is)f(a)g(\(preferable)j(quadratic\))g(pix)o(el.)k(A)21
+b(pix)o(el)i(consists)h(of)e(one)h(or)f(more)0 2664 y(sample)i(v)n
+(alues.)30 b(Each)24 b(sample)g(v)n(alue)g(represents)j(one)d(channel)h
+(\(e.g.,)e(the)h(red)g(channel\).)0 2836 y(The)i(SANE)f(API)g
+(transmits)j(an)f(image)g(as)f(a)h(sequence)i(of)d(frames.)39
+b(Each)27 b(frame)g(co)o(v)o(ers)g(the)g(same)g(rectangular)j(area)0
+2948 y(as)36 b(the)g(entire)h(image,)j(b)n(ut)c(may)g(contain)i(only)f
+(a)e(subset)j(of)e(the)g(channels)i(in)e(the)g(\002nal)g(image.)67
+b(F)o(or)35 b(e)o(xample,)40 b(a)0 3061 y(red/green/blue)34
+b(image)d(could)g(either)g(be)g(transmitted)h(as)e(a)g(single)h(frame)f
+(that)h(contains)h(the)f(sample)g(v)n(alues)g(for)f(all)0
+3174 y(three)g(channels)i(or)d(it)g(could)h(be)f(transmitted)j(as)d(a)g
+(sequence)i(of)e(three)h(frames:)42 b(the)29 b(\002rst)g(frame)g
+(containing)j(the)e(red)0 3287 y(channel,)25 b(the)f(second)h(the)f
+(green)h(channel,)g(and)f(the)g(third)g(the)g(blue)g(channel.)0
+3459 y(When)30 b(transmitting)i(an)e(image)g(frame)g(by)g(frame,)h(the)
+f(frontend)i(needs)f(to)e(kno)n(w)h(what)g(part)g(of)g(the)g(image)g(a)
+f(frame)0 3572 y(represents)e(\(and)d(ho)n(w)g(man)o(y)g(frames)g(it)g
+(should)i(e)o(xpect\).)31 b(F)o(or)23 b(that)i(purpose,)h(the)e(SANE)d
+(API)i(tags)i(e)n(v)o(ery)f(frame)g(with)0 3685 y(a)f(type)h(and)g(a)f
+(format)i(descriptor)-5 b(.)0 3704 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 3704 a 0 3704
+a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 3704 a 152 x Fq(There)22 b(are)g(tw)o(o)g(dif)n(ferent)i(types)f
+(of)e(frames:)29 b(pix)o(el)23 b(oriented)h(frames)e
+Fp(SANE)p 2477 3856 28 4 v 31 w(FRAME)p 2783 3856 V 31
+w(RAW)e Fq(and)i(arbitrary)i(data)f(frames)0 3969 y Fp(SANE)p
+225 3969 V 31 w(FRAME)p 531 3969 V 30 w(MIME)p Fq(.)j(These)i(types)i
+(are)f(discussed)i(in)d(detail)h(in)g(the)f(follo)n(wing)i(sections.)45
+b(The)28 b(frame)h(types)g(used)0 4082 y(by)d(the)f(pre)n(vious)j(v)o
+(ersion)f(1)e(of)h(this)g(standard)i(\()p Fp(SANE)p 1793
+4082 V 31 w(FRAME)p 2099 4082 V 30 w(GRAY)p Fq(,)23 b
+Fp(SANE)p 2615 4082 V 31 w(FRAME)p 2921 4082 V 30 w(RGB)p
+Fq(,)g Fp(SANE)p 3382 4082 V 31 w(FRAME)p 3688 4082 V
+31 w(RED)p Fq(,)0 4195 y Fp(SANE)p 225 4195 V 31 w(FRAME)p
+531 4195 V 30 w(GREEN)p Fq(,)e(and)j Fp(SANE)p 1254 4195
+V 30 w(FRAME)p 1559 4195 V 31 w(BLUE)p Fq(\))d(are)j(obsolete)i(and)e
+(superseded)i(by)e Fp(SANE)p 3235 4195 V 31 w(FRAME)p
+3541 4195 V 30 w(RAW)p Fq(.)0 4503 y Fm(3.2.1)99 b(Pixel)24
+b(oriented)i(frames)0 4736 y Fq(The)f(type)i(of)f(pix)o(el)h(oriented)h
+(frames)e(is)g Fp(SANE)p 1561 4736 V 31 w(FRAME)p 1867
+4736 V 30 w(RAW)p Fq(.)e(The)h(frame)h(contains)i(one)f(or)f(more)g
+(channels)i(of)e(data)0 4849 y(in)g(a)h(channel-interlea)n(v)o(ed)32
+b(format,)c(that)f(represents)i(sample)e(v)n(alues)h(from)f(a)f
+(property)j(of)d(the)h(indi)n(vidual)i(pix)o(els)f(that)0
+4962 y(is)22 b(subject)i(to)e(further)h(description)i(in)d(the)h
+Fp(format)p 1706 4962 V 30 w(desc)c Fq(member)j(of)g(the)g
+Fp(SANE)p 2743 4962 V 31 w(Parameters)17 b Fq(structured)25
+b(type.)0 5075 y(See)e(section)i(4.3.8)f(on)f(page)i(29)e(for)h
+(details)h(about)g(the)f(format)g(descriptions.)2563
+5075 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 2563 5075 a 2563 5075 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 2563 5075 a 2563 5075
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 2563 5075 a 1905 5381 a Fq(10)p eop
+%%Page: 11 12
+11 11 bop 0 123 a Fq(Each)24 b(sample)h(v)n(alue)g(has)f(a)g(certain)h
+(bit)g(depth.)31 b(The)24 b(bit)g(depth)h(is)f(\002x)o(ed)g(for)g(the)g
+(entire)i(image)e(and)h(can)f(be)g(as)g(small)g(as)0
+236 y(one)f(bit.)29 b(V)-10 b(alid)23 b(bit)g(depths)i(are)e(1,)f(8,)h
+(or)g(16)g(bits)g(per)h(sample.)29 b(If)22 b(a)h(de)n(vice')-5
+b(s)25 b(natural)f(bit)f(depth)i(is)d(something)j(else,)f(it)e(is)0
+349 y(up)k(to)f(the)h(dri)n(v)o(er)g(to)g(scale)g(the)g(sample)h(v)n
+(alues)f(appropriately)k(\(e.g.,)c(a)f(4)g(bit)h(sample)g(could)h(be)f
+(scaled)h(by)e(a)g(f)o(actor)i(of)0 462 y(four)d(to)g(represent)i(a)d
+(sample)h(v)n(alue)g(of)g(depth)g(8\).)0 481 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 481
+a 0 481 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 481 a 137 x Fq(The)f(complete)i(image)f(may)f(consist)i(of)
+f(se)n(v)o(eral)g(dif)n(ferent)i(channels.)31 b(The)23
+b(number)h(of)g(channels)i(is)d(de\002ned)h(by)g(mem-)0
+731 y(ber)f Fp(channels)p 583 731 28 4 v 30 w(per)p 778
+731 V 31 w(image)d Fq(of)j Fp(SANE)p 1422 731 V 31 w(Parameters)p
+Fq(.)g(The)g(image)h(may)f(be)g(transmitted)i(in)e(an)h(arbitrary)h
+(num-)0 844 y(ber)i(of)f(frames)i(which)f(can)g(be)f(determined)j(by)e
+(w)o(atching)h(the)f Fp(SANE)p 2300 844 V 31 w(PFLAG)p
+2606 844 V 30 w(LAST)p 2856 844 V 31 w(FRAME)d Fq(\003ag)i(in)g(said)i
+(type)f(\(or)0 957 y(by)c(counting)j(the)d(channels\).)31
+b(Note:)e(This)23 b(frame)g(type)h(replaces)h(all)e(frame)g(types)h(of)
+f(the)h(SANE)c(standard)25 b(v)o(ersion)g(1.)3900 957
+y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 3900 957 a 3900 957 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 3900 957 a 3900 957 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 3900 957
+a 0 1113 a Fq(Conceptually)-6 b(,)35 b(each)30 b(pix)o(el)h(oriented)i
+(frame)d(is)g(transmitted)i(a)e(byte)h(at)f(a)g(time.)48
+b(Each)30 b(byte)h(may)f(contain)i(8)d(sample)0 1226
+y(v)n(alues)g(\(for)g(an)f(image)g(bit)h(depth)g(of)f(1\),)h(one)f
+(full)h(sample)g(v)n(alue)g(\(for)f(an)g(image)h(bit)f(depth)h(of)f
+(8\),)h(or)f(a)g(partial)h(sam-)0 1339 y(ple)j(v)n(alue)g(\(for)f(an)h
+(image)f(bit)h(depth)g(of)g(16)f(or)g(bigger\).)54 b(In)31
+b(the)h(latter)g(case,)i(the)d(bytes)i(of)e(each)h(sample)g(v)n(alue)g
+(are)0 1452 y(transmitted)26 b(in)d(the)h(machine')-5
+b(s)25 b(nati)n(v)o(e)g(byte)f(order)-5 b(.)1357 1651
+y Fr(Back)o(end)22 b(Implementation)i(Note)227 1795 y
+Fq(A)d(netw)o(ork-based)26 b(meta)d(back)o(end)h(will)e(ha)n(v)o(e)h
+(to)g(ensure)g(that)g(the)g(byte)g(order)g(in)g(image)g(data)g(is)f
+(adjusted)227 1908 y(appropriately)32 b(if)c(necessary)-6
+b(.)45 b(F)o(or)27 b(e)o(xample,)j(when)e(the)g(meta)g(back)o(end)i
+(attaches)h(to)d(the)g(serv)o(er)h(proxy)-6 b(,)227 2021
+y(the)28 b(proxy)g(may)f(inform)g(the)h(back)o(end)h(of)e(the)g(serv)o
+(er')-5 b(s)29 b(byte)e(order)-5 b(.)41 b(The)26 b(back)o(end)j(can)f
+(then)f(apply)i(the)227 2134 y(adjustment)d(if)d(necessary)-6
+b(.)32 b(In)23 b(essence,)i(this)f(implements)h(a)e(\223recei)n(v)o(er)
+n(-mak)o(es-right)q(\224)29 b(approach.)975 3263 y @beginspecial
+0 @llx 0 @lly 362 @urx 182 @ury 2340 @rwi @setspecial
+%%BeginDocument: figs/xfer.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: xfer.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:30 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 362 182
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-134.0 370.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+15.000 slw
+% Polyline
+n 2400 3300 m 8100 3300 l gs col-1 s gr
+n 7812.00 3240.00 m 8100.00 3300.00 l 7812.00 3360.00 l 7860.50 3300.50 l 7812.00 3240.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3375 m 2400 3675 l gs col-1 s gr
+15.000 slw
+n 2690.76 3719.78 m 2400.00 3675.00 l 2684.45 3599.95 l 2640.17 3662.89 l 2690.76 3719.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 3750 m 8100 3750 l gs col-1 s gr
+n 7812.00 3690.00 m 8100.00 3750.00 l 7812.00 3810.00 l 7860.50 3750.50 l 7812.00 3690.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 3825 m 2400 4125 l gs col-1 s gr
+15.000 slw
+n 2690.76 4169.78 m 2400.00 4125.00 l 2684.45 4049.95 l 2640.17 4112.89 l 2690.76 4169.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 2250 3150 m 8250 3150 l 8250 6150 l 2250 6150 l clp gs col-1 s gr
+15.000 slw
+% Polyline
+n 2400 4200 m 8100 4200 l gs col-1 s gr
+n 7812.00 4140.00 m 8100.00 4200.00 l 7812.00 4260.00 l 7860.50 4200.50 l 7812.00 4140.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+7.500 slw
+% Polyline
+n 8100 4275 m 2400 4575 l gs col-1 s gr
+15.000 slw
+n 2690.76 4619.78 m 2400.00 4575.00 l 2684.45 4499.95 l 2640.17 4562.89 l 2690.76 4619.78 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 2400 4650 m 8100 4650 l gs col-1 s gr
+n 7812.00 4590.00 m 8100.00 4650.00 l 7812.00 4710.00 l 7860.50 4650.50 l 7812.00 4590.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1111 3459 a(Figure)24 b(3.2:)29 b(T)m(ransfer)24
+b(order)h(of)e(image)h(data)g(bytes)0 3759 y(The)f(order)i(in)f(which)g
+(the)g(sample)h(v)n(alues)g(in)e(a)h(frame)g(are)g(transmitted)i(is)e
+(illustrated)i(in)e(Figure)g(3.2.)30 b(As)23 b(can)h(be)g(seen,)0
+3872 y(the)f(v)n(alues)g(are)g(transmitted)h(ro)n(w)e(by)g(ro)n(w)g
+(and)h(each)g(ro)n(w)e(is)h(transmitted)j(from)d(left-most)i(to)e
+(right-most)i(column.)30 b(The)0 3985 y(left-to-right,)35
+b(top-to-bottom)e(transmission)g(order)d(applies)i(when)e(the)g(image)h
+(is)e(vie)n(wed)i(in)e(its)h(normal)h(orientation)0 4097
+y(\(as)24 b(it)f(w)o(ould)h(be)g(displayed)i(on)d(a)h(screen,)g(for)g
+(e)o(xample\).)0 4254 y(If)d(a)g(frame)h(contains)h(multiple)g
+(channels,)h(then)e(the)g(channels)h(are)f(transmitted)h(in)f(an)f
+(interlea)n(v)o(ed)j(f)o(ashion.)30 b(Figure)22 b(3.3)0
+4367 y(illustrates)k(this)e(for)g(the)g(case)g(where)g(a)f(frame)h
+(contains)h(a)f(complete)h(red/green/blue)i(image)d(with)g(a)f
+(bit-depth)j(of)d(8.)0 4523 y(F)o(or)k(a)g(bit)h(depth)g(of)g(1,)g
+(each)g(byte)g(contains)i(8)d(sample)i(v)n(alues)g(of)e(a)g
+Fl(single)i Fq(channel.)43 b(In)27 b(other)i(w)o(ords,)g(a)e(bit)h
+(depth)h(1)0 4636 y(frame)d(is)g(transmitted)i(in)e(a)g(byte)g
+(interlea)n(v)o(ed)j(f)o(ashion.)38 b(The)25 b(\002rst)h(sample)h(of)f
+(each)g(byte)h(is)f(represented)j(by)d(the)g(most)0 4749
+y(signi\002cant)g(bit.)0 4769 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 4769 a 0 4769 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 4769
+a 137 x Fq(F)o(or)g(gray)h(channels)i(at)d(a)g(bit)h(depth)g(of)g(1)f
+(only)h(tw)o(o)f(sample)h(v)n(alues)h(are)f(possible:)37
+b(1)26 b(represents)k(minimum)c(intensity)0 5019 y(\(black\))32
+b(and)f(0)f(represents)j(maximum)d(intensity)i(\(white\).)50
+b(F)o(or)29 b(all)i(other)g(channel)h(types)g(and)e(bit)h(depths)h(a)d
+(sample)0 5132 y(v)n(alue)24 b(of)g(0)f(represents)j(minimum)e
+(intensity)i(and)e(lar)n(ger)h(v)n(alues)f(represent)i(increasing)h
+(intensity)-6 b(.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 0 5151 a
+0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 0 5151 a 1905 5381 a Fq(11)p eop
+%%Page: 12 13
+12 12 bop 390 588 a @beginspecial 0 @llx 0 @lly 521 @urx
+93 @ury 3744 @rwi @setspecial
+%%BeginDocument: figs/image-data.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: image-data.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Fri Nov 22 08:53:36 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 521 93
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-88.0 120.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 1800 1200 m 3150 1200 l 3150 1350 l 1800 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+1875 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 3150 1200 m 4500 1200 l 4500 1350 l 3150 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3225 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 4500 1200 m 5850 1200 l 5850 1350 l 4500 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+4575 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 1800 1200 m 5850 1200 l 5850 1350 l 1800 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 1800 900 m 1950 825 l 3750 825 l 3825 750 l 3900 825 l 5700 825 l
+ 5850 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 600 m
+gs 1 -1 sc (pixel 0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 5850 1200 m 7200 1200 l 7200 1350 l 5850 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+5925 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 7200 1200 m 8550 1200 l 8550 1350 l 7200 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+7275 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+% Polyline
+n 8550 1200 m 9900 1200 l 9900 1350 l 8550 1350 l clp gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+8625 1125 m
+gs 1 -1 sc (7 6 5 4 3 2 1 0) col-1 show gr
+15.000 slw
+% Polyline
+n 5850 1200 m 9900 1200 l 9900 1350 l 5850 1350 l clp gs col-1 s gr
+7.500 slw
+% Polyline
+n 5850 900 m 6000 825 l 7800 825 l 7875 750 l 7950 825 l 9750 825 l
+ 9900 900 l gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1575 m
+gs 1 -1 sc (r) col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1575 m
+gs 1 -1 sc (g) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1575 m
+gs 1 -1 sc (b) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 600 m
+gs 1 -1 sc (pixel 1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+9225 1950 m
+gs 1 -1 sc (byte 5) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+7875 1950 m
+gs 1 -1 sc (byte 4) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+6525 1950 m
+gs 1 -1 sc (byte 3) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+5175 1950 m
+gs 1 -1 sc (byte 2) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+3825 1950 m
+gs 1 -1 sc (byte1) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2475 1950 m
+gs 1 -1 sc (byte0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+10050 1275 m
+gs 1 -1 sc (....) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1125 m
+gs 1 -1 sc (bit:) dup stringwidth pop neg 0 rmoveto col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1148 784 a Fq(Figure)24 b(3.3:)29 b(Bit)23
+b(and)h(byte)g(order)h(of)e(image)h(data)0 1070 y
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 1070
+a 0 1070 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 1070 a 91 x Fm(3.2.2)99 b(Arbitrary)25 b(data)g(frames)0
+1394 y Fq(It)31 b(also)g(is)g(possible)i(to)e(transmit)h(arbitrary)h
+(\(not)f(necessaryly)i(pix)o(el)e(oriented\))h(data.)52
+b(This)30 b(allo)n(ws)i(transmission)h(of)0 1507 y(compressed)26
+b(images)e(lik)o(e)g(jpe)o(g,)g(tif)n(f,)f(etc.)0 1679
+y(The)k(type)h(of)g(arbitrary)i(data)e(frames)g(is)f
+Fp(SANE)p 1558 1679 28 4 v 31 w(FRAME)p 1864 1679 V 31
+w(MIME)p Fq(.)e(The)i(frame)g(contains)j(arbitrary)g(data)e(of)g(the)g
+(MIME)0 1791 y(\(see)f(RFC)e(1521/1522\))30 b(type)e(that)f(is)f(gi)n
+(v)o(en)i(in)e(the)h Fp(format)p 2039 1791 V 30 w(desc)d
+Fq(member)j(of)g(the)g Fp(SANE)p 3096 1791 V 31 w(Parameters)21
+b Fq(struc-)0 1904 y(tured)30 b(type)h(\(see)f(section)h(4.3.8)e(on)h
+(page)g(29\).)47 b(As)29 b(such,)i(it)e(is)h(assumed)g(to)g(be)f
+(incomprehensible)34 b(to)c(the)f(frontend,)0 2017 y(e)o(xcept)f(for)e
+(selected)j(types)e(the)g(frontend)h(is)f(speci\002cally)h(capable)g
+(of)f(handling)i(internally)-6 b(.)40 b(The)26 b(frontend)i(is)e(free)h
+(to)0 2130 y(ignore)32 b(those)g(frames,)g(or)f(emplo)o(y)h(an)o(y)e
+(appropriate)k(means)d(to)g(otherwise)h(handle)g(this)f(data)h(\(lik)o
+(e)f(sa)n(ving)i(them)d(to)0 2243 y(disk)24 b(or)g(spa)o(wning)h(an)e
+(e)o(xternal)i(vie)n(wer\).)1392 2243 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 1392 2243 a 1392
+2243 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 1392 2243 a 1392 2243 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 1392 2243 a 1905 5381
+a Fq(12)p eop
+%%Page: 13 14
+13 13 bop 0 797 a Fo(Chapter)44 b(4)0 1263 y Fs(The)51
+b(SANE)g(A)-5 b(pplication)53 b(Pr)l(ogrammer)0 1512
+y(Interface)e(\(API\))0 1879 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 0 1879 a 0 1879 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 0 1879
+a 129 x Fq(This)27 b(Section)h(de\002nes)h(v)o(ersion)f(2)f(of)h(the)f
+(SANE)e(application)31 b(programmer)e(interf)o(ace)g(\(API\).)d(An)o(y)
+h(SANE)e(frontend)0 2121 y(must)e(depend)h(on)f(the)g(interf)o(ace)i
+(de\002ned)f(in)f(this)g(section)i(only)-6 b(.)29 b(Con)l(v)o(ersele)o
+(y)-6 b(,)25 b(an)o(y)e(SANE)d(back)o(end)25 b(must)e(implement)0
+2234 y(its)36 b(functionality)j(in)c(accordance)k(with)c(this)h
+(speci\002cation.)68 b(The)35 b(interf)o(ace)j(as)d(documented)j(here)e
+(is)g(declared)h(as)0 2347 y(a)32 b(C)g(callable)i(interf)o(ace)h(in)d
+(a)g(\002le)g(called)i Fp(sane/sane-2.h)p Fq(.)49 b(This)33
+b(\002le)f(should)i(normally)g(be)f(included)h(via)f(a)f(C)0
+2460 y(pre-processor)27 b(directi)n(v)o(e)f(of)d(the)h(form:)109
+2682 y Fp(#include)51 b()0 2748 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 0 2748
+a 0 2748 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 0 2748 a 0 2748 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 0 2748 a 333 x Fn(4.1)119
+b(V)-12 b(ersion)30 b(Contr)n(ol)0 3339 y Fq(The)22 b(SANE)d(standard)
+25 b(is)d(e)o(xpected)i(to)e(e)n(v)n(olv)o(e)h(o)o(v)o(er)g(time.)28
+b(Whene)n(v)o(er)23 b(a)f(change)i(to)e(the)g(SANE)e(standard)k(is)e
+(made)h(that)0 3452 y(may)h(render)j(an)d(e)o(xisting)j(frontend)g(or)d
+(back)o(end)j(incompatible)h(with)c(the)h(ne)n(w)f(standard,)j(the)e
+(major)g(v)o(ersion)h(number)0 3565 y(must)k(be)g(increased.)51
+b(Thus,)32 b(an)o(y)e(frontend/back)o(end)36 b(pair)30
+b(is)g(compatible)j(pro)o(vided)f(the)e(major)h(v)o(ersion)g(number)g
+(of)0 3678 y(the)h(SANE)e(standard)k(the)o(y)f(implement)g(is)f(the)g
+(same.)55 b(A)31 b(frontend)j(may)e(implement)h(backw)o(ards)h
+(compatiblity)h(by)0 3791 y(allo)n(wing)26 b(major)f(numbers)h(that)g
+(are)f(smaller)g(than)h(the)f(e)o(xpected)i(major)e(number)h(\(pro)o
+(vided)h(the)e(frontend)i(really)f(can)0 3904 y(cope)i(with)f(the)g
+(older)h(v)o(ersion\).)41 b(In)27 b(contrast,)i(a)e(back)o(end)i(al)o
+(w)o(ays)f(pro)o(vides)h(support)f(for)g(one)f(and)g(only)h(one)g(v)o
+(ersion)0 4017 y(of)h(the)h(standard.)49 b(If)29 b(a)g(speci\002c)i
+(application)h(does)f(require)g(that)f(tw)o(o)f(dif)n(ferent)i(v)o
+(ersions)h(of)d(the)h(same)f(back)o(end)j(are)0 4129
+y(accessible)26 b(at)e(the)f(same)h(time,)f(it)g(is)h(possible)h(to)f
+(do)g(so)f(by)h(installing)i(the)e(tw)o(o)f(v)o(ersions)i(under)g(dif)n
+(ferent)g(names.)0 4293 y(SANE)i(v)o(ersion)k(control)g(also)f
+(includes)i(a)d(minor)h(v)o(ersion)h(number)f(and)g(a)f(b)n(uild)i(re)n
+(vision.)48 b(While)30 b(control)h(of)e(these)0 4406
+y(numbers)22 b(remains)f(with)f(the)g(implementor)i(of)f(a)e(back)o
+(end,)k(the)e(recommended)h(use)f(is)f(as)g(follo)n(ws.)28
+b(The)20 b(minor)h(v)o(ersion)0 4519 y(is)26 b(incremented)i(with)e
+(each)h(of)n(\002cial)f(release)i(of)e(a)f(back)o(end.)38
+b(The)26 b(b)n(uild)h(re)n(vision)h(is)e(increased)i(with)e(each)h(b)n
+(uild)g(of)f(a)0 4632 y(back)o(end.)0 4796 y(The)d(SANE)e(API)h(pro)o
+(vides)k(the)e(follo)n(wing)h(\002)n(v)o(e)d(macros)i(to)g(manage)g(v)o
+(ersion)h(numbers.)227 5019 y Fp(SANE)p 452 5019 28 4
+v 31 w(CURRENT)p 868 5019 V 30 w(MAJOR)p Fr(:)43 b Fq(The)29
+b(v)n(alue)h(of)g(this)g(macro)f(is)h(the)f(number)i(of)e(the)h(SANE)d
+(standard)k(that)427 5132 y(the)24 b(interf)o(ace)i(implements.)1905
+5381 y(13)p eop
+%%Page: 14 15
+14 14 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(VERSION)p
+868 123 V 30 w(CODE\()p Fl(maj)p Fp(,)p Fl(min)p Fp(,)p
+Fl(bld)p Fp(\))p Fr(:)44 b Fq(This)37 b(macro)g(can)h(be)f(used)g(to)g
+(b)n(uild)i(a)d(monotonically)427 236 y(increasing)i(v)o(ersion)e
+(code.)64 b(A)34 b(SANE)f(v)o(ersion)j(code)g(consists)h(of)e(the)g
+(SANE)d(standard)38 b(major)427 349 y(v)o(ersion)25 b(number)f(\()p
+Fl(maj)p Fq(\),)f(the)h(minor)f(v)o(ersion)i(number)f
+Fl(min)p Fq(,)f(and)h(the)f(b)n(uild)i(re)n(vision)g(of)e(a)g(back)o
+(end)427 462 y(\()p Fl(bld)p Fq(\).)39 b(The)27 b(major)g(and)g(minor)g
+(v)o(ersion)h(numbers)g(must)f(be)f(in)h(the)g(range)h(0.)14
+b(.)g(.)g(255)26 b(and)h(the)g(b)n(uild)427 574 y(re)n(vision)f(must)d
+(be)h(in)f(the)h(range)h(0.)14 b(.)g(.)g(65535.)427 704
+y(V)-10 b(ersion)29 b(codes)h(are)e(monotonic)i(in)e(the)h(sense)g
+(that)f(it)g(is)g(possible)i(to)e(apply)i(relational)g(operators)427
+817 y(\(e.g.,)21 b(equality)j(or)d(less-than)j(test\))e(directly)h(on)e
+(the)h(v)o(ersion)h(code)f(rather)g(than)h(indi)n(vidually)h(on)e(the)
+427 930 y(three)j(components)h(of)d(the)h(v)o(ersion)h(code.)427
+1059 y(Note)34 b(that)g(the)g(major)f(v)o(ersion)i(number)g(alone)f
+(determines)i(whether)e(a)f(frontend/back)o(end)39 b(pair)427
+1172 y(is)31 b(compatible.)51 b(The)30 b(minor)h(v)o(ersion)h(and)f
+(the)g(b)n(uild)h(re)n(vision)g(are)f(used)g(for)g(informational)i(and)
+427 1285 y(b)n(ug-\002xing)26 b(purposes)g(only)-6 b(.)227
+1431 y Fp(SANE)p 452 1431 V 31 w(VERSION)p 868 1431 V
+30 w(MAJOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32 b(macro)h(returns)h
+(the)f(major)g(v)o(ersion)h(number)f(component)i(of)427
+1544 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1690 y Fp(SANE)p 452 1690 V 31 w(VERSION)p
+868 1690 V 30 w(MINOR\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)32
+b(macro)g(returns)h(the)g(minor)f(v)o(ersion)h(number)g(component)h(of)
+427 1803 y(the)24 b(v)o(ersion)h(code)f(passed)i(in)d(ar)n(gument)i
+Fl(vc)p Fq(.)227 1949 y Fp(SANE)p 452 1949 V 31 w(VERSION)p
+868 1949 V 30 w(BUILD\()p Fl(vc)p Fp(\))p Fr(:)43 b Fq(This)18
+b(macro)h(returns)g(the)g(b)n(uild)g(re)n(vision)h(component)h(of)d
+(the)g(v)o(ersion)427 2062 y(code)25 b(passed)g(in)e(ar)n(gument)j
+Fl(vc)p Fq(.)0 2414 y Fn(4.2)119 b(Data)30 b(T)-9 b(ypes)0
+2683 y Fm(4.2.1)99 b(Base)25 b(T)-7 b(ypes)0 2916 y Fq(The)23
+b(SANE)e(standard)26 b(is)d(based)i(on)f(just)g(tw)o(o)f
+(SANE-speci\002c)g(base)h(types:)31 b(the)23 b(SANE)f(byte)i(and)g(w)o
+(ord.)227 3162 y Fp(typedef)52 b Fl(some-scalar)n(-type)59
+b Fp(SANE)p 1567 3162 V 31 w(Byte;)227 3275 y(typedef)52
+b Fl(some-scalar)n(-type)59 b Fp(SANE)p 1567 3275 V 31
+w(Word;)0 3521 y(SANE_Byte)18 b Fq(must)23 b(correspond)j(to)d(some)g
+(scalar)h(C)d(type)j(that)f(is)g(capable)i(of)e(holding)i(v)n(alues)f
+(in)e(the)i(range)g(0)e(to)h(255.)0 3634 y Fp(SANE_Word)c
+Fq(must)k(be)h(capable)h(of)f(holding)h(an)o(y)f(of)f(the)h(follo)n
+(wing:)136 3880 y Fk(\017)46 b Fq(the)24 b(truth)h(v)n(alues)f
+Fp(SANE_FALSE)18 b Fq(and)24 b Fp(SANE_TRUE)136 4068
+y Fk(\017)46 b Fq(signed)25 b(inte)o(gers)h(in)d(the)h(range)g
+Fk(\000)p Fj(2)1364 4035 y Fi(31)1454 4068 y Fh(:)15
+b(:)g(:)i Fj(2)1621 4035 y Fi(31)1716 4068 y Fk(\000)j
+Fj(1)136 4256 y Fk(\017)46 b Fq(\002x)o(ed)23 b(point)i(v)n(alues)g(in)
+e(the)h(range)h Fk(\000)p Fj(32768)15 b Fh(:)g(:)g(:)j
+Fj(32767)p Fh(:)p Fj(9999)27 b Fq(with)c(a)h(resolution)i(of)d
+Fj(1)p Fh(=)p Fj(65536)136 4443 y Fk(\017)46 b Fq(32)24
+b(bits)g(\(for)g(bit)g(sets\))0 4690 y(Note)33 b(that)h(the)f(SANE)e
+(standard)36 b(does)e(not)f(de\002ne)h(what)f(C)f(type)i
+Fp(SANE_Byte)28 b Fq(and)34 b Fp(SANE_Word)28 b Fq(map)33
+b(to.)58 b(F)o(or)0 4803 y(e)o(xample,)29 b(on)f(some)g(platforms,)i
+(the)e(latter)h(may)f(map)f(to)h Fp(long)53 b(int)25
+b Fq(whereas)k(on)f(others)h(it)e(may)h(map)f(to)h Fp(int)p
+Fq(.)39 b(A)0 4915 y(portable)26 b(SANE)21 b(frontend)k(or)f(back)o
+(end)i(must)d(therefore)j(not)e(depend)h(on)f(a)f(particular)j
+(mapping.)1905 5381 y(14)p eop
+%%Page: 15 16
+15 15 bop 0 123 a Fm(4.2.2)99 b(Boolean)25 b(T)-7 b(ype)0
+356 y Fp(SANE)p 225 356 28 4 v 31 w(Bool)20 b Fq(is)j(used)h(for)g(v)n
+(ariables)h(that)e(can)h(tak)o(e)g(one)f(of)g(the)h(tw)o(o)e(truth)i(v)
+n(alues)h Fp(SANE)p 2934 356 V 31 w(FALSE)20 b Fq(and)j
+Fp(SANE)p 3633 356 V 31 w(TRUE)p Fq(.)0 469 y(The)d(former)h(v)n(alue)g
+(is)g(de\002ned)g(to)f(be)h(0,)f(whereas)i(the)e(latter)i(is)e(1.)2097
+436 y Fg(1)2162 469 y Fq(The)g(C)f(declarations)24 b(for)c(this)h(type)
+h(are)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227 715 y Fp(#define)52
+b(SANE_FALSE)322 b(0)227 828 y(#define)52 b(SANE_TRUE)377
+b(1)227 941 y(typedef)52 b(SANE_Word)e(SANE_Bool;)0 1187
+y Fq(Note)34 b(that)g Fp(SANE_Bool)29 b Fq(is)34 b(simply)g(an)g(alias)
+g(of)g Fp(SANE_Word)p Fq(.)55 b(It)33 b(is)h(therefore)i(al)o(w)o(ays)e
+(le)o(gal)g(to)g(use)g(the)g(latter)0 1300 y(type)26
+b(in)g(place)g(of)g(the)f(former)-5 b(.)36 b(Ho)n(we)n(v)o(er)l(,)25
+b(for)h(clarity)-6 b(,)27 b(it)e(is)h(recommended)h(to)f(use)g
+Fp(SANE_Bool)20 b Fq(whene)n(v)o(er)27 b(a)e(gi)n(v)o(en)0
+1413 y(v)n(ariable)g(or)f(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(a)h(boolean)h(object.)0
+1721 y Fm(4.2.3)99 b(Integer)26 b(T)-7 b(ype)0 1954 y
+Fp(SANE)p 225 1954 V 31 w(Int)22 b Fq(is)i(used)h(for)g(v)n(ariables)h
+(that)f(can)g(tak)o(e)g(inte)o(ger)h(v)n(alues)f(in)f(the)h(range)h
+Fk(\000)p Fj(2)2774 1921 y Fi(32)2872 1954 y Fq(to)e
+Fj(2)3011 1921 y Fi(31)3107 1954 y Fk(\000)d Fj(1)p Fq(.)30
+b(Its)25 b(C)e(declaration)0 2067 y(is)g(gi)n(v)o(en)h(belo)n(w)-6
+b(.)227 2313 y Fp(typedef)52 b(SANE_Word)e(SANE_Int;)0
+2560 y Fq(Note)22 b(that)h Fp(SANE_Int)18 b Fq(is)k(simply)h(an)f
+(alias)h(of)f Fp(SANE_Word)p Fq(.)i(It)e(is)g(therefore)i(al)o(w)o(ays)
+f(le)o(gal)g(to)f(use)h(the)f(latter)h(type)g(in)0 2672
+y(place)k(of)g(the)f(former)-5 b(.)38 b(Ho)n(we)n(v)o(er)l(,)27
+b(for)f(clarity)-6 b(,)29 b(it)d(is)g(recommended)i(to)f(use)f
+Fp(SANE_Int)c Fq(whene)n(v)o(er)28 b(a)e(gi)n(v)o(en)g(v)n(ariable)0
+2785 y(or)d(formal)i(ar)n(gument)g(has)f(a)f(\002x)o(ed)g
+(interpretation)28 b(as)23 b(an)h(inte)o(ger)h(object.)0
+3093 y Fm(4.2.4)99 b(Fixed-point)25 b(T)-7 b(ype)0 3326
+y Fp(SANE)p 225 3326 V 31 w(Fixed)19 b Fq(is)i(used)i(for)f(v)n
+(ariables)i(that)f(can)f(tak)o(e)h(\002x)o(ed)e(point)i(v)n(alues)g(in)
+f(the)g(range)h Fk(\000)p Fj(32768)g Fq(to)f Fj(32767)p
+Fh(:)p Fj(9999)j Fq(with)0 3439 y(a)e(resolution)j(of)e
+Fj(1)p Fh(=)p Fj(65535)p Fq(.)31 b(The)23 b(C)f(declarations)27
+b(relating)f(to)d(this)h(type)h(are)e(gi)n(v)o(en)i(belo)n(w)-6
+b(.)227 3686 y Fp(#define)52 b(SANE_FIXED_SCA)o(LE)o(_S)o(HIF)o(T)103
+b(16)227 3798 y(typedef)52 b(SANE_Word)e(SANE_Fixed;)0
+4045 y Fq(The)20 b(macro)i Fp(SANE)p 634 4045 V 31 w(FIXED)p
+940 4045 V 30 w(SCALE)p 1245 4045 V 31 w(SHIFT)17 b Fq(gi)n(v)o(es)22
+b(the)f(location)i(of)e(the)g(\002x)o(ed)f(binary)j(point.)29
+b(This)20 b(standard)j(de\002nes)0 4158 y(that)h(v)n(alue)g(to)g(be)f
+(16,)h(which)g(yields)h(a)e(resolution)j(of)e Fj(1)p
+Fh(=)p Fj(65536)p Fq(.)0 4329 y(Note)31 b(that)g Fp(SANE_Fixed)26
+b Fq(is)31 b(simply)g(an)g(alias)h(of)f Fp(SANE_Word)p
+Fq(.)46 b(It)30 b(is)h(therefore)i(al)o(w)o(ays)f(le)o(gal)f(to)g(use)g
+(the)g(latter)0 4442 y(type)23 b(in)g(place)g(of)g(the)f(former)-5
+b(.)29 b(Ho)n(we)n(v)o(er)l(,)23 b(for)f(clarity)-6 b(,)24
+b(it)f(is)f(recommended)j(to)d(use)h Fp(SANE_Fixed)17
+b Fq(whene)n(v)o(er)24 b(a)e(gi)n(v)o(en)0 4555 y(v)n(ariable)j(or)f
+(formal)g(ar)n(gument)h(has)f(a)f(\002x)o(ed)g(interpretation)28
+b(as)23 b(a)h(\002x)o(ed-point)h(object.)0 4727 y(F)o(or)36
+b(con)l(v)o(enience,)44 b(SANE)34 b(also)k(de\002nes)f(tw)o(o)g(macros)
+h(that)f(con)l(v)o(ert)i(\002x)o(ed-point)g(v)n(alues)f(to)f(and)g
+(from)g(C)f(double)0 4840 y(\003oating)25 b(point)f(v)n(alues.)p
+0 4921 1560 4 v 105 4976 a Ff(1)134 5008 y Fe(This)19
+b(is)g(dif)n(ferent)g(from)g(ANSI)f(C)g(where)h(an)o(y)h(non-zero)g
+(inte)o(ger)f(v)n(alue)h(represents)f(logical)g(TR)m(UE.)1905
+5381 y Fq(15)p eop
+%%Page: 16 17
+16 16 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(FIX\()p
+Fl(d)p Fp(\))p Fr(:)44 b Fq(Returns)34 b(the)g(lar)n(gest)h(SANE)c
+(\002x)o(ed-point)k(v)n(alue)f(that)g(is)f(smaller)h(than)g(the)f
+(double)427 236 y(v)n(alue)d Fl(d)p Fq(.)45 b(No)28 b(range)i(checking)
+h(is)e(performed.)47 b(If)29 b(the)g(v)n(alue)h(of)f
+Fl(d)f Fq(is)h(out)h(of)e(range,)k(the)d(result)h(is)427
+349 y(unde\002ned.)227 495 y Fp(SANE)p 452 495 V 31 w(UNFIX\()p
+Fl(w)p Fp(\))p Fr(:)42 b Fq(Returns)d(the)g(nearest)g(double)h(machine)
+f(number)g(that)g(corresponds)i(to)d(\002x)o(ed-)427
+608 y(point)25 b(v)n(alue)f Fl(w)p Fq(.)0 854 y(SANE)j(does)j
+Fl(not)h Fq(require)g(that)f(the)g(follo)n(wing)h(tw)o(o)e(e)o
+(xpressions)j(hold)e(true)g(\(e)n(v)o(en)g(if)f(the)h(v)n(alues)g(of)g
+Fl(w)e Fq(and)i Fl(d)f Fq(are)g(in)0 967 y(range\):)227
+1213 y Fp(SANE_UNFIX\(SANE)o(_FI)o(X\()o(d\))o(\))48
+b(==)54 b(d)227 1326 y(SANE_FIX\(SANE_U)o(NFI)o(X\()o(w\))o(\))48
+b(==)54 b(w)0 1573 y Fq(In)27 b(other)h(w)o(ords,)g(con)l(v)o(ersion)i
+(between)e(\002x)o(ed)f(and)g(double)i(v)n(alues)f(may)e(be)h(lossy)-6
+b(.)40 b(It)27 b(is)g(therefore)i(recommended)g(to)0
+1685 y(a)n(v)n(oid)c(repeated)h(con)l(v)o(ersions)h(between)d(the)g(tw)
+o(o)f(representations.)0 1993 y Fm(4.2.5)99 b(T)-9 b(ext)0
+2226 y Fr(Character)25 b(T)-7 b(ype)0 2459 y Fq(T)g(ype)29
+b Fp(SANE)p 433 2459 V 31 w(Char)e Fq(represents)32 b(a)d(single)i(te)o
+(xt)e(character)j(or)d(symbol.)47 b(At)29 b(present,)j(this)e(type)g
+(maps)f(directly)j(to)d(the)0 2572 y(underlying)j(C)d
+Fp(char)d Fq(type)31 b(\(typically)h(one)d(byte\).)48
+b(The)29 b(encoding)i(for)f(such)g(characters)i(is)d(currently)j(\002x)
+o(ed)d(as)h(ISO)0 2685 y(LA)-10 b(TIN-1.)37 b(Future)27
+b(v)o(ersions)i(of)d(this)h(standard)i(may)e(map)f(this)h(type)h(to)f
+(a)f(wider)h(type)g(and)g(allo)n(w)g(multi-byte)i(encod-)0
+2798 y(ings)h(to)f(support)h(internationalizatio)q(n.)50
+b(As)29 b(a)f(result)i(of)f(this,)i(care)e(should)i(be)e(tak)o(en)h(to)
+f(a)n(v)n(oid)h(the)f(assumption)j(that)0 2911 y Fp(sizeof\(SANE_Cha)o
+(r\))o(==)o(si)o(zeo)o(f\()o(ch)o(ar)o(\))p Fq(.)227
+3157 y Fp(typedef)52 b(char)g(SANE_Char;)0 3462 y Fr(String)23
+b(T)-7 b(ype)0 3695 y Fq(T)g(ype)27 b Fp(SANE)p 431 3695
+V 31 w(String)c Fq(represents)29 b(a)e(te)o(xt)g(string)h(as)f(a)f
+(sequence)k(of)c(C)g Fp(char)e Fq(v)n(alues.)40 b(The)27
+b(end)g(of)g(the)g(sequence)i(is)0 3808 y(indicated)d(by)e(a)f
+Fp('\\0')e Fq(\(NUL\))h(character)-5 b(.)227 4054 y Fp(typedef)52
+b(SANE_Char)e(*SANE_String;)227 4167 y(typedef)i(const)g(SANE_Char)e
+(*SANE_String_Con)o(st)o(;)0 4413 y Fq(The)29 b(type)h
+Fp(SANE)p 580 4413 V 31 w(String)p 941 4413 V 30 w(Const)d
+Fq(is)i(pro)o(vided)j(by)d(SANE)e(to)j(enable)h(declaring)h(strings)f
+(whose)f(contents)h(is)f(un-)0 4526 y(changable.)h(Note)23
+b(that)i(in)e(ANSI)f(C,)g(the)i(declaration)227 4773
+y Fp(const)53 b(SANE_String)c(str;)0 5019 y Fq(declares)26
+b(a)d(string)h(pointer)i(that)e(is)f(constant)j(\(not)e(a)f(string)i
+(pointer)g(that)f(points)h(to)f(a)f(constant)j(v)n(alue\).)1905
+5381 y(16)p eop
+%%Page: 17 18
+17 17 bop 0 123 a Fm(4.2.6)99 b(Scanner)26 b(Handle)f(T)-7
+b(ype)0 356 y Fq(Access)29 b(to)f(a)g(scanner)i(is)e(pro)o(vided)i
+(through)g(an)e(opaque)i(type)f(called)h Fp(SANE)p 2560
+356 28 4 v 30 w(Handle)p Fq(.)40 b(The)27 b(C)g(declaration)32
+b(of)c(this)0 469 y(type)c(is)g(gi)n(v)o(en)g(belo)n(w)-6
+b(.)227 715 y Fp(typedef)52 b(void)g(*SANE_Handle;)0
+961 y Fq(While)28 b(this)g(type)g(is)f(declared)i(to)f(be)f(a)g(v)n
+(oid)h(pointer)l(,)i(an)e(application)i(must)e(not)f(attempt)i(to)e
+(interpret)j(the)d(v)n(alue)h(of)g(a)0 1074 y Fp(SANE_Handle)p
+Fq(.)23 b(In)g(particular)l(,)k(SANE)21 b(does)j(not)g(require)h(that)f
+(a)f(v)n(alue)i(of)e(this)h(type)g(is)g(a)f(le)o(gal)h(pointer)h(v)n
+(alue.)0 1382 y Fm(4.2.7)99 b(Status)25 b(T)-7 b(ype)0
+1615 y Fq(Most)26 b(SANE)e(operations)29 b(return)e(a)f(v)n(alue)h(of)f
+(type)h Fp(SANE)p 1915 1615 V 31 w(Status)c Fq(to)j(indicate)i(whether)
+f(the)f(completion)j(status)e(of)0 1728 y(the)32 b(operation.)57
+b(If)31 b(an)h(operation)j(completes)e(successfully)-6
+b(,)38 b Fp(SANE_STATUS_GO)o(OD)24 b Fq(is)32 b(returned.)56
+b(In)32 b(case)g(of)g(an)0 1841 y(error)l(,)24 b(a)e(v)n(alue)h(is)f
+(returned)j(that)e(indicates)h(the)f(nature)h(of)e(the)h(problem.)30
+b(The)22 b(complete)h(list)g(of)g(a)n(v)n(ailable)h(status)g(codes)0
+1954 y(is)f(listed)i(in)e(T)-7 b(able)23 b(4.1.)28 b(It)23
+b(is)g(recommended)j(to)d(use)h(function)h Fp(sane)p
+2268 1954 V 31 w(strstatus\(\))17 b Fq(to)24 b(con)l(v)o(ert)h(status)f
+(codes)h(into)0 2067 y(a)e(le)o(gible)i(string.)p 385
+2189 3131 4 v 383 2302 4 113 v 937 2269 a Fr(Symbol)p
+1781 2302 V 602 w(Code)p 2083 2302 V 541 w(Description)p
+3514 2302 V 385 2306 3131 4 v 385 2322 V 383 2435 4 113
+v 435 2401 a Fp(SANE)p 660 2401 28 4 v 31 w(STATUS)p
+1021 2401 V 30 w(GOOD)p 1781 2435 4 113 v 723 w Fq(0)p
+2083 2435 V 100 w(Operation)g(completed)h(succesfully)-6
+b(.)p 3514 2435 V 383 2548 V 435 2514 a Fp(SANE)p 660
+2514 28 4 v 31 w(STATUS)p 1021 2514 V 30 w(UNSUPPORTED)p
+1781 2548 4 113 v 338 w Fq(1)p 2083 2548 V 100 w(Operation)25
+b(is)f(not)g(supported.)p 3514 2548 V 383 2661 V 435
+2627 a Fp(SANE)p 660 2627 28 4 v 31 w(STATUS)p 1021 2627
+V 30 w(CANCELLED)p 1781 2661 4 113 v 448 w Fq(2)p 2083
+2661 V 100 w(Operation)h(w)o(as)e(cancelled.)p 3514 2661
+V 383 2774 V 435 2740 a Fp(SANE)p 660 2740 28 4 v 31
+w(STATUS)p 1021 2740 V 30 w(DEVICE)p 1381 2740 V 30 w(BUSY)p
+1781 2774 4 113 v 363 w Fq(3)p 2083 2774 V 100 w(De)n(vice)h(is)f(b)n
+(usy\227retry)j(later)-5 b(.)p 3514 2774 V 383 2887 V
+435 2853 a Fp(SANE)p 660 2853 28 4 v 31 w(STATUS)p 1021
+2853 V 30 w(INVAL)p 1781 2887 4 113 v 668 w Fq(4)p 2083
+2887 V 100 w(Data)23 b(or)h(ar)n(gument)h(is)f(in)l(v)n(alid.)p
+3514 2887 V 383 3000 V 435 2966 a Fp(SANE)p 660 2966
+28 4 v 31 w(STATUS)p 1021 2966 V 30 w(EOF)p 1781 3000
+4 113 v 778 w Fq(5)p 2083 3000 V 100 w(No)f(more)g(data)i(a)n(v)n
+(ailable)g(\(end-of-\002le\).)p 3514 3000 V 383 3113
+V 435 3079 a Fp(SANE)p 660 3079 28 4 v 31 w(STATUS)p
+1021 3079 V 30 w(JAMMED)p 1781 3113 4 113 v 613 w Fq(6)p
+2083 3113 V 100 w(Document)f(feeder)h(jammed.)p 3514
+3113 V 383 3226 V 435 3192 a Fp(SANE)p 660 3192 28 4
+v 31 w(STATUS)p 1021 3192 V 30 w(NO)p 1161 3192 V 31
+w(DOCS)p 1781 3226 4 113 v 582 w Fq(7)p 2083 3226 V 100
+w(Document)f(feeder)h(out)f(of)g(documents.)p 3514 3226
+V 383 3339 V 435 3305 a Fp(SANE)p 660 3305 28 4 v 31
+w(STATUS)p 1021 3305 V 30 w(COVER)p 1326 3305 V 30 w(OPEN)p
+1781 3339 4 113 v 418 w Fq(8)p 2083 3339 V 100 w(Scanner)h(co)o(v)o(er)
+e(is)h(open.)p 3514 3339 V 383 3451 V 435 3418 a Fp(SANE)p
+660 3418 28 4 v 31 w(STATUS)p 1021 3418 V 30 w(IO)p 1161
+3418 V 31 w(ERROR)p 1781 3451 4 113 v 527 w Fq(9)p 2083
+3451 V 100 w(Error)g(during)h(de)n(vice)f(I/O.)p 3514
+3451 V 383 3564 V 435 3530 a Fp(SANE)p 660 3530 28 4
+v 31 w(STATUS)p 1021 3530 V 30 w(NO)p 1161 3530 V 31
+w(MEM)p 1781 3564 4 113 v 592 w Fq(10)p 2083 3564 V 100
+w(Out)f(of)h(memory)-6 b(.)p 3514 3564 V 383 3677 V 435
+3643 a Fp(SANE)p 660 3643 28 4 v 31 w(STATUS)p 1021 3643
+V 30 w(ACCESS)p 1381 3643 V 30 w(DENIED)p 1781 3677 4
+113 v 208 w Fq(11)p 2083 3677 V 100 w(Access)24 b(to)g(resource)h(has)f
+(been)h(denied.)p 3514 3677 V 385 3681 3131 4 v 1519
+3834 a(T)-7 b(able)24 b(4.1:)29 b(Status)24 b(Codes)0
+4264 y Fm(4.2.8)99 b(De)o(vice)24 b(Descriptor)i(T)-7
+b(ype)0 4346 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 4346 a 0 4346 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 4346 a 151 x Fq(Each)27
+b(SANE)d(de)n(vice)k(is)f(represented)j(by)c(a)h(structure)i(of)e(type)
+g Fp(SANE)p 2300 4497 28 4 v 31 w(Device)p Fq(.)35 b(The)26
+b(C)g(declaration)k(of)d(this)g(type)g(is)0 4610 y(gi)n(v)o(en)d(belo)n
+(w)-6 b(.)227 4856 y Fp(typedef)52 b(struct)336 4969
+y({)445 5082 y(SANE_String_Cons)o(t)c(name;)0 5096 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+
+0 5096 a 0 5096 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 5096 a 0 5096 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 5096 a 1905 5381
+a Fq(17)p eop
+%%Page: 18 19
+18 18 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 0 32 a 445 123 a Fp(SANE_String_Cons)o
+(t)48 b(vendor;)445 236 y(SANE_String_Cons)o(t)g(model;)445
+349 y(SANE_String_Cons)o(t)g(type;)445 462 y(SANE_String_Cons)o(t)g
+(email_backend_a)o(uth)o(or)o(;)445 574 y(SANE_String_Cons)o(t)g
+(backend_website)o(;)445 687 y(SANE_String_Cons)o(t)g(device_location)o
+(;)445 800 y(SANE_String_Cons)o(t)g(comment;)445 913
+y(SANE_String_Cons)o(t)g(reserved_string)o(;)445 1026
+y(SANE_Int)j(backend_version_)o(co)o(de)o(;)445 1139
+y(SANE_Int)g(backend_capablit)o(y_)o(fl)o(ag)o(s;)445
+1252 y(SANE_Int)g(reserved_int;)336 1365 y(})227 1478
+y(SANE_Device;)0 1533 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 0 1533 a 0 1533 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 0 1533 a 0
+1533 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 0 1533 a 145 x Fq(The)24 b(structure)i(pro)o(vides)g(the)f
+(unique)h(name)e(of)g(the)h(scanner)h(in)e(member)g Fp(name)p
+Fq(.)29 b(It)24 b(is)g(this)h(unique)g(name)g(that)g(should)0
+1791 y(be)h(passed)i(in)e(a)g(call)h(to)f Fp(sane)p 1019
+1791 28 4 v 31 w(open\(\))p Fq(.)33 b(The)26 b(format)h(of)f(this)h
+(name)f(is)g(completely)i(up)f(to)f(the)h(back)o(end.)39
+b(The)25 b(only)0 1904 y(constraints)30 b(are)d(that)g(the)h(name)e(is)
+h(unique)i(among)e(all)g(de)n(vices)h(supported)i(by)d(the)g(back)o
+(end)i(and)e(that)h(the)f(name)g(is)g(a)0 2017 y(le)o(gal)c(SANE)d(te)o
+(xt)j(string.)29 b(T)-7 b(o)22 b(simplify)i(presentation)i(of)c(unique)
+j(names,)e(their)g(length)h(should)g(not)f(be)g(e)o(xcessi)n(v)o(e.)30
+b(It)22 b(is)0 2130 y Fl(r)m(ecommended)28 b Fq(that)d(back)o(ends)i(k)
+o(eep)e(unique)g(names)g(belo)n(w)f(32)g(characters)j(in)d(length.)32
+b(Ho)n(we)n(v)o(er)l(,)24 b(applications)j Fl(must)0
+2243 y Fq(be)d(able)g(to)f(cope)i(with)e(arbitrary)j(length)f(unique)g
+(names.)0 2400 y(The)f(ne)o(xt)g(three)h(members)g(in)f(the)h(de)n
+(vice)g(structure)h(pro)o(vide)g(additional)h(information)g(on)d(the)h
+(de)n(vice)g(corresponding)0 2513 y(to)31 b(the)g(unique)i(name.)52
+b(Speci\002cally)-6 b(,)34 b(members)d Fp(vendor)p Fq(,)f
+Fp(model)p Fq(,)f(and)j Fp(type)c Fq(are)k(single-line)i(strings)e
+(that)g(gi)n(v)o(e)0 2626 y(information)g(on)e(the)g(v)o(endor)h
+(\(manuf)o(acturer\),)j(model,)d(and)f(the)g(type)h(of)e(the)h(de)n
+(vice.)48 b(F)o(or)29 b(consistenc)o(y')-5 b(s)33 b(sak)o(e,)f(the)0
+2739 y(follo)n(wing)25 b(strings)g(should)g(be)f(used)g(when)g
+(appropriate)j(\(the)d(lists)g(will)f(be)h(e)o(xpanded)h(as)f(need)g
+(arises\):)p 320 2849 1454 4 v 318 2962 4 113 v 755 2928
+a Fr(V)-9 b(endor)22 b(Strings)p 1772 2962 V 320 2965
+1454 4 v 320 2982 V 318 3094 4 113 v 370 3061 a Fp(AGFA)698
+b(Microtek)p 1772 3094 V 318 3207 V 370 3173 a(Abaton)588
+b(Minolta)p 1772 3207 V 318 3320 V 370 3286 a(Acer)698
+b(Mustek)p 1772 3320 V 318 3433 V 370 3399 a(Apple)643
+b(NEC)p 1772 3433 V 318 3546 V 370 3512 a(Artec)g(Nikon)p
+1772 3546 V 318 3659 V 370 3625 a(Avision)533 b(Plustek)p
+1772 3659 V 318 3772 V 370 3738 a(CANON)643 b(Polaroid)p
+1772 3772 V 318 3885 V 370 3851 a(Connectix)423 b(Ricoh)p
+1772 3885 V 318 3998 V 370 3964 a(Epson)643 b(Sharp)p
+1772 3998 V 318 4111 V 370 4077 a(Fujitsu)533 b(Siemens)p
+1772 4111 V 318 4224 V 370 4190 a(Hewlett-Packard)93
+b(Tamarack)p 1772 4224 V 318 4336 V 370 4303 a(IBM)753
+b(UMAX)p 1772 4336 V 318 4449 V 370 4415 a(Kodak)643
+b(Noname)p 1772 4449 V 318 4562 V 370 4528 a(Logitech)p
+1772 4562 V 320 4566 1454 4 v 2117 2849 1464 4 v 2115
+2962 4 113 v 2603 2928 a Fr(T)-7 b(ype)23 b(Strings)p
+3578 2962 V 2117 2965 1464 4 v 2117 2982 V 2115 3094
+4 113 v 2166 3061 a Fp(film)53 b(scanner)p 3578 3094
+V 2115 3207 V 2166 3173 a(flatbed)f(scanner)p 3578 3207
+V 2115 3320 V 2166 3286 a(frame)h(grabber)p 3578 3320
+V 2115 3433 V 2166 3399 a(handheld)e(scanner)p 3578 3433
+V 2115 3546 V 2166 3512 a(multi-function)e(peripheral)p
+3578 3546 V 2115 3659 V 2166 3625 a(sheetfed)i(scanner)p
+3578 3659 V 2115 3772 V 2166 3738 a(still)i(camera)p
+3578 3772 V 2115 3885 V 2166 3851 a(video)g(camera)p
+3578 3885 V 2115 3998 V 2166 3964 a(virtual)f(device)p
+3578 3998 V 2117 4001 1464 4 v 1053 4719 a Fq(T)-7 b(able)24
+b(4.2:)29 b(Prede\002ned)24 b(De)n(vice)g(Information)i(Strings)0
+5019 y(Note)k(that)g(v)o(endor)h(string)g Fp(Noname)26
+b Fq(can)k(be)g(used)h(for)f(virtual)h(de)n(vices)g(that)g(ha)n(v)o(e)f
+(no)g(physical)i(v)o(endor)f(associated.)0 5132 y(Also,)c(there)h(are)f
+(no)g(prede\002ned)h(model)f(name)g(strings)i(since)e(those)h(are)f(v)o
+(endor)h(speci\002c)g(and)f(therefore)i(completely)1905
+5381 y(18)p eop
+%%Page: 19 20
+19 19 bop 0 123 a Fq(under)25 b(control)g(of)e(the)h(respecti)n(v)o(e)i
+(back)o(ends.)0 143 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 143 a 0 143 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 143 a 148 x Fq(The)i(back)o
+(end)j(has)e(to)g(set)f(up)h(the)g(string)h Fp(email)p
+1648 291 28 4 v 30 w(backend)p 2063 291 V 30 w(author)25
+b Fq(with)j(the)h(name)g(and)g(the)g(email)g(address)h(of)0
+404 y(the)24 b(back)o(end)i(author)f(or)e(a)g(contact)i(person)g(in)f
+(the)g(format:)0 641 y Fp(Firstname)50 b(Lastname)h()0 878 y Fq(The)32 b(string)i Fp(backend)p 802 878
+V 30 w(website)29 b Fq(should)34 b(be)f(set)g(up)g(by)g(the)g(back)o
+(end)i(with)e(the)g(website)h(or)e(ftp)i(address)g(of)f(the)0
+991 y(back)o(end)26 b(in)d(the)h(format:)0 1228 y Fp(http://www.doma)o
+(in)o(.o)o(rg)o(/sa)o(ne)o(-h)o(el)o(lo)o(/in)o(de)o(x.)o(ht)o(ml)0
+1464 y Fq(The)e(back)o(end)j(should)g(\002ll)d(the)h(string)h
+Fp(device)p 1572 1464 V 30 w(location)18 b Fq(with)23
+b(a)f(te)o(xt)h(that)h(describes)h(where)e(a)g(user)g(can)g(\002nd)g
+(this)0 1577 y(de)n(vice.)30 b(The)23 b(te)o(xt)h(should)h(be)e
+(con\002gurable)k(by)c(the)h(administrator)-5 b(.)32
+b(This)23 b(could)i(e.g.)j(look)d(lik)o(e)f(this:)0 1814
+y Fp(building)51 b(93,)i(2nd)g(plane,)f(room)h(2124)0
+2051 y Fq(The)25 b(string)j Fp(comment)21 b Fq(can)27
+b(be)e(used)i(to)f(display)i(an)o(y)d(comment)i(about)g(the)f(de)n
+(vice)h(to)f(the)g(user)-5 b(.)36 b(The)26 b(te)o(xt)g(should)h(be)0
+2164 y(con\002gurable)f(by)e(the)g(administrator)-5 b(.)0
+2332 y(The)23 b(string)i Fp(reserved)p 839 2332 V 29
+w(string)20 b Fq(is)j(unused)j(currently)g(b)n(ut)e(planned)h(for)f
+(future)h(use.)0 2501 y(All)e(unused)i(strings)g(must)f(be)f(set)h(to)g
+(\223\224)f(by)h(the)g(back)o(end.)0 2669 y(W)l(ith)i(member)f
+Fp(backend)p 915 2669 V 30 w(version)p 1330 2669 V 29
+w(code)e Fq(a)i(frontend)j(can)e(\002nd)f(out)g(the)h(v)o(ersion)h(of)e
+(a)g(back)o(end)j(it)d(is)g(connected)0 2782 y(to)e(via)h(one)g(or)g
+(more)f(meta)h(back)o(ends.)0 2951 y(The)30 b(member)h
+Fp(backend)p 889 2951 V 29 w(capability)p 1468 2951 V
+29 w(flags)c Fq(contains)33 b(32)d(bits)i(that)f(are)g(planned)h(to)f
+(gi)n(v)o(e)f(the)h(back)o(end)i(the)0 3064 y(chance)26
+b(to)f(inform)g(the)g(frontend)i(about)f(its)f(capabilities.)36
+b(The)24 b(meaning)i(of)f(the)g(\003ags)f(will)h(be)f(de\002ned)i(when)
+f(there)g(is)0 3177 y(the)f(need)g(for)g(it.)k(The)23
+b(back)o(end)j(has)e(to)g(set)f(all)h(not)g(de\002ned)g(bits)g(\(in)g
+(the)g(moment)g(all)f(32)h(bits\))g(to)g(0.)0 3345 y(The)d(member)h
+Fp(reserved)p 926 3345 V 29 w(int)e Fq(is)h(planned)j(for)e(future)g
+(use,)h(the)f(back)o(end)h(has)f(to)g(set)g(the)g(v)n(alue)g(of)g(the)g
+(inte)o(ger)h(to)e(0.)3900 3345 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 3900 3345 a 3900 3345
+a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 3900 3345 a 3900 3345 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 3900 3345 a 0 3649 a Fm(4.2.9)99
+b(Option)25 b(Descriptor)g(T)-7 b(ype)0 3879 y Fq(Option)23
+b(descriptors)j(are)d(at)f(the)h(same)f(time)h(the)f(most)h(intricate)h
+(and)f(po)n(werful)h(type)f(in)g(the)f(SANE)f(standard.)30
+b(Options)0 3991 y(are)h(used)g(to)f(control)j(virtually)g(all)d
+(aspects)i(of)f(de)n(vice)h(operation.)52 b(Much)31 b(of)f(the)h(po)n
+(wer)f(of)h(the)g(SANE)d(API)h(stems)0 4104 y(from)22
+b(the)h(f)o(act)g(that)g(most)g(de)n(vice)h(controls)g(are)f
+(completely)i(described)g(by)d(their)i(respecti)n(v)o(e)g(option)g
+(descriptor)-5 b(.)31 b(Thus,)0 4217 y(a)21 b(frontend)i(can)e(control)
+i(a)e(scanner)i(abstractly)-6 b(,)24 b(without)e(requiring)i(kno)n
+(wledge)f(as)e(to)g(what)g(the)g(purpose)i(of)e(an)o(y)h(gi)n(v)o(en)0
+4330 y(option)27 b(is.)33 b(Con)l(v)o(ersely)-6 b(,)28
+b(a)d(scanner)i(can)f(describe)h(its)e(controls)j(without)e(requiring)i
+(kno)n(wledge)f(of)e(ho)n(w)f(the)i(frontend)0 4443 y(operates.)31
+b(The)23 b(C)f(declaration)27 b(of)c(the)h Fp(SANE)p
+1485 4443 28 4 v 31 w(Option)p 1846 4443 V 30 w(Descriptor)18
+b Fq(type)25 b(is)e(gi)n(v)o(en)h(belo)n(w)-6 b(.)227
+4680 y Fp(typedef)52 b(struct)336 4793 y({)445 4906 y(SANE_String_Cons)
+o(t)c(name;)445 5019 y(SANE_String_Cons)o(t)g(title;)445
+5132 y(SANE_String_Cons)o(t)g(desc;)1905 5381 y Fq(19)p
+eop
+%%Page: 20 21
+20 20 bop 445 123 a Fp(SANE_Value_Type)48 b(type;)445
+236 y(SANE_Unit)j(unit;)445 349 y(SANE_Int)g(size;)445
+462 y(SANE_Int)g(cap;)445 574 y(SANE_Constraint_)o(Ty)o(pe)d
+(constraint_type)o(;)445 687 y(union)555 800 y({)664
+913 y(const)k(SANE_String_Con)o(st)c(*string_list;)664
+1026 y(const)k(SANE_Word)e(*word_list;)664 1139 y(const)i(SANE_Range)e
+(*range;)555 1252 y(})445 1365 y(constraint;)336 1478
+y(})227 1591 y(SANE_Option_Des)o(cri)o(pt)o(or)o(;)0
+1889 y Fr(Option)23 b(Name)0 2118 y Fq(Member)k Fp(name)e
+Fq(is)h(a)h(string)h(that)g(uniquely)h(identi\002es)g(the)e(option.)40
+b(The)27 b(name)g(must)g(be)g(unique)i(for)e(a)f(gi)n(v)o(en)i(de)n
+(vice)0 2231 y(\(i.e.,)33 b(the)f(option)h(names)f(across)h(dif)n
+(ferent)h(back)o(ends)g(or)e(de)n(vices)h(need)f(not)g(be)g(unique\).)
+55 b(The)31 b(option)i(name)f(must)0 2344 y(consist)e(of)d(lo)n(wer)n
+(-case)j(ASCII)c(letters)k(\()p Fp(a)p Fq(\226)p Fp(z)p
+Fq(\),)e(digits)h(\()p Fp(0)p Fq(\226)p Fp(9)p Fq(\),)f(or)f(the)i
+(dash)f(character)i(\()p Fp(-)p Fq(\))d(only)-6 b(.)43
+b(The)27 b(\002rst)h(character)0 2457 y(must)c(be)f(a)g(lo)n(wer)n
+(-case)j(ASCII)c(character)j(\(i.e.,)e(not)h(a)f(digit)i(or)e(a)g
+(dash\).)0 2756 y Fr(Option)g(T)n(itle)0 2984 y Fq(Member)e
+Fp(title)d Fq(is)j(a)g(single-line)j(string)e(that)g(can)g(be)f(used)h
+(by)f(the)g(frontend)j(as)d(a)f(title)i(string.)29 b(This)21
+b(should)i(typically)0 3097 y(be)h(a)f(short)h(\(one)g(or)g(tw)o(o-w)o
+(ord\))h(string)f(that)g(is)g(chosen)h(based)g(on)e(the)h(function)i
+(of)d(the)h(option.)0 3396 y Fr(Option)f(Description)0
+3625 y Fq(Member)i Fp(desc)e Fq(is)h(a)h(\(potentially)j(v)o(ery\))e
+(long)g(string)g(that)f(can)h(be)f(used)h(as)e(a)h(help)h(te)o(xt)f(to)
+g(describe)i(the)e(option.)35 b(It)24 b(is)0 3738 y(the)g
+(responsibility)j(of)d(the)f(frontend)j(to)e(break)g(the)g(string)h
+(into)f(managable-length)j(lines.)j(Ne)n(wline)23 b(characters)j(in)e
+(this)0 3851 y(string)h(should)g(be)f(interpreted)i(as)e(paragraph)i
+(breaks.)0 4149 y Fr(Option)d(V)-8 b(alue)22 b(T)-7 b(ype)0
+4378 y Fq(Member)23 b Fp(type)e Fq(speci\002es)j(the)f(type)h(of)f(the)
+g(option)i(v)n(alue.)k(The)23 b(possible)i(v)n(alues)f(for)f(type)h
+Fp(SANE)p 3217 4378 28 4 v 31 w(Value)p 3523 4378 V 31
+w(Type)c Fq(are)0 4491 y(described)26 b(in)e(T)-7 b(able)23
+b(4.3.)0 4790 y Fr(Option)g(V)-8 b(alue)22 b(Unit)0 5019
+y Fq(Member)f Fp(unit)c Fq(speci\002es)22 b(what)e(the)h(physical)h
+(unit)f(of)f(the)h(option)h(v)n(alue)f(is.)27 b(The)20
+b(possible)j(v)n(alues)e(for)g(type)g Fp(SANE)p 3765
+5019 V 31 w(U-)0 5132 y(nit)e Fq(are)j(described)i(in)d(T)-7
+b(able)22 b(4.4.)27 b(Note)22 b(that)g(the)g(speci\002ed)g(unit)g(is)g
+(what)f(the)h(SANE)d(back)o(end)k(e)o(xpects.)30 b(It)21
+b(is)g(entirely)1905 5381 y(20)p eop
+%%Page: 21 22
+21 21 bop 115 35 3670 4 v 113 148 4 113 v 433 114 a Fr(Symbol)p
+1042 148 V 368 w(Code)p 1344 148 V 1044 w(Description)p
+3783 148 V 115 151 3670 4 v 115 168 V 113 281 4 113 v
+165 247 a Fp(SANE)p 390 247 28 4 v 31 w(TYPE)p 641 247
+V 31 w(BOOL)p 1042 281 4 113 v 207 w Fq(0)p 1344 281
+V 256 w(Option)24 b(v)n(alue)h(is)e(of)h(type)g Fp(SANE_Bool)p
+Fq(.)p 3783 281 V 113 394 V 165 360 a Fp(SANE)p 390 360
+28 4 v 31 w(TYPE)p 641 360 V 31 w(INT)p 1042 394 4 113
+v 262 w Fq(1)p 1344 394 V 256 w(Option)g(v)n(alue)h(is)e(of)h(type)g
+Fp(SANE_Int)p Fq(.)p 3783 394 V 113 506 V 165 473 a Fp(SANE)p
+390 473 28 4 v 31 w(TYPE)p 641 473 V 31 w(FIXED)p 1042
+506 4 113 v 152 w Fq(2)p 1344 506 V 256 w(Option)g(v)n(alue)h(is)e(of)h
+(type)g Fp(SANE_Fixed)p Fq(.)p 3783 506 V 113 619 V 165
+585 a Fp(SANE)p 390 585 28 4 v 31 w(TYPE)p 641 585 V
+31 w(STRING)p 1042 619 4 113 v 97 w Fq(3)p 1344 619 V
+256 w(Option)g(v)n(alue)h(is)e(of)h(type)g Fp(SANE_String)p
+Fq(.)p 3783 619 V 113 1184 4 565 v 165 698 a Fp(SANE)p
+390 698 28 4 v 31 w(TYPE)p 641 698 V 31 w(BUTTON)p 1042
+1184 4 565 v 97 w Fq(4)p 1344 1184 V 256 w(An)31 b(option)h(of)g(this)f
+(type)h(has)g(no)f(v)n(alue.)53 b(Instead,)35 b(setting)e(an)e(option)
+1395 811 y(of)j(this)h(type)g(has)g(an)f(option-speci\002c)k(side-ef)n
+(fect.)63 b(F)o(or)33 b(e)o(xample,)38 b(a)1395 924 y(b)n(utton-typed)k
+(option)d(could)g(be)f(used)h(by)e(a)h(back)o(end)i(to)d(pro)o(vide)j
+(a)1395 1037 y(means)35 b(to)f(select)i(def)o(ault)g(v)n(alues)f(or)g
+(to)f(the)h(tell)f(an)h(automatic)h(doc-)1395 1150 y(ument)24
+b(feeder)h(to)e(adv)n(ance)j(to)d(the)h(ne)o(xt)g(sheet)g(of)g(paper)-5
+b(.)p 3783 1184 V 113 1861 4 678 v 165 1263 a Fp(SANE)p
+390 1263 28 4 v 31 w(TYPE)p 641 1263 V 31 w(GROUP)p 1042
+1861 4 678 v 152 w Fq(5)p 1344 1861 V 256 w(An)28 b(option)i(of)e(this)
+h(type)h(has)f(no)f(v)n(alue.)45 b(This)28 b(type)h(is)f(used)i(to)e
+(group)1395 1376 y(logically)35 b(related)e(options.)56
+b(A)31 b(group)i(option)h(is)d(in)h(ef)n(fect)h(up)f(to)g(the)1395
+1489 y(point)j(where)f(another)i(group)f(option)g(is)f(encountered)j
+(\(or)d(up)g(to)g(the)1395 1602 y(end)d(of)f(the)g(option)i(list,)g(if)
+e(there)h(are)f(no)g(other)h(group)h(options\).)50 b(F)o(or)1395
+1715 y(group)27 b(options,)h(only)e(members)g Fp(title)d
+Fq(and)j Fp(type)d Fq(are)i(v)n(alid)i(in)e(the)1395
+1827 y(option)g(descriptor)-5 b(.)p 3783 1861 V 115 1865
+3670 4 v 966 2018 a(T)e(able)24 b(4.3:)29 b(Option)24
+b(V)-10 b(alue)24 b(T)-7 b(ypes)24 b(\()p Fp(SANE)p 2354
+2018 28 4 v 31 w(Value)p 2660 2018 V 30 w(Type)p Fq(\))0
+2395 y(up)i(to)h(a)f(frontend)i(as)f(to)f(ho)n(w)g(these)h(units)g(a)f
+(presented)j(to)e(the)f(user)-5 b(.)38 b(F)o(or)26 b(e)o(xample,)h
+(SANE)d(e)o(xpresses)29 b(all)d(lengths)i(in)0 2508 y(millimeters.)37
+b(A)25 b(frontend)j(is)d(generally)k(e)o(xpected)f(to)d(pro)o(vide)j
+(appropriate)h(con)l(v)o(ersion)g(routines)f(so)e(that)g(a)f(user)i
+(can)0 2620 y(e)o(xpress)e(quantities)h(in)e(a)f(customary)i(unit)f
+(\(e.g.,)f(inches)i(or)f(centimeters\).)p 499 2743 2903
+4 v 497 2856 4 113 v 953 2822 a Fr(Symbol)p 1698 2856
+V 1698 2856 V 504 w(Code)p 2000 2856 V 2000 2856 V 525
+w(Description)p 3400 2856 V 499 2859 2903 4 v 499 2876
+V 497 2989 4 113 v 548 2955 a Fp(SANE)p 773 2955 28 4
+v 31 w(UNIT)p 1024 2955 V 31 w(NONE)p 1698 2989 4 113
+v 480 w Fq(0)p 2000 2989 V 256 w(V)-10 b(alue)24 b(is)f(unit-less)j
+(\(e.g.,)d(page)i(count\).)p 3400 2989 V 497 3102 V 548
+3068 a Fp(SANE)p 773 3068 28 4 v 31 w(UNIT)p 1024 3068
+V 31 w(PIXEL)p 1698 3102 4 113 v 425 w Fq(1)p 2000 3102
+V 256 w(V)-10 b(alue)24 b(is)f(in)h(number)g(of)g(pix)o(els.)p
+3400 3102 V 497 3215 V 548 3181 a Fp(SANE)p 773 3181
+28 4 v 31 w(UNIT)p 1024 3181 V 31 w(BIT)p 1698 3215 4
+113 v 535 w Fq(2)p 2000 3215 V 256 w(V)-10 b(alue)24
+b(is)f(in)h(number)g(of)g(bits.)p 3400 3215 V 497 3328
+V 548 3294 a Fp(SANE)p 773 3294 28 4 v 31 w(UNIT)p 1024
+3294 V 31 w(MM)p 1698 3328 4 113 v 590 w Fq(3)p 2000
+3328 V 256 w(V)-10 b(alue)24 b(is)f(in)h(millimeters.)p
+3400 3328 V 497 3440 V 548 3407 a Fp(SANE)p 773 3407
+28 4 v 31 w(UNIT)p 1024 3407 V 31 w(DPI)p 1698 3440 4
+113 v 535 w Fq(4)p 2000 3440 V 256 w(V)-10 b(alue)24
+b(is)f(a)h(resolution)i(in)d(dots/inch.)p 3400 3440 V
+497 3553 V 548 3520 a Fp(SANE)p 773 3520 28 4 v 31 w(UNIT)p
+1024 3520 V 31 w(PERCENT)p 1698 3553 4 113 v 315 w Fq(5)p
+2000 3553 V 256 w(V)-10 b(alue)24 b(is)f(a)h(percentage.)p
+3400 3553 V 497 3666 V 548 3632 a Fp(SANE)p 773 3632
+28 4 v 31 w(UNIT)p 1024 3632 V 31 w(MICROSECOND)p 1698
+3666 4 113 v 95 w Fq(6)p 2000 3666 V 256 w(V)-10 b(alue)24
+b(is)f(time)h(in)f Fh(\026)p Fq(-seconds.)p 3400 3666
+V 499 3670 2903 4 v 1215 3823 a(T)-7 b(able)24 b(4.4:)29
+b(Physical)24 b(Units)g(\()p Fp(SANE)p 2410 3823 28 4
+v 31 w(Unit)p Fq(\))0 4268 y Fr(Option)f(V)-8 b(alue)22
+b(Size)0 4501 y Fq(Member)27 b Fp(size)d Fq(speci\002es)j(the)g(size)g
+(of)g(the)g(option)h(v)n(alue)f(\(in)g(bytes\).)39 b(This)26
+b(member)h(has)g(a)f(slightly)i(dif)n(ferent)h(inter)n(-)0
+4614 y(pretation)d(depending)g(on)e(the)g(type)g(of)g(the)f(option)i(v)
+n(alue:)227 4860 y Fp(SANE)p 452 4860 V 31 w(TYPE)p 703
+4860 V 31 w(STRING)p Fr(:)43 b Fq(The)27 b(size)g(is)g(the)g(maximum)g
+(size)h(of)f(the)g(string.)40 b(F)o(or)26 b(the)i(purpose)h(of)e
+(string)427 4973 y(size)c(calcuations,)i(the)d(terminating)i
+Fp(NUL)19 b Fq(character)24 b(is)e(considered)i(to)e(be)g(part)g(of)g
+(the)g(string.)29 b(Note)427 5086 y(that)24 b(the)g(terminating)i
+Fp(NUL)21 b Fq(character)26 b(must)e(al)o(w)o(ays)g(be)g(present)h(in)e
+(string)i(option)g(v)n(alues.)1905 5381 y(21)p eop
+%%Page: 22 23
+22 22 bop 227 123 a Fp(SANE)p 452 123 28 4 v 31 w(TYPE)p
+703 123 V 31 w(INT)p Fr(,)21 b Fp(SANE)p 1163 123 V 31
+w(TYPE)p 1414 123 V 31 w(FIXED)p Fr(:)43 b Fq(The)31
+b(size)h(must)f(be)g(a)g(positi)n(v)o(e)i(inte)o(ger)f(multiple)h(of)e
+(the)427 236 y(size)24 b(of)g(a)f Fp(SANE_Word)p Fq(.)h(The)f(option)i
+(v)n(alue)f(is)g(a)f(v)o(ector)h(of)g(length)1533 437
+y Fd(size)o Fh(=)p Fd(sizeof)p Fj(\()p Fd(SANE)p 2289
+437 V 31 w(Word)p Fj(\))o Fh(:)227 653 y Fp(SANE)p 452
+653 V 31 w(TYPE)p 703 653 V 31 w(BOOL)p Fr(:)44 b Fq(The)23
+b(size)h(must)g(be)f(set)h(to)f Fp(sizeof\(SANE)p 2486
+653 V 28 w(Word\))p Fq(.)227 798 y Fp(SANE)p 452 798
+V 31 w(TYPE)p 703 798 V 31 w(BUTTON)p Fr(,)d Fp(SANE)p
+1327 798 V 31 w(TYPE)p 1578 798 V 31 w(GROUP)p Fr(:)43
+b Fq(The)23 b(option)i(size)f(is)g(ignored.)0 1101 y
+Fr(Option)f(Capabilities)0 1332 y Fq(Member)h Fp(cap)d
+Fq(describes)26 b(what)d(capabilities)k(the)c(option)i(posseses.)31
+b(This)23 b(is)h(a)f(bitset)h(that)g(is)f(formed)h(as)g(the)f(inclusi)n
+(v)o(e)0 1445 y(logical)29 b(OR)d(of)h(the)h(capabilities)j(described)f
+(in)d(T)-7 b(able)28 b(4.5.)40 b(The)27 b(SANE)e(API)i(pro)o(vides)i
+(the)f(follo)n(wing)h(to)e(macros)h(to)0 1558 y(test)c(certain)h
+(features)h(of)d(a)g(gi)n(v)o(en)h(capability)i(bitset:)227
+1800 y Fp(SANE)p 452 1800 V 31 w(OPTION)p 813 1800 V
+30 w(IS)p 953 1800 V 32 w(ACTIVE\()p Fl(cap)p Fp(\))p
+Fr(:)43 b Fq(This)22 b(macro)h(returns)g Fp(SANE)p 2553
+1800 V 31 w(TRUE)d Fq(if)i(and)g(only)h(if)f(the)g(option)427
+1913 y(with)i(the)f(capability)k(set)c Fl(cap)h Fq(is)g(currently)i
+(acti)n(v)o(e.)227 2058 y Fp(SANE)p 452 2058 V 31 w(OPTION)p
+813 2058 V 30 w(IS)p 953 2058 V 32 w(SETTABLE\()p Fl(cap)p
+Fp(\))p Fr(:)42 b Fq(This)23 b(macro)f(returns)i Fp(SANE)p
+2663 2058 V 31 w(TRUE)c Fq(if)i(and)h(only)g(if)f(the)h(op-)427
+2171 y(tion)h(with)g(the)g(capability)i(set)e Fl(cap)g
+Fq(is)f(softw)o(are)i(settable.)0 2546 y Fr(Option)e(V)-8
+b(alue)22 b(Constraints)0 2777 y Fq(It)k(is)g(often)h(useful)g(to)f
+(constrain)j(the)d(v)n(alues)i(that)e(an)h(option)g(can)g(tak)o(e.)37
+b(F)o(or)25 b(e)o(xample,)j(constraints)h(can)d(be)g(used)h(by)g(a)0
+2890 y(frontend)h(to)e(determine)i(ho)n(w)e(to)g(represent)i(a)e(gi)n
+(v)o(en)h(option.)38 b(Member)26 b Fp(constraint)p 2921
+2890 V 28 w(type)e Fq(indicates)k(what)e(con-)0 3003
+y(straint)e(is)d(in)h(ef)n(fect)h(for)g(the)f(option.)30
+b(The)21 b(constrained)26 b(v)n(alues)d(that)f(are)h(allo)n(wed)f(for)h
+(the)f(option)i(are)e(described)j(by)d(one)0 3116 y(of)i(the)g(union)h
+(members)f(of)g(member)g Fp(constraint)p Fq(.)g(The)f(possible)j(v)n
+(alues)f(of)f(type)h Fp(SANE)p 3078 3116 V 31 w(Constraint)p
+3659 3116 V 28 w(Type)0 3229 y Fq(and)f(the)g(interpretation)j(of)d
+(the)g Fp(constraint)18 b Fq(union)25 b(is)e(described)j(in)e(T)-7
+b(able)23 b(4.6.)0 3535 y Fm(4.2.10)99 b(Inter)o(nationalization)0
+3598 y
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 3598 a 0 3598 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 3598 a 168 x Fq(All)23 b(back)o(end)j(te)o
+(xts)f(should)g(be)f(written)h(in)e(english.)32 b(Localization)26
+b(\(translation)h(of)d(back)o(end)i(te)o(xts\))f(has)f(to)g(be)g(done)g
+(in)0 3879 y(the)g(frontend.)30 b(T)-7 b(o)22 b(automatically)27
+b(prepare)e(translation)h(tables)f(\(e.g.)j(english)d(to)e(german\))i
+(it)e(is)g(necessary)j(to)d(mark)g(the)0 3992 y(te)o(xts)h(that)g
+(shall)h(be)e(translated.)0 4295 y Fr(Ho)o(w)g(is)g(a)g(text)h(mark)o
+(ed)f(f)n(or)h(translation)0 4526 y Fq(The)e(k)o(e)o(yw)o(ord)h
+Fp(SANE)p 724 4526 28 4 v 31 w(I18N)d Fq(is)i(used)h(to)f(mark)h(a)f
+(te)o(xt)g(for)h(translation.)31 b Fp(SANE)p 2566 4526
+V 31 w(I18N)20 b Fq(has)i(to)h(be)f(de\002ned)h(as)f(a)g(dummy)0
+4639 y(prototype:)227 4906 y Fp(#ifndef)52 b(SANE_I18N)227
+5019 y(#)109 b(define)52 b(SANE_I18N\(text)o(\))c(text)227
+5132 y(#endif)0 5135 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 0 5135 a 0 5135 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 0 5135 a 0 5135
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 0 5135 a 1905 5381 a Fq(22)p eop
+%%Page: 23 24
+23 23 bop 0 43 4046 4 v -2 156 4 113 v 525 122 a Fr(Symbol)p
+1342 156 V 575 w(Code)p 1643 156 V 1025 w(Description)p
+4044 156 V 0 159 4046 4 v 0 176 V -2 402 4 226 v 50 255
+a Fp(SANE)p 275 255 28 4 v 31 w(CAP)p 471 255 V 31 w(SOFT)p
+722 255 V 31 w(SELECT)p 1342 402 4 226 v 472 w Fq(1)p
+1643 402 V 100 w(The)20 b(option)j(v)n(alue)f(can)f(be)g(set)h(by)f(a)g
+(call)g(to)g Fp(sane)p 3337 255 28 4 v 31 w(control)p
+3753 255 V 30 w(opt-)1695 368 y(ion\(\))p Fq(.)p 4044
+402 4 226 v -2 966 4 565 v 50 481 a Fp(SANE)p 275 481
+28 4 v 31 w(CAP)p 471 481 V 31 w(HARD)p 722 481 V 31
+w(SELECT)p 1342 966 4 565 v 472 w Fq(2)p 1643 966 V 100
+w(The)28 b(option)j(v)n(alue)f(can)f(be)g(set)h(by)f(user)n(-interv)o
+(ention)34 b(\(e.g.,)c(by)f(\003ip-)1695 594 y(ping)35
+b(a)f(switch\).)63 b(The)34 b(user)n(-interf)o(ace)39
+b(should)d(prompt)g(the)f(user)g(to)1695 707 y(e)o(x)o(ecute)25
+b(the)g(appropriate)i(action)f(to)e(set)g(such)h(an)f(option.)33
+b(This)24 b(capa-)1695 820 y(bility)33 b(is)f(mutually)i(e)o(xclusi)n
+(v)o(e)g(with)e(SANE)p 3172 820 28 4 v 31 w(CAP)p 3381
+820 V 31 w(SOFT)p 3636 820 V 31 w(SELECT)1695 932 y(\(either)25
+b(one)f(of)f(them)h(can)g(be)f(set,)h(b)n(ut)g(not)g(both)g
+(simultaneously\).)p 4044 966 4 565 v -2 1757 4 791 v
+50 1045 a Fp(SANE)p 275 1045 28 4 v 31 w(CAP)p 471 1045
+V 31 w(SOFT)p 722 1045 V 31 w(DETECT)p 1342 1757 4 791
+v 472 w Fq(4)p 1643 1757 V 100 w(The)42 b(option)j(v)n(alue)f(can)g(be)
+f(detected)i(by)e(softw)o(are.)89 b(If)43 b Fp(SANE)p
+3915 1045 28 4 v 31 w(-)1695 1158 y(CAP)p 1865 1158 V
+31 w(SOFT)p 2116 1158 V 31 w(SELECT)f Fq(is)j(set,)50
+b(this)c(capability)i Fl(must)e Fq(be)f(set.)94 b(If)1695
+1271 y Fp(SANE)p 1920 1271 V 31 w(CAP)p 2116 1271 V 31
+w(HARD)p 2367 1271 V 31 w(SELECT)27 b Fq(is)k(set,)i(this)e(capability)
+j(may)c(or)h(may)1695 1384 y(not)d(be)g(set.)42 b(If)28
+b(this)g(capability)j(is)d(set)g(b)n(ut)g(neither)i Fp(SANE)p
+3610 1384 V 31 w(CAP)p 3806 1384 V 31 w(SO-)1695 1497
+y(FT)p 1810 1497 V 32 w(SELECT)22 b Fq(nor)27 b Fp(SANE)p
+2561 1497 V 31 w(CAP)p 2757 1497 V 31 w(HARD)p 3008 1497
+V 31 w(SELECT)22 b Fq(are,)27 b(then)g(there)g(is)1695
+1610 y(no)e(w)o(ay)f(to)h(control)i(the)e(option.)34
+b(That)25 b(is,)g(the)g(option)h(pro)o(vides)h(read-)1695
+1723 y(out)d(of)f(the)h(current)h(v)n(alue)f(only)-6
+b(.)p 4044 1757 4 791 v -2 2208 4 452 v 50 1836 a Fp(SANE)p
+275 1836 28 4 v 31 w(CAP)p 471 1836 V 31 w(EMULATED)p
+1342 2208 4 452 v 613 w Fq(8)p 1643 2208 V 100 w(If)22
+b(set,)g(this)h(capability)j(indicates)e(that)f(an)g(option)h(is)e(not)
+h(directly)h(sup-)1695 1949 y(ported)36 b(by)f(the)h(de)n(vice)g(and)f
+(is)g(instead)i(emulated)g(in)e(the)g(back)o(end.)1695
+2062 y(A)26 b(sophisticated)31 b(frontend)e(may)e(elect)h(to)g(use)f
+(its)h(o)n(wn)e(\(presumably)1695 2174 y(better\))f(emulation)g(in)f
+(lieu)g(of)f(an)h(emulated)h(option.)p 4044 2208 V -2
+2773 4 565 v 50 2287 a Fp(SANE)p 275 2287 28 4 v 31 w(CAP)p
+471 2287 V 31 w(AUTOMATIC)p 1342 2773 4 565 v 512 w Fq(16)p
+1643 2773 V 101 w(If)i(set,)i(this)g(capability)h(indicates)h(that)d
+(the)g(back)o(end)i(\(or)e(the)g(de)n(vice\))1695 2400
+y(is)k(capable)i(to)e(picking)i(a)e(reasonable)j(option)f(v)n(alue)f
+(automatically)-6 b(.)1695 2513 y(F)o(or)24 b(such)h(options,)i(it)d
+(is)h(possible)i(to)d(select)i(automatic)h(operation)g(by)1695
+2626 y(calling)37 b Fp(sane)p 2202 2626 28 4 v 31 w(control)p
+2618 2626 V 30 w(option\(\))32 b Fq(with)j(an)i(action)g(v)n(alue)g(of)
+1695 2739 y Fp(SANE)p 1920 2739 V 31 w(ACTION)p 2281
+2739 V 30 w(SET)p 2476 2739 V 31 w(AUTO)p Fq(.)p 4044
+2773 4 565 v -2 3112 4 339 v 50 2852 a Fp(SANE)p 275
+2852 28 4 v 31 w(CAP)p 471 2852 V 31 w(INACTIVE)p 1342
+3112 4 339 v 567 w Fq(32)p 1643 3112 V 101 w(If)32 b(set,)j(this)e
+(capability)i(indicates)g(that)e(the)f(option)i(is)f(not)g(currently)
+1695 2965 y(acti)n(v)o(e)22 b(\(e.g.,)f(because)i(it')-5
+b(s)22 b(meaningful)i(only)e(if)f(another)i(option)g(is)f(set)1695
+3078 y(to)h(some)h(other)g(v)n(alue\).)p 4044 3112 V
+-2 4015 4 904 v 50 3191 a Fp(SANE)p 275 3191 28 4 v 31
+w(CAP)p 471 3191 V 31 w(ADVANCED)p 1342 4015 4 904 v
+567 w Fq(64)p 1643 4015 V 101 w(If)33 b(set,)k(this)d(capability)j
+(indicates)f(that)f(the)f(option)i(should)f(be)f(con-)1695
+3304 y(sidered)d(an)f(\223adv)n(anced)i(user)e(option\224.)3033
+3225 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 3033 3225 a 3033 3225 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 3033 3225 a 79 x Fq(If)g(this)g
+(capability)i(is)e(set)g(for)1695 3417 y(an)21 b(option)h(of)f(type)g
+Fp(SANE)p 2550 3417 28 4 v 31 w(TYPE)p 2801 3417 V 31
+w(GROUP)p Fq(,)d(all)j(options)h(belonging)i(to)1695
+3529 y(the)f(group)h(are)f(also)g(adv)n(anced,)i(e)n(v)o(en)e(if)g(the)
+o(y)g(don')n(t)h(set)f(the)g(capabilty)1695 3642 y(themselv)o(es.)2147
+3642 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 2147 3642 a 2147 3642 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 2147 3642 a 2147 3642
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 2147 3642 a 27 w Fq(A)18 b(frontend)k(typically)g(displays)g(such)e
+(options)i(in)d(a)g(less)1695 3755 y(conspicuous)26 b(w)o(ay)d(than)h
+(re)o(gular)g(options)h(\(e.g.,)e(a)f(command)i(line)g(in-)1695
+3868 y(terf)o(ace)32 b(may)e(list)h(such)h(options)g(last)f(or)g(a)f
+(graphical)j(interf)o(ace)g(may)1695 3981 y(mak)o(e)23
+b(them)h(a)n(v)n(ailable)i(in)d(a)g(seperate)j(\223adv)n(anced)g
+(settings\224)g(dialog\).)p 4044 4015 4 904 v -2 4980
+4 966 v 50 4094 a Fp(SANE)p 275 4094 28 4 v 31 w(CAP)p
+471 4094 V 31 w(HIDDEN)p 1342 4980 4 966 v 632 w Fq(128)p
+1643 4980 V 1695 4094 a
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 1695 4094 a 1695 4094 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 1695
+4094 a 62 x Fq(If)g(set,)i(this)f(capability)i(indicates)g(that)f(the)f
+(option)h(shouldn')n(t)i(be)c(dis-)1695 4269 y(played)f(to)f(and)g
+(used)h(by)f(the)g(user)g(directly)-6 b(.)32 b(Instead)25
+b(a)f(hidden)h(option)1695 4382 y(is)k(supposed)i(to)e(be)g
+(automatically)k(used)d(by)f(the)g(frontend,)k(lik)o(e)c(e.g.)1695
+4495 y(the)i(\223pre)n(vie)n(w\224)h(option.)53 b(If)31
+b(this)h(capability)i(is)d(set)g(for)g(an)g(option)i(of)1695
+4608 y(type)h Fp(SANE)p 2109 4608 28 4 v 31 w(TYPE)p
+2360 4608 V 31 w(GROUP)p Fq(,)d(all)i(options)j(belonging)h(to)d(the)g
+(group)1695 4721 y(are)24 b(also)h(hidden,)h(e)n(v)o(en)e(if)g(the)o(y)
+g(don')n(t)i(set)e(the)h(capabilty)h(themselv)o(es.)1695
+4833 y(A)20 b(frontend)k(typically)h(doesn')n(t)f(display)f(such)g
+(options)h(by)e(def)o(ault)h(b)n(ut)1695 4946 y(there)h(should)h(be)f
+(a)f(w)o(ay)g(to)h(o)o(v)o(erride)h(this)f(def)o(ault)h(beha)n(viour)-5
+b(.)3762 4946 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 3762 4946 a 3762 4946 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 3762 4946 a 3762
+4946 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 3762 4946 a 4044 4980 4 966 v -2 5381 4 401 v
+50 5059 a Fp(SANE)p 275 5059 28 4 v 31 w(CAP)p 471 5059
+V 31 w(ALWAYS)p 832 5059 V 30 w(SETTABLE)p 1342 5381
+4 401 v 162 w Fq(256)p 1643 5381 V 1695 5059 a
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 1695 5059
+a 1695 5059 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 1695 5059 a 62 x Fq(If)35 b(set,)k(this)d(capability)i
+(indicates)g(that)e(the)g(option)h(may)f(be)f(at)h(an)o(y)1695
+5234 y(time)d(between)h Fp(sane)p 2449 5234 28 4 v 31
+w(open\(\))c Fq(and)j Fp(sane)p 3223 5234 V 31 w(close\(\))p
+Fq(.)54 b(I.e.)k(it')-5 b(s)1695 5347 y(allo)n(wed)24
+b(to)f(set)h(it)f(e)n(v)o(en)h(while)g(an)f(image)h(is)g(acquired.)3510
+5347 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 3510 5347 a 3510 5347 a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 3510 5347 a 3510 5347
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 3510 5347 a 4044 5381 4 401 v 0 5384 4046 4 v 1400
+5538 a Fq(T)-7 b(able)24 b(4.5:)29 b(Option)24 b(Capabilities)1905
+5381 y(23)p eop
+%%Page: 24 25
+24 24 bop 21 102 3859 4 v 19 215 4 113 v 628 181 a Fr(Symbol)p
+1526 215 V 1526 215 V 657 w(Code)p 1828 215 V 1828 215
+V 850 w(Description)p 3877 215 V 21 219 3859 4 v 21 235
+V 19 461 4 226 v 71 314 a Fp(SANE)p 296 314 28 4 v 31
+w(CONSTRAINT)p 877 314 V 28 w(NONE)p 1526 461 4 226 v
+614 w Fq(0)p 1828 461 V 100 w(The)29 b(v)n(alue)g(is)g(unconstrained.)
+49 b(The)28 b(option)j(can)e(tak)o(e)g(an)o(y)1879 427
+y(of)24 b(the)g(v)n(alues)g(possible)i(for)e(the)g(option')-5
+b(s)25 b(type.)p 3877 461 V 19 3094 4 2634 v 71 540 a
+Fp(SANE)p 296 540 28 4 v 31 w(CONSTRAINT)p 877 540 V
+28 w(RANGE)p 1526 3094 4 2634 v 559 w Fq(1)p 1828 3094
+V 100 w(This)d(constraint)i(is)d(applicable)j(to)e(inte)o(ger)h(and)f
+(\002x)o(ed-point)1879 653 y(v)n(alued)h(options)g(only)-6
+b(.)29 b(It)21 b(constrains)j(the)d(option)i(v)n(alue)f(to)f(a)1879
+766 y(possibly)k(quantized)g(range)e(of)f(numbers.)30
+b(Option)22 b(descrip-)1879 879 y(tor)j(member)g Fp(constraint.rang)o
+(e)17 b Fq(points)27 b(to)d(a)g(range)1879 992 y(of)h(the)g(type)h
+Fp(SANE)p 2520 992 28 4 v 31 w(Range)p Fq(.)k(This)25
+b(type)h(is)e(illustrated)k(be-)1879 1105 y(lo)n(w:)2107
+1292 y Fp(typedef)51 b(struct)2216 1405 y({)2325 1518
+y(SANE_Word)f(min;)2325 1631 y(SANE_Word)g(max;)2325
+1744 y(SANE_Word)g(quant;)2216 1857 y(})2107 1970 y(SANE_Range;)1879
+2157 y Fq(All)23 b(three)i(members)f(in)g(this)g(structure)i(are)e
+(interpreted)i(ac-)1879 2270 y(cording)31 b(to)e(the)g(option)h(v)n
+(alue)f(type)h(\()p Fp(SANE_TYPE_INT)1879 2383 y Fq(or)41
+b Fp(SANE_TYPE_FIXED)o Fq(\).)35 b(Members)41 b Fp(min)e
+Fq(and)j Fp(max)1879 2496 y Fq(specify)37 b(the)e(minimum)g(and)g
+(maximum)g(v)n(alues,)k(respec-)1879 2609 y(ti)n(v)o(ely)-6
+b(.)39 b(If)26 b(member)g Fp(quant)e Fq(is)i(non-zero,)j(it)d
+(speci\002es)i(the)1879 2722 y(quantization)34 b(v)n(alue.)51
+b(If)30 b Fh(l)h Fq(is)g(the)f(minimum)h(v)n(alue,)h
+Fh(u)e Fq(the)1879 2835 y(maximum)e(v)n(alue)h(and)g
+Fh(q)h Fq(the)f(\(non-zero\))i(quantization)h(of)1879
+2948 y(a)25 b(range,)i(then)f(the)g(le)o(gal)g(v)n(alues)h(are)e
+Fh(v)33 b Fj(=)28 b Fh(k)d Fk(\001)d Fh(q)j Fj(+)c Fh(l)27
+b Fq(for)e(all)1879 3061 y(non-ne)o(gati)n(v)o(e)h(inte)o(ger)f(v)n
+(alues)g(of)e Fh(k)j Fq(such)e(that)h Fh(v)j(<)p Fj(=)d
+Fh(u)p Fq(.)p 3877 3094 4 2634 v 19 4224 4 1130 v 71
+3173 a Fp(SANE)p 296 3173 28 4 v 31 w(CONSTRAINT)p 877
+3173 V 28 w(WORD)p 1125 3173 V 31 w(LIST)p 1526 4224
+4 1130 v 363 w Fq(2)p 1828 4224 V 100 w(This)d(constraint)i(is)d
+(applicable)j(to)e(inte)o(ger)h(and)f(\002x)o(ed-point)1879
+3286 y(v)n(alued)29 b(options)h(only)-6 b(.)43 b(It)28
+b(constrains)i(the)e(option)i(v)n(alue)f(to)1879 3399
+y(a)34 b(list)g(of)g(numeric)h(v)n(alues.)61 b(Option)35
+b(descriptor)h(member)1879 3512 y Fp(constraint.word)p
+2708 3512 28 4 v 26 w(list)22 b Fq(points)j(to)f(a)g(list)g(of)g(w)o
+(ords)1879 3625 y(that)k(enumerates)h(the)e(le)o(gal)f(v)n(alues.)40
+b(The)26 b(\002rst)h(element)h(in)1879 3738 y(that)33
+b(list)f(is)f(an)h(inte)o(ger)h(\()p Fp(SANE_Int)p Fq(\))28
+b(that)k(speci\002es)h(the)1879 3851 y(length)28 b(of)f(the)g(list)g
+(\(not)h(counting)h(the)e(length)h(itself\).)40 b(The)1879
+3964 y(remaining)30 b(elements)f(in)e(the)h(list)g(are)g(interpreted)j
+(accord-)1879 4077 y(ing)19 b(to)g(the)g(type)g(of)f(the)h(option)h(v)n
+(alue)g(\()p Fp(SANE_TYPE_INT)1879 4190 y Fq(or)k Fp(SANE_TYPE_FIXE)o
+(D)p Fq(\).)p 3877 4224 4 1130 v 19 4788 4 565 v 71 4303
+a Fp(SANE)p 296 4303 28 4 v 31 w(CONSTRAINT)p 877 4303
+V 28 w(STRING)p 1235 4303 V 30 w(LIST)p 1526 4788 4 565
+v 254 w Fq(3)p 1828 4788 V 100 w(This)31 b(constraint)i(is)e
+(applicable)i(to)e(string-v)n(alued)k(options)1879 4415
+y(only)-6 b(.)33 b(It)25 b(constrains)i(the)e(option)h(v)n(alue)g(to)e
+(a)g(list)i(of)e(strings.)1879 4528 y(The)h(option)h(descriptor)i
+(member)d Fp(constraint.str-)1879 4641 y(ing)p 2049 4641
+28 4 v 32 w(list)19 b Fq(points)k(to)e(a)g Fp(NULL)e
+Fq(terminated)k(list)f(of)g(strings)1879 4754 y(that)i(enumerate)i(the)
+e(le)o(gal)f(v)n(alues)i(for)f(the)f(option)j(v)n(alue.)p
+3877 4788 4 565 v 21 4791 3859 4 v 1296 4945 a(T)-7 b(able)23
+b(4.6:)29 b(Option)24 b(V)-10 b(alue)24 b(Constraints)1905
+5381 y(24)p eop
+%%Page: 25 26
+25 25 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 32 a 91 x Fq(Y)-10 b(ou)33
+b(should)i(not)f(mark)f(prototypes)k(or)c(v)n(ariables)i(with)e
+Fp(SANE)p 2124 123 28 4 v 31 w(I18N)e Fq(because)k(it)e(is)h(not)f
+(possible)j(\(or)d(v)o(ery)h(hard\))0 236 y(to)c(\002nd)f(out)h(the)g
+(te)o(xts)g(that)h(are)f(co)o(v)o(ered)h(by)e(prototypes)k(\()p
+Fp(SANE_I18N\(START_)o(SC)o(AN)o(_TE)o(XT)o(\))p Fq(\))23
+b(and)30 b(v)n(ariables)0 349 y(\()p Fp(SANE_I18N\(optio)o(n[7)o(].)o
+(na)o(me)o(\))p Fq(\).)0 520 y(A)22 b(correct)j(mark)o(ed)g(te)o(xt)f
+(can)g(look)g(lik)o(e)g(this:)0 633 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(SANE_I18N\("Sta)o(rt)f(scan"\))0 746
+y Fq(or)0 859 y Fp(#define)j(START_SCAN_TEXT)d(SANE_I18N\("Star)o(t)g
+(scan"\))p Fq(.)0 972 y(It)23 b(also)h(is)g(allo)n(wed)g(to)g(mark)f
+(te)o(xts)h(in)g(structs)h(because)g(the)f(prototype)i
+Fp(SANE)p 2529 972 V 31 w(I18N)21 b Fq(has)j(no)g(ef)n(fect)g(to)f(the)
+h(compiler)-5 b(.)0 1277 y Fr(Which)22 b(texts)j(shall)e(be)g(mark)o
+(ed)g(f)n(or)g(translation?)0 1509 y Fq(All)g(option)i(te)o(xts)f(that)
+g(are)g(visible)h(for)f(the)g(user)g(should)h(be)f(mark)o(ed)g(for)g
+(translation.)31 b(This)24 b(is:)136 1756 y Fk(\017)46
+b Fq(member)24 b Fp(title)136 1943 y Fk(\017)46 b Fq(member)24
+b Fp(desc)136 2131 y Fk(\017)46 b Fq(member)24 b Fp(string)p
+883 2131 V 30 w(list)0 2377 y Fq(of)f Fp(SANE)p 323 2377
+V 31 w(Option)p 684 2377 V 30 w(Descriptor)p Fq(.)0 2549
+y(It)f(is)h(not)g(allo)n(wed)g(to)f(mark/translate)k(member)d
+Fp(name)p Fq(.)j(Please)d(also)g(do)f(not)h(mark)g(an)o(y)g(error)g(or)
+f(deb)n(ug)j(messages)f(that)0 2662 y(are)g(displayed)i(by)e(the)f
+(back)o(end.)0 2967 y Fr(File)g(f)n(ormats)i(and)d(translation)j
+(functions)0 3200 y Fq(The)h(recommended)j(\002le)d(formats)h(for)g
+(translation)j(tables)e(are)e(the)h Fp(po)e Fq(\002les)h(and)h
+Fp(mo)e Fq(or)i Fp(gmo)d Fq(\002les.)38 b(The)26 b(po)h(\002le)e(con-)0
+3312 y(tains)32 b(the)e(original)j(te)o(xt)e(mark)o(ed)g(with)g(the)g
+(k)o(e)o(yw)o(ord)h Fp(msgid)27 b Fq(and)k(the)g(translated)i(te)o(xt)e
+(mark)o(ed)h(with)e(the)h(k)o(e)o(yw)o(ord)0 3425 y Fp(msgstr)p
+Fq(.)25 b(A)c Fp(po)f Fq(\002le)h(that)i(contains)h(all)e(needed)i
+Fp(msgid)p Fq(s)19 b(can)k(be)f(created)i(e.g.)k(by)22
+b(the)g(gnu)h(gette)o(xt)g(tool)g Fp(xgettext)0 3538
+y Fq(with)k(the)h(option)h Fp(-k)53 b(SANE_I18N)p Fq(.)22
+b(The)27 b(translator)j(adds)e(the)g(translated)i(te)o(xts)e(to)f(the)h
+Fp(po)d Fq(\002les.)40 b(The)27 b(gette)o(xt)i(tool)0
+3651 y Fp(msgfmt)20 b Fq(con)l(v)o(erts)26 b(the)e Fp(po)d
+Fq(\002les)j(to)f(the)h Fp(mo)e Fq(or)h Fp(gmo)f Fq(\002les.)0
+3936 y(T)m(ranslation)k(is)e(done)i(in)e(the)g(frontend.)34
+b(A)23 b(back)o(end)j(has)f(nothing)h(to)e(do)h(with)f(the)g
+(translation)k(of)c(te)o(xts.)31 b(The)24 b(frontend)0
+4049 y(should)h(use)f(the)g(function)i Fp(gettext)19
+b Fq(to)24 b(translate)h(the)f(te)o(xts.)29 b(This)24
+b(e.g.)k(can)c(look)h(lik)o(e)f(this:)0 4162 y Fp(snprintf\(buf,)49
+b(sizeof\(buf\),)g(gettext\("engli)o(sh)f(text"\)\);)0
+4333 y Fq(If)25 b(a)f(frontend)j(author)f(decides)h(to)e(use)g
+(translation)j(functions)f(that)f(need)g(dif)n(ferent)g(translation)i
+(tables,)f(then)e(the)g(fron-)0 4446 y(tend)f(is)f(responsible)k(to)c
+(create/con)l(v)o(ert)28 b(the)c(translation)i(tables.)k(In)23
+b(this)h(case)h(it)e(should)i(use)f(the)f Fp(po)f Fq(\002les)h(to)g
+(create)i(its)0 4559 y(o)n(wn)e(translation)k(tables)d(from)g(it.)0
+4843 y(Note)f(that)i(it)e(is)g(strongly)j(recommended)g(to)d(use)h(the)
+g(gette)o(xt)h(tools.)2241 4843 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 2241 4843 a 2241 4843
+a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+ 2241 4843 a 2241 4843 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 2241 4843 a 1905 5381 a Fq(25)p
+eop
+%%Page: 26 27
+26 26 bop 0 123 a Fn(4.3)119 b(Operations)0 392 y Fm(4.3.1)99
+b Fc(sane)p 545 392 30 4 v 35 w(init)0 625 y Fq(This)35
+b(function)h(must)f(be)g(called)h(before)g(an)o(y)f(other)g(SANE)d
+(function)37 b(can)e(be)g(called.)63 b(The)35 b(beha)n(vior)i(of)d(a)h
+(SANE)0 738 y(back)o(end)i(is)d(unde\002ned)j(if)d(this)h(function)i
+(is)e(not)g(called)g(\002rst)g(or)f(if)h(the)g(status)h(code)f
+(returned)i(by)d Fp(sane)p 3561 738 28 4 v 31 w(init)e
+Fq(is)0 851 y(dif)n(ferent)e(from)e Fp(SANE)p 767 851
+V 31 w(STATUS)p 1128 851 V 30 w(GOOD)p Fq(.)d(The)j(v)o(ersion)h(code)g
+(of)f(the)h(back)o(end)h(is)e(returned)i(in)e(the)g(v)n(alue)h(pointed)
+h(to)0 964 y(by)24 b Fp(version)p 504 964 V 29 w(code)p
+Fq(.)j(If)d(that)g(pointer)i(is)d Fp(NULL)p Fq(,)e(no)j(v)o(ersion)i
+(code)e(is)g(returned.)31 b(Ar)n(gument)25 b Fp(authorize)19
+b Fq(is)24 b(either)0 1077 y(a)29 b(pointer)h(to)f(a)g(function)i(that)
+e(is)g(in)l(v)n(ok)o(ed)j(when)d(the)g(back)o(end)i(requires)g
+(authentication)j(for)29 b(a)f(speci\002c)i(resource)h(or)0
+1189 y Fp(NULL)21 b Fq(if)i(the)h(frontend)i(does)e(not)g(support)h
+(authentication.)227 1436 y Fp(SANE_Status)50 b(sane_init)g(\(SANE_Int)
+h(*)j(version_code,)1482 1549 y(SANE_Authoriza)o(tio)o(n_)o(Ca)o(ll)o
+(ba)o(ck)48 b(authorize\);)0 1795 y Fq(The)23 b(authorization)28
+b(function)d(may)f(be)f(called)i(by)f(a)f(back)o(end)i(in)f(response)i
+(to)d(an)o(y)h(of)f(the)h(follo)n(wing)h(calls:)227 2041
+y Fp(sane)p 452 2041 V 31 w(open)p Fq(,)c Fp(sane)p 967
+2041 V 31 w(control)p 1383 2041 V 29 w(option)p Fq(,)f
+Fp(sane)p 2005 2041 V 31 w(start)0 2288 y Fq(If)25 b(a)h(back)o(end)i
+(w)o(as)d(initialized)k(without)d(authorization)k(function,)e(then)f
+(authorization)i(requests)f(that)e(cannot)i(be)d(han-)0
+2401 y(dled)k(by)g(the)g(back)o(end)i(itself)f(will)e(f)o(ail)h
+(automatically)j(and)e(the)f(user)g(may)f(be)h(pre)n(v)o(ented)i(from)d
+(accessing)k(protected)0 2514 y(resources.)66 b(Back)o(ends)37
+b(are)f(encouraged)i(to)d(implement)h(means)g(of)f(authentication)40
+b(that)35 b(do)h(not)f(require)i(user)f(as-)0 2626 y(sistance.)64
+b(E.g.,)36 b(on)f(a)f(multi-user)i(system)g(that)f(authenticates)j
+(users)e(through)h(a)d(login)i(process)g(a)e(back)o(end)j(could)0
+2739 y(automatically)27 b(lookup)e(the)f(apporpriate)i(passw)o(ord)g
+(based)e(on)g(resource-)i(and)e(user)n(-name.)0 2911
+y(The)f(authentication)28 b(function)e(type)e(has)g(the)g(follo)n(wing)
+h(declaration:)227 3157 y Fp(#define)52 b(SANE_MAX_USERN)o(AM)o(E_)o
+(LEN)157 b(128)227 3270 y(#define)52 b(SANE_MAX_PASSW)o(OR)o(D_)o(LEN)
+157 b(128)227 3496 y(typedef)52 b(void)g(\(*SANE_Authoriza)o(ti)o(on)o
+(_C)o(al)o(lba)o(ck)o(\))445 3609 y(\(SANE_String_Con)o(st)c(resource,)
+500 3722 y(SANE_Char)i(username[SANE_MA)o(X_)o(US)o(ER)o(NAM)o(E_)o(LE)
+o(N])o(,)500 3835 y(SANE_Char)g(password[SANE_MA)o(X_)o(PA)o(SS)o(WOR)o
+(D_)o(LE)o(N])o(\);)0 4081 y Fq(Three)31 b(ar)n(guments)i(are)e(passed)
+h(to)f(the)g(authorization)j(function:)46 b Fp(resource)26
+b Fq(is)31 b(a)f(string)i(specifying)i(the)c(name)h(of)0
+4194 y(the)24 b(resource)j(that)d(requires)i(authorization.)35
+b(A)23 b(frontend)j(should)g(use)e(this)h(string)g(to)f(b)n(uild)i(a)d
+(user)n(-prompt)k(requesting)0 4307 y(a)36 b(username)i(and)f(a)g
+(passw)o(ord.)69 b(The)36 b Fp(username)c Fq(and)38 b
+Fp(password)32 b Fq(ar)n(guments)39 b(are)d(\(pointers)j(to\))e(an)g
+(array)g(of)0 4420 y Fp(SANE)p 225 4420 V 31 w(MAX)p
+421 4420 V 31 w(USERNAME)p 892 4420 V 29 w(LEN)22 b Fq(and)i
+Fp(SANE)p 1482 4420 V 31 w(MAX)p 1678 4420 V 32 w(PASSWORD)p
+2150 4420 V 29 w(LEN)d Fq(characters,)26 b(respecti)n(v)o(ely)-6
+b(.)33 b(The)23 b(authorization)0 4533 y(call)k(should)h(place)f(the)f
+(entered)i(username)g(and)f(passw)o(ord)h(in)e(these)h(arrays.)38
+b(The)26 b(returned)i(strings)g Fl(must)g Fq(be)e(ASCII-)0
+4646 y(NUL)c(terminated.)1905 5381 y(26)p eop
+%%Page: 27 28
+27 27 bop 0 123 a Fm(4.3.2)99 b Fc(sane)p 545 123 30
+4 v 35 w(exit)0 352 y Fq(This)26 b(function)i(must)e(be)g(called)h(to)f
+(terminate)h(use)f(of)g(a)g(back)o(end.)38 b(The)25 b(function)j(will)e
+(\002rst)f(close)i(all)f(de)n(vice)h(handles)0 465 y(that)d(still)h
+(might)f(be)f(open)i(\(it)f(is)f(recommended)j(to)e(close)h(de)n(vice)f
+(handles)i(e)o(xplicitly)g(through)g(a)d(call)h(to)g
+Fp(sane)p 3656 465 28 4 v 31 w(clo-)0 578 y(se\(\))p
+Fq(,)k(b)n(ut)h(back)o(ends)j(are)d(required)i(to)e(release)i(all)e
+(resources)j(upon)e(a)e(call)i(to)f(this)g(function\).)48
+b(After)29 b(this)h(function)0 691 y(returns,)36 b(no)c(function)i
+(other)f(than)g Fp(sane)p 1396 691 V 31 w(init\(\))28
+b Fq(may)k(be)g(called)h(\(re)o(gardless)h(of)e(the)h(status)g(v)n
+(alue)g(returned)h(by)0 804 y Fp(sane)p 225 804 V 31
+w(exit\(\))p Fq(.)25 b(Ne)o(glecting)g(to)f(call)g(this)g(function)i
+(may)d(result)i(in)e(some)h(resources)i(not)e(being)g(released)i
+(properly)-6 b(.)227 1038 y Fp(void)53 b(sane_exit)d(\(void\);)0
+1341 y Fm(4.3.3)99 b Fc(sane)p 545 1341 30 4 v 35 w(get)p
+760 1341 V 35 w(devices)0 1570 y Fq(This)21 b(function)i(can)e(be)g
+(used)h(to)f(query)h(the)g(list)f(of)g(de)n(vices)h(that)g(are)f(a)n(v)
+n(ailable.)30 b(If)21 b(the)g(function)i(e)o(x)o(ecutes)g(successfully)
+-6 b(,)0 1683 y(it)22 b(stores)h(a)e(pointer)j(to)d(a)h
+Fp(NULL)d Fq(terminated)24 b(array)f(of)f(pointers)h(to)f
+Fp(SANE_Device)16 b Fq(structures)25 b(in)d Fp(*device)p
+3635 1683 28 4 v 29 w(list)p Fq(.)0 1796 y(The)27 b(returned)i(list)f
+(is)f(guaranteed)j(to)d(remain)h(unchanged)i(and)e(v)n(alid)g(until)g
+(\(a\))f(another)i(call)f(to)f(this)h(function)h(is)e(per)n(-)0
+1909 y(formed)f(or)e(\(b\))h(a)g(call)g(to)g Fp(sane)p
+1056 1909 V 31 w(exit\(\))c Fq(is)j(performed.)35 b(This)25
+b(function)i(can)e(be)g(called)h(repeatedly)h(to)e(detect)h(when)0
+2022 y(ne)n(w)g(de)n(vices)j(become)e(a)n(v)n(ailable.)41
+b(If)27 b(ar)n(gument)h Fp(local)p 1899 2022 V 31 w(only)c
+Fq(is)j(true,)h(only)f(local)h(de)n(vices)g(are)f(returned)i(\(de)n
+(vices)0 2135 y(directly)f(attached)h(to)d(the)h(machine)h(that)f(SANE)
+d(is)i(running)j(on\).)37 b(If)27 b(it)f(is)g(f)o(alse,)i(the)f(de)n
+(vice)g(list)g(includes)i(all)e(remote)0 2247 y(de)n(vices)e(that)f
+(are)g(accessible)i(to)e(the)f(SANE)f(library)-6 b(.)227
+2482 y Fp(SANE_Status)50 b(sane_get_devic)o(es)e(\(const)k(SANE_Device)
+d(***)54 b(device_list,)1864 2595 y(SANE_Bool)c(local_only\);)0
+2830 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g
+Fp(SANE)p 1242 2830 V 31 w(STATUS)p 1603 2830 V 30 w(NO)p
+1743 2830 V 31 w(MEM)e Fq(if)h(an)h(insuf)n(\002cient)h(amount)g(of)e
+(memory)h(is)f(a)n(v)n(ailable.)1357 3087 y Fr(Back)o(end)f
+(Implementation)i(Note)227 3236 y Fq(SANE)h(does)k(not)f(require)h
+(that)f(this)h(function)g(is)f(called)h(before)g(a)e
+Fp(sane)p 2646 3236 V 31 w(open\(\))d Fq(call)k(is)f(performed.)227
+3349 y(A)32 b(de)n(vice)j(name)e(may)g(be)g(speci\002ed)i(e)o
+(xplicitly)h(by)d(a)g(user)h(which)f(w)o(ould)h(mak)o(e)g(it)f
+(unnecessary)j(and)227 3462 y(undesirable)31 b(to)c(call)h(this)g
+(function)h(\002rst.)1619 3383 y
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 1619 3383 a 1619 3383
+a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+ 1619 3383 a 79 x Fq(The)e(same)g(information)j(about)e(a)f(de)n(vice)
+i(has)e(to)h(be)f(returned)227 3575 y(when)d Fp(sane)p
+672 3575 28 4 v 31 w(open)d Fq(is)i(called.)1290 3575
+y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 1290 3575 a 1290 3575 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 1290 3575 a 1290 3575 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 1290
+3575 a 0 3877 a Fm(4.3.4)99 b Fc(sane)p 545 3877 30 4
+v 35 w(open)0 4107 y Fq(This)26 b(function)h(is)f(used)h(to)e
+(establish)j(a)e(connection)j(to)c(a)g(particular)k(de)n(vice.)36
+b(The)26 b(name)f(of)h(the)g(de)n(vice)h(to)f(be)f(opened)0
+4219 y(is)j(passed)i(in)e(ar)n(gument)i Fp(name)p Fq(.)40
+b(If)28 b(the)h(call)g(completes)h(successfully)-6 b(,)33
+b(a)27 b(handle)j(for)f(the)f(de)n(vice)i(is)e(returned)i(in)e
+Fp(*h)p Fq(.)0 4253 y
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+ 0 4253 a 0 4253 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 0 4253 a 79 x
+Fq(The)d(description)j(of)c(the)i(de)n(vice)g(is)f(returned)i(in)e
+Fp(**device)p 2040 4332 28 4 v 29 w(description)p Fq(.)i(This)e(is)f
+(the)i(same)f(description)j(that)0 4445 y(is)h(returned)j(in)d(the)h
+(list)g(by)f Fp(sane)p 1144 4445 V 31 w(get)p 1340 4445
+V 32 w(devices)p Fq(.)42 b(The)29 b(returned)i(data)g
+Fp(*h)c Fq(and)j Fp(*device)p 3186 4445 V 30 w(description)23
+b Fq(is)0 4558 y(guaranteed)j(to)e(remain)g(unchanged)j(and)c(v)n(alid)
+i(until)f(a)f(call)h(to)g Fp(sane)p 2288 4558 V 30 w(close\(\))c
+Fq(is)j(performed.)3231 4558 y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+ 3231 4558 a 3231 4558
+a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 3231 4558 a 3231 4558 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 3231 4558 a 28 w Fq(As)g(a)g(special)i(case,)
+0 4671 y(specifying)33 b(a)d(zero-length)j(string)f(as)e(the)h(de)n
+(vice)g(requests)h(opening)h(the)d(\002rst)g(a)n(v)n(ailable)j(de)n
+(vice)e(\(if)f(there)h(is)g(such)g(a)0 4784 y(de)n(vice\).)227
+5019 y Fp(SANE_Status)50 b(sane_open)g(\(SANE_String_Co)o(nst)e(name,)k
+(SANE_Handle)d(*)55 b(h,)227 5132 y(const)e(SANE_Device)c(**)54
+b(device_descrip)o(ti)o(on\))o(;)1905 5381 y Fq(27)p
+eop
+%%Page: 28 29
+28 28 bop 0 123 a Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g
+(of)f(the)h(follo)n(wing)h(status)g(codes.)227 369 y
+Fp(SANE)p 452 369 28 4 v 31 w(STATUS)p 813 369 V 30 w(DEVICE)p
+1173 369 V 30 w(BUSY)p Fr(:)44 b Fq(The)23 b(de)n(vice)i(is)e
+(currently)j(b)n(usy)f(\(in)f(use)f(by)h(somebody)i(else\).)227
+515 y Fp(SANE)p 452 515 V 31 w(STATUS)p 813 515 V 30
+w(INVAL)p Fr(:)44 b Fq(The)23 b(de)n(vice)h(name)g(is)f(not)h(v)n
+(alid.)227 661 y Fp(SANE)p 452 661 V 31 w(STATUS)p 813
+661 V 30 w(IO)p 953 661 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+808 y Fp(SANE)p 452 808 V 31 w(STATUS)p 813 808 V 30
+w(NO)p 953 808 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 954
+y Fp(SANE)p 452 954 V 31 w(STATUS)p 813 954 V 30 w(ACCESS)p
+1173 954 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)g(de)n(vice)
+h(has)f(been)h(denied)h(due)e(to)g(insuf)n(\002cient)427
+1067 y(or)24 b(in)l(v)n(alid)h(authentication.)0 1374
+y Fm(4.3.5)99 b Fc(sane)p 545 1374 30 4 v 35 w(close)0
+1607 y Fq(This)32 b(function)h(terminates)h(the)e(association)j
+(between)e(the)f(de)n(vice)h(handle)g(passed)g(in)f(ar)n(gument)h
+Fp(h)e Fq(and)h(the)g(de)n(vice)0 1720 y(it)h(represents.)59
+b(If)33 b(the)g(de)n(vice)h(is)f(presently)j(acti)n(v)o(e,)f(a)e(call)g
+(to)g Fp(sane)p 2326 1720 28 4 v 31 w(cancel\(\))c Fq(is)j(performed)j
+(\002rst.)57 b(After)33 b(this)0 1833 y(function)26 b(returns,)f
+(handle)g Fp(h)d Fq(must)i(not)f(be)h(used)g(an)o(ymore.)227
+2105 y Fp(void)53 b(sane_close)d(\(SANE_Handle)f(h\);)0
+2412 y Fm(4.3.6)99 b Fc(sane)p 545 2412 30 4 v 35 w(get)p
+760 2412 V 35 w(option)p 1155 2412 V 35 w(descriptor)0
+2645 y Fq(This)33 b(function)i(is)e(used)h(to)f(access)i(option)f
+(descriptors.)61 b(The)32 b(function)k(returns)e(the)g(option)h
+(descriptor)g(for)f(option)0 2758 y(number)i Fp(n)e Fq(of)h(the)h(de)n
+(vice)h(represented)h(by)d(handle)i Fp(h)p Fq(.)63 b(Option)36
+b(number)g(0)f(is)g(guaranteed)k(to)c(be)g(a)g(v)n(alid)h(option.)0
+2871 y(Its)26 b(v)n(alue)h(is)f(an)h(inte)o(ger)g(that)g(speci\002es)g
+(the)g(number)g(of)f(options)i(that)f(are)f(a)n(v)n(ailable)j(for)d(de)
+n(vice)i(handle)f Fp(h)e Fq(\(the)i(count)0 2984 y(includes)22
+b(option)f(0\).)28 b(If)19 b Fh(n)g Fq(is)h(not)g(a)f(v)n(alid)i
+(option)g(inde)o(x,)g(the)f(function)i(returns)g Fp(NULL)p
+Fq(.)17 b(The)i(returned)j(option)f(descriptor)0 3097
+y(is)i(guaranteed)k(to)c(remain)i(v)n(alid)f(\(and)g(at)f(the)h
+(returned)i(address\))g(until)e(the)g(de)n(vice)h(is)e(closed.)227
+3368 y Fp(const)53 b(SANE_Option_De)o(sc)o(ri)o(pt)o(or)48
+b(*)445 3481 y(sane_get_option_)o(de)o(sc)o(ri)o(pto)o(r)g
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(n\);)0 3789 y Fm(4.3.7)99
+b Fc(sane)p 545 3789 V 35 w(control)p 1000 3789 V 34
+w(option)0 4022 y Fq(This)31 b(function)h(is)f(used)g(to)g(set)g(or)g
+(inquire)h(the)f(current)h(v)n(alue)g(of)e(option)j(number)e
+Fp(n)f Fq(of)g(the)h(de)n(vice)h(represented)i(by)0 4135
+y(handle)26 b Fp(h)p Fq(.)k(The)24 b(manner)i(in)e(which)h(the)f
+(option)i(is)f(controlled)i(is)d(speci\002ed)i(by)f(parameter)h
+Fp(a)p Fq(.)k(The)24 b(possible)j(v)n(alues)e(of)0 4248
+y(this)g(parameter)h(are)e(described)j(in)d(more)g(detail)h(belo)n(w)-6
+b(.)31 b(The)24 b(v)n(alue)h(of)f(the)g(option)i(is)e(passed)i(through)
+g(ar)n(gument)g Fp(v)p Fq(.)j(It)0 4361 y(is)21 b(a)f(pointer)j(to)e
+(the)g(memory)h(that)f(holds)h(the)g(option)g(v)n(alue.)29
+b(The)20 b(memory)i(area)f(pointed)i(to)e(by)g Fp(v)f
+Fq(must)h(be)g(big)g(enough)0 4474 y(to)26 b(hold)g(the)g(entire)h
+(option)h(v)n(alue)e(\(determined)i(by)e(member)g Fp(size)d
+Fq(in)j(the)g(corresponding)k(option)d(descriptor\).)39
+b(The)0 4587 y(only)23 b(e)o(xception)i(to)d(this)g(rule)h(is)f(that)h
+(when)f(setting)i(the)f(v)n(alue)g(of)f(a)g(string)h(option,)h(the)e
+(string)i(pointed)g(to)e(by)g(ar)n(gument)0 4700 y Fp(v)33
+b Fq(may)i(be)f(shorter)j(since)e(the)g(back)o(end)i(will)d(stop)h
+(reading)i(the)e(option)h(v)n(alue)f(upon)h(encountering)i(the)d
+(\002rst)f Fp(NUL)0 4812 y Fq(terminator)c(in)e(the)g(string.)44
+b(If)28 b(ar)n(gument)i Fp(i)c Fq(is)i(not)h Fp(NULL)p
+Fq(,)c(the)j(v)n(alue)h(of)f Fp(*i)e Fq(will)i(be)g(set)g(to)g(pro)o
+(vide)i(details)g(on)e(ho)n(w)0 4925 y(well)23 b(the)h(request)h(has)f
+(been)h(met.)j(The)23 b(meaning)i(of)e(this)h(ar)n(gument)i(is)d
+(described)j(in)e(more)f(detail)i(belo)n(w)-6 b(.)1905
+5381 y(28)p eop
+%%Page: 29 30
+29 29 bop 227 123 a Fp(SANE_Status)50 b(sane_control_o)o(pti)o(on)e
+(\(SANE_Handle)h(h,)k(SANE_Int)e(n,)2027 236 y(SANE_Action)f(a,)j(void)
+g(*v,)2027 349 y(SANE_Int)e(*)j(i\);)0 595 y Fq(The)21
+b(w)o(ay)h(the)f(option)j(is)d(af)n(fected)i(by)f(a)f(call)h(to)g(this)
+g(function)i(is)d(controlled)k(by)c(parameter)j Fp(a)c
+Fq(which)i(is)f(a)g(v)n(alue)i(of)e(type)0 708 y Fp(SANE)p
+225 708 28 4 v 31 w(Action)p Fq(.)k(The)e(possible)j(v)n(alues)f(and)f
+(their)g(meaning)h(is)e(described)j(in)e(T)-7 b(able)23
+b(4.7.)p 185 831 3531 4 v 183 943 4 113 v 628 910 a Fr(Symbol)p
+1363 943 V 1363 943 V 493 w(Code)p 1664 943 V 1664 943
+V 850 w(Description)p 3714 943 V 185 947 3531 4 v 185
+963 V 183 1076 4 113 v 234 1042 a Fp(SANE)p 459 1042
+28 4 v 31 w(ACTION)p 820 1042 V 30 w(GET)p 1015 1042
+V 32 w(VALUE)p 1363 1076 4 113 v 254 w Fq(0)p 1664 1076
+V 100 w(Get)g(current)i(option)g(v)n(alue.)p 3714 1076
+V 183 1415 4 339 v 234 1155 a Fp(SANE)p 459 1155 28 4
+v 31 w(ACTION)p 820 1155 V 30 w(SET)p 1015 1155 V 32
+w(VALUE)p 1363 1415 4 339 v 254 w Fq(1)p 1664 1415 V
+100 w(Set)e(option)i(v)n(alue.)31 b(The)24 b(option)h(v)n(alue)g
+(passed)h(through)g(ar)n(-)1716 1268 y(gument)21 b Fp(v)d
+Fq(may)i(be)g(modi\002ed)g(by)h(the)f(back)o(end)i(if)e(the)g(v)n(alue)
+1716 1381 y(cannot)25 b(be)e(set)h(e)o(xactly)-6 b(.)p
+3714 1415 V 183 1980 4 565 v 234 1494 a Fp(SANE)p 459
+1494 28 4 v 31 w(ACTION)p 820 1494 V 30 w(SET)p 1015
+1494 V 32 w(AUTO)p 1363 1980 4 565 v 309 w Fq(2)p 1664
+1980 V 100 w(T)l(urn)26 b(on)h(automatic)h(mode.)38 b(Back)o(end)28
+b(or)f(de)n(vice)g(will)g(au-)1716 1607 y(tomatically)39
+b(select)g(an)e(appropriate)k(v)n(alue.)71 b(This)38
+b(mode)1716 1720 y(remains)e(ef)n(fecti)n(v)o(e)h(until)f(o)o(v)o
+(erridden)i(by)e(an)g(e)o(xplicit)h(set)1716 1833 y(v)n(alue)22
+b(request.)30 b(The)22 b(v)n(alue)h(of)f(parameter)h
+Fp(v)e Fq(is)h(completely)1716 1946 y(ignored)j(in)f(this)g(case)g(and)
+g(may)f(be)h Fp(NULL)p Fq(.)p 3714 1980 V 185 1983 3531
+4 v 1168 2136 a(T)-7 b(able)24 b(4.7:)29 b(Action)24
+b(V)-10 b(alues)24 b(\()p Fp(SANE)p 2348 2136 28 4 v
+31 w(Action)p Fq(\))0 2445 y(After)j(setting)h(a)e(v)n(alue)h(via)g(an)
+g(action)h(v)n(alue)f(of)g Fp(SANE_ACTION_SE)o(T_)o(VA)o(LUE)o
+Fq(,)20 b(additional)29 b(information)g(on)e(ho)n(w)0
+2558 y(well)f(the)g(request)i(has)e(been)h(met)e(is)h(returned)i(in)e
+Fp(*i)e Fq(\(if)i Fp(i)f Fq(is)h(non-)p Fp(NULL)p Fq(\).)f(The)h
+(returned)i(v)n(alue)e(is)g(a)g(bitset)h(that)f(may)0
+2671 y(contain)f(an)o(y)f(combination)i(of)e(the)g(v)n(alues)g
+(described)i(in)e(T)-7 b(able)23 b(4.8.)0 2842 y(This)g(function)j(may)
+d(f)o(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+3089 y Fp(SANE)p 452 3089 V 31 w(STATUS)p 813 3089 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)25 b(operation)k(is)c(not)h
+(supported)j(for)d(the)g(speci\002ed)h(handle)g(and)427
+3202 y(option)e(number)-5 b(.)227 3348 y Fp(SANE)p 452
+3348 V 31 w(STATUS)p 813 3348 V 30 w(INVAL)p Fr(:)44
+b Fq(The)23 b(option)i(v)n(alue)f(is)g(not)f(v)n(alid.)227
+3494 y Fp(SANE)p 452 3494 V 31 w(STATUS)p 813 3494 V
+30 w(IO)p 953 3494 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occured)g(while)f(communicating)i(with)e(the)f(de)n(vice.)227
+3640 y Fp(SANE)p 452 3640 V 31 w(STATUS)p 813 3640 V
+30 w(NO)p 953 3640 V 32 w(MEM)p Fr(:)44 b Fq(An)23 b(insuf)n(\002cent)i
+(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227 3786
+y Fp(SANE)p 452 3786 V 31 w(STATUS)p 813 3786 V 30 w(ACCESS)p
+1173 3786 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30 b(to)f(the)h(option)h
+(has)e(been)h(denied)h(due)f(to)f(insuf)n(\002cient)427
+3899 y(or)24 b(in)l(v)n(alid)h(authentication.)0 4207
+y Fm(4.3.8)99 b Fc(sane)p 545 4207 30 4 v 35 w(get)p
+760 4207 V 35 w(parameters)0 4440 y Fq(This)28 b(function)i(is)e(used)h
+(to)e(obtain)j(the)e(current)i(scan)f(parameters.)44
+b(The)27 b(returned)j(parameters)g(are)e(guaranteed)j(to)d(be)0
+4553 y(accurate)d(between)f(the)f(time)g(a)f(scan)i(has)f(been)h
+(started)h(\()p Fp(sane)p 2070 4553 28 4 v 31 w(start\(\))19
+b Fq(has)k(been)h(called\))g(and)g(the)f(completion)i(of)0
+4666 y(that)30 b(request.)47 b(Outside)30 b(of)f(that)h(windo)n(w)-6
+b(,)30 b(the)g(returned)h(v)n(alues)g(are)e(best-ef)n(fort)j(estimates)
+e(of)g(what)f(the)g(parameters)0 4779 y(will)23 b(be)g(when)g
+Fp(sane)p 716 4779 V 31 w(start\(\))d Fq(gets)j(in)l(v)n(ok)o(ed.)32
+b(Calling)24 b(this)g(function)h(before)g(a)e(scan)h(has)f(actually)i
+(started)g(allo)n(ws,)0 4891 y(for)c(e)o(xample,)h(to)e(get)h(an)g
+(estimate)g(of)g(ho)n(w)f(big)h(the)g(scanned)h(image)f(will)g(be.)27
+b(The)21 b(parameters)h(passed)g(to)f(this)g(function)0
+5004 y(are)27 b(the)g(handle)i Fp(h)c Fq(of)i(the)g(de)n(vice)h(for)f
+(which)h(the)f(parameters)i(should)f(be)f(obtained)i(and)f(a)e(pointer)
+j Fp(p)c Fq(to)i(a)g(parameter)0 5117 y(structure.)k(The)23
+b(parameter)i(structure)h(is)d(described)k(in)c(more)h(detail)g(belo)n
+(w)-6 b(.)1905 5381 y(29)p eop
+%%Page: 30 31
+30 30 bop 0 463 3913 4 v -2 576 4 113 v 634 543 a Fr(Symbol)p
+1560 576 V 1560 576 V 684 w(Code)p 1861 576 V 1861 576
+V 850 w(Description)p 3911 576 V 0 580 3913 4 v 0 596
+V -2 1951 4 1355 v 50 675 a Fp(SANE)p 275 675 28 4 v
+31 w(INFO)p 526 675 V 31 w(INEXACT)p 1560 1951 4 1355
+v 831 w Fq(1)p 1861 1951 V 100 w(This)20 b(v)n(alue)i(is)e(returned)i
+(when)f(setting)h(an)f(option)h(v)n(alue)f(re-)1913 788
+y(sulted)30 b(in)f(a)f(v)n(alue)i(being)g(selected)h(that)e(does)h(not)
+f(e)o(xactly)1913 901 y(match)e(the)h(requested)h(v)n(alue.)40
+b(F)o(or)26 b(e)o(xample,)j(if)e(a)f(scanner)1913 1014
+y(can)g(adjust)h(the)g(resolution)h(in)e(increments)i(of)e(30dpi)h
+(only)-6 b(,)1913 1127 y(setting)34 b(the)e(resolution)k(to)c(307dpi)i
+(may)e(result)h(in)g(an)f(ac-)1913 1240 y(tual)d(setting)i(of)e
+(300dpi.)47 b(When)29 b(this)g(happens,)k(the)c(bitset)1913
+1353 y(returned)j(in)e Fp(*i)f Fq(has)i(this)f(member)h(set.)49
+b(In)30 b(addition,)k(the)1913 1466 y(option)22 b(v)n(alue)f(is)e
+(modi\002ed)i(to)f(re\003ect)h(the)f(actual)h(\(rounded\))1913
+1579 y(v)n(alue)j(that)g(w)o(as)g(used)g(by)g(the)g(back)o(end.)31
+b(Note)24 b(that)g(ine)o(xact)1913 1692 y(v)n(alues)31
+b(are)f(admissible)h(for)f(strings)i(as)d(well.)47 b(A)29
+b(back)o(end)1913 1804 y(may)18 b(choose)j(to)e(\223round\224)i(a)d
+(string)i(to)f(the)g(closest)i(matching)1913 1917 y(le)o(gal)j(string)g
+(for)g(a)f(constrained)k(string)e(v)n(alue.)p 3911 1951
+V -2 2629 4 678 v 50 2030 a Fp(SANE)p 275 2030 28 4 v
+31 w(INFO)p 526 2030 V 31 w(RELOAD)p 887 2030 V 30 w(OPTIONS)p
+1560 2629 4 678 v 471 w Fq(2)p 1861 2629 V 100 w(The)41
+b(setting)i(of)f(an)f(option)j(may)d(af)n(fect)h(the)3489
+1951 y
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 3489 1951 a 3489 1951 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 3489 1951 a 79 x Fq(v)n(alue,)47
+b(the)1913 2143 y(a)n(v)n(ailability)-6 b(,)48 b(or)40
+b(the)h(constraint)i(of)d(one)h(or)g(more)f Fl(other)1913
+2256 y Fq(options.)2277 2256 y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 2277 2256 a 2277 2256
+a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 2277 2256 a 2277 2256 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 2277 2256 a 73 w Fq(When)f(this)h(happens,)k
+(the)39 b(SANE)d(back)o(end)1913 2369 y(sets)f(this)h(member)e(in)h
+Fp(*i)e Fq(to)i(indicate)i(that)e(the)g(applica-)1913
+2482 y(tion)c(should)h(reload)g(all)e(options.)51 b(This)30
+b(member)h(may)f(be)1913 2595 y(set)24 b(if)f(and)h(only)g(if)g(at)f
+(least)h(one)g(option)h(changed.)p 3911 2629 4 678 v
+-2 3419 4 791 v 50 2708 a Fp(SANE)p 275 2708 28 4 v 31
+w(INFO)p 526 2708 V 31 w(RELOAD)p 887 2708 V 30 w(PARAMS)p
+1560 3419 4 791 v 526 w Fq(4)p 1861 3419 V 100 w(The)d(setting)j(of)d
+(an)h(option)h(may)f(af)n(fect)g(the)g(parameter)i(v)n(al-)1913
+2821 y(ues)i(\(see)g Fp(sane)p 2457 2821 28 4 v 30 w(get)p
+2652 2821 V 32 w(parameters\(\))p Fq(\).)k(If)26 b(setting)i(an)1913
+2934 y(option)g(af)n(fects)f(the)g(parameter)h(v)n(alues,)g(this)f
+(member)f(will)1913 3046 y(be)21 b(set)g(in)h Fp(*i)p
+Fq(.)k(Note)21 b(that)h(this)f(member)h(may)e(be)i(set)f(e)n(v)o(en)g
+(if)1913 3159 y(the)i(parameters)i(did)e(not)g(actually)i(change.)30
+b(Ho)n(we)n(v)o(er)l(,)23 b(it)f(is)1913 3272 y(guaranteed)32
+b(that)e(the)g(parameters)h(ne)n(v)o(er)f(change)h(without)1913
+3385 y(this)24 b(member)g(being)g(set.)p 3911 3419 4
+791 v -2 4435 4 1017 v 50 3498 a Fp(SANE)p 275 3498 28
+4 v 31 w(INFO)p 526 3498 V 31 w(INVALIDATE)p 1107 3498
+V 28 w(PREVIEW)p 1560 4435 4 1017 v 253 w Fq(8)p 1861
+4435 V 100 w(The)39 b(setting)i(of)f(an)f(option)i(may)f(af)n(fect)g
+(the)g(v)n(alidity)h(of)1913 3611 y(the)26 b(pre)n(vie)n(w)g(that)h(w)o
+(as)f(acquired)i(by)e(the)g(frontend)i(earlier)-5 b(.)1913
+3724 y(When)31 b(the)f(pre)n(vie)n(w)h(image)g(w)o(ould)g(change)h
+(signi\002cantly)1913 3837 y(if)f(it)f(w)o(as)h(scanned)i(again,)g(the)
+e(SANE)e(back)o(end)k(sets)f(this)1913 3950 y(member)c(in)g
+Fp(*i)f Fq(to)h(indicate)j(that)d(the)h(application)i(should)1913
+4063 y(inform)g(the)g(user)g(of)g(the)g(in)l(v)n(alidity)i(of)d(the)h
+(pre)n(vie)n(w)-6 b(.)51 b(Ex-)1913 4176 y(amples)27
+b(for)f(such)h(option)h(settings)g(may)e(include)i(setting)g(a)1913
+4288 y(dif)n(ferent)d(scan)f(source)g(or)f(signi\002cantly)j(changing)g
+(the)d(e)o(x-)1913 4401 y(posure.)p 3911 4435 V 0 4439
+3913 4 v 702 4592 a(T)-7 b(able)24 b(4.8:)29 b(Additional)c
+(Information)h(Returned)f(When)f(Setting)h(an)e(Option)1905
+5381 y(30)p eop
+%%Page: 31 32
+31 31 bop 227 123 a Fp(SANE_Status)50 b(sane_get_param)o(ete)o(rs)e
+(\(SANE_Handle)h(h,)2027 236 y(SANE_Parameters)f(*)54
+b(p\);)0 507 y Fq(The)32 b(scan)g(parameters)i(are)f(returned)h(in)e(a)
+f(structure)k(of)d(type)g Fp(SANE)p 2314 507 28 4 v 31
+w(Parameters)p Fq(.)49 b(The)32 b(C)f(declaration)k(of)d(this)0
+620 y(structure)26 b(is)d(gi)n(v)o(en)h(belo)n(w)-6 b(.)910
+541 y
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 910 541 a 910 541 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 910 541 a 227 866 a Fp(typedef)52
+b(struct)336 979 y({)445 1092 y(SANE_Frame)e(format;)445
+1205 y(SANE_Int)h(flags;)445 1318 y(SANE_Int)g(lines;)445
+1431 y(SANE_Int)g(depth;)445 1544 y(SANE_Int)g(pixels_per_line;)445
+1657 y(SANE_Int)g(bytes_per_line;)445 1770 y(SANE_Int)g
+(channels_per_ima)o(ge)o(;)445 1882 y(SANE_String)f(format_desc;)445
+1995 y(SANE_String)g(proposed_filena)o(me)o(;)445 2108
+y(SANE_String)g(proposed_commen)o(t;)445 2221 y(SANE_Int)h(dpi_x;)445
+2334 y(SANE_Int)g(dpi_y;)445 2447 y(char)i(reserved[32];)c(/*)k(32)h
+(bytes)e(for)i(future)d(use)j(*/)336 2560 y(})227 2673
+y(SANE_Parameters)o(;)0 2759 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+ 0 2759 a 0 2759 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 0 2759
+a 0 2759 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 0 2759 a 0 2759 a
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 0 2759 a 0 2759 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 0 2759
+a 160 x Fq(Member)38 b Fp(format)d Fq(speci\002es)k(the)f(format)h(of)f
+(the)g(ne)o(xt)h(frame)f(to)g(be)g(returned.)74 b(The)38
+b(possible)i(v)n(alues)f(for)f(type)0 3032 y Fp(SANE)p
+225 3032 28 4 v 31 w(Frame)25 b Fq(are)j(described)j(in)d(T)-7
+b(able)28 b(4.9.)42 b(The)27 b(meaning)j(of)e(these)h(v)n(alues)g(is)f
+(described)i(in)e(more)g(detail)i(in)e(sec-)0 3145 y(tion)k(3.2.)53
+b(The)31 b(frame)h(types)h(used)f(by)g(v)o(ersion)h(1)e(of)h(this)g
+(standard)i(\()p Fp(SANE)p 2554 3145 V 31 w(FRAME)p 2860
+3145 V 31 w(GRAY)p Fq(,)28 b Fp(SANE)p 3382 3145 V 31
+w(FRAME)p 3688 3145 V 31 w(RGB)p Fq(,)0 3258 y Fp(SANE)p
+225 3258 V 31 w(FRAME)p 531 3258 V 30 w(RED)p Fq(,)23
+b Fp(SANE)p 992 3258 V 31 w(FRAME)p 1298 3258 V 30 w(GREEN)p
+Fq(,)f(and)k Fp(SANE)p 2024 3258 V 30 w(FRAME)p 2329
+3258 V 31 w(BLUE)p Fq(\))d(are)i(obsolete)i(and)f(superseded)i(by)d
+(the)0 3371 y(frame)f(type)g Fp(SANE)p 639 3371 V 31
+w(FRAME)p 945 3371 V 30 w(RAW)p Fq(.)0 3490 y
+ -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch
+pop /CBarY65 exch def
+ 0 3490
+a 0 3490 a
+ 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint
+exch pop /CBarY66 exch def
+ 0 3490 a 624 3493 2653 4 v 622 3606 4 113
+v 914 3572 a Fr(Symbol)p 1496 3606 V 1496 3606 V 341
+w(Code)p 1798 3606 V 1798 3606 V 563 w(Description)p
+3275 3606 V 624 3610 2653 4 v 624 3626 V 622 3739 4 113
+v 673 3705 a Fp(SANE)p 898 3705 28 4 v 31 w(FRAME)p 1204
+3705 V 31 w(RAW)p 1496 3739 4 113 v 309 w Fq(5)p 1798
+3739 V 100 w(Arbitrary)h(pix)o(el)f(property)i(transmission.)p
+3275 3739 V 622 3852 V 673 3818 a Fp(SANE)p 898 3818
+28 4 v 31 w(FRAME)p 1204 3818 V 31 w(MIME)p 1496 3852
+4 113 v 254 w Fq(6)p 1798 3852 V 100 w(Data)e(described)i(by)d(a)g
+(mime)g(descriptor)-5 b(.)p 3275 3852 V 624 3855 2653
+4 v 1194 4009 a(T)e(able)23 b(4.9:)29 b(Frame)23 b(F)o(ormat)g(\()p
+Fp(SANE)p 2377 4009 28 4 v 31 w(Frame)p Fq(\))0 4124
+y
+ -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch
+pop /CBarY67 exch def
+ 0 4124 a 0 4124 a
+ 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint
+exch pop /CBarY68 exch def
+ 0 4124 a 0 4124 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore
+ 0 4124 a 193 x
+Fq(The)e Fp(flags)e Fq(member)j(is)g(a)g(32)g(bit)g(bit\002eld,)g(for)h
+(which)f(up)g(to)g(no)n(w)f(4)h(informational)j(bits)d(are)g
+(de\002ned,)h(all)f(unused)i(bits)0 4430 y(ha)n(v)o(e)g(to)g(be)f(set)h
+(to)f(0:)136 4702 y Fk(\017)46 b Fp(SANE)p 452 4702 28
+4 v 31 w(PFLAG)p 758 4702 V 31 w(LAST)p 1009 4702 V 31
+w(FRAME)27 b Fq(\(bit)j(0,)i(bitv)n(alue)g(1\))e(is)g(set)g(to)g(1)g
+(if)g(and)h(only)g(if)f(the)h(frame)f(that)h(is)f(currently)227
+4814 y(being)d(acquired)g(\(or)e(the)h(frame)f(that)h(will)f(be)g
+(acquired)i(ne)o(xt)f(if)f(there)h(is)f(no)g(current)i(frame\))f(is)f
+(the)g(only)h(frame)227 4927 y(or)c(the)h(last)g(frame)f(of)g(a)g
+(multi)g(frame)h(image)f(\(e.g.,)g(the)h(current)h(frame)e(is)g(the)h
+(blue)g(component)h(of)e(a)g(red,)g(green,)227 5040 y(blue)j(image\).)0
+5060 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 0 5060 a 0 5060 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 0 5060 a 0 5060 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 0 5060 a 1905
+5381 a Fq(31)p eop
+%%Page: 32 33
+32 32 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fp(SANE)p 452 123 28 4 v 31 w(PFLAG)p 758 123 V 31
+w(MORE)p 1009 123 V 31 w(IMAGES)23 b Fq(\(bit)k(1,)h(bitv)n(alue)g(2\))
+f(is)g(set)g(to)g(1)g(to)f(indicate)j(further)g(pending)g(images.)40
+b(The)227 236 y(frontend)27 b(is)d(e)o(xpected)i(to)e(call)g
+Fp(sane)p 1461 236 V 31 w(start)d Fq(again)k(after)g(the)f(end)h(of)f
+(the)g(current)i(scan)f(to)f(get)h(more)f(images,)227
+349 y(e.g.)38 b(from)27 b(an)f(automatic)j(document)f(feeder)-5
+b(.)39 b(It)27 b(is)f(permissible)j(to)e(set)f(that)i(v)n(alue)f(to)g
+(1)f(\223in)h(good)g(f)o(aith\224,)i(as)d(it)227 462
+y(has)f(to)g(be)f(determined)j(at)e(a)f(v)o(ery)h(early)g(time,)g
+(where)g(it)f(might)h(not)g(be)g(detectable,)i(if)d(there)i(actually)g
+(are)f(more)227 574 y(images)d(to)f(transfer)-5 b(.)30
+b(E.g.)d(you)22 b(will)e(usually)j(not)f(kno)n(w)f(if)g(the)g(document)
+i(feeder)g(contains)g(further)g(pages)f(when)227 687
+y(starting)j(to)f(scan)g(the)f(current)i(one.)k(Thus)23
+b(you)h(are)f(allo)n(wed)h(to)f(set)h(that)g(bit)f(b)n(ut)h(later)g(f)o
+(ail)f(at)h Fp(sane)p 3470 687 V 30 w(start\(\))p Fq(.)136
+866 y Fk(\017)46 b Fp(SANE)p 452 866 V 31 w(PFLAG)p 758
+866 V 31 w(NEW)p 954 866 V 31 w(PAGE)18 b Fq(\(bit)j(2,)g(bitv)n(alue)h
+(4\))f(is)f(set)h(to)g(1)f(to)h(indicate)i(that)e(the)g(current)h
+(frame)f(comes)g(from)g(a)227 979 y(ne)n(w)i(physical)i(page.)30
+b(This)23 b(bit)h(is)f(of)g(informational)k(character)f(only)e(to)f
+(help)h(frontends)i(to)e(group)h(multi-image)227 1091
+y(scans.)136 1270 y Fk(\017)46 b Fp(SANE)p 452 1270 V
+31 w(PFLAG)p 758 1270 V 31 w(BACKSIDE)16 b Fq(\(bit)21
+b(3,)f(bitv)n(alue)j(8\))d(tells)i(if)e(the)h(current)h(image)f(w)o(as)
+f(acquired)j(from)e(the)f(front)i(\(0\))227 1383 y(or)27
+b(backside)h(\(1\))f(of)f(the)h(currently)i(processed)g(sheet.)38
+b(It)26 b(is)g(of)h(informational)i(character)g(and)e(allo)n(ws)g(to)f
+(group)227 1496 y(and)e(order)h(multi-image)g(transfers)h(re)o
+(gardless)f(of)f(scanner)h(acquisition)i(order)d(\(front)h
+(\002rst/back)g(\002rst\).)0 1727 y(Note,)e(that)i Fp(flags)20
+b Fq(is)k(compatible)i(to)e(member)f Fp(last)p 1827 1727
+V 31 w(frame)e Fq(of)j Fp(SANE)p 2473 1727 V 31 w(Parameters)18
+b Fq(of)24 b(SANE)d(standard)26 b(v)o(er)n(-)0 1840 y(sion)e(1)f
+(\(same)h(size)g(and)g(only)h(bit)e(0)h(\(bitv)n(alue)h(1\))f(w)o(as)f
+(used)h(with)g(same)f(function\).)2744 1840 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 2744 1840
+a 2744 1840 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 2744 1840 a 2744 1840 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 2744 1840 a 0 2001
+a Fq(Member)33 b Fp(lines)d Fq(speci\002es)35 b(ho)n(w)d(man)o(y)h
+(scan)h(lines)g(the)g(frame)f(is)g(comprised)i(of.)57
+b(If)33 b(this)h(v)n(alue)g(is)f(-1,)i(the)e(num-)0 2114
+y(ber)e(of)h(lines)g(is)f(not)g(kno)n(wn)h(a)e(priori)j(and)e(the)h
+(frontend)h(should)g(call)f Fp(sane)p 2572 2114 28 4
+v 31 w(read\(\))27 b Fq(until)32 b(it)f(returns)i(a)e(status)h(of)0
+2227 y Fp(SANE)p 225 2227 V 31 w(STATUS)p 586 2227 V
+30 w(EOF)p Fq(.)820 2148 y
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 820 2148 a 820 2148 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 820
+2148 a 79 x Fq(Note,)22 b(that)i(e)n(v)o(en)f(when)g(transferring)k
+(formats)d(that)g(ha)n(v)o(e)f(this)h(information)h(inband,)g(it)e(is)g
+(rec-)0 2340 y(ommended)28 b(to)f(set)g(that)h(member)l(,)g(if)f(a)n(v)
+n(ailable.)42 b(If)26 b(una)n(v)n(ailable)31 b(or)c(not)g(applicable,)k
+(set)c(to)g(-1)g(as)g(mentioned)i(abo)o(v)o(e.)0 2453
+y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 2453 a 0 2453 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 2453 a 0 2453 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 2453 a 160 x
+Fq(Member)d Fp(bytes)p 613 2613 28 4 v 31 w(per)p 809
+2613 V 31 w(line)e Fq(speci\002es)j(the)g(number)g(of)f(bytes)h(that)g
+(comprise)h(one)f(scan)g(line.)3235 2534 y
+ -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch
+pop /CBarY73 exch def
+ 3235 2534
+a 3235 2534 a
+ 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint
+exch pop /CBarY74 exch def
+ 3235 2534 a 79 x Fq(If)f(this)h(v)n(alue)g(is)f(not)0
+2726 y(applicable)g(for)d(image)h(data)g(of)f(type)h
+Fp(SANE)p 1445 2726 28 4 v 31 w(FRAME)p 1751 2726 V 30
+w(MIME)p Fq(,)d(it)h(must)i(be)f(set)g(to)g(-1.)29 b(In)23
+b(this)h(case)g(the)f(frontend)j(should)0 2839 y(just)e(call)g
+Fp(sane)p 533 2839 V 31 w(read)d Fq(until)j Fp(SANE)p
+1214 2839 V 31 w(STATUS)p 1575 2839 V 30 w(EOF)e Fq(is)h(returned.)2224
+2839 y
+ -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch
+pop /CBarY75 exch def
+ 2224 2839 a 2224 2839 a
+ 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint
+exch pop /CBarY76 exch def
+ 2224 2839 a 2224 2839
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore
+ 2224 2839 a 0 3000 a Fq(Member)32 b Fp(depth)d Fq(speci\002es)34
+b(the)e(number)h(of)f(bits)h(per)g(sample.)2191 2920
+y
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 2191 2920 a 2191 2920 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 2191 2920 a 80 x Fq(Note,)h(that)f(only)g(-1)
+f(\(for)g(not)h(applicable\),)k(1,)d(and)0 3112 y(multiples)28
+b(of)e(8)g(are)g(allo)n(wed)h(v)n(alues.)37 b(Data)26
+b(with)g(other)h(depths)h(has)e(to)g(be)h(scaled)g(up)f(accordingly)-6
+b(.)40 b(Depth)27 b(1)e(is)h(only)0 3225 y(allo)n(wed)e(if)g(the)f
+(image)h(consists)i(of)d(a)g(single)i(channel)h(\(lineart)f(or)f
+(halftone)h(modes\).)2806 3225 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 2806 3225 a 2806 3225
+a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 2806 3225 a 2806 3225 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 2806 3225 a 0 3386 a Fq(Member)g
+Fp(pixels)p 667 3386 28 4 v 30 w(per)p 862 3386 V 32
+w(line)d Fq(speci\002es)27 b(the)f(number)g(of)f(pix)o(els)h(that)g
+(comprise)h(one)e(scan)h(line.)3300 3307 y
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 3300 3307
+a 3300 3307 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 3300 3307 a 79 x Fq(If)f(una)n(v)n(ailable)j(or)0
+3499 y(not)c(applicable,)i(set)e(to)f(-1.)902 3499 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+
+902 3499 a 902 3499 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 902 3499 a 902 3499 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 902 3499
+a 0 3659 a Fq(Assume)28 b Fh(B)j Fq(is)c(the)h(number)g(of)f(channels)j
+(in)d(the)h(frame,)g(then)h(the)e(bit)h(depth)h Fh(d)d
+Fq(\(as)i(gi)n(v)o(en)g(by)g(member)f Fp(depth)p Fq(\))e(and)0
+3772 y(the)e(number)i(of)e(pix)o(els)h(per)f(line)h Fh(n)e
+Fq(\(as)i(gi)n(v)o(en)f(by)h(this)f(member)h Fp(pixels)p
+2416 3772 28 4 v 30 w(per)p 2611 3772 V 31 w(line)p Fq(\))d(are)i
+(related)i(to)e Fh(c)p Fq(,)g(the)g(number)0 3885 y(of)g(bytes)i(per)f
+(line)g(\(as)g(gi)n(v)o(en)g(by)f(member)h Fp(bytes)p
+1675 3885 V 31 w(per)p 1871 3885 V 31 w(line)p Fq(\))d(as)j(follo)n
+(ws:)2590 3806 y
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 2590 3806 a 2590 3806 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 2590 3806 a
+1368 4124 a Fh(c)i(>)p Fj(=)1599 3980 y Fb(\()1708 4067
+y Fk(d)p Fh(B)f Fk(\001)20 b Fh(n=)p Fj(8)p Fk(e)116
+b Fq(if)24 b Fh(d)h Fj(=)g(1)1708 4180 y Fh(B)f Fk(\001)d
+Fh(n)f Fk(\001)g Fh(d=)p Fj(8)84 b Fq(if)24 b Fh(d)h(>)g
+Fj(1)0 4359 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 4359 a 0 4359 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 4359 a 0 4359 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 4359
+a 26 w Fq(Note)h(that)h(the)f(number)h(of)g(bytes)g(per)g(line)g(can)f
+(be)h(lar)n(ger)g(than)h(the)e(minimum)g(v)n(alue)h(imposed)h(by)e(the)
+h(right)g(side)g(of)0 4472 y(this)d(equation.)31 b(A)22
+b(frontend)k(must)e(be)f(able)h(to)g(properly)i(cope)e(with)f(such)i
+(\223padded\224)h(image)e(formats.)0 4491 y
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 4491 a
+0 4491 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 4491 a 141 x Fq(Member)f Fp(channels)p 775
+4632 28 4 v 29 w(per)p 969 4632 V 31 w(image)d Fq(speci\002es)j(the)g
+(number)h(of)e(channels)j(the)e(image)f(consists)j(of.)j(When)23
+b(the)g(image)0 4745 y(is)29 b(transmitted)i(in)e(more)g(than)g(one)h
+(frame)f Fp(channels)p 1869 4745 V 29 w(per)p 2063 4745
+V 31 w(image)d Fq(has)j(to)g(be)g(the)g(same)g(for)g(all)g(frames)h
+(for)f(this)0 4858 y(image.)0 5019 y(Member)f Fp(format)p
+670 5019 V 30 w(desc)e Fq(is)i(used)g(to)g(describe)j(the)d(details)i
+(of)e(the)g(frame)g(formats.)43 b(Its)29 b(meaning)g(dif)n(fers)g
+(between)0 5132 y(the)24 b(tw)o(o)f(formats:)0 5133 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+
+0 5133 a 0 5133 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 5133 a 0 5133 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 5133 a 1905 5381
+a Fq(32)p eop
+%%Page: 33 34
+33 33 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 32 a 136 123 a Fk(\017)46
+b Fp(SANE)p 452 123 28 4 v 31 w(FRAME)p 758 123 V 31
+w(RAW)p Fq(:)26 b(The)h Fp(format)p 1503 123 V 30 w(desc)e
+Fq(contains)30 b(a)e(description)j(of)c(the)i(channel)g(data)g(and)f
+(an)g(optional)227 236 y(depth)d(information)h(separated)g(by)e(a)f
+(colon\(:\).)227 386 y(A)g(plane)h(is)g(descibed)h(by)f(one)g(channel,)
+h(e.g.)k(\223)p Fp(gray)p Fq(\224)21 b(or)j(\223)p Fp(gray:12)p
+Fq(\224.)227 536 y(Channel)h(interlea)n(v)o(ed)i(data)d(is)g(described)
+i(by)e(a)g(comma)f(separated)k(list)d(of)f(channel)j(descriptions,)h
+(for)d(e)o(xample)227 649 y(\223)p Fp(red,green,blue)p
+Fq(\224)14 b(or)21 b(\223)p Fp(red:8,green:8,b)o(lu)o(e:)o(8)p
+Fq(\224,)14 b(the)21 b(channel)h(data)f(is)f(sent)h(in)g(the)f(gi)n(v)o
+(en)h(order)-5 b(.)227 799 y(The)24 b(depth)i(information)h(does)e
+Fr(not)f Fq(de\002ne)h(the)g(size)g(of)f(the)h(transmitted)i(channel)f
+(data,)g(it)e(is)g(only)h(an)g(informa-)227 912 y(tion)f(for)g(the)g
+(frontend.)31 b(The)23 b(channel)i(data)g(has)f(to)f(be)h(sent)g(in)f
+(the)h(size)g(de\002ned)g(by)g(member)g Fp(depth)p Fq(.)227
+1063 y(W)-7 b(ell)33 b(kno)n(wn)h(channels)h(are)e Fp(red)p
+Fq(,)h Fp(green)p Fq(,)e Fp(blue)e Fq(and)k Fp(gray)p
+Fq(.)55 b(It)33 b(also)h(is)f(allo)n(wed)g(to)h(use)f(other)h(channel)
+227 1176 y(descriptions,)g(e.g.)45 b(if)29 b(you)h(use)f(an)g(infrared)
+j(camera)d(or)g(scanner)i(it)e(could)h(be)g Fp(infrared)24
+b Fq(or)29 b(a)g(w)o(a)n(v)o(elength)227 1288 y(description)e(lik)o(e)e
+Fp(1100nm)p Fq(,)20 b(b)n(ut)25 b(be)f(a)o(w)o(are)g(that)g(a)g
+(frontend)i(may)e(not)g(be)g(able)h(to)f(display)h(such)g(channels)h
+(with)227 1401 y(useful)f(colors.)227 1552 y(Note)30
+b(that)g(an)f(image)h(can)f(be)h(sent)g(in)f(single)i(planes,)h(in)d
+(one)h(interlea)n(v)o(ed)i(frame)e(that)g(contains)h(all)f(channels)227
+1665 y(or)d(in)g(se)n(v)o(eral)h(frames)f(that)h(contain)g(one)g(or)f
+(more)f(\(interlea)n(v)o(ed\))31 b(channels.)41 b(When)27
+b(an)g(RGB)e(image)i(is)g(sent)g(it)227 1777 y(is)e(prefered)i(to)e
+(send)g(the)g(image)h(data)f(in)g(one)g(interlea)n(v)o(ed)j(frame)d
+(that)g(consist)i(of)e(red,)g(green)h(and)f(blue)h(data)f(in)227
+1890 y(this)f(order)-5 b(.)30 b(The)23 b(number)i(of)e(channels)j(is)d
+(de\002ned)i(in)e(member)h Fp(channels)p 2756 1890 V
+29 w(per)p 2950 1890 V 31 w(image)p Fq(.)136 2078 y Fk(\017)46
+b Fp(SANE)p 452 2078 V 31 w(FRAME)p 758 2078 V 31 w(MIME)p
+Fq(:)227 2228 y Fp(format)p 562 2228 V 30 w(desc)28 b
+Fq(contains)33 b(the)e(MIME)e(Content-T)-7 b(ype:)45
+b(header)32 b(\002eld)f(as)f(described)j(in)e(RFC)e(1521)i(\(section)
+227 2341 y(4\))e(without)g(the)g(pre\002xing)h(\224Content-T)-7
+b(ype:\224.)47 b(MIME)28 b(T)-7 b(ypes)28 b(and)h(subtypes)i(should)g
+(be)d(either)i(chosen)g(from)227 2454 y(the)35 b(RFC)d(or)i(from)h(the)
+f(list)h(of)f(IAN)m(A-appro)o(v)o(ed)h(v)n(alues.)62
+b(The)34 b(data)h(stream)g(must)f(be)h(compliant)h(with)e(the)227
+2567 y(corresponding)28 b(speci\002cation.)227 2717 y(When)36
+b(data)h(is)e(transmitted)j(with)e(the)g(frame)g(type)h
+Fp(SANE)p 2212 2717 V 30 w(FRAME)p 2517 2717 V 31 w(MIME)c
+Fq(all)j(data)g(has)g(to)g(be)g(transmitted)227 2830
+y(within)23 b(one)f(frame,)g(multiple)h(frames)f(are)g(not)g(allo)n
+(wed)h(\(so)f(the)g(\003ag)f Fp(last)p 2703 2830 V 31
+w(frame)e Fq(has)j(to)f(be)h(set)g(when)g(using)227 2943
+y(this)i(frame)g(type\).)227 3093 y(A)h(SANE)f(back)o(end)29
+b(must)d(be)h(able)g(to)f(at)g(least)h(optionally)j(transmit)d
+Fp(SANE)p 2722 3093 V 31 w(FRAME)p 3028 3093 V 31 w(RAW)d
+Fq(\(possibly)29 b(with)d(the)227 3206 y(help)i(of)f(a)g(meta)g(back)o
+(end\),)j(if)d(the)g(hardw)o(are)h(supports)i(deli)n(v)o(ering)f(image)
+f(data)f(at)g(all.)40 b(F)o(or)26 b(data)h(that)h(doesn')n(t)227
+3319 y(comprise)j(images,)h(it')-5 b(s)29 b(admisable)j(to)d(only)h
+(pro)o(vide)h(MIME)d(frames.)48 b(As)28 b(a)h(general)i(principle,)i
+(if)d(there)g(are)227 3432 y(se)n(v)o(eral)25 b(choices)g(in)f(MIME)e
+(types,)i(the)g(format)g(that)g(is)g(most)f(widely)h(implemented)i
+(should)f(be)e(used.)0 3703 y(The)g(member)g Fp(proposed)p
+929 3703 V 29 w(filename)c Fq(can)24 b(be)f(used)i(to)e(suggest)i(a)e
+(reasonable)j(def)o(ault)f(\002lename)f(or)f(-e)o(xtension)j(in)0
+3816 y(case)21 b(the)h(back)o(end)h(can)e(mak)o(e)g(such)h(a)e
+(suggestion,)k(lik)o(e)e(e.g.)27 b(an)21 b(image)g(database.)30
+b(If)21 b(no)g(such)h(suggestion)i(is)c(intended,)0 3929
+y(set)k(the)g(\002eld)f(to)g(\223\224.)0 4101 y(In)e(the)h(case)g(of)g
+(ra)o(w)e(frames,)i Fp(proposed)p 1393 4101 V 29 w(filename)17
+b Fq(is)22 b(e)o(xpected)h(to)e(hold)i(the)e(basename)i(for)f(the)g
+(image,)g(with)f(the)0 4214 y(e)o(xtension)k(determined)g(by)f(the)f
+(sa)n(v)o(e)g(function)j(of)d(the)g(frontend,)i(as)e(the)g(frontend)i
+(can)f(fully)g(understand)i(the)d(data)h(and)0 4327 y(is)f(thus)i(able)
+f(to)f(encode)i(it)f(in)f(an)o(y)h(format)g(it)f(wishes.)0
+4498 y(F)o(or)g(MIME)f(frames)i Fp(proposed)p 1133 4498
+V 29 w(filename)19 b Fq(can)24 b(contain)h(either:)136
+4769 y Fk(\017)46 b Fq(A)23 b(name)h(with)g(a)g(leading)i(dot,)e(which)
+g(is)g(considered)j(to)d(be)g(a)g(proposed)j(\002lename)d(e)o
+(xtension.)32 b(This)24 b(could)i(also)227 4882 y(be)e(gotten)h(from)e
+(the)h(mime)f(database,)i(b)n(ut)f(for)g(systems)h(lacking)g(it,)e
+(this)h(might)g(be)g(con)l(v)o(enient.)32 b(Or:)136 5070
+y Fk(\017)46 b Fq(A)23 b(complete)i(\002lename,)e(including)j(e)o
+(xtension.)0 5090 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 0 5090 a 0 5090 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 0 5090 a 0 5090
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 0 5090 a 1905 5381 a Fq(33)p eop
+%%Page: 34 35
+34 34 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 32 a 91 x Fq(Note,)31
+b(that)f(for)g(frontends)i(that)e(are)g(able)g(to)g(parse)g(a)f(gi)n(v)
+o(en)i(MIME)d(type)i(internally)-6 b(,)34 b(it)29 b(is)g(perfectly)j
+(permissible)g(to)0 236 y(ignore)25 b(the)f(e)o(xtension)h(part)f(of)g
+(the)g(proposed)i(\002lename)d(and)h(only)h(mak)o(e)e(use)h(of)f(the)h
+(basename,)h(when)f(using)g(internal)0 349 y(sa)n(v)o(e)g(algorithms)i
+(for)d(dif)n(ferent)j(formats.)0 514 y(The)f(string)i
+Fp(proposed)p 843 514 28 4 v 29 w(comment)21 b Fq(can)26
+b(be)f(used)i(to)e(transmit)i(additional)h(image)e(information,)i(that)
+e(can)f(be)h(stored)0 626 y(in)c(the)g(comment)h(areas)g(se)n(v)o(eral)
+g(\002le)e(formats)i(of)n(fer)-5 b(.)29 b(It)22 b(can)g(contain)i(an)o
+(y)e(te)o(xtual)i(information)g(the)e(back)o(end)j(wishes)d(to)0
+739 y(con)l(v)o(e)o(y)j(to)e(the)h(user)l(,)g(lik)o(e)h(date/time)g(of)
+e(e)o(xposure,)i(enganged)h(\002lters,)e(etc.)29 b(Set)22
+b(to)i(\223\224)f(if)h(unused.)0 904 y(The)k(members)h
+Fp(dpi)p 700 904 V 31 w(x)e Fq(and)i Fp(dpi)p 1137 904
+V 31 w(y)f Fq(encode)i(the)e(horizontal)k(and)c(v)o(ertical)i
+(resolution.)46 b(Note,)30 b(that)e(multiple-image)0
+1017 y(scans)36 b(may)e(ha)n(v)o(e)h(dif)n(ferent)i(resolutions)h(of)c
+(each)i(image.)62 b(It)34 b(is)h(not)g(permissible)i(to)d(change)j
+(resolution)g(between)0 1130 y(frames)24 b(of)g(the)f(same)h(image.)29
+b(If)23 b(not)h(applicable,)i(set)e(to)f(-1.)0 1295 y(The)g(member)g
+Fp(reserved)c Fq(is)k(an)g(array)h(of)f(32)g(bytes)i(\(char\))f(to)f(k)
+o(eep)h(the)g(size)g(of)f(the)g(struct)h(unchanged)j(when)c(future)0
+1408 y(e)o(xtensions)j(are)e(done.)30 b(The)23 b(back)o(end)i(has)f(to)
+g(set)f(the)h(reserv)o(ed)i(bytes)e(to)g(0.)2484 1408
+y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 2484 1408 a 2484 1408 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 2484 1408 a 2484 1408 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 2484
+1408 a 0 1706 a Fm(4.3.9)99 b Fc(sane)p 545 1706 30 4
+v 35 w(start)0 1932 y Fq(This)23 b(function)j(initiates)g(aquisition)g
+(of)e(an)f(image)h(from)f(the)h(de)n(vice)h(represented)i(by)c(handle)i
+Fp(h)p Fq(.)227 2158 y Fp(SANE_Status)50 b(sane_start)g(\(SANE_Handle)f
+(h\);)0 2383 y Fq(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)
+f(the)h(follo)n(wing)h(status)g(codes.)227 2608 y Fp(SANE)p
+452 2608 28 4 v 31 w(STATUS)p 813 2608 V 30 w(CANCELLED)p
+Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j(through)f(a)e
+(call)h(to)g Fp(sane)p 3297 2608 V 31 w(cancel)p Fq(.)227
+2749 y Fp(SANE)p 452 2749 V 31 w(STATUS)p 813 2749 V
+30 w(DEVICE)p 1173 2749 V 30 w(BUSY)p Fr(:)44 b Fq(The)23
+b(de)n(vice)i(is)e(b)n(usy)-6 b(.)30 b(The)23 b(operation)j(should)g
+(be)d(retried)i(later)-5 b(.)227 2889 y Fp(SANE)p 452
+2889 V 31 w(STATUS)p 813 2889 V 30 w(JAMMED)p Fr(:)43
+b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 3030
+y Fp(SANE)p 452 3030 V 31 w(STATUS)p 813 3030 V 30 w(NO)p
+953 3030 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e
+(out)h(of)g(documents.)227 3170 y Fp(SANE)p 452 3170
+V 31 w(STATUS)p 813 3170 V 30 w(COVER)p 1118 3170 V 31
+w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227
+3310 y Fp(SANE)p 452 3310 V 31 w(STATUS)p 813 3310 V
+30 w(IO)p 953 3310 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.)
+227 3451 y Fp(SANE)p 452 3451 V 31 w(STATUS)p 813 3451
+V 30 w(NO)p 953 3451 V 32 w(MEM)p Fr(:)44 b Fq(An)23
+b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227
+3591 y Fp(SANE)p 452 3591 V 31 w(STATUS)p 813 3591 V
+30 w(INVAL)p Fr(:)44 b Fq(The)24 b(scan)h(cannot)h(be)f(started)h(with)
+e(the)h(current)h(set)f(of)f(options.)34 b(The)24 b(fron-)427
+3704 y(tend)19 b(should)h(reload)g(the)f(option)h(descriptors,)i(as)c
+(if)g Fp(SANE)p 2316 3704 V 31 w(INFO)p 2567 3704 V 31
+w(RELOAD)p 2928 3704 V 30 w(OPTIONS)c Fq(had)19 b(been)427
+3817 y(returned)27 b(from)d(a)g(call)g(to)h Fp(sane)p
+1492 3817 V 30 w(control)p 1907 3817 V 30 w(option\(\))p
+Fq(,)20 b(since)25 b(the)g(de)n(vice')-5 b(s)26 b(capabilities)h(may)
+427 3930 y(ha)n(v)o(e)d(changed.)0 4228 y Fm(4.3.10)99
+b Fc(sane)p 595 4228 30 4 v 35 w(read)0 4455 y Fq(This)19
+b(function)j(is)e(used)g(to)g(read)g(image)g(data)g(from)g(the)g(de)n
+(vice)h(represented)h(by)e(handle)h Fp(h)p Fq(.)27 b(Ar)n(gument)20
+b Fp(buf)e Fq(is)h(a)g(pointer)0 4567 y(to)27 b(a)g(memory)g(area)h
+(that)f(is)g(at)g(least)h Fp(maxlen)c Fq(bytes)k(long.)41
+b(The)26 b(number)i(of)f(bytes)i(returned)g(is)e(stored)h(in)f
+Fp(*len)p Fq(.)37 b(A)0 4680 y(back)o(end)31 b(must)e(set)h(this)f(to)g
+(zero)h(when)f(a)g(status)h(other)g(than)g Fp(SANE)p
+2262 4680 28 4 v 31 w(STATUS)p 2623 4680 V 30 w(GOOD)c
+Fq(is)j(returned\).)48 b(When)29 b(the)h(call)0 4793
+y(succeeds,)c(the)d(number)i(of)e(bytes)i(returned)h(can)d(be)h(an)o
+(ywhere)h(in)e(the)h(range)h(from)e(0)g(to)h Fp(maxlen)c
+Fq(bytes.)227 5019 y Fp(SANE_Status)50 b(sane_read)g(\(SANE_Handle)f
+(h,)54 b(SANE_Byte)c(*)55 b(buf,)1482 5132 y(SANE_Int)c(maxlen,)g
+(SANE_Int)g(*)j(len\);)1905 5381 y Fq(34)p eop
+%%Page: 35 36
+35 35 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX13 exch def currentpoint exch
+pop /CBarY13 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX14 exch def currentpoint
+exch pop /CBarY14 exch def
+ 0 32 a 91 x Fq(F)o(or)28
+b(ef)n(\002cienc)o(y)i(reasons,)h(medium)e(to)g(lar)n(ge)h(block)g
+(sizes)g(\(in)f(the)g(range)h(of)e(a)h(fe)n(w)f(kilobytes\))j(should)g
+(be)d(used.)46 b(Re-)0 236 y(turning)28 b(short)f(reads)g(is)f(allo)n
+(wed)g(to)g(allo)n(w)g(for)g(small)g(b)n(uf)n(fers)i(in)e(the)g(back)o
+(end.)2653 236 y
+ -31.0 Resolution mul 72.27 div /CBarX15 exch def currentpoint exch
+pop /CBarY15 exch def
+ 2653 236 a 2653 236 a
+ 500.75499 Resolution mul 72.27 div /CBarX16 exch def currentpoint
+exch pop /CBarY16 exch def
+ 2653 236 a 2653
+236 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX14 CBarY14 moveto CBarX16 CBarY16 lineto stroke grestore
+ 2653 236 a 36 w Fq(If)f(this)i(function)h(is)e(called)h(when)f
+(no)0 349 y(data)e(is)g(a)n(v)n(ailable,)h(one)f(of)g(tw)o(o)f(things)i
+(may)e(happen,)i(depending)h(on)e(the)g(I/O)f(mode)h(that)g(is)f(in)g
+(ef)n(fect)i(for)f(handle)h Fp(h)p Fq(.)114 595 y(1.)45
+b(If)24 b(the)h(de)n(vice)g(is)f(in)g(blocking)i(I/O)e(mode)g(\(the)h
+(def)o(ault)h(mode\),)e(the)h(call)f(blocks)i(until)f(at)f(least)h(one)
+g(data)f(byte)h(is)227 708 y(a)n(v)n(ailable)h(\(or)e(until)g(some)g
+(error)g(occurs\).)114 896 y(2.)45 b(If)37 b(the)h(de)n(vice)h(is)e(in)
+h(non-blocking)j(I/O)c(mode,)k(the)d(call)g(returns)h(immediately)g
+(with)e(status)i Fp(SANE)p 3656 896 28 4 v 31 w(STA-)227
+1008 y(TUS)p 397 1008 V 32 w(GOOD)21 b Fq(and)j(with)f
+Fp(*len)e Fq(set)j(to)f(zero.)0 1255 y(The)g(I/O)g(mode)h(of)f(handle)i
+Fp(h)e Fq(can)g(be)h(set)g(via)g(a)f(call)h(to)f Fp(sane)p
+2024 1255 V 31 w(set)p 2220 1255 V 31 w(io)p 2361 1255
+V 32 w(mode\(\))p Fq(.)0 1426 y(This)g(function)j(may)d(f)o(ail)h(with)
+g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes.)227
+1673 y Fp(SANE)p 452 1673 V 31 w(STATUS)p 813 1673 V
+30 w(CANCELLED)p Fr(:)42 b Fq(The)22 b(operation)j(w)o(as)d(cancelled)j
+(through)f(a)e(call)h(to)g Fp(sane)p 3297 1673 V 31 w(cancel)p
+Fq(.)227 1819 y Fp(SANE)p 452 1819 V 31 w(STATUS)p 813
+1819 V 30 w(EOF)p Fr(:)45 b Fq(No)27 b(more)i(data)g(is)f(a)n(v)n
+(ailable)j(for)e(the)g(current)h(frame.)2886 1740 y
+ -31.0 Resolution mul 72.27 div /CBarX17 exch def currentpoint exch
+pop /CBarY17 exch def
+ 2886
+1740 a 2886 1740 a
+ 500.75499 Resolution mul 72.27 div /CBarX18 exch def currentpoint
+exch pop /CBarY18 exch def
+ 2886 1740 a 79 x Fq(If)e Fp(sane)p
+3199 1819 28 4 v 31 w(read)e Fq(sends)427 1932 y(back)f(an)o(y)e(image)
+h(data)g(it)g(is)f(not)h(allo)n(wed)g(to)g(return)g(with)g
+Fp(SANE)p 2540 1932 V 31 w(STATUS)p 2901 1932 V 30 w(EOF)p
+Fq(.)3135 1932 y
+ -31.0 Resolution mul 72.27 div /CBarX19 exch def currentpoint exch
+pop /CBarY19 exch def
+ 3135 1932 a 3135 1932 a
+ 500.75499 Resolution mul 72.27 div /CBarX20 exch def currentpoint
+exch pop /CBarY20 exch def
+ 3135 1932 a
+3135 1932 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX18 CBarY18 moveto CBarX20 CBarY20 lineto stroke grestore
+ 3135 1932 a 227 2078 a Fp(SANE)p 452 2078
+28 4 v 31 w(STATUS)p 813 2078 V 30 w(JAMMED)p Fr(:)43
+b Fq(The)23 b(document)j(feeder)e(is)g(jammed.)227 2224
+y Fp(SANE)p 452 2224 V 31 w(STATUS)p 813 2224 V 30 w(NO)p
+953 2224 V 32 w(DOCS)p Fr(:)44 b Fq(The)23 b(document)i(feeder)g(is)e
+(out)h(of)g(documents.)227 2370 y Fp(SANE)p 452 2370
+V 31 w(STATUS)p 813 2370 V 30 w(COVER)p 1118 2370 V 31
+w(OPEN)p Fr(:)44 b Fq(The)23 b(scanner)i(co)o(v)o(er)f(is)f(open.)227
+2516 y Fp(SANE)p 452 2516 V 31 w(STATUS)p 813 2516 V
+30 w(IO)p 953 2516 V 32 w(ERROR)p Fr(:)43 b Fq(An)23
+b(error)i(occurred)g(while)f(communicating)i(with)e(the)g(de)n(vice.)
+227 2662 y Fp(SANE)p 452 2662 V 31 w(STATUS)p 813 2662
+V 30 w(NO)p 953 2662 V 32 w(MEM)p Fr(:)44 b Fq(An)23
+b(insuf)n(\002cent)i(amount)g(of)e(memory)h(is)f(a)n(v)n(ailable.)227
+2809 y Fp(SANE)p 452 2809 V 31 w(STATUS)p 813 2809 V
+30 w(ACCESS)p 1173 2809 V 30 w(DENIED)p Fr(:)43 b Fq(Access)30
+b(to)f(the)g(de)n(vice)h(has)f(been)h(denied)h(due)e(to)g(insuf)n
+(\002cient)427 2921 y(or)24 b(in)l(v)n(alid)h(authentication.)0
+3229 y Fm(4.3.11)99 b Fc(sane)p 595 3229 30 4 v 35 w(cancel)0
+3462 y Fq(This)24 b(function)i(is)d(used)i(to)e(immediately)j(or)e(as)f
+(quickly)j(as)e(possible)i(cancel)f(the)f(currently)i(pending)g
+(operation)g(of)e(the)0 3575 y(de)n(vice)h(represented)h(by)e(handle)h
+Fp(h)p Fq(.)227 3822 y Fp(void)53 b(sane_cancel)d(\(SANE_Handle)f(h\);)
+0 4068 y Fq(This)33 b(function)i(can)f(be)f(called)h(at)f(an)o(y)h
+(time)f(\(as)g(long)h(as)f(handle)i Fp(h)d Fq(is)h(a)f(v)n(alid)i
+(handle\))h(b)n(ut)f(usually)h(af)n(fects)f(long-)0 4181
+y(running)28 b(operations)h(only)e(\(such)g(as)f(image)h(is)f
+(acquisition\).)40 b(It)26 b(is)g(safe)g(to)g(call)h(this)f(function)j
+(asynchronously)i(\(e.g.,)0 4294 y(from)37 b(within)g(a)f(signal)j
+(handler\).)70 b(It)37 b(is)f(important)j(to)d(note)i(that)f
+(completion)i(of)e(this)g(operaton)i(does)f Fl(not)h
+Fq(imply)0 4407 y(that)g(the)f(currently)i(pending)g(operation)h(has)d
+(been)h(cancelled.)75 b(It)37 b(only)i(guarantees)i(that)e
+(cancellation)i(has)d(been)0 4520 y Fl(initiated)p Fq(.)68
+b(Cancellation)39 b(completes)e(only)g(when)f(the)g(cancelled)j(call)d
+(returns)i(\(typically)g(with)e(a)f(status)j(v)n(alue)e(of)0
+4632 y Fp(SANE)p 225 4632 28 4 v 31 w(STATUS)p 586 4632
+V 30 w(CANCELLED)p Fq(\).)17 b(Since)23 b(the)g(SANE)c(API)i(does)j
+(not)e(require)i(an)o(y)f(other)g(operations)i(to)e(be)f(re-entrant,)0
+4745 y(this)i(implies)h(that)f(a)f(frontend)i(must)f
+Fl(not)i Fq(call)e(an)o(y)f(other)i(operation)h(until)e(the)g
+(cancelled)i(operation)g(has)e(returned.)1905 5381 y(35)p
+eop
+%%Page: 36 37
+36 36 bop 0 123 a Fm(4.3.12)99 b Fc(sane)p 595 123 30
+4 v 35 w(set)p 810 123 V 35 w(io)p 965 123 V 35 w(mode)0
+346 y Fq(This)21 b(function)j(is)e(used)g(to)f(set)h(the)g(I/O)f(mode)h
+(of)f(handle)i Fp(h)p Fq(.)k(The)21 b(I/O)g(mode)h(can)g(be)f(either)i
+(blocking)h(or)d(non-blocking.)0 459 y(If)27 b(ar)n(gument)j
+Fp(m)c Fq(is)i Fp(SANE)p 850 459 28 4 v 31 w(TRUE)p Fq(,)c(the)k(mode)g
+(is)f(set)h(to)g(non-blocking)j(mode,)e(otherwise)g(it')-5
+b(s)28 b(set)g(to)f(blocking)j(mode.)0 572 y(This)23
+b(function)j(can)e(be)g(called)g(only)h(after)f(a)f(call)h(to)g
+Fp(sane)p 1917 572 V 30 w(start\(\))c Fq(has)k(been)g(performed.)227
+787 y Fp(SANE_Status)50 b(sane_set_io_mo)o(de)e(\(SANE_Handle)h(h,)54
+b(SANE_Bool)c(m\);)0 1003 y Fq(By)33 b(def)o(ault,)38
+b(ne)n(wly)c(opened)h(handles)h(operate)g(in)d(blocking)j(mode.)60
+b(A)33 b(back)o(end)j(may)d(elect)i(not)f(to)g(support)h(non-)0
+1116 y(blocking)29 b(I/O)c(mode.)38 b(In)26 b(such)h(a)f(case)h(the)f
+(status)i(v)n(alue)f Fp(SANE)p 2107 1116 V 31 w(STATUS)p
+2468 1116 V 30 w(UNSUPPORTED)20 b Fq(is)27 b(returned.)39
+b(Blocking)0 1229 y(I/O)32 b(must)g(be)h(supported)i(by)d(all)h(back)o
+(ends,)k(so)32 b(calling)i(this)f(function)i(with)d(ar)n(gument)i
+Fp(m)d Fq(set)i(to)f Fp(SANE)p 3509 1229 V 31 w(FALSE)d
+Fq(is)0 1342 y(guaranteed)e(to)c(complete)i(successfully)-6
+b(.)0 1504 y(This)23 b(function)j(may)d(f)o(ail)h(with)g(one)g(of)f
+(the)h(follo)n(wing)h(status)g(codes:)227 1719 y Fp(SANE)p
+452 1719 V 31 w(STATUS)p 813 1719 V 30 w(INVAL)p Fr(:)44
+b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)227
+1857 y Fp(SANE)p 452 1857 V 31 w(STATUS)p 813 1857 V
+30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(the)f(requested)i(I/O)d(mode.)0 2151 y Fm(4.3.13)99
+b Fc(sane)p 595 2151 30 4 v 35 w(get)p 810 2151 V 35
+w(select)p 1205 2151 V 34 w(fd)0 2374 y Fq(This)25 b(function)j(is)e
+(used)g(to)g(obtain)h(a)e(\(platform-speci\002c\))k(\002le-descriptor)g
+(for)d(handle)h Fp(h)e Fq(that)h(is)f(readable)j(if)d(and)h(only)0
+2487 y(if)21 b(image)h(data)g(is)g(a)n(v)n(ailable)i(\(i.e.,)d(when)h
+(a)f(call)h(to)f Fp(sane)p 1850 2487 28 4 v 31 w(read\(\))d
+Fq(will)j(return)i(at)e(least)i(one)f(byte)g(of)g(data\).)29
+b(If)21 b(the)h(call)0 2600 y(completes)j(successfully)-6
+b(,)27 b(the)d(select)h(\002le-descriptor)i(is)c(returned)j(in)d
+Fp(*fd)p Fq(.)227 2815 y Fp(SANE_Status)50 b(sane_get_selec)o(t_f)o(d)e
+(\(SANE_Handle)h(h,)54 b(SANE_Int)d(*fd\);)0 3031 y Fq(This)37
+b(function)j(can)e(be)f(called)i(only)f(after)g(a)f(call)h(to)g
+Fp(sane)p 2056 3031 V 31 w(start\(\))33 b Fq(has)38 b(been)g(performed)
+h(and)f(the)g(returned)0 3144 y(\002le-descriptor)j(is)c(guaranteed)k
+(to)d(remain)g(v)n(alid)h(for)e(the)h(duration)i(of)e(the)g(current)h
+(image)f(acquisition)j(\(i.e.,)g(un-)0 3257 y(til)e Fp(sane)p
+339 3257 V 31 w(cancel\(\))c Fq(or)k Fp(sane)p 1179 3257
+V 31 w(start\(\))d Fq(get)j(called)i(again)f(or)f(until)h
+Fp(sane)p 2810 3257 V 31 w(read\(\))c Fq(returns)41 b(with)e(status)0
+3370 y Fp(SANE)p 225 3370 V 31 w(STATUS)p 586 3370 V
+30 w(EOF)p Fq(\).)27 b(Indeed,)k(a)e(back)o(end)i(must)e(guarantee)i
+(to)e(close)h(the)f(returned)i(select)f(\002le)f(descriptor)i(at)e(the)
+0 3483 y(point)24 b(when)e(the)h(ne)o(xt)g Fp(sane)p
+962 3483 V 31 w(read\(\))c Fq(call)k(w)o(ould)g(return)h
+Fp(SANE)p 2202 3483 V 31 w(STATUS)p 2563 3483 V 30 w(EOF)p
+Fq(.)c(This)j(is)f(necessary)j(to)e(ensure)h(the)0 3596
+y(application)j(can)d(detect)g(when)g(this)g(condition)i(occurs)f
+(without)g(actually)g(ha)n(ving)h(to)d(call)h Fp(sane)p
+3167 3596 V 31 w(read\(\))p Fq(.)0 3757 y(A)30 b(back)o(end)k(may)e
+(elect)g(not)g(to)g(support)h(this)f(operation.)56 b(In)31
+b(such)i(a)e(case,)j(the)e(function)i(returns)f(with)e(status)i(code)0
+3870 y Fp(SANE)p 225 3870 V 31 w(STATUS)p 586 3870 V
+30 w(UNSUPPORTED)p Fq(.)0 4032 y(Note)25 b(that)h(the)g(only)g
+(operation)i(supported)h(by)c(the)h(returned)h(\002le-descriptor)i(is)c
+(a)g(host)i(operating-system)i(dependent)0 4145 y(test)23
+b(whether)h(the)e(\002le-descriptor)k(is)d(readable)h(\(e.g.,)e(this)h
+(test)g(can)g(be)g(implemented)h(using)g Fp(select\(\))18
+b Fq(or)23 b Fp(poll\(\))0 4258 y Fq(under)e(UNIX\).)c(If)j(an)o(y)f
+(other)i(operation)h(is)d(performed)i(on)f(the)g(\002le)e(descriptor)l
+(,)23 b(the)d(beha)n(vior)i(of)e(the)f(back)o(end)j(becomes)0
+4371 y(unpredictable.)50 b(Once)29 b(the)g(\002le-descriptor)j(signals)
+f(\223readable\224)h(status,)g(it)d(will)f(remain)i(in)f(that)h(state)g
+(until)g(a)f(call)g(to)0 4484 y Fp(sane)p 225 4484 V
+31 w(read\(\))19 b Fq(is)j(performed.)30 b(Since)23 b(man)o(y)f(input)i
+(de)n(vices)f(are)g(v)o(ery)g(slo)n(w)-6 b(,)22 b(support)i(for)f(this)
+g(operation)i(is)d(strongly)0 4597 y(encouraged)27 b(as)c(it)g(permits)
+i(an)e(application)k(to)d(do)f(other)i(w)o(ork)e(while)h(image)g
+(acquisition)j(is)c(in)h(progress.)0 4758 y(This)f(function)j(may)d(f)o
+(ail)h(with)g(one)g(of)f(the)h(follo)n(wing)h(status)g(codes:)227
+4974 y Fp(SANE)p 452 4974 V 31 w(STATUS)p 813 4974 V
+30 w(INVAL)p Fr(:)44 b Fq(No)22 b(image)i(acquisition)j(is)c(pending.)
+227 5112 y Fp(SANE)p 452 5112 V 31 w(STATUS)p 813 5112
+V 30 w(UNSUPPORTED)p Fr(:)41 b Fq(The)23 b(back)o(end)j(does)e(not)g
+(support)h(this)g(operation.)1905 5381 y(36)p eop
+%%Page: 37 38
+37 37 bop 0 123 a Fm(4.3.14)99 b Fc(sane)p 595 123 30
+4 v 35 w(strstatus)0 356 y Fq(This)28 b(function)i(can)f(be)f(used)h
+(to)f(translate)i(a)e(SANE)e(status)j(code)g(into)g(a)f(printable)i
+(string.)44 b(The)28 b(returned)i(string)g(is)e(a)0 469
+y(single)c(line)g(of)f(te)o(xt)g(that)h(forms)f(a)g(complete)h
+(sentence,)h(b)n(ut)f(without)g(the)f(trailing)i(period)f
+(\(full-stop\).)32 b(The)22 b(function)j(is)0 582 y(guaranteed)k(to)c
+(ne)n(v)o(er)h(return)h Fp(NULL)p Fq(.)22 b(The)k(returned)h(pointer)g
+(is)f(v)n(alid)g(at)g(least)g(until)g(the)g(ne)o(xt)g(call)g(to)g(this)
+g(function)h(is)0 695 y(performed.)227 941 y Fp(SANE_String_Con)o(st)48
+b(sane_strstatus)g(\(SANE_Status)h(status\);)0 1292 y
+Fn(4.4)119 b(Code)31 b(Flo)o(w)0 1558 y Fq(The)21 b(code)h(\003o)n(w)d
+(for)j(the)f(SANE)e(API)g(is)i(illustrated)j(in)d(Figure)h(4.1.)28
+b(Functions)23 b Fp(sane)p 2797 1558 28 4 v 31 w(init\(\))17
+b Fq(and)22 b Fp(sane)p 3547 1558 V 31 w(exit\(\))0 1671
+y Fq(initialize)j(and)d(e)o(xit)g(the)h(back)o(end,)h(respecti)n(v)o
+(ely)-6 b(.)31 b(All)22 b(other)h(calls)g(must)f(be)g(performed)i
+(after)f(initialization)j(and)d(before)0 1784 y(e)o(xiting)i(the)f
+(back)o(end.)536 4453 y @beginspecial 0 @llx 0 @lly 601
+@urx 542 @ury 3060 @rhi @setspecial
+%%BeginDocument: figs/flow.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: flow.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Tue Dec 3 22:09:10 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 601 542
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-161.0 577.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+7.500 slw
+% Polyline
+n 2700 600 m 10200 600 l 10200 9600 l 2700 9600 l clp gs col7 0.95 shd ef gr gs col-1 s gr
+% Polyline
+n 3300 2400 m 10200 2400 l 10200 8925 l 3300 8925 l clp gs col7 0.90 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 2925 m 10200 2925 l 10200 4650 l 3900 4650 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 3900 4800 m 10200 4800 l 10200 8250 l 3900 8250 l clp gs col7 0.85 shd ef gr gs col-1 s gr
+% Polyline
+n 10350 3000 m 10425 3075 l 10425 4500 l 10350 4575 l gs col-1 s gr
+% Polyline
+n 10350 4875 m 10425 4950 l 10425 8100 l 10350 8175 l gs col-1 s gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 6600 m
+gs 1 -1 sc (image acquisition) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+10575 3825 m
+gs 1 -1 sc (device setup) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 7515 m
+gs 1 -1 sc (- go back to) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5775 7515 m
+gs 1 -1 sc (sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+7275 7515 m
+gs 1 -1 sc (if more frames desired) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 3300 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 5100 m
+gs 1 -1 sc (- sane_start\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 4500 m
+gs 1 -1 sc (repeatedly to configure device as desired) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 4080 m
+gs 1 -1 sc (sane_control_option\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 3600 m
+gs 1 -1 sc (sane_get_option_descriptor\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4200 5700 m
+gs 1 -1 sc (- use:) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+4500 6900 m
+gs 1 -1 sc (repeatedly until read returns EOF) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6000 m
+gs 1 -1 sc (sane_get_parameters\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+5400 6450 m
+gs 1 -1 sc (sane_read\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4200 8100 m
+gs 1 -1 sc (- sane_cancel\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 1200 m
+gs 1 -1 sc (- sane_init\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3000 9300 m
+gs 1 -1 sc (- sane_exit\(\)) col-1 show gr
+/Helvetica-Oblique findfont 270.00 scalefont setfont
+3600 1800 m
+gs 1 -1 sc (- pick desired device, possibly by using) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 2700 m
+gs 1 -1 sc (- sane_open\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+3600 8700 m
+gs 1 -1 sc (- sane_close\(\)) col-1 show gr
+/Helvetica findfont 270.00 scalefont setfont
+4800 2175 m
+gs 1 -1 sc (sane_get_devices\(\)) col-1 show gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1549 4649 a(Figure)h(4.1:)k(Code)23 b(\003o)n(w)0
+4961 y(Function)k Fp(sane)p 573 4961 V 31 w(get)p 769
+4961 V 31 w(devices\(\))21 b Fq(can)26 b(be)g(called)h(an)o(y)e(time)h
+(after)g Fp(sane)p 2572 4961 V 31 w(init\(\))c Fq(has)k(been)h(called.)
+36 b(It)26 b(returns)0 5074 y(the)32 b(list)f(of)h(the)f(de)n(vices)i
+(that)f(are)g(kno)n(wn)f(at)h(the)f(time)g(of)h(the)f(call.)53
+b(This)31 b(list)h(may)f(change)i(o)o(v)o(er)f(time)f(since)h(some)1905
+5381 y(37)p eop
+%%Page: 38 39
+38 38 bop 0 123 a Fq(de)n(vices)24 b(may)e(be)g(turned)h(on)f(or)g(of)n
+(f)h(or)f(a)f(remote)i(host)g(may)f(boot)h(or)f(shutdo)n(wn)h(between)g
+(dif)n(ferent)h(calls.)30 b(It)21 b(should)j(be)0 236
+y(noted)i(that)f(this)g(operation)i(may)d(be)g(relati)n(v)o(ely)j(slo)n
+(w)d(since)h(it)g(requires)h(contacting)h(all)e(con\002gured)h(de)n
+(vices)g(\(some)f(of)0 349 y(which)h(may)f(be)h(on)g(remote)g(hosts\).)
+36 b(A)25 b(frontend)j(may)d(therefore)j(w)o(ant)e(to)f(pro)o(vide)i
+(the)f(ability)h(for)f(a)f(user)i(to)e(directly)0 462
+y(select)g(a)e(desired)i(de)n(vice)g(without)f(requiring)i(a)d(call)h
+(to)g(this)g(function.)0 633 y(Once)e(a)g(de)n(vice)h(has)g(been)g
+(chosen,)h(it)e(is)g(opened)i(using)f(a)f(call)g(to)h
+Fp(sane)p 2352 633 28 4 v 30 w(open\(\))p Fq(.)i(Multiple)f(de)n(vices)
+f(can)g(be)f(open)h(at)0 746 y(an)o(y)i(gi)n(v)o(en)h(time.)34
+b(A)24 b(SANE)f(back)o(end)k(must)f(not)f(impose)h(arti\002cial)h
+(constraints)h(on)e(ho)n(w)e(man)o(y)i(de)n(vices)g(can)g(be)f(open)0
+859 y(at)e(an)o(y)h(gi)n(v)o(en)g(time.)0 1031 y(An)f(opened)i(de)n
+(vice)g(can)f(be)f(setup)i(through)g(the)f(corresponding)k(de)n(vice)d
+(handle)g(using)f(functions)j Fp(sane)p 3460 1031 V 30
+w(get)p 3655 1031 V 32 w(opt-)0 1144 y(ion)p 170 1144
+V 31 w(descriptor\(\))k Fq(and)38 b Fp(sane)p 1280 1144
+V 31 w(control)p 1696 1144 V 29 w(option\(\))p Fq(.)66
+b(While)37 b(setting)i(up)e(a)g(de)n(vice,)42 b(obtaining)e(option)0
+1256 y(descriptors)d(and)e(setting)h(and)f(reading)h(of)e(option)i(v)n
+(alues)g(can)e(be)h(mix)o(ed)f(freely)-6 b(.)62 b(It)34
+b(is)g(typical)i(for)f(a)f(frontend)i(to)0 1369 y(read)28
+b(out)f(all)h(a)n(v)n(ailable)h(options)g(at)e(the)h(be)o(ginning)h
+(and)f(then)g(b)n(uild)g(a)f(dialog)i(\(either)f(graphical)i(or)d(a)g
+(command-line)0 1482 y(oriented)22 b(option)f(list\))f(that)h(allo)n
+(ws)f(to)f(control)j(the)e(a)n(v)n(ailable)i(options.)29
+b(It)20 b(should)h(be)f(noted)h(that)f(the)g(number)h(of)e(options)0
+1595 y(is)j(\002x)o(ed)g(for)h(a)e(gi)n(v)o(en)i(handle.)986
+1516 y
+ -31.0 Resolution mul 72.27 div /CBarX21 exch def currentpoint exch
+pop /CBarY21 exch def
+ 986 1516 a 986 1516 a
+ 500.75499 Resolution mul 72.27 div /CBarX22 exch def currentpoint
+exch pop /CBarY22 exch def
+ 986 1516 a 79 x Fq(Ho)n(we)n(v)o(er)l(,)f
+(as)g(options)j(are)d(set,)h(other)g(options)h(may)e(become)h(acti)n(v)
+o(e)g(or)f(inacti)n(v)o(e)i(or)e(their)0 1708 y(constraint)27
+b(may)d(change.)33 b(Thus,)24 b(after)h(setting)h(an)e(option,)i(it)e
+(may)g(be)h(necessary)h(to)f(re-read)h(the)e(descriptors.)3647
+1708 y
+ -31.0 Resolution mul 72.27 div /CBarX23 exch def currentpoint exch
+pop /CBarY23 exch def
+ 3647 1708 a 3647 1708 a
+ 500.75499 Resolution mul 72.27 div /CBarX24 exch def currentpoint
+exch pop /CBarY24 exch def
+ 3647 1708 a 3647 1708
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX22 CBarY22 moveto CBarX24 CBarY24 lineto stroke grestore
+ 3647 1708 a 31 w Fq(While)0 1821 y(setting)29 b(up)e(the)h(de)n
+(vice,)h(it)e(is)g(also)h(admissible)h(to)f(call)f Fp(sane)p
+2041 1821 28 4 v 31 w(get)p 2237 1821 V 32 w(parameters\(\))21
+b Fq(to)27 b(get)g(an)h(estimate)g(of)f(what)0 1934 y(the)d(image)g
+(parameters)h(will)e(look)i(lik)o(e)f(once)g(image)g(acquisition)j(be)o
+(gins.)0 2106 y(The)36 b(de)n(vice)h(handle)h(can)e(be)g(put)h(in)f
+(blocking)i(or)e(non-blocking)k(mode)c(by)h(a)e(call)i(to)f
+Fp(sane)p 3186 2106 V 31 w(set)p 3382 2106 V 31 w(io)p
+3523 2106 V 32 w(mode\(\))p Fq(.)0 2218 y(De)n(vices)30
+b(are)f(required)i(to)e(support)i(blocking)g(mode)e(\(which)h(is)e(the)
+i(def)o(ault)g(mode\),)h(b)n(ut)e(support)i(for)e(non-blocking)0
+2331 y(I/O)23 b(is)g(strongly)j(encouraged)h(for)c(operating)k(systems)
+d(such)h(as)e(UNIX.)0 2503 y(After)g(the)g(de)n(vice)g(is)g(setup)h
+(properly)-6 b(,)24 b(image)f(acquisition)j(can)d(be)g(started)h(by)f
+(a)f(call)h(to)g Fp(sane)p 3077 2503 V 30 w(start\(\))p
+Fq(.)i(The)d(back-)0 2616 y(end)33 b(calculates)h(the)f(e)o(xact)f
+(image)h(parameters)h(at)e(this)g(point.)56 b(So)31 b(future)i(calls)g
+(to)f Fp(sane)p 3023 2616 V 31 w(get)p 3219 2616 V 31
+w(parameters\(\))0 2729 y Fq(will)h(return)i(the)f(e)o(xact)g(v)n
+(alues,)k(rather)c(than)h(estimates.)60 b(Whether)35
+b(the)f(physical)i(image)e(acquisition)i(starts)f(at)f(this)0
+2842 y(point)41 b(or)e(during)i(the)e(\002rst)h(call)f(to)h
+Fp(sane)p 1450 2842 V 31 w(read\(\))35 b Fq(is)40 b(unspeci\002ed)h(by)
+f(the)g(SANE)c(API.)i(If)h(non-blocking)44 b(I/O)0 2955
+y(and/or)30 b(a)d(select-style)32 b(interf)o(ace)e(is)e(desired,)j(the)
+d(frontend)i(may)e(attempt)h(to)f(call)h Fp(sane)p 2949
+2955 V 31 w(set)p 3145 2955 V 31 w(io)p 3286 2955 V 32
+w(mode\(\))c Fq(and/or)0 3068 y Fp(sane)p 225 3068 V
+31 w(get)p 421 3068 V 31 w(select)p 782 3068 V 30 w(fd\(\))c
+Fq(at)i(this)h(point.)30 b(Either)24 b(of)f(these)h(functions)i(may)d
+(f)o(ail)h(if)f(the)h(back)o(end)h(does)g(not)e(support)0
+3180 y(the)h(requested)i(operation.)0 3200 y
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 3200 a
+0 3200 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 3200 a 152 x Fq(Image)k(data)h(is)f(collected)i(by)e
+(repeatedly)j(calling)f Fp(sane)p 1914 3352 28 4 v 30
+w(read\(\))27 b Fq(until)k(this)f(function)i(will)e(return)h(an)f
+(end-of-\002le)0 3465 y(status)40 b(\()p Fp(SANE)p 500
+3465 V 31 w(STATUS)p 861 3465 V 30 w(EOF)p Fq(\).)c(This)i(indicates)j
+(the)e(end)g(of)f(the)h(current)h(frame.)74 b(If)38 b(the)g(frontend)j
+(e)o(xpects)f(ad-)0 3578 y(ditional)e(frames)f(\(e.g.,)h(the)e(indi)n
+(vidual)j(channels)f(of)e(a)g(red/green/blue)k(image)d(or)e(multiple)j
+(images\),)i(it)35 b(can)i(call)0 3691 y Fp(sane)p 225
+3691 V 31 w(start\(\))20 b Fq(again.)31 b(If)24 b(the)h
+Fp(SANE)p 1349 3691 V 31 w(PFLAG)p 1655 3691 V 30 w(LAST)p
+1905 3691 V 31 w(FRAME)c Fq(bit)k(is)f(set)g(in)g Fp(flags)p
+Fq(,)d(the)k(current)h(image)e(is)g(com-)0 3804 y(plete.)60
+b(In)33 b(this)i(case,)h(it)e(should)h(be)e(tested,)38
+b(if)33 b Fp(flags)d Fq(has)k(the)g Fp(SANE)p 2409 3804
+V 31 w(PFLAG)p 2715 3804 V 31 w(MORE)p 2966 3804 V 31
+w(IMAGES)c Fq(bit)k(set.)59 b(If)33 b(yes,)0 3917 y(further)e(calls)e
+(to)g Fp(sane)p 794 3917 V 31 w(start\(\))c Fq(can)30
+b(be)f(made)g(to)g(acquire)h(more)f(images.)46 b(Please)30
+b(note,)h(that)e(as)g(this)h(bit)f(has)g(to)0 4030 y(be)f(set)g(at)f
+(the)h(be)o(ginning)i(of)e(a)f(the)h(transmission)i(of)e(the)g(last)g
+(frame)g(before)h(the)f(ne)n(w)f(image,)h(it)g(is)f(possible,)k(that)d
+(no)0 4142 y(reliable)f(decision)h(can)e(be)f(made)h(at)f(this)h(time.)
+34 b(It)26 b(is)f(thus)h(permissible)i(for)e(a)f(back)o(end)i(to)f(set)
+f(this)h(bit,)g(and)g(then)g(later)0 4255 y(at)33 b(the)g(actual)h
+(call)f(to)f Fp(sane)p 980 4255 V 31 w(start\(\))d Fq(return)34
+b(an)f(error)g(lik)o(e)h Fp(SANE)p 2388 4255 V 31 w(STATUS)p
+2749 4255 V 30 w(NO)p 2889 4255 V 31 w(DOCS)p Fq(.)c(Such)j(a)f
+(sequence)j(is)0 4368 y(permitted)27 b(to)f(transmit)h(multiple)g
+(images)g(from)e(a)h(single)h(page)g(as)e(well)h(as)f(multiple)j
+(pages.)36 b(This)26 b(beha)n(viour)j(should)0 4481 y(be)21
+b(controlled)i(by)e(back)o(end)i(options)f(as)f(required,)i(to)d(allo)n
+(w)h(single-page)i(scanning)g(as)e(well)f(as)h(ADF-batch-scanning.)0
+4594 y(The)g(frontend)j(should)g(al)o(w)o(ays)e(continue)i(reading)g
+(all)d(images)i(until)f(a)g(frame)g(with)f Fp(SANE)p
+2933 4594 V 31 w(PFLAG)p 3239 4594 V 31 w(LAST)p 3490
+4594 V 30 w(FRAME)e Fq(on)0 4707 y(and)29 b Fp(SANE)p
+384 4707 V 31 w(PFLAG)p 690 4707 V 31 w(MORE)p 941 4707
+V 31 w(IMAGES)c Fq(of)n(f)k(is)f(encountered,)34 b(or)28
+b(an)h(error)h(other)g(than)f Fp(SANE)p 3085 4707 V 31
+w(STATUS)p 3446 4707 V 30 w(EOF)e Fq(occurs)0 4820 y(in)21
+b(a)g(SANE)e(function.)30 b(Note)21 b(that)h Fp(SANE)p
+1342 4820 V 31 w(STATUS)p 1703 4820 V 30 w(NO)p 1843
+4820 V 32 w(DOCS)d Fq(also)j(is)f(an)g(allo)n(wed)h(w)o(ay)f(for)h(the)
+f(back)o(end)j(to)d(indicate)0 4933 y(the)j(end)g(of)f(a)g(multiple)i
+(image)f(scan.)0 5104 y(A)c(frontend)k(may)d(choose)i(to)e(skip)i
+(frames)f(\(e.g.)28 b(because)23 b(it)e(cannot)i(parse)g(them\),)e
+(which)h(is)f(accomplished)k(by)c(simply)0 5124 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 0 5124
+a 0 5124 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 0 5124 a 0 5124 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 0 5124 a 1905 5381 a Fq(38)p
+eop
+%%Page: 39 40
+39 39 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX25 exch def currentpoint exch
+pop /CBarY25 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX26 exch def currentpoint
+exch pop /CBarY26 exch def
+ 0 32 a 91 x Fq(calling)30
+b Fp(sane)p 500 123 28 4 v 31 w(start)25 b Fq(again,)30
+b(which)f(will)f(get)h(you)g(to)f(the)h(ne)o(xt)f(frame,)i(without)f
+(ha)n(ving)i(to)d(read)h(and)g(discard)h(the)0 236 y(current)25
+b(one.)0 407 y(In)d(order)h(to)f(prematurely)i(stop)f(scanning)h(and)f
+(to)e(reset)i(the)f(back)o(end)j(state,)d Fp(sane)p 2707
+407 V 31 w(cancel\(\))c Fq(can)k(be)g(called)h(at)f(an)o(y)0
+520 y(time.)29 b(This)23 b(call)h(is)f(required)j(as)d(well)h(after)g
+(normal)g(termination)i(of)e(a)f(multiple)h(image)g(scan)h(as)e
+(described)j(abo)o(v)o(e.)3800 520 y
+ -31.0 Resolution mul 72.27 div /CBarX27 exch def currentpoint exch
+pop /CBarY27 exch def
+ 3800 520 a 3800
+520 a
+ 500.75499 Resolution mul 72.27 div /CBarX28 exch def currentpoint
+exch pop /CBarY28 exch def
+ 3800 520 a 3800 520 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX26 CBarY26 moveto CBarX28 CBarY28 lineto stroke grestore
+ 3800 520 a 0 692 a Fq(When)33
+b(done)g(using)g(the)g(de)n(vice,)i(the)e(handle)h(should)g(be)e
+(closed)i(by)e(a)g(call)h(to)f Fp(sane)p 2875 692 28
+4 v 31 w(close\(\))p Fq(.)51 b(Finally)-6 b(,)35 b(before)0
+805 y(e)o(xiting)e(the)f(application,)37 b(function)d
+Fp(sane)p 1443 805 V 31 w(exit\(\))29 b Fq(must)j(be)g(called.)55
+b(It)31 b(is)h(important)i(not)e(to)g(for)n(get)h(to)f(call)h(this)0
+918 y(function)26 b(since)e(otherwise)h(some)f(resources)i(\(e.g.,)d
+(temporary)i(\002les)f(or)f(locks\))i(may)e(remain)i(unclaimed.)0
+937 y
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 937 a 0 937 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 937 a 152 x Fq(The)e(follo)n(wing)i(C)d(sample)
+j(code)f(implements)h(a)e(reference)j(loop)e(for)g(acquiring)i
+(multiple)f(images:)0 1361 y Fp(SANE_Parameters)48 b(parms;)0
+1474 y(SANE_Status)268 b(status;)0 1699 y(do)109 1812
+y({)218 1925 y(do)327 2038 y({)436 2151 y(/*)54 b(Now)f(start)f
+(acquiring)f(the)i(next)g(frame.)f(*/)436 2264 y(status)g(=)i
+(sane_start)c(\(handle\);)436 2490 y(/*)k(if)g(that)e(failed,)g(we)h
+(have)g(a)h(problem,)d(and)i(no)h(more)f(frames)e(can)j(be)491
+2603 y(*)g(read)f(at)g(this)g(time.)f(Due)i(to)f(SANE_PFLAG_MORE)o(_I)o
+(MAG)o(ES)48 b(still)491 2716 y(*)54 b(being)e(clear,)g(this)h(will)g
+(break)f(out)h(of)h(_BOTH_)d(loops.)491 2828 y(*/)436
+2941 y(if)j(\(status)d(!=)j(SANE_STATUS_GOO)o(D\))545
+3054 y(break;)436 3280 y(/*)g(Now)f(let)g(us)h(see)f(what)g(the)g(next)
+g(frame)f(brings.)f(*/)436 3393 y(status)h(=)i(sane_get_parame)o(ter)o
+(s)48 b(\(handle,)j(&parms\);)436 3619 y(/*)j(This)f(actually)e(should)
+g(not)j(fail,)e(but)h(maybe)f(the)i(doc)f(feeder)491
+3732 y(*)h(jammed)e(or)h(something,)d(so)k(we)g(break)e(as)i(well,)e
+(if)i(something)491 3845 y(*)g(is)g(wrong.)491 3958 y(*/)436
+4070 y(if)g(\(status)d(!=)j(SANE_STATUS_GOO)o(D\))545
+4183 y(break;)436 4409 y(/*)g(Now)f(we)h(check)e(the)h(announced)e
+(parameters,)e(if)54 b(we)g(can)f(make)f(use)491 4522
+y(*)i(of)g(the)f(frame)f(data.)g(If)i(not,)f(we)g(skip)g(over)g(to)g
+(the)h(next)e(frame.)491 4635 y(*/)436 4748 y(if)i(\(do_i_like_that)48
+b(\(&parms\))j(==)i(NO\))545 4861 y(continue;)436 5087
+y(/*)h(Set)f(up)h(for)f(reading)e(the)j(data)e(here.)h(Mangle)e
+(filenames,)0 5101 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 0 5101 a 0 5101 a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 0 5101 a 0 5101
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 0 5101 a 1905 5381 a Fq(39)p eop
+%%Page: 40 41
+40 40 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX29 exch def currentpoint exch
+pop /CBarY29 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX30 exch def currentpoint
+exch pop /CBarY30 exch def
+ 0 32 a 491 123 a Fp(*)54
+b(allocate)d(memory,)g(rewind)h(multiframe)e(files,)i(ask)h(user)491
+236 y(*)h(for)f(confirmation,)c(...)491 349 y(*/)436
+462 y(setup_for_transf)o(er)f(\(...\);)436 687 y(/*)54
+b(Now)f(we)h(read)f(in)g(the)g(frame)g(data)f(and)i(process)d(it.)i
+(This)g(should)491 800 y(*)h(return)e(SANE_STATUS_GO)o(OD,)c(until)k
+(the)h(frame)f(is)i(complete,)491 913 y(*)g(what)f(causes)f
+(SANE_STATUS_EO)o(F)c(to)54 b(be)g(returned.)491 1026
+y(*/)436 1139 y(while)f(\(SANE_STATUS_G)o(OO)o(D)48 b(==)54
+b(\(status)d(=)k(sane_read)50 b(\(...\)\)\))545 1252
+y(read_in_and_proc)o(es)o(s_)o(da)o(ta_)o(as)o(_r)o(eq)o(ui)o(red)e
+(\(\);)436 1478 y(/*)54 b(If)g(transfer)d(was)i(broken)f(due)h(to)g
+(anything)e(but)i(EOF,)g(break)f(out.)h(*/)436 1591 y(if)h(\(status)d
+(!=)j(SANE_STATUS_EOF)o(\))545 1704 y(break;)436 1929
+y(/*)g(Now)f(loop)g(until)f(we)i(have)f(all)g(frames)f(of)h(an)h
+(image.)e(*/)327 2042 y(})218 2155 y(while)g(\(!\(parms.flag)d(&)54
+b(SANE_PFLAG_LAST)o(_F)o(RAM)o(E\))o(\);)218 2381 y(/*)g(O.K.)f(-)h(we)
+f(now)g(have)g(a)h(complete)d(image.)h(Fit)h(it)h(together,)c(save)j
+(it,)273 2494 y(*)h(flush)e(buffers,)f(transmit)g(it,)i(increment)e
+(filenames,)f(etc.)273 2607 y(*/)218 2833 y(/*)k(Now)f(check)f(for)h
+(more)g(pending)f(images.)f(If)j(we)f(have)g(more,)f(redo)h(from)g
+(start.)273 2946 y(*)h(Some)f(backends)d(might)j(cheat)f(here)h(and)g
+(send)g(us)g(for)g(an)h(extra)e(round)h(which)273 3059
+y(*)h(will)f(fail)f(at)i(sane_start,)49 b(as)54 b(they)f(were)g(not)g
+(able)f(to)i(determine)d(if)i(they)273 3171 y(*)h(would)e(have)h(more)g
+(data)f(at)i(the)f(start)f(of)i(the)f(last)g(frame)f(we)i(read.)273
+3284 y(*/)109 3397 y(})0 3510 y(while)e(\(parms.flags)d(&)54
+b(SANE_PFLAG_MORE_)o(IM)o(AG)o(ES)o(\);)0 3736 y(/*)g(No)f(more)g
+(data.)f(Fine.)h(Reset)f(the)h(backend)e(and)j(go)f(back)g(to)h
+(option-control)55 3849 y(*)g(loop.)55 3962 y(*/)0 4188
+y(sane_cancel)c(\(handle\);)0 4299 y
+ -31.0 Resolution mul 72.27 div /CBarX31 exch def currentpoint exch
+pop /CBarY31 exch def
+ 0 4299 a 0 4299
+a
+ 500.75499 Resolution mul 72.27 div /CBarX32 exch def currentpoint
+exch pop /CBarY32 exch def
+ 0 4299 a 0 4299 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX30 CBarY30 moveto CBarX32 CBarY32 lineto stroke grestore
+ 0 4299 a 340 x Fn(4.5)119 b(W)-8
+b(ell-Kno)o(wn)31 b(Options)0 4904 y Fq(While)g(most)h(back)o(end)h
+(options)g(are)e(completely)i(self-describing,)k(there)32
+b(are)g(cases)g(where)f(a)g(user)g(interf)o(ace)j(might)0
+5017 y(w)o(ant)24 b(to)g(special-case)k(the)c(handling)j(of)d(certain)i
+(options.)32 b(F)o(or)24 b(e)o(xample,)h(the)f(scan)h(area)g(is)f
+(typically)i(de\002ned)f(by)g(four)0 5130 y(options)35
+b(that)e(specify)h(the)f(top-left)i(and)e(bottom-right)j(corners)e(of)f
+(the)g(area.)57 b(W)l(ith)33 b(a)f(graphical)j(user)e(interf)o(ace,)k
+(it)1905 5381 y(40)p eop
+%%Page: 41 42
+41 41 bop 0 123 a Fq(w)o(ould)25 b(be)g(tedious)i(to)d(force)i(the)f
+(user)h(to)e(type)i(in)f(these)g(four)h(numbers.)34 b(Instead,)26
+b(most)f(such)h(interf)o(aces)h(will)d(w)o(ant)h(to)0
+236 y(present)f(to)f(the)g(user)g(a)g(pre)n(vie)n(w)g(\(lo)n
+(w-resolution)j(scan)d(of)g(the)g(full)g(scanner)h(surf)o(ace)h(or)d(a)
+h(high\(er\))h(resolution)i(scan)d(of)0 349 y(a)h(subpart)i(of)e(the)g
+(scanner)i(surf)o(ace\))h(and)d(let)h(the)f(user)h(pick)g(the)f(scan)h
+(area)g(by)f(dragging)j(a)d(rectangle)i(into)f(the)f(desired)0
+462 y(position.)43 b(F)o(or)27 b(this)i(reason,)g(the)f(SANE)e(API)g
+(speci\002es)j(a)e(small)h(number)h(of)e(option)j(names)e(that)g(ha)n
+(v)o(e)h(well-de\002ned)0 574 y(meanings.)0 882 y Fm(4.5.1)99
+b(Option)25 b(Number)h(Count)0 1115 y Fq(Option)e(number)h(0)e(has)h
+(an)f(empty)h(string)h(as)e(its)h(name.)29 b(The)23 b(v)n(alue)h(of)g
+(this)g(option)h(is)e(of)g(type)i Fp(SANE)p 3306 1115
+28 4 v 30 w(TYPE)p 3556 1115 V 31 w(INT)d Fq(and)0 1228
+y(it)29 b(speci\002es)i(the)e(total)h(number)g(of)g(options)h(a)n(v)n
+(ailable)g(for)f(a)f(gi)n(v)o(en)g(de)n(vice)i(\(the)f(count)g
+(includes)i(option)e(number)h(0\).)0 1341 y(This)23 b(means)h(that)f
+(there)h(are)g(tw)o(o)f(w)o(ays)g(of)g(counting)j(the)d(number)h(of)f
+(options)i(a)n(v)n(ailable:)32 b(a)22 b(frontend)k(can)d(either)i(c)o
+(ycle)0 1454 y(through)h(all)d(option)i(numbers)g(starting)h(at)d(one)h
+(until)h Fp(sane)p 1963 1454 V 31 w(get)p 2159 1454 V
+31 w(option)p 2520 1454 V 30 w(descriptor\(\))17 b Fq(returns)25
+b Fp(NULL)p Fq(,)c(or)j(a)0 1567 y(frontend)i(can)e(directly)h(read)f
+(out)g(the)g(v)n(alue)g(of)g(option)h(number)f(0.)0 1875
+y Fm(4.5.2)99 b(Scan)26 b(Resolution)e(Options)0 2108
+y Fq(Option)33 b Fp(resolution)28 b Fq(is)k(used)i(to)f(select)g(the)g
+(resolution)j(at)c(which)i(an)e(image)h(should)i(be)d(acquired.)3540
+2029 y
+ -31.0 Resolution mul 72.27 div /CBarX33 exch def currentpoint exch
+pop /CBarY33 exch def
+ 3540 2029 a 3540 2029 a
+ 500.75499 Resolution mul 72.27 div /CBarX34 exch def currentpoint
+exch pop /CBarY34 exch def
+ 3540 2029 a 79 x Fq(When)h(the)0
+2221 y(back)o(end)23 b(w)o(ants)f(to)f(allo)n(w)g(dif)n(ferent)i(v)n
+(alues)f(for)g(x-)f(and)g(y-resolution)k(it)c(has)g(to)g(de\002ne)h
+(the)f(options)i Fp(x-resolution)0 2334 y Fq(and)37 b
+Fp(y-resolution)p Fq(.)62 b(Note)37 b(that)g(only)g(the)g(option)i
+Fp(resolution)31 b Fr(or)37 b Fq(the)f(options)j Fp(x-resolution)30
+b Fr(and)0 2447 y Fp(y-resolution)17 b Fq(may)24 b(be)f(acti)n(v)o(e)h
+(at)g(the)f(same)h(time.)1846 2447 y
+ -31.0 Resolution mul 72.27 div /CBarX35 exch def currentpoint exch
+pop /CBarY35 exch def
+ 1846 2447 a 1846
+2447 a
+ 500.75499 Resolution mul 72.27 div /CBarX36 exch def currentpoint
+exch pop /CBarY36 exch def
+ 1846 2447 a 1846 2447 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX34 CBarY34 moveto CBarX36 CBarY36 lineto stroke grestore
+ 1846 2447 a 0 2618 a Fq(The)j(type)h(of)
+g(this)g(option)h(is)e(either)i Fp(SANE)p 1417 2618 28
+4 v 31 w(TYPE)p 1668 2618 V 31 w(INT)c Fq(or)j Fp(SANE)p
+2212 2618 V 31 w(TYPE)p 2463 2618 V 31 w(FIXED)p Fq(.)c(The)j(unit)h
+(is)g Fp(SANE)p 3460 2618 V 30 w(UNIT)p 3710 2618 V 31
+w(DPI)0 2731 y Fq(\(dots/inch\).)0 2903 y(These)e(options)h(are)f(not)g
+(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i
+(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0
+3016 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)0
+3324 y Fm(4.5.3)99 b(Pr)n(e)o(view)25 b(Mode)g(Option)0
+3557 y Fq(The)g(boolean)j(option)f Fp(preview)22 b Fq(is)j(used)i(by)f
+(a)f(frontend)j(to)e(inform)g(the)g(back)o(end)i(when)e(image)g
+(acquisition)j(should)0 3669 y(be)e(optimized)i(for)e(speed,)i(rather)g
+(than)e(quality)i(\(\223pre)n(vie)n(w)f(mode\224\).)41
+b(When)27 b(set)g(to)g Fp(SANE)p 3003 3669 V 31 w(TRUE)p
+Fq(,)e(pre)n(vie)n(w)i(mode)g(is)0 3782 y(in)e(ef)n(fect,)g(when)g(set)
+g(to)g Fp(SANE)p 1012 3782 V 31 w(FALSE)d Fq(image)j(acquisition)j
+(should)f(proceed)f(in)f(normal)h(quality)g(mode.)33
+b(The)25 b(setting)0 3895 y(of)c(this)h(option)h Fl(must)f(not)h
+Fq(af)n(fect)g(an)o(y)e(other)i(option.)29 b(That)22
+b(is,)f(as)g(f)o(ar)h(as)f(the)h(other)h(options)g(are)f(concerned,)i
+(the)e(pre)n(vie)n(w)0 4008 y(mode)i(is)g(completely)i(side)e(ef)n
+(fect)h(free.)30 b(A)23 b(back)o(end)j(can)e(assume)h(that)f(the)g
+(frontend)i(will)e(tak)o(e)g(care)h(of)e(appropriately)0
+4121 y(setting)i(the)e(scan)h(resolution)i(for)d(pre)n(vie)n(w)h(mode)f
+(\(through)j(option)e Fp(resolution)p Fq(\).)g(A)e(back)o(end)j(is)e
+(free)h(to)f(o)o(v)o(erride)0 4234 y(the)j Fp(resolution)21
+b Fq(v)n(alue)27 b(with)e(its)h(o)n(wn)g(choice)h(for)f(pre)n(vie)n(w)h
+(mode,)f(b)n(ut)g(it)g(is)g(advised)i(to)d(lea)n(v)o(e)i(this)g(choice)
+g(to)f(the)0 4347 y(frontend)35 b(where)n(v)o(er)e(possible.)1081
+4268 y
+ -31.0 Resolution mul 72.27 div /CBarX37 exch def currentpoint exch
+pop /CBarY37 exch def
+ 1081 4268 a 1081 4268 a
+ 500.75499 Resolution mul 72.27 div /CBarX38 exch def currentpoint
+exch pop /CBarY38 exch def
+ 1081 4268 a 79 x Fq(When)f(the)h
+Fp(preview)28 b Fq(option)34 b(is)e(set)h(the)f(back)o(end)j(should)f
+(transfer)g(the)f(image)f(in)0 4460 y(frame)24 b(type)g
+Fp(SANE)p 639 4460 28 4 v 31 w(FRAME)p 945 4460 V 30
+w(RAW)e Fq(if)h(possible.)1584 4460 y
+ -31.0 Resolution mul 72.27 div /CBarX39 exch def currentpoint exch
+pop /CBarY39 exch def
+ 1584 4460 a 1584
+4460 a
+ 500.75499 Resolution mul 72.27 div /CBarX40 exch def currentpoint
+exch pop /CBarY40 exch def
+ 1584 4460 a 1584 4460 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX38 CBarY38 moveto CBarX40 CBarY40 lineto stroke grestore
+ 1584 4460 a 0 4631 a Fq(This)j(option)i
+(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f
+(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i
+(consistent)0 4744 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)1905
+5381 y(41)p eop
+%%Page: 42 43
+42 42 bop 1125 1562 a @beginspecial 0 @llx 0 @lly 221
+@urx 205 @ury 1836 @rhi @setspecial
+%%BeginDocument: figs/area.eps
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: area.fig
+%%Creator: fig2dev Version 3.1 Patchlevel 1
+%%CreationDate: Wed Dec 4 19:19:37 1996
+%%For: davidm@panda.mosberger (David Mosberger-Tang)
+%%Orientation: Portrait
+%%BoundingBox: 0 0 221 205
+%%Pages: 0
+%%BeginSetup
+%%IncludeFeature: *PageSize Letter
+%%EndSetup
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {} def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+-59.0 231.0 translate
+1 -1 scale
+
+/clp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+%%EndProlog
+
+$F2psBegin
+10 setmiterlimit
+ 0.06000 0.06000 sc
+% Polyline
+n 1725 1725 m 3375 1725 l 3375 2775 l 1725 2775 l clp gs col7 0.90 shd ef gr
+/Helvetica findfont 180.00 scalefont setfont
+2550 2302 m
+gs 1 -1 sc (scan area) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+7.500 slw
+% Polyline
+n 1200 525 m 1200 3825 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 1230.00 3681.00 m 1200.00 3825.00 l 1170.00 3681.00 l 1200.50 3705.50 l 1230.00 3681.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+% Polyline
+n 1050 675 m 4650 675 l gs col7 0.80 shd ef gr gs col-1 s gr
+n 4506.00 645.00 m 4650.00 675.00 l 4506.00 705.00 l 4530.50 675.50 l 4506.00 645.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
+/Helvetica findfont 180.00 scalefont setfont
+3375 3150 m
+gs 1 -1 sc (bottom-right) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1725 1500 m
+gs 1 -1 sc (top-left) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+2700 1050 m
+gs 1 -1 sc (scan surface) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1050 3600 m
+gs 1 -1 sc (y) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+4425 525 m
+gs 1 -1 sc (x) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+/Helvetica findfont 180.00 scalefont setfont
+1080 585 m
+gs 1 -1 sc (0) dup stringwidth pop 2 div neg 0 rmoveto col-1 show gr
+% Polyline
+n 1725 1650 m 1725 1800 l gs col-1 s gr
+% Polyline
+n 1650 1725 m 1800 1725 l gs col-1 s gr
+% Polyline
+n 3375 2700 m 3375 2850 l gs col-1 s gr
+% Polyline
+n 3300 2775 m 3450 2775 l gs col-1 s gr
+15.000 slw
+% Polyline
+n 1200 675 m 4275 675 l 4275 3375 l 1200 3375 l clp gs col-1 s gr
+$F2psEnd
+restore
+
+%%EndDocument
+ @endspecial 1416 1757 a Fq(Figure)24 b(4.2:)29 b(Scan)23
+b(area)h(options)0 2124 y Fm(4.5.4)99 b(Scan)26 b(Ar)n(ea)f(Options)0
+2351 y Fq(The)d(four)i(most)e(important)j(well-kno)n(wn)f(options)g
+(are)f(the)g(ones)h(that)f(de\002ne)g(the)g(scan)h(area.)29
+b(The)22 b(scan)i(area)f(is)f(de\002ned)0 2464 y(by)h(tw)o(o)f(points)j
+(\(x/y)e(coordinate)j(pairs\))e(that)f(specify)i(the)e(top-left)i(and)e
+(the)g(bottom-right)j(corners.)k(This)23 b(is)f(illustrated)0
+2577 y(in)28 b(Figure)h(4.2.)44 b(Note)28 b(that)h(the)g(origin)h(of)e
+(the)h(coordinate)i(system)e(is)g(at)f(the)h(top-left)h(corner)g(of)e
+(the)h(scan)g(surf)o(ace)h(as)0 2690 y(seen)25 b(by)g(the)g(sensor)h
+(\(which)f(typically)i(is)e(a)f(mirror)h(image)g(of)g(the)f(scan)i
+(surf)o(ace)g(seen)g(by)e(the)h(user\).)33 b(F)o(or)24
+b(this)h(reason,)0 2803 y(the)i(top-left)i(corner)f(is)f(the)g(corner)i
+(for)e(which)g(the)g(abscissa)i(and)f(ordinate)h(v)n(alues)f(are)f
+(simultaneously)k(the)c Fl(smallest)0 2916 y Fq(and)f(the)f
+(bottom-right)k(corner)d(is)g(the)f(corner)i(for)f(which)f(the)h
+(abscissa)h(and)f(ordinate)i(v)n(alues)e(are)g(simulatenously)j(the)0
+3029 y Fl(lar)m(g)o(est)p Fq(.)h(If)22 b(this)i(coordinate)h(system)f
+(is)f(not)g(natural)h(for)f(a)f(gi)n(v)o(en)i(de)n(vice,)f(it)g(is)g
+(the)g(job)g(of)f(the)h(back)o(end)i(to)e(perform)h(the)0
+3141 y(necessary)i(con)l(v)o(ersions.)0 3307 y(The)d(names)h(of)g(the)f
+(four)i(options)g(that)f(de\002ne)g(the)g(scan)g(area)g(are)g(gi)n(v)o
+(en)g(in)f(the)h(table)h(belo)n(w:)1200 3529 y Fr(Name)100
+b(Description)1200 3642 y Fp(tl-x)107 b Fq(T)-7 b(op-left)24
+b Fh(x)f Fq(coordinate)j(v)n(alue)1200 3755 y Fp(tl-y)107
+b Fq(T)-7 b(op-left)24 b Fh(y)i Fq(coordinate)g(v)n(alue)1200
+3868 y Fp(br-x)107 b Fq(Bottom-right)25 b Fh(x)e Fq(coordinate)j(v)n
+(alue)1200 3981 y Fp(br-y)107 b Fq(Bottom-right)25 b
+Fh(y)h Fq(coordinate)g(v)n(alue)0 4200 y(There)e(are)f(se)n(v)o(eral)i
+(rules)f(that)h(should)g(be)e(follo)n(wed)i(by)f(front)g(and)g(back)o
+(ends)i(re)o(garding)f(these)g(options:)136 4428 y Fk(\017)46
+b Fq(Back)o(ends)25 b(must)f(attach)h(a)e(unit)h(of)f(either)i(pix)o
+(els)g(\()p Fp(SANE)p 2091 4428 28 4 v 31 w(UNIT)p 2342
+4428 V 31 w(PIXEL)p Fq(\))20 b(or)k(millimeters)h(\()p
+Fp(SANE)p 3484 4428 V 31 w(UNIT)p 3735 4428 V 31 w(MM)p
+Fq(\))227 4541 y(to)f(these)g(options.)31 b(The)23 b(unit)h(of)g(all)f
+(four)h(options)i(must)d(be)h(identical.)136 4723 y Fk(\017)46
+b Fq(Whene)n(v)o(er)25 b(meaningful,)g(a)f(back)o(end)h(should)g
+(attach)g(a)e(range)i(or)e(a)h(w)o(ord-list)h(constraint)h(to)d(these)i
+(options.)136 4906 y Fk(\017)46 b Fq(A)29 b(frontend)k(can)d(determine)
+i(the)f(size)g(of)f(the)h(scan)g(surf)o(ace)h(by)e(\002rst)g(checking)j
+(that)d(the)h(options)h(ha)n(v)o(e)f(range)227 5019 y(constraints)i
+(associated.)51 b(If)30 b(a)g(range)h(or)f(w)o(ord-list)h(constraints)i
+(e)o(xist,)f(the)f(frontend)h(can)e(tak)o(e)h(the)f(minimum)227
+5132 y(and)21 b(maximum)g(v)n(alues)h(of)e(one)h(of)f(the)h(x)g(and)g
+(y)f(option)i(range-constraints)k(to)20 b(determine)i(the)f(scan)h
+(surf)o(ace)g(size.)1905 5381 y(42)p eop
+%%Page: 43 44
+43 43 bop 136 123 a Fk(\017)46 b Fq(A)23 b(frontend)i(must)f(w)o(ork)g
+(properly)h(with)f(an)o(y)f(or)h(all)f(of)h(these)g(options)i(missing.)
+0 143 y
+ -31.0 Resolution mul 72.27 div /CBarX41 exch def currentpoint exch
+pop /CBarY41 exch def
+ 0 143 a 0 143 a
+ 500.75499 Resolution mul 72.27 div /CBarX42 exch def currentpoint
+exch pop /CBarY42 exch def
+ 0 143 a 136 309 a Fk(\017)46
+b Fq(A)21 b(frontend)i(may)f(temporarily)i(set)d(the)h(v)n(alues)h(in)e
+(a)g(w)o(ay)h(that)g Fp(tl-x)d Fq(is)i(lar)n(ger)i(than)f
+Fp(br-x)d Fq(and)j Fp(tl-y)d Fq(is)j(lar)n(ger)227 422
+y(than)j Fp(br-y)p Fq(.)676 422 y
+ -31.0 Resolution mul 72.27 div /CBarX43 exch def currentpoint exch
+pop /CBarY43 exch def
+ 676 422 a 676 422 a
+ 500.75499 Resolution mul 72.27 div /CBarX44 exch def currentpoint
+exch pop /CBarY44 exch def
+
+676 422 a 676 422 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX42 CBarY42 moveto CBarX44 CBarY44 lineto stroke grestore
+ 676 422 a 0 508 a
+ -31.0 Resolution mul 72.27 div /CBarX45 exch def currentpoint exch
+pop /CBarY45 exch def
+ 0 508 a 0 508 a
+ 500.75499 Resolution mul 72.27 div /CBarX46 exch def currentpoint
+exch pop /CBarY46 exch def
+
+0 508 a 156 x Fq(These)h(options)h(are)f(not)g(mandatory)-6
+b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i(them,)d(it)h
+(must)f(implement)i(them)e(in)g(a)g(manner)0 777 y(consistent)h(with)e
+(the)g(abo)o(v)o(e)g(de\002nition.)1341 777 y
+ -31.0 Resolution mul 72.27 div /CBarX47 exch def currentpoint exch
+pop /CBarY47 exch def
+ 1341 777
+a 1341 777 a
+ 500.75499 Resolution mul 72.27 div /CBarX48 exch def currentpoint
+exch pop /CBarY48 exch def
+ 1341 777 a 1341 777 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX46 CBarY46 moveto CBarX48 CBarY48 lineto stroke grestore
+ 1341 777 a 0 778 a
+ -31.0 Resolution mul 72.27 div /CBarX49 exch def currentpoint exch
+pop /CBarY49 exch def
+
+0 778 a 0 778 a
+ 500.75499 Resolution mul 72.27 div /CBarX50 exch def currentpoint
+exch pop /CBarY50 exch def
+ 0 778 a 305 x Fm(4.5.5)99 b(Depth)26
+b(Option)0 1315 y Fq(Option)e Fp(depth)19 b Fq(is)k(used)g(to)g(select)
+h(the)f(image)g(depth)h(in)f(bits/sample)i(in)e(multi)g(bit)g(mode)g
+(\(e.g.)28 b(for)23 b(24)g(bit)g(RGB)e(mode)0 1428 y(this)k(v)n(alue)g
+(must)f(be)g(8\).)31 b(The)24 b(type)h(of)f(this)h(option)h(is)e
+Fp(SANE)p 1975 1428 28 4 v 31 w(TYPE)p 2226 1428 V 31
+w(INT)p Fq(.)d(The)j(unit)h(is)f Fp(SANE)p 3100 1428
+V 31 w(UNIT)p 3351 1428 V 31 w(BIT)p Fq(.)e(F)o(or)h(1)h(bit)0
+1540 y(modes)e(\(Lineart)g(or)g(Halftone\))h(this)f(option)h(has)e(to)h
+(be)f(inacti)n(v)o(e.)30 b(F)o(or)20 b(selection)k(of)d(1)g(bit)h
+(modes)g(\(Lineart)g(or)g(Halftone\))0 1653 y(the)i(back)o(end)i
+(should)f(use)f(the)f(well-kno)n(wn)i(option)g Fp(mode)p
+Fq(.)0 1824 y(This)h(option)i(is)e(not)h(mandatory)-6
+b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f
+(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+1937 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 1937
+y
+ -31.0 Resolution mul 72.27 div /CBarX51 exch def currentpoint exch
+pop /CBarY51 exch def
+ 955 1937 a 955 1937 a
+ 500.75499 Resolution mul 72.27 div /CBarX52 exch def currentpoint
+exch pop /CBarY52 exch def
+ 955 1937 a 955 1937 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX50 CBarY50 moveto CBarX52 CBarY52 lineto stroke grestore
+ 955 1937
+a 0 1938 a
+ -31.0 Resolution mul 72.27 div /CBarX53 exch def currentpoint exch
+pop /CBarY53 exch def
+ 0 1938 a 0 1938 a
+ 500.75499 Resolution mul 72.27 div /CBarX54 exch def currentpoint
+exch pop /CBarY54 exch def
+ 0 1938 a 304 x Fm(4.5.6)99
+b(Scan)26 b(Mode)f(Options)0 2474 y Fq(The)d(option)i
+Fp(mode)19 b Fq(de\002nes)k(a)f Fp(SANE)p 1222 2474 28
+4 v 31 w(CONSTRAINT)p 1803 2474 V 28 w(STRING)p 2161
+2474 V 30 w(LIST)e Fq(of)i(type)h Fp(SANE)p 2926 2474
+V 31 w(TYPE)p 3177 2474 V 31 w(STRING)p Fq(.)18 b(It)k(is)g(used)0
+2587 y(to)34 b(select)i(the)e(scanmode)i(\(e.g.)61 b(Color)34
+b(or)g(Gray\).)61 b(W)-7 b(ell)34 b(kno)n(wn)h(modes)g(are:)50
+b Fp(Color)p Fq(,)34 b Fp(Gray)p Fq(,)g Fp(Halftone)c
+Fq(and)0 2700 y Fp(Lineart)p Fq(.)46 b Fp(Color)27 b
+Fq(and)k Fp(Gray)d Fq(are)j(multi)f(bit)h(modes)g(\(8)g(or)f(16)h
+(bits/sample\),)j Fp(Halftone)26 b Fq(and)31 b Fp(Lineart)c
+Fq(are)0 2813 y(single)f(bit)f(modes.)33 b(When)26 b(well-kno)n(wn)g
+(scan)f(modes)h(are)f(used,)g(a)g(frontend)i(is)d(able)i(to)f
+(automatically)j(decide)e(which)0 2926 y(mode)e(is)f(appropriate)k(for)
+d(a)f(speci\002c)h(task,)g(e.g)f(the)h(mode)g Fp(Gray)d
+Fq(for)i(scanning)j(a)d(f)o(ax.)0 3096 y(This)j(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3209 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3209
+y
+ -31.0 Resolution mul 72.27 div /CBarX55 exch def currentpoint exch
+pop /CBarY55 exch def
+ 955 3209 a 955 3209 a
+ 500.75499 Resolution mul 72.27 div /CBarX56 exch def currentpoint
+exch pop /CBarY56 exch def
+ 955 3209 a 955 3209 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX54 CBarY54 moveto CBarX56 CBarY56 lineto stroke grestore
+ 955 3209
+a 0 3210 a
+ -31.0 Resolution mul 72.27 div /CBarX57 exch def currentpoint exch
+pop /CBarY57 exch def
+ 0 3210 a 0 3210 a
+ 500.75499 Resolution mul 72.27 div /CBarX58 exch def currentpoint
+exch pop /CBarY58 exch def
+ 0 3210 a 305 x Fm(4.5.7)99
+b(Scan)26 b(Sour)n(ce)g(Options)0 3746 y Fq(The)35 b(option)h
+Fp(source)c Fq(is)j(used)h(to)f(select)h(the)g(scan)f(source)i(\(e.g.)
+63 b(Automatic)37 b(Document)f(Feeder\).)64 b(It)35 b(de\002nes)h(a)0
+3859 y Fp(SANE)p 225 3859 28 4 v 31 w(CONSTRAINT)p 806
+3859 V 28 w(STRING)p 1164 3859 V 30 w(LIST)20 b Fq(of)j(type)g
+Fp(SANE)p 1930 3859 V 31 w(TYPE)p 2181 3859 V 31 w(STRING)p
+Fq(.)c(W)-7 b(ell)22 b(kno)n(wn)h(sources)h(are:)29 b
+Fp(Flatbed)p Fq(,)0 3972 y Fp(Transparancy)49 b(Adapter)20
+b Fq(and)k Fp(Automatic)50 b(Document)h(Feeder)p Fq(.)0
+4142 y(This)26 b(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 4255
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 4255 y
+ -31.0 Resolution mul 72.27 div /CBarX59 exch def currentpoint exch
+pop /CBarY59 exch def
+
+955 4255 a 955 4255 a
+ 500.75499 Resolution mul 72.27 div /CBarX60 exch def currentpoint
+exch pop /CBarY60 exch def
+ 955 4255 a 955 4255 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX58 CBarY58 moveto CBarX60 CBarY60 lineto stroke grestore
+ 955 4255
+a 0 4256 a
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 0 4256 a 0 4256 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 0 4256 a 305 x Fm(4.5.8)99
+b(Thr)n(eshold)26 b(Option)0 4793 y Fq(The)31 b(option)i
+Fp(threshold)27 b Fq(is)k(used)i(to)e(de\002ne)h(the)g(threshold)i(for)
+d(Lineart)i(and)f(maybe)g(Halftone)h(mode.)53 b(In)31
+b(multi)0 4906 y(bit)36 b(modes)g(this)g(option)i(should)f(be)f(set)g
+(inacti)n(v)o(e.)67 b(The)35 b(type)h(of)g(this)g(option)i(is)d
+Fp(SANE)p 2975 4906 28 4 v 31 w(TYPE)p 3226 4906 V 31
+w(FIXED)p Fq(.)d(The)k(unit)0 5019 y(is)g Fp(SANE)p 321
+5019 V 31 w(UNIT)p 572 5019 V 30 w(PERCENT)p Fq(.)c(The)j(v)n(alue)i
+(range)g(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)36 b(if)f(possible.)68
+b(It)36 b(de\002nes)g(the)g(minimum)0 5132 y(intensity)26
+b(to)d(get)h(a)f(white)h(point)h(/)e(full)h(intensity)-6
+b(.)0 5151 y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 0 5151
+a 1905 5381 a Fq(43)p eop
+%%Page: 44 45
+44 44 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX61 exch def currentpoint exch
+pop /CBarY61 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX62 exch def currentpoint
+exch pop /CBarY62 exch def
+ 0 32 a 91 x Fq(The)28
+b(back)o(end)i(has)e(to)g(scale)h(the)f(v)n(alues)h(in)f(the)g(follo)n
+(wing)i(w)o(ay:)37 b(A)27 b(v)n(alue)i(of)f(0.0)g(means)g(all)g(pix)o
+(els)h(get)f(white)g(/)g(full)0 236 y(intensity)-6 b(.)34
+b(A)23 b(v)n(alue)i(of)g(50.0)f(means)h(intensities)j(brighter)e(than)f
+(medium)g(gray)g(get)g(white)f(/)g(full)h(intensity)-6
+b(.)34 b(A)23 b(v)n(alue)i(of)0 349 y(100.0)h(means)f(all)g(pix)o(els)h
+(get)f(black.)33 b(If)25 b(the)g(scanner)h(is)f(not)g(able)h(to)e(co)o
+(v)o(er)i(the)f(full)g(range)h(the)f(back)o(end)i(has)e(to)g(de\002ne)0
+462 y(a)e(reduced)j(v)n(alue)e(range)h(\(e.g.)j(30.)14
+b(.)g(.)g(70)23 b(percent\).)0 633 y(This)j(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+746 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 746
+y
+ -31.0 Resolution mul 72.27 div /CBarX63 exch def currentpoint exch
+pop /CBarY63 exch def
+ 955 746 a 955 746 a
+ 500.75499 Resolution mul 72.27 div /CBarX64 exch def currentpoint
+exch pop /CBarY64 exch def
+ 955 746 a 955 746 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX62 CBarY62 moveto CBarX64 CBarY64 lineto stroke grestore
+ 955 746 a 0
+747 a
+ -31.0 Resolution mul 72.27 div /CBarX65 exch def currentpoint exch
+pop /CBarY65 exch def
+ 0 747 a 0 747 a
+ 500.75499 Resolution mul 72.27 div /CBarX66 exch def currentpoint
+exch pop /CBarY66 exch def
+ 0 747 a 307 x Fm(4.5.9)99 b(Gamma)24
+b(T)-9 b(able)25 b(Options)0 1287 y Fq(The)30 b Fp(gamma-table)24
+b Fq(option)32 b(de\002nes)f(a)f Fp(SANE)p 1644 1287
+28 4 v 31 w(CONSTRAINT)p 2225 1287 V 29 w(RANGE)d Fq(of)j(the)h(type)g
+Fp(SANE)p 3208 1287 V 31 w(TYPE)p 3459 1287 V 31 w(INT)d
+Fq(which)0 1400 y(represents)22 b(the)d(gamma)g(correction)j(table)e
+(for)g(gray)-6 b(.)28 b(In)19 b(color)h(mode)g(the)f
+Fp(gamma-table)14 b Fq(may)19 b(be)g(used)h(to)f(set)g(a)g(com-)0
+1513 y(mon)f(gamma)f(correction)k(for)d(red,)i(green)f(and)f(blue.)28
+b(The)18 b(options)i Fp(red-gamma-tabl)o(e)p Fq(,)12
+b Fp(green-gamma-tab)o(le)0 1626 y Fq(and)32 b Fp(blue-gamma-table)24
+b Fq(are)32 b(used)h(in)f(color)h(mode)f(to)g(set)g(a)f(gamma)g
+(correction)k(for)d(each)h(color)g(separately)-6 b(.)0
+1739 y(In)32 b(color)g(mode)g(the)g(back)o(end)i(is)d(free)i(to)e(use)h
+(only)h(the)f Fp(gamma-table)25 b Fq(option,)35 b(only)e(the)f
+Fp(red-)p Fq(,)f Fp(green-)d Fq(and)0 1852 y Fp(blue-gamma-tabl)o(e)19
+b Fq(or)26 b(all)g(four)h(options.)38 b(When)26 b(all)g(four)h(options)
+h(are)e(used)h(then)g(the)f(color)h(tables)g(should)h(do)0
+1964 y(a)g(gamma)g(correction)j(with)d(the)h(same)f(input)i(and)f
+(output)h(bit)f(depth)g(and)g(the)g(gray)g(gamma)f(table)h(should)h
+(reduce)g(\(if)0 2077 y(necessary\))i(the)d(bit)f(depth)i(from)f(the)g
+(scanner)i(internal)f(bit)f(depth)h(to)f(the)g(output)h(bit)f(depth.)45
+b(This)29 b(should)h(e.g.)44 b(look)0 2190 y(lik)o(e)24
+b(this:)0 2437 y Fp(red_value)160 b(=)54 b(gamma-table\(re)o(d-)o(ga)o
+(mma)o(-t)o(ab)o(le)o(\(v)o(alu)o(e\))o(\))0 2550 y(green_value)c(=)k
+(gamma-table\(gr)o(ee)o(n-)o(gam)o(ma)o(-t)o(ab)o(le)o(\(va)o(lu)o(e\))
+o(\))0 2662 y(blue_value)105 b(=)54 b(gamma-table\(bl)o(ue)o(-g)o(amm)o
+(a-)o(ta)o(bl)o(e\()o(val)o(ue)o(\)\))0 2909 y Fq(The)24
+b(back)o(end)j(should)f(not)f(use)g(the)g(gamma)f(tables)i(to)e
+(emulate)i(other)f(functions)i(or)e(options)h(lik)o(e)g(highlight,)h
+(shado)n(w)-6 b(,)0 3022 y(contrast,)24 b(brightness,)i(threshold,)f
+(analog)p 1379 3022 V 35 w(gamma.)j(These)22 b(functions)j(are)e
+(common)g(for)g(all)f(back)o(ends)j(and)e(should)h(be)0
+3135 y(added)h(to)e(the)h(frontend)i(or)d(a)g(meta-back)o(end.)0
+3306 y(It)j(is)f(also)i(discouraged)i(to)d(emulate)h(gamma)e(tables)i
+(in)f(the)g(back)o(end.)38 b(The)25 b(back)o(end)j(should)g(disable)f
+(\(or)f(not)h(de\002ne\))0 3419 y(this)d(option)h(when)f(the)g(scanner)
+h(does)f(not)g(support)i(gamma)d(tables)h(in)g(hardw)o(are.)0
+3591 y(This)i(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 3704
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3704 y
+ -31.0 Resolution mul 72.27 div /CBarX67 exch def currentpoint exch
+pop /CBarY67 exch def
+
+955 3704 a 955 3704 a
+ 500.75499 Resolution mul 72.27 div /CBarX68 exch def currentpoint
+exch pop /CBarY68 exch def
+ 955 3704 a 955 3704 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX66 CBarY66 moveto CBarX68 CBarY68 lineto stroke grestore
+ 955 3704
+a 0 3705 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 3705 a 0 3705 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 3705 a 307 x Fm(4.5.10)99
+b(Analog)24 b(Gamma)0 4245 y Fq(The)37 b(option)i Fp(analog-gamma)31
+b Fq(is)38 b(used)g(to)g(de\002ne)f(the)h(gamma)f(v)n(alue)i(for)e(an)h
+(analog)h(gamma)e(function)i(of)f(the)0 4357 y(scanner)33
+b(in)e(multi)h(bit)f(modes.)53 b(In)31 b(1)g(bit)g(modes)h(this)g
+(option)h(should)g(be)e(set)g(inacti)n(v)o(e.)54 b(The)31
+b(type)h(of)f(this)h(option)g(is)0 4470 y Fp(SANE)p 225
+4470 28 4 v 31 w(TYPE)p 476 4470 V 31 w(FIXED)p Fq(.)27
+b(The)k(unit)g(is)g Fp(SANE)p 1486 4470 V 30 w(UNIT)p
+1736 4470 V 31 w(NONE)p Fq(.)d(The)j(v)n(alue)g(range)h(can)f(be)g
+(de\002ned)g(by)g(the)g(back)o(end)i(as)0 4583 y(supported.)38
+b(The)26 b(v)n(alues)h(ha)n(v)o(e)f(to)g(be)g(positi)n(v)o(e.)37
+b(A)25 b(gamma)g(v)n(alue)i(of)f(1.0)f(means)i(that)f(the)g(gamma)f
+(correction)k(has)d(no)0 4696 y(ef)n(fect.)j(A)20 b(v)n(alue)j(lar)n
+(ger)g(than)g(1.0)e(increases)j(the)e(brightness)j(of)c(the)h(image.)29
+b(In)21 b(color)i(mode)f(there)g(also)h(can)f(be)f(options)0
+4809 y Fp(analog-gamma-re)o(d)p Fq(,)16 b Fp(analog-gamma-gre)o(en)g
+Fq(and)24 b Fp(analog-gamma-bl)o(ue)o Fq(.)f(It)g(is)h(not)g(allo)n
+(wed)g(to)g(em-)0 4922 y(ulate)29 b(an)e(analog)i(gamma)e(function)j
+(by)e(a)f(digital)i(gamma)e(table.)42 b(The)27 b(back)o(end)j(has)e(to)
+f(disable)j(\(or)d(not)h(de\002ne\))h(this)0 5035 y(option)c(when)f
+(the)g(scanner)h(does)f(not)g(support)i(an)d(analog)i(\(hardw)o(are\))h
+(gamma)d(function.)0 5055 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+ 0 5055 a 0 5055 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 0 5055
+a 0 5055 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 0 5055 a 1905 5381 a Fq(44)p eop
+%%Page: 45 46
+45 45 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX69 exch def currentpoint exch
+pop /CBarY69 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX70 exch def currentpoint
+exch pop /CBarY70 exch def
+ 0 32 a 91 x Fq(When)37
+b(analog)i(gamma,)h(highlight)f(and)f(shado)n(w)f(functions)j(are)d(a)n
+(v)n(ailable)j(at)d(the)g(same)g(time)g(then)h(the)f(back)o(end)0
+236 y(author)32 b(has)g(to)e(care)i(about)g(the)f(order)h(in)e(which)i
+(the)f(functions)i(are)e(implemented)i(in)e(the)g(scanner)i(hardw)o
+(are.)52 b(The)0 349 y(SANE)26 b(standard)31 b(e)o(xpects)f(that)f
+(changing)i(the)e(analog)h(gamma)e(v)n(alue)i(has)f(no)f(ef)n(fect)i
+(on)e(the)h(shado)n(w)h(and)f(highlight)0 462 y(function.)59
+b(When)33 b(the)g(analog)i(gamma)d(function)j(is)e(e)o(x)o(ecuted)i(in)
+d(the)i(scanner)g(hardw)o(are)h(before)f(the)f(shado)n(w)h(and)0
+574 y(highlight)d(functions)g(then)e(the)g(back)o(end)i(should)f(do)e
+(a)g(compensation.)47 b(F)o(or)27 b(this)i(the)g(shado)n(w)g(and)g
+(highlight)i(v)n(alues)0 687 y(ha)n(v)o(e)24 b(to)g(be)f(gamma)g
+(corrected)j(with)d(the)h(rele)n(v)n(ant)h(analog)g(gamma)e(v)n(alue.)0
+855 y(This)j(option)i(is)e(not)h(mandatory)-6 b(,)28
+b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h(it,)f(it)f(must)g
+(implement)h(it)f(in)h(a)e(manner)i(consistent)0 968
+y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 968 y
+ -31.0 Resolution mul 72.27 div /CBarX71 exch def currentpoint exch
+pop /CBarY71 exch def
+
+955 968 a 955 968 a
+ 500.75499 Resolution mul 72.27 div /CBarX72 exch def currentpoint
+exch pop /CBarY72 exch def
+ 955 968 a 955 968 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX70 CBarY70 moveto CBarX72 CBarY72 lineto stroke grestore
+ 955 968 a 0 969
+a
+ -31.0 Resolution mul 72.27 div /CBarX73 exch def currentpoint exch
+pop /CBarY73 exch def
+ 0 969 a 0 969 a
+ 500.75499 Resolution mul 72.27 div /CBarX74 exch def currentpoint
+exch pop /CBarY74 exch def
+ 0 969 a 302 x Fm(4.5.11)99 b(Shado)o(w)25
+b(Option)0 1500 y Fq(The)36 b(option)j Fp(shadow)33 b
+Fq(is)k(used)g(to)g(de\002ne)g(the)g(shado)n(w)h(le)n(v)o(el)f(/)f
+(black)i(point)g(le)n(v)o(el.)69 b(The)36 b(type)i(of)f(this)g(option)h
+(is)0 1613 y Fp(SANE)p 225 1613 28 4 v 31 w(TYPE)p 476
+1613 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p
+1461 1613 V 31 w(UNIT)p 1712 1613 V 31 w(PERCENT)p Fq(.)d(The)j(v)n
+(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24
+b(if)h(possi-)0 1725 y(ble.)k(It)23 b(is)h(used)g(to)f(de\002ne)h(the)g
+(maximum)g(intensity)i(le)n(v)o(el)d(that)h(creates)i(an)d(image)h
+(data)g(v)n(alue)h(of)e(0)g(\(black\).)0 1893 y(The)h(back)o(end)i(has)
+e(to)g(scale)h(the)f(v)n(alues)h(in)f(the)h(follo)n(wing)g(w)o(ay:)30
+b(A)23 b(v)n(alue)i(of)e(0.0)h(means)h(that)f(the)h(sensiti)n(vity)h
+(range)f(is)0 2006 y(not)f(reduced,)i(only)f(the)f(minimum)g(intensity)
+i(produces)g(an)e(image)h(data)f(v)n(alue)h(of)f(0)g(\(black\).)31
+b(A)23 b(v)n(alue)i(of)f(50.0)g(means)0 2119 y(that)d(that)h(a)e
+(medium)h(intensity)i(and)e(e)n(v)o(erything)j(that)d(is)g(dark)o(er)h
+(produces)h(an)e(image)g(data)g(v)n(alue)h(of)f(0)f(\(black\).)30
+b(A)19 b(v)n(alue)0 2232 y(of)j(100.0)h(means)g(the)g(sensiti)n(vity)i
+(range)e(is)f(reduced)j(to)d(0,)g(all)g(image)h(data)g(v)n(alues)g(are)
+g(0)f(\(black\).)30 b(If)22 b(the)h(scanner)h(is)e(not)0
+2345 y(able)j(to)e(co)o(v)o(er)i(the)f(full)g(range)h(the)g(back)o(end)
+h(has)e(to)g(de\002ne)g(a)g(reduced)i(v)n(alue)e(range)h(\(e.g.)30
+b(30.)14 b(.)g(.)g(70)23 b(percent\).)32 b(In)24 b(color)0
+2458 y(mode)d(there)h(can)f(be)g(options)i Fp(shadow-red)p
+Fq(,)16 b Fp(shadow-green)f Fq(and)21 b Fp(shadow-blue)p
+Fq(,)16 b(in)k(this)i(case)f(the)h Fp(shadow)0 2571 y
+Fq(function)29 b(has)f(to)f(be)g(disabled.)42 b(It)27
+b(is)g(not)h(allo)n(wed)f(to)h(emulate)g(a)f(shado)n(w)g(function)j(by)
+d(a)g(digital)h(gamma)f(table.)41 b(The)0 2684 y(back)o(end)29
+b(has)e(to)g(disable)i(\(or)e(not)g(de\002ne\))h(this)f(option)h(when)f
+(the)g(scanner)i(does)f(not)f(support)i(an)e(analog)h(\(hardw)o(are\))0
+2797 y(shado)n(w)c(function.)0 2964 y(This)i(option)i(is)e(not)h
+(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o(end)i(does)f(support)h
+(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e(manner)i(consistent)0
+3077 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)955 3077
+y
+ -31.0 Resolution mul 72.27 div /CBarX75 exch def currentpoint exch
+pop /CBarY75 exch def
+ 955 3077 a 955 3077 a
+ 500.75499 Resolution mul 72.27 div /CBarX76 exch def currentpoint
+exch pop /CBarY76 exch def
+ 955 3077 a 955 3077 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX74 CBarY74 moveto CBarX76 CBarY76 lineto stroke grestore
+ 955 3077
+a 0 3078 a
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 3078 a 0 3078 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 3078 a 302 x Fm(4.5.12)99
+b(Highlight)24 b(Option)0 3609 y Fq(The)i(option)i Fp(highlight)21
+b Fq(is)26 b(used)h(to)f(de\002ne)h(the)g(highlight)h(le)n(v)o(el)f(/)f
+(white)g(point)i(le)n(v)o(el.)37 b(The)26 b(type)h(of)f(this)h(option)g
+(is)0 3722 y Fp(SANE)p 225 3722 28 4 v 31 w(TYPE)p 476
+3722 V 31 w(FIXED)p Fq(.)21 b(The)j(unit)i(is)e Fp(SANE)p
+1461 3722 V 31 w(UNIT)p 1712 3722 V 31 w(PERCENT)p Fq(.)d(The)j(v)n
+(alue)h(range)h(should)h(be)d(0.0.)14 b(.)g(.)g(100.0)24
+b(if)h(possi-)0 3835 y(ble.)47 b(It)29 b(is)g(used)i(to)e(de\002ne)h
+(the)g(minimum)f(intensity)j(le)n(v)o(el)e(that)g(creates)h(the)e
+(maximum)h(possible)h(image)f(data)g(v)n(alue)0 3948
+y(\(white/full)c(intensity\).)0 4115 y(The)32 b(back)o(end)i(has)e(to)g
+(scale)h(the)f(v)n(alues)h(in)f(the)g(follo)n(wing)i(w)o(ay:)46
+b(A)30 b(v)n(alue)j(of)f(0.0)g(means)g(the)h(sensiti)n(vity)h(range)f
+(is)0 4228 y(reduced)h(to)e(0,)i(all)f(image)f(data)h(ha)n(v)o(e)g
+(maximum)f(v)n(alue)h(\(white)g(/)f(full)h(intensity\).)57
+b(A)31 b(v)n(alue)i(of)g(50.0)f(means)h(that)g(a)0 4341
+y(medium)25 b(intensity)i(and)e(e)n(v)o(erything)h(that)g(is)e
+(brighter)i(produces)h(the)e(maximum)g(possible)h(image)f(data)g(v)n
+(alue)h(\(white)f(/)0 4454 y(full)e(intensity\).)31 b(A)21
+b(v)n(alue)i(of)f(100.0)h(means)g(that)g(the)f(sensiti)n(vity)j(range)f
+(is)e(not)h(reduced,)h(only)f(the)g(maximum)f(intensity)0
+4567 y(produces)35 b(an)d(image)h(data)g(with)g(maximum)f(possible)j(v)
+n(alue)e(\(white)g(/)f(full)h(intensity\).)58 b(If)32
+b(the)h(scanner)h(is)f(not)g(able)0 4680 y(to)f(co)o(v)o(er)g(the)g
+(full)h(range)g(the)f(back)o(end)i(has)e(to)g(de\002ne)g(a)f(reduced)j
+(v)n(alue)f(range)g(\(e.g.)54 b(30.)14 b(.)g(.)g(70)31
+b(percent\).)55 b(In)32 b(color)0 4793 y(mode)37 b(there)h(can)f(be)g
+(options)i Fp(highlight-red)p Fq(,)33 b Fp(highlight-gree)o(n)d
+Fq(and)37 b Fp(highlight-blue)p Fq(,)c(in)k(this)0 4906
+y(case)27 b Fp(highlight)21 b Fq(has)27 b(to)f(be)h(disabled.)39
+b(It)26 b(is)g(not)h(allo)n(wed)g(to)f(emulate)h(a)f(highlight)j
+(function)g(by)d(a)g(digital)i(gamma)0 5019 y(table.)42
+b(The)28 b(back)o(end)i(has)e(to)g(disable)h(\(or)f(not)g(de\002ne\))h
+(this)f(option)i(when)e(the)g(scanner)h(does)g(not)f(support)i(an)e
+(analog)0 5132 y(\(hardw)o(are\))e(highlight)g(function.)0
+5151 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 0 5151 a 0 5151 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 0 5151 a 0 5151 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 0 5151 a 1905
+5381 a Fq(45)p eop
+%%Page: 46 47
+46 46 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX77 exch def currentpoint exch
+pop /CBarY77 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX78 exch def currentpoint
+exch pop /CBarY78 exch def
+ 0 32 a 91 x Fq(This)26
+b(option)i(is)e(not)h(mandatory)-6 b(,)28 b(b)n(ut)f(if)f(a)g(back)o
+(end)i(does)f(support)h(it,)f(it)f(must)g(implement)h(it)f(in)h(a)e
+(manner)i(consistent)0 236 y(with)c(the)h(abo)o(v)o(e)g(de\002nition.)
+955 236 y
+ -31.0 Resolution mul 72.27 div /CBarX79 exch def currentpoint exch
+pop /CBarY79 exch def
+ 955 236 a 955 236 a
+ 500.75499 Resolution mul 72.27 div /CBarX80 exch def currentpoint
+exch pop /CBarY80 exch def
+ 955 236 a 955 236 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX78 CBarY78 moveto CBarX80 CBarY80 lineto stroke grestore
+ 955
+236 a 0 237 a
+ -31.0 Resolution mul 72.27 div /CBarX1 exch def currentpoint exch
+pop /CBarY1 exch def
+ 0 237 a 0 237 a
+ 500.75499 Resolution mul 72.27 div /CBarX2 exch def currentpoint exch
+pop /CBarY2 exch def
+ 0 237 a 307 x Fm(4.5.13)99
+b(Lamp)25 b(Options)0 777 y Fq(The)k(options)i Fp(lamp-on)25
+b Fq(and)30 b Fp(lamp-off)25 b Fq(are)30 b(b)n(utton)h(options)g(\()p
+Fp(SANE)p 2451 777 28 4 v 31 w(TYPE)p 2702 777 V 31 w(BUTTON)p
+Fq(\))26 b(and)k(don')n(t)h(ha)n(v)o(e)f(a)f(unit)0 890
+y(\()p Fp(SANE)p 255 890 V 31 w(UNIT)p 506 890 V 31 w(NONE)p
+Fq(\).)0 1061 y(Option)24 b Fp(lamp-on)c Fq(is)j(used)i(to)e(turn)h(on)
+g(the)g(lamp)f(of)h(the)f(scanner)j(while)e Fp(lamp-off)19
+b Fq(turns)24 b(it)f(of)n(f.)0 1233 y(These)j(options)h(are)f(not)g
+(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e(support)i
+(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0
+1346 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)1341
+1346 y
+ -31.0 Resolution mul 72.27 div /CBarX3 exch def currentpoint exch
+pop /CBarY3 exch def
+ 1341 1346 a 1341 1346 a
+ 500.75499 Resolution mul 72.27 div /CBarX4 exch def currentpoint exch
+pop /CBarY4 exch def
+ 1341 1346 a 1341 1346
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX2 CBarY2 moveto CBarX4 CBarY4 lineto stroke grestore
+ 1341 1346 a 0 1347 a
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 1347 a 0 1347 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 1347 a 307
+x Fm(4.5.14)99 b(Scanner)26 b(Button)h(Options)0 1887
+y Fq(Some)k(scanners)j(ha)n(v)o(e)e(b)n(uttons)i(which)e(state)h(can)f
+(be)g(read)g(by)g(the)g(scanner)i(dri)n(v)o(er)-5 b(.)54
+b(It)31 b(is)h(necessary)i(to)e(implement)0 2000 y(a)f(locking)i
+(function)g(for)f(the)f(b)n(uttons)j(because)f(it)e(is)g(possible)i
+(that)f(se)n(v)o(eral)g(frontends)i(try)d(to)g(connect)j(to)d(the)g
+(same)0 2112 y(back)o(end/scanner)36 b(at)30 b(the)h(same)f(time.)50
+b(Imagine)31 b(what)g(could)h(happen)g(when)e(no)h(locking)h(w)o(ould)f
+(be)g(implemented:)0 2225 y(Fi)n(v)o(e)25 b(people)i(ha)n(v)o(e)f
+(started)h(a)e(scanning)j(application)g(which)e(is)g(connected)i(via)e
+(netw)o(ork)g(to)g(the)f(scanner)j(you)e(w)o(ant)f(to)0
+2338 y(use.)36 b(Y)-10 b(ou)26 b(start)g(a)g(frontend,)i(put)e(a)f
+(paper)i(to)f(the)g(scanner)i(and)e(press)h(the)f(scan-b)n(utton)j(on)d
+(the)h(scanner)-5 b(.)37 b(The)25 b(scanner)0 2451 y(does)30
+b(scan)g(three)g(times)f(\(because)i(three)g(frontends)g(ask)o(ed)g
+(the)e(b)n(utton)i(status)f(when)g(you)f(pressed)i(the)f(b)n(utton\).)
+47 b(F)o(or)0 2564 y(three)24 b(people)i(the)d(image)h(is)g(sa)n(v)o
+(ed)g(to)g(the)f(harddisk,)j(b)n(ut)e(it)f(is)h(not)g(sure)g(that)g
+(your)g(frontend)i(did)e(scan)g(the)g(image.)0 2736 y(A)e(back)o(end)k
+(that)e(does)h(mak)o(e)e(a)n(v)n(ailable)j(the)e(scanner)n(-b)n(uttons)
+29 b(has)24 b(to)f(implement)i(the)e(follo)n(wing)i(options:)0
+2849 y Fp(scanner-buttons)o(-l)o(oc)o(k)17 b Fq(is)23
+b(of)g(type)i Fp(SANE)p 1700 2849 28 4 v 31 w(TYPE)p
+1951 2849 V 31 w(BOOL)p Fq(,)20 b(def)o(ault)25 b(=)e
+Fp(SANE)p 2813 2849 V 31 w(FALSE)0 2961 y(scanner-buttons)o(-s)o(ta)o
+(tu)o(s)17 b Fq(is)23 b(of)h(type)g Fp(SANE)p 1809 2961
+V 31 w(TYPE)p 2060 2961 V 31 w(INT)p Fq(,)d(def)o(ault)k(=)e(0)0
+3074 y Fp(scanner-buttons)o(-s)o(ta)o(tu)o(s-u)o(pd)o(at)o(e)17
+b Fq(is)23 b(of)g(type)i Fp(SANE)p 2191 3074 V 31 w(TYPE)p
+2442 3074 V 30 w(BUTTON)0 3187 y Fq(When)18 b(setting)i(these)f
+(options)h(the)f(back)o(end)h(does)f(not)f(set)g Fp(SANE)p
+2091 3187 V 31 w(INFO)p 2342 3187 V 31 w(RELOAD)p 2703
+3187 V 30 w(OPTIONS)c Fq(or)k Fp(SANE)p 3445 3187 V 31
+w(INFO)p 3696 3187 V 31 w(RELOAD)p 4057 3187 V 30 w(PARAMS)0
+3300 y Fq(if)23 b(not)h(e)o(xplictly)i(de\002ned.)0 3472
+y(A)34 b(frontend)k(has)e(to)f(disable)j(the)d(usage)i(of)e(the)h
+(scanner)n(-b)n(uttons)41 b(by)36 b(def)o(ault.)66 b(This)35
+b(is)h(important)h(because)g(other)0 3585 y(frontends)26
+b(will)e(not)g(be)f(able)i(to)e(use)h(the)g(b)n(uttons)i(when)e(the)g
+(b)n(utton-functions)29 b(are)24 b(lock)o(ed.)31 b(Another)25
+b(important)g(thing)0 3698 y(is)f(that)h(some)f(scanners)i(do)f(not)f
+(turn)h(of)n(f)f(their)h(lamp)f(when)g(the)h(dri)n(v)o(er)g(does)g
+(frequently)i(talk)d(to)h(the)f(scanner)i(\(what)e(is)0
+3811 y(done)g(when)g(reading)h(the)f(b)n(utton)i(status)e(from)g(the)g
+(scanner\).)136 4082 y Fk(\017)46 b Fq(A)31 b(frontend)j(that)e(w)o
+(ants)g(to)g(read)h(the)f(b)n(utton)h(status)g(has)f(to)g(lock)h(the)f
+(b)n(utton)h(functions)h(at)e(\002rst.)53 b(F)o(or)31
+b(this)h(it)227 4195 y(does)d(set)g(the)f(option)i Fp(scanner-buttons)o
+(-lo)o(ck)21 b Fq(to)28 b Fp(SANE)p 2390 4195 V 31 w(TRUE)p
+Fq(.)d(While)k(setting)h(the)e(v)n(alue)h(of)g(option)227
+4308 y Fp(scanner-buttons)o(-lo)o(ck)20 b Fq(to)27 b
+Fp(SANE)p 1667 4308 V 31 w(TRUE)e Fq(the)j(back)o(end)i(does)e(check)h
+(if)e(a)g(lock\002le)h(\(e.g.)41 b(\223back)o(end\224-)227
+4421 y(b)n(uttons.lock\))33 b(does)c(e)o(xist.)45 b(The)28
+b(lock\002le)h(has)g(to)g(be)f(placed)i(in)f(a)f(directory)j(where)e(e)
+n(v)o(ery)g(user)g(has)g(read)h(and)227 4533 y(write)24
+b(access)h(to.)336 4746 y Fr(\226)46 b Fq(If)20 b(the)h(lock\002le)g
+(does)g(not)f(e)o(xist)h(then)g(the)f(back)o(end)j(creates)f(the)e
+(lock\002le)h(and)g(writes)f(the)h(process)h(ID)d(\(PID\))427
+4859 y(of)f(the)h(back)o(end)h(to)e(the)g(\002le.)27
+b(Button)18 b(access)i(is)e(allo)n(wed:)27 b(the)18 b(v)n(alue)h(of)f
+(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)427 4972 y
+Fq(is)k(set)f(to)h Fp(SANE)p 953 4972 V 31 w(TRUE)0 4974
+y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 4974 a 0 4974 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 4974 a 0 4974 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 4974 a 1905 5381
+a Fq(46)p eop
+%%Page: 47 48
+47 47 bop 0 32 a
+ -31.0 Resolution mul 72.27 div /CBarX5 exch def currentpoint exch
+pop /CBarY5 exch def
+ 0 32 a 0 32 a
+ 500.75499 Resolution mul 72.27 div /CBarX6 exch def currentpoint exch
+pop /CBarY6 exch def
+ 0 32 a 336 123 a Fr(\226)46
+b Fq(If)30 b(the)g(\002le)f(does)h(e)o(xist)g(and)h(the)f(back)o(end)h
+(PID)e(is)g(not)h(the)g(\002le)f(PID)g(then)h(the)g(back)o(end)i(has)e
+(to)g(check)g(if)427 236 y(the)f(process)i(with)d(the)h(PID)f(stored)i
+(in)e(the)h(lock\002le)h(still)f(is)g(running.)46 b(If)28
+b(yes)h(then)h(the)f(b)n(utton)h(access)g(is)427 349
+y(not)i(allo)n(wed:)47 b(the)32 b(v)n(alue)h(of)e(option)j
+Fp(scanner-button)o(s-)o(loc)o(k)25 b Fq(is)31 b(set)h(to)g
+Fp(SANE)p 3340 349 28 4 v 31 w(FALSE)p Fq(.)c(If)k(not)427
+462 y(then)c(the)e(lock\002le)i(is)e(recreated)j(and)e(the)g(PID)e(of)h
+(the)h(back)o(end)i(is)d(stored)i(in)f(the)g(lock\002le,)h(b)n(utton)g
+(access)427 574 y(is)c(allo)n(wed:)30 b(the)23 b(v)n(alue)i(of)e
+(option)i Fp(scanner-buttons-)o(lo)o(ck)16 b Fq(is)23
+b(set)h(to)g Fp(SANE)p 3194 574 V 30 w(TRUE)136 787 y
+Fk(\017)46 b Fq(The)28 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e
+(option)i Fp(scanner-buttons)o(-l)o(oc)o(k)p Fq(.)37
+b(If)28 b(it)g(is)h Fp(SANE)p 3472 787 V 31 w(TRUE)c
+Fq(then)227 900 y(the)f(frontend)i(has)e(access)h(to)e(the)h(scanner)h
+(b)n(uttons.)31 b(If)23 b(it)h(is)f Fp(SANE)p 2400 900
+V 31 w(FALSE)d Fq(then)25 b(access)g(has)e(been)i(denied.)136
+1088 y Fk(\017)46 b Fq(If)25 b(the)g(b)n(utton)i(access)g(is)e(allo)n
+(wed)h(the)f(frontend)i(has)f(to)f(do)g(the)g(follo)n(wing)i(about)f
+(once)g(per)g(second)g(\(while)g(not)227 1200 y(scanning\):)336
+1388 y Fr(\226)46 b Fq(The)27 b(frontend)j(does)f(set)f(option)h
+Fp(scanner-button)o(s-)o(st)o(atu)o(s-)o(up)o(da)o(te)o
+Fq(.)35 b(The)27 b(back)o(end)j(checks)427 1501 y(if)37
+b(access)h(to)f(the)g(b)n(uttons)i(is)e(allo)n(wed)g(by)g(comparing)i
+(the)e(back)o(end)i(PID)d(with)g(the)h(lock\002le)h(PID.)d(If)427
+1614 y(access)j(is)d(allo)n(wed)i(it)f(does)h(read)f(the)h(b)n(utton)h
+(status)f(from)f(the)g(scanner)i(and)e(stores)i(it)d(in)h(the)h(option)
+427 1727 y Fp(scanner-buttons)o(-st)o(at)o(us)o Fq(,)20
+b(each)28 b(bit)e(represents)j(a)d(b)n(utton,)j(a)d(v)n(alue)h(of)g(0)f
+(means)g(the)h(b)n(utton)h(is)427 1840 y(not)23 b(pressed,)h(a)d(v)n
+(alue)i(of)f(1)g(means)g(that)h(the)f(b)n(utton)i(is)e(pressed.)30
+b(When)22 b(the)h(scanner)h(is)d(b)n(usy)j(the)e(back)o(end)427
+1953 y(must)k(not)g(w)o(ait,)f(it)h(has)g(to)f(return)i(immediately)g
+(and)g(the)e(b)n(utton)j(state)e(k)o(eeps)h(unchanged.)38
+b(The)25 b(back)o(end)427 2066 y(has)e(to)f(implement)h(a)f(timeout)h
+(function.)30 b(When)23 b(no)f(b)n(utton)i(has)e(been)h(pressed)h
+(within)f(a)e(prede\002ned)j(time)427 2178 y(\(e.g.)50
+b(15)30 b(minutes\))i(then)f(the)g(access)g(permission)i(is)d(lost.)50
+b(In)31 b(this)f(case)i(the)e(back)o(end)j(does)e(set)g(option)427
+2291 y Fp(scanner-buttons)o(-lo)o(ck)17 b Fq(to)25 b
+Fp(SANE)p 1862 2291 V 31 w(FALSE)d Fq(and)j(does)h(set)f
+Fp(SANE)p 2881 2291 V 31 w(INFO)p 3132 2291 V 31 w(RELOAD)p
+3493 2291 V 30 w(OPTIONS)427 2404 y Fq(to)20 b(inform)g(the)g(frontend)
+i(that)f(it)e(has)h(lost)h(permission)h(to)d(access)j(the)e(scanner)n
+(-b)n(utton)k(functions.)30 b(If)20 b(access)427 2517
+y(is)k(not)g(allo)n(wed)g(it)f(does)h(set)g(the)g Fp(scanner-buttons)o
+(-s)o(ta)o(tu)o(s)17 b Fq(to)23 b(0.)336 2663 y Fr(\226)46
+b Fq(The)23 b(frontend)j(does)e(read)h(the)e(v)n(alue)i(of)e(option)i
+Fp(scanner-buttons-)o(st)o(at)o(us)136 2851 y Fk(\017)46
+b Fq(When)19 b(the)f(frontend)i(does)f(e)o(xit)f(or)g(it)g(does)h(not)g
+(w)o(ant)f(to)g(use)g(the)h(b)n(uttons)h(it)e(does)g(set)h(option)g
+Fp(scanner-buttons-)o(lo)o(ck)227 2964 y Fq(to)34 b Fp(SANE)p
+556 2964 V 31 w(FALSE)p Fq(.)c(The)j(back)o(end)j(does)f(check)f(if)g
+(the)g(back)o(end)i(PID)c(and)i(the)g(lock\002le)g(PID)f(are)h(the)f
+(same.)227 3077 y(If)39 b(this)g(is)g(true)h(then)f(it)g(remo)o(v)o(es)
+g(the)h(lock\002le)g(and)f(sets)g(the)h(v)n(alue)f(of)g
+Fp(scanner-buttons)o(-lo)o(ck)31 b Fq(to)227 3190 y Fp(SANE)p
+452 3190 V 31 w(FALSE)p Fq(.)227 3340 y Fp(sane)p 452
+3340 V 31 w(close\(\))14 b Fq(should)20 b(do)e(the)h(same)f(as)g
+(setting)h(option)h Fp(scanner-buttons)o(-l)o(oc)o(k)11
+b Fq(to)18 b Fp(SANE)p 3601 3340 V 31 w(FALSE)p Fq(.)0
+3459 y
+ -31.0 Resolution mul 72.27 div /CBarX7 exch def currentpoint exch
+pop /CBarY7 exch def
+ 0 3459 a 0 3459 a
+ 500.75499 Resolution mul 72.27 div /CBarX8 exch def currentpoint exch
+pop /CBarY8 exch def
+ 0 3459 a 0 3459 a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX6 CBarY6 moveto CBarX8 CBarY8 lineto stroke grestore
+ 0 3459 a 0
+3459 a
+ -31.0 Resolution mul 72.27 div /CBarX9 exch def currentpoint exch
+pop /CBarY9 exch def
+ 0 3459 a 0 3459 a
+ 500.75499 Resolution mul 72.27 div /CBarX10 exch def currentpoint
+exch pop /CBarY10 exch def
+ 0 3459 a 288 x Fm(4.5.15)99
+b(Batch)26 b(Scan)f(Options)0 3980 y Fq(The)i(batch)h(scan)h(options)g
+(can)f(be)f(used)h(by)g(a)f(frontend)i(to)f(indicate)h(that)f(more)g
+(than)g(one)g(image)f(will)g(be)h(scanned)h(in)0 4093
+y(a)g(batch.)47 b(The)29 b(back)o(end)j(can)e(optimize)g(for)g(such)g
+(scans)h(by)e(e.g.)46 b(a)n(v)n(oiding)32 b(calibration)h(and)d(not)f
+(mo)o(ving)h(home)g(the)0 4206 y(sensor)d(array)g(in)e(this)i(case.)35
+b(The)26 b(back)o(end)i(pro)o(vides)f(the)f(options)i
+Fp(batch-scan)p Fq(,)20 b Fp(batch-scan-next-)o(tl)o(-x)o
+Fq(,)0 4319 y Fp(batch-scan-next)o(-t)o(l-)o(y)p Fq(,)k
+Fp(batch-scan-next)o(-b)o(r-)o(x)p Fq(,)g(and)30 b Fp(batch-scan-next)o
+(-br)o(-y)o Fq(.)41 b(The)29 b(op-)0 4432 y(tion)d Fp(batch-scan)20
+b Fq(pro)o(vides)27 b(a)e(string)h(list)g(with)f(the)h(v)n(alues)g(of)f
+Fp(No)f Fq(if)h(batch)h(scanning)i(isn')n(t)e(used,)g
+Fp(Start)c Fq(for)k(the)0 4545 y(\002rst,)21 b Fp(End)f
+Fq(for)i(the)f(last)i(and)f Fp(Loop)d Fq(for)i(an)o(y)h(other)h
+(\(intermediate\))h(image.)29 b(The)21 b(batch-scan-ne)o(xt)26
+b(options)e(specify)f(the)0 4658 y(coordinates)k(of)c(the)h(ne)o(xt)g
+(scan)g(and)g(follo)n(w)g(the)g(same)f(rules)i(as)e(the)h(scan)g(area)h
+(options)g(\(see)f(section)h(4.5.4\).)0 4830 y(These)h(options)h(are)f
+(not)g(mandatory)-6 b(,)27 b(b)n(ut)f(if)f(a)g(back)o(end)j(does)e
+(support)i(them,)d(it)h(must)f(implement)i(them)e(in)g(a)g(manner)0
+4942 y(consistent)h(with)e(the)g(abo)o(v)o(e)g(de\002nition.)30
+b(In)24 b(this)g(case,)g(all)f(options)j(must)d(be)h(implemented.)3033
+4942 y
+ -31.0 Resolution mul 72.27 div /CBarX11 exch def currentpoint exch
+pop /CBarY11 exch def
+ 3033 4942 a 3033 4942 a
+ 500.75499 Resolution mul 72.27 div /CBarX12 exch def currentpoint
+exch pop /CBarY12 exch def
+ 3033 4942 a 3033 4942
+a
+ gsave 0 100 div setgray 2.0 Resolution mul 72.27 div setlinewidth
+CBarX10 CBarY10 moveto CBarX12 CBarY12 lineto stroke grestore
+ 3033 4942 a 1905 5381 a Fq(47)p eop
+%%Page: 48 49
+48 48 bop 0 804 a Fo(Chapter)44 b(5)0 1278 y Fs(Netw)n(ork)51
+b(Pr)l(otocol)0 1782 y Fq(The)22 b(SANE)e(interf)o(ace)k(has)f(been)g
+(designed)h(to)e(f)o(acilitate)j(netw)o(ork)f(access)f(to)f(image)h
+(acquisition)i(de)n(vices.)30 b(In)22 b(particu-)0 1895
+y(lar)l(,)f(most)e(SANE)f(implementations)23 b(are)c(e)o(xpected)j(to)e
+(support)h(a)e(netw)o(ork)i(back)o(end)h(\(net)e(client\))i(and)e(a)f
+(corresponding)0 2008 y(netw)o(ork)k(daemon)f(\(net)g(serv)o(er\))h
+(that)f(allo)n(ws)g(accessing)i(image)e(acquisition)j(de)n(vices)e
+(through)h(a)d(netw)o(ork)h(connection.)0 2120 y(Netw)o(ork)i(access)h
+(is)e(useful)i(in)f(se)n(v)o(eral)g(situations:)136 2367
+y Fk(\017)46 b Fq(T)-7 b(o)25 b(pro)o(vide)j(controlled)h(access)f(to)e
+(resources)j(that)e(are)f(inaccessible)k(to)c(a)g(re)o(gular)h(user)-5
+b(.)38 b(F)o(or)25 b(e)o(xample,)j(a)e(user)227 2480
+y(may)g(w)o(ant)f(to)h(access)g(a)g(de)n(vice)g(on)g(a)f(host)h(where)g
+(she)g(has)g(no)f(account)j(on.)35 b(W)l(ith)26 b(the)f(netw)o(ork)i
+(protocol,)h(it)d(is)227 2593 y(possible)h(to)d(allo)n(w)h(certain)h
+(users)g(to)e(access)i(scanners)h(without)e(gi)n(ving)h(them)f(full)g
+(access)g(to)g(the)g(system.)227 2743 y(Controlling)34
+b(access)e(through)h(the)e(netw)o(ork)h(daemon)g(can)g(be)e(useful)j(e)
+n(v)o(en)e(in)g(the)g(local)h(case:)45 b(for)31 b(e)o(xample,)227
+2856 y(certain)d(back)o(ends)g(may)d(require)j(root)e(pri)n(vile)o(ges)
+i(to)e(access)h(a)e(de)n(vice.)37 b(Rather)27 b(than)f(installing)i
+(each)f(frontend)227 2969 y(as)36 b(setuid-root,)43 b(a)36
+b(system)h(administrator)i(could)e(instead)h(install)g(the)f(SANE)d
+(netw)o(ork)j(daemon)g(as)g(setuid-)227 3082 y(root.)47
+b(This)30 b(enables)h(re)o(gular)g(users)f(to)f(access)i(the)f(pri)n
+(vile)o(ged)i(de)n(vice)e(through)i(the)d(SANE)e(daemon)k(\(which,)227
+3195 y(presumably)-6 b(,)24 b(supports)f(a)d(more)h(\002ne-grained)i
+(access)f(control)h(mechanism)f(than)f(the)g(simple)h(setuid)g
+(approach\).)227 3307 y(This)29 b(has)h(the)f(added)h(bene\002t)g(that)
+g(the)f(system)h(administrator)i(only)e(needs)g(to)f(trust)h(the)f
+(SANE)e(daemon,)k(not)227 3420 y(each)25 b(and)f(e)n(v)o(ery)g
+(frontend)h(that)f(may)g(need)g(access)h(to)e(the)h(pri)n(vile)o(ged)i
+(de)n(vice.)136 3608 y Fk(\017)46 b Fq(Netw)o(ork)24
+b(access)g(pro)o(vides)h(a)d(sense)i(of)f(ubiquity)j(of)c(the)i(a)n(v)n
+(ailable)h(image)e(acquisition)j(de)n(vices.)31 b(F)o(or)22
+b(e)o(xample,)227 3721 y(in)k(a)f(local)h(area)g(netw)o(ork)h(en)l
+(vironment,)h(this)e(allo)n(ws)g(a)f(user)h(to)g(log)g(onto)g(an)o(y)f
+(machine)i(and)f(ha)n(v)o(e)g(con)l(v)o(enient)227 3834
+y(access)f(to)f(an)o(y)f(resource)j(a)n(v)n(ailable)g(to)d(an)o(y)h
+(machine)h(on)e(the)h(netw)o(ork)h(\(subject)g(to)f(permission)h
+(constraints\).)136 4021 y Fk(\017)46 b Fq(F)o(or)19
+b(de)n(vices)h(that)g(do)f(not)h(require)h(physical)f(access)h(when)e
+(used)h(\(e.g.,)g(video)g(cameras\),)h(netw)o(ork)f(access)h(allo)n(ws)
+227 4134 y(a)28 b(user)h(to)f(control)h(and)g(use)f(these)h(de)n(vices)
+h(without)f(being)g(in)f(physical)i(proximity)-6 b(.)44
+b(Indeed,)31 b(if)d(such)h(de)n(vices)227 4247 y(are)24
+b(connected)i(to)e(the)g(Internet,)h(access)g(from)e(an)o(y)h(place)g
+(in)g(the)g(w)o(orld)f(is)h(possible.)0 4494 y(The)f(netw)o(ork)i
+(protocol)h(described)g(in)d(this)h(chapter)h(has)f(been)h(design)g
+(with)e(the)h(follo)n(wing)h(goals)g(in)e(mind:)114 4740
+y(1.)45 b(Image)24 b(transmission)j(should)e(be)e(ef)n(\002cient)i
+(\(ha)n(v)o(e)f(lo)n(w)f(encoding)j(o)o(v)o(erhead\).)114
+4928 y(2.)45 b(Accessing)28 b(option)f(descriptors)i(on)d(the)g(client)
+h(side)f(must)g(be)g(ef)n(\002cient)g(\(since)h(this)g(is)e(a)h(v)o
+(ery)g(common)g(opera-)227 5041 y(tion\).)1905 5381 y(48)p
+eop
+%%Page: 49 50
+49 49 bop 114 123 a Fq(3.)45 b(Other)22 b(operations,)i(such)e(as)f
+(setting)h(or)f(inquiring)j(the)d(v)n(alue)h(of)f(an)g(option)i(are)e
+(less)h(performance)h(critical)g(since)227 236 y(the)o(y)h(typically)i
+(require)f(e)o(xplicit)g(user)g(action.)114 423 y(4.)45
+b(The)37 b(netw)o(ork)h(protocol)i(should)f(be)e(simple)h(and)f(easy)h
+(to)f(implement)i(on)e(an)o(y)g(host)h(architecture)i(and)e(an)o(y)227
+536 y(programming)26 b(language.)0 783 y(The)32 b(SANE)e(protocol)k
+(can)f(be)f(run)h(across)h(an)o(y)e(transport)j(protocol)g(that)e(pro)o
+(vides)h(reliable)g(data)f(deli)n(v)o(ery)-6 b(.)57 b(While)0
+896 y(SANE)30 b(does)k(not)f(specify)i(a)d(speci\002c)i(transport)h
+(protocol,)i(it)32 b(is)h(e)o(xpected)h(that)g(TCP/IP)d(will)h(be)h
+(among)g(the)g(most)0 1008 y(commonly)25 b(used)f(protocols.)0
+1360 y Fn(5.1)119 b(Data)30 b(T)-9 b(ype)30 b(Encoding)0
+1629 y Fm(5.1.1)99 b(Primiti)o(v)o(e)24 b(Data)h(T)-7
+b(ypes)0 1862 y Fq(The)23 b(four)h(primiti)n(v)o(e)h(types)f(of)g(the)g
+(SANE)d(standard)k(are)f(encoded)i(as)d(follo)n(ws:)0
+2108 y Fp(SANE)p 225 2108 28 4 v 31 w(Byte)p Fr(:)44
+b Fq(A)17 b(byte)j(is)e(encoded)j(as)e(an)f(8)h(bit)f(v)n(alue.)28
+b(Since)19 b(the)g(transport)i(protocol)g(is)e(assumed)h(to)e(be)h
+(byte-orientd,)227 2221 y(the)24 b(bit)g(order)g(is)g(irrele)n(v)n
+(ant.)0 2409 y Fp(SANE)p 225 2409 V 31 w(Word)p Fr(:)44
+b Fq(A)22 b(w)o(ord)i(is)f(encoded)j(as)d(4)h(bytes)g(\(32)g(bits\).)30
+b(The)23 b(bytes)h(are)g(ordered)i(from)d(most-signi\002cant)k(to)c
+(least-)227 2522 y(signi\002cant)j(byte)e(\(big-endian)j(byte-order\).)
+0 2709 y Fp(SANE)p 225 2709 V 31 w(Char)p Fr(:)44 b Fq(A)29
+b(character)j(is)e(currently)i(encoded)g(as)e(an)g(8-bit)h(ISO)e(LA)-10
+b(TIN-1)29 b(v)n(alue.)49 b(An)29 b(e)o(xtension)j(to)e(support)227
+2822 y(wider)24 b(character)i(sets)e(\(16)g(or)f(32)h(bits\))g(is)g
+(planned)h(for)f(the)g(future,)g(b)n(ut)g(not)g(supported)j(at)c(this)h
+(point.)0 3010 y Fp(SANE)p 225 3010 V 31 w(String)p Fr(:)43
+b Fq(A)25 b(string)i(pointer)h(is)d(encoded)j(as)e(a)g
+Fp(SANE)p 2065 3010 V 30 w(Char)e Fq(array)-6 b(.)37
+b(The)25 b(trailing)j(NUL)c(byte)i(is)g(considered)227
+3123 y(part)e(of)g(the)g(array)g(and)g(a)f Fp(NULL)e
+Fq(pointer)k(is)f(encoded)h(as)f(a)f(zero-length)k(array)-6
+b(.)0 3310 y Fp(SANE)p 225 3310 V 31 w(Handle)p Fr(:)43
+b Fq(A)26 b(handle)j(is)e(encoded)i(lik)o(e)f(a)f(w)o(ord.)40
+b(The)27 b(netw)o(ork)i(back)o(end)g(needs)g(to)e(tak)o(e)h(care)g(of)f
+(con)l(v)o(erting)227 3423 y(these)22 b(inte)o(ger)g(v)n(alues)f(to)g
+(the)g(opaque)h(pointer)g(v)n(alues)g(that)f(are)g(presented)i(to)d
+(the)h(user)g(of)g(the)g(netw)o(ork)g(back)o(end.)227
+3536 y(Similarly)-6 b(,)32 b(the)e(SANE)d(daemon)k(needs)g(to)f(tak)o
+(e)g(care)h(of)e(con)l(v)o(erting)k(the)d(opaque)i(pointer)f(v)n(alues)
+g(it)f(recei)n(v)o(es)227 3649 y(from)24 b(its)f(back)o(ends)j(into)f
+(32-bit)g(inte)o(gers)g(suitable)g(for)f(use)g(for)g(netw)o(ork)g
+(encoding.)0 3837 y Fa(enumeration)g(types)p Fr(:)47
+b Fq(Enumeration)26 b(types)e(are)g(encoded)i(lik)o(e)e(w)o(ords.)0
+4145 y Fm(5.1.2)99 b(T)-7 b(ype)25 b(Constructors)0 4378
+y Fq(Closely)f(follo)n(wing)g(the)f(type)g(constructors)j(of)d(the)g(C)
+e(language,)k(the)e(SANE)d(netw)o(ork)k(protocol)h(supports)g(the)e
+(follo)n(w-)0 4490 y(ing)h(four)g(constructors:)0 4737
+y Fa(pointer)p Fr(:)47 b Fq(A)21 b(pointer)j(is)e(encoded)i(by)e(a)g(w)
+o(ord)g(that)h(indicates)h(whether)f(the)f(pointer)i(is)e(a)g
+(NULL-pointer)g(which)h(is)e(then)227 4850 y(follo)n(wed)28
+b(by)g(the)f(v)n(alue)h(that)f(the)h(pointer)g(points)h(to)e(\(in)g
+(the)g(case)h(of)f(a)g(non-NULL)f(pointer;)31 b(in)c(the)g(case)h(of)f
+(a)227 4963 y(NULL)21 b(pointer)l(,)26 b(no)d(bytes)i(are)f(encoded)h
+(for)f(the)g(pointer)h(v)n(alue\).)1905 5381 y(49)p eop
+%%Page: 50 51
+50 50 bop 0 123 a Fa(array)p Fr(:)48 b Fq(An)28 b(array)i(is)e(encoded)
+j(by)e(a)g(w)o(ord)f(that)i(indicates)h(the)e(length)h(of)f(the)g
+(array)h(follo)n(wed)g(by)f(the)g(v)n(alues)h(of)f(the)227
+236 y(elements)j(in)e(the)g(array)-6 b(.)50 b(The)29
+b(length)j(may)e(be)g(zero)g(in)g(which)h(case)g(no)f(bytes)h(are)f
+(encoded)j(for)d(the)g(element)227 349 y(v)n(alues.)0
+525 y Fa(structure)p Fr(:)47 b Fq(A)32 b(structure)j(is)e(encoded)i(by)
+e(simply)h(encoding)h(the)f(structure)h(members)e(in)g(the)h(order)g
+(in)e(which)i(the)o(y)227 638 y(appear)25 b(in)f(the)g(corresponding)j
+(C)c(type)h(declaration.)0 815 y Fa(union)p Fr(:)45 b
+Fq(A)25 b(union)i(must)f(al)o(w)o(ays)h(be)f(accompanied)j(by)e(a)e
+(tag)i(v)n(alue)g(that)f(indicates)j(which)d(of)g(the)g(union)i
+(members)e(is)227 928 y(the)e(currently)j(the)d(acti)n(v)o(e)g(one.)30
+b(F)o(or)23 b(this)i(reason,)g(the)f(union)h(itself)g(is)e(encoded)j
+(simply)f(by)f(encoding)i(the)e(v)n(alue)227 1041 y(of)g(the)g
+(currently)h(acti)n(v)o(e)g(member)-5 b(.)0 1246 y(Note)25
+b(that)h(for)f(type)h(constructors,)j(the)d(pointer)l(,)i(element,)e
+(or)f(member)h(v)n(alues)g(themselv)o(es)h(may)e(ha)n(v)o(e)h(a)f
+(constructed)0 1359 y(type.)k(Thus,)21 b(the)g(abo)o(v)o(e)h(rules)g
+(should)h(be)e(applied)i(recursi)n(v)o(ely)g(until)f(a)f(sequence)j(of)
+d(primiti)n(v)o(e)h(types)g(has)f(been)h(found.)0 1518
+y(Also)h(SANE)f(had)i(no)f(need)i(for)e(encoding)j(of)e(circular)h
+(structures.)31 b(This)24 b(greatly)h(simpli\002es)f(the)g(netw)o(ork)h
+(protocol.)0 1850 y Fn(5.2)119 b(Remote)30 b(Pr)n(ocedur)n(e)g(Call)h
+(Requests)0 2103 y Fq(The)24 b(SANE)e(netw)o(ork)j(protocol)i(is)d(a)g
+(client/serv)o(er)n(-style)30 b(remote)25 b(procedure)i(call)d(\(RPC\))
+f(protocol.)34 b(This)24 b(means)h(that)0 2216 y(all)h(acti)n(vity)h
+(is)f(initiated)i(by)e(the)g(client)h(side)g(\(the)f(netw)o(ork)i(back)
+o(end\)\227a)g(serv)o(er)f(is)f(restricted)i(to)e(answering)h(request)0
+2329 y(by)d(the)f(client.)0 2618 y Fm(5.2.1)99 b Fc(SANE)p
+545 2618 30 4 v 35 w(NET)p 760 2618 V 35 w(INIT)0 2838
+y Fq(This)20 b(RPC)f(establishes)k(a)d(connection)j(to)e(a)e
+(particular)k(SANE)18 b(netw)o(ork)k(daemon.)28 b(It)20
+b(must)h(be)f(the)h(\002rst)f(call)g(in)h(a)f(SANE)0
+2951 y(netw)o(ork)25 b(session.)30 b(The)23 b(parameter)j(and)e(reply)g
+(ar)n(guments)i(for)e(this)g(call)g(are)f(sho)n(wn)h(in)g(the)g(table)g
+(belo)n(w:)744 3151 y Fr(r)n(equest:)941 b(r)n(eply:)744
+3264 y Fp(SANE)p 969 3264 28 4 v 31 w(Word)52 b(version)p
+1657 3264 V 30 w(code)98 b(SANE)p 2225 3264 V 31 w(Word)52
+b(status)744 3377 y(SANE)p 969 3377 V 31 w(String)g(user)p
+1602 3377 V 30 w(name)153 b(SANE)p 2225 3377 V 31 w(Word)52
+b(version)p 2913 3377 V 30 w(code)0 3574 y Fq(The)32
+b Fp(version)p 563 3574 V 30 w(code)e Fq(ar)n(gument)35
+b(in)d(the)i(request)g(is)f(the)g(SANE)d(v)o(ersion-code)36
+b(of)d(the)g(netw)o(ork)h(back)o(end)h(that)e(is)0 3687
+y(contacting)d(the)d(netw)o(ork)i(daemon)f(\(see)f(Section)h(4.1\).)39
+b(The)27 b(\223b)n(uild-re)n(vision\224)32 b(in)27 b(the)g(v)o(ersion)i
+(code)f(is)f(used)g(to)g(hold)0 3799 y(the)c(netw)o(ork)h(protocol)h(v)
+o(ersion.)30 b(The)23 b(SANE)d(netw)o(ork)k(daemon)g(recei)n(ving)h
+(such)f(a)e(request)j(must)e(mak)o(e)g(sure)g(that)h(the)0
+3912 y(netw)o(ork)30 b(protocol)h(v)o(ersion)f(corresponds)i(to)d(a)f
+(supported)j(v)o(ersion)f(since)g(otherwise)g(the)f(encoding)i(of)e
+(the)g(netw)o(ork)0 4025 y(stream)c(may)e(be)i(incompatible)i(\(e)n(v)o
+(en)d(though)i(the)e(SANE)e(interf)o(ace)k(itself)f(may)f(be)g
+(compatible\).)33 b(The)24 b Fp(user)p 3656 4025 V 31
+w(name)0 4138 y Fq(ar)n(gument)35 b(is)e(the)g(name)g(of)g(the)g(user)h
+(on)f(whose)g(behalf)i(this)e(call)h(is)f(being)h(performed.)59
+b(If)33 b(the)g(netw)o(ork)h(back)o(end)0 4251 y(cannot)26
+b(determine)g(a)e(user)n(-name,)j(it)d(passes)i(a)e Fp(NULL)e
+Fq(pointer)k(for)f(this)g(ar)n(gument.)33 b(No)24 b(trust)h(should)h
+(be)f(placed)h(in)e(the)0 4364 y(authenticity)30 b(of)c(this)i(user)n
+(-name.)39 b(The)26 b(intent)i(of)f(this)g(string)h(is)e(to)g(pro)o
+(vide)i(more)f(con)l(v)o(enience)j(to)d(the)f(user)-5
+b(.)39 b(E.g.,)25 b(it)0 4477 y(could)g(be)e(used)i(as)e(the)h(def)o
+(ault-user)j(name)d(in)f(subsequent)k(authentication)h(calls.)0
+4635 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 4635 V 31 w(STA-)0 4748 y(TUS)p 170 4748
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)h(of)f(the)g(reply)g(has)g
+(unde\002ned)i(v)n(alues.)2384 4715 y Fg(1)2457 4748
+y Fq(The)d Fp(version)p 3013 4748 V 30 w(code)e Fq(ar)n(gument)28
+b(returns)0 4861 y(the)c(SANE)e(v)o(ersion-code)28 b(that)c(the)h(netw)
+o(ork)g(daemon)g(supports.)33 b(See)24 b(the)g(comments)i(in)e(the)g
+(pre)n(vious)i(paragraph)h(on)0 4974 y(the)d(meaning)h(of)e(the)h(b)n
+(uild-re)n(vision)k(in)23 b(this)h(v)o(ersion)h(code.)p
+0 5044 1560 4 v 105 5100 a Ff(1)134 5132 y Fe(The)19
+b(sane)h(netw)o(ork)g(daemon)g(should)g(be)f(careful)g(not)g(to)g(leak)
+g(information)h(in)f(the)g(unde\002ned)h(portion)f(of)g(the)g(reply)-5
+b(.)1905 5381 y Fq(50)p eop
+%%Page: 51 52
+51 51 bop 0 123 a Fm(5.2.2)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(DEVICES)0
+356 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i(the)f(list)g(of)f
+(de)n(vices)i(accessible)i(by)c(the)h(SANE)d(daemon.)1055
+596 y Fr(r)n(equest:)101 b(r)n(eply:)1055 709 y Fp(void)196
+b(SANE)p 1696 709 28 4 v 31 w(Word)52 b(status)1471 822
+y(SANE)p 1696 822 V 31 w(Device)f(***device)p 2603 822
+V 29 w(list)0 1060 y Fq(There)24 b(are)f(no)h(ar)n(guments)i(in)d(the)h
+(request)h(for)f(this)g(call.)0 1231 y(In)35 b(the)h(reply)-6
+b(,)40 b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 1231 V 31 w(STA-)0 1344 y(TUS)p 170 1344
+V 31 w(SUCCESS)p Fq(,)17 b(the)22 b(remainder)h(of)e(the)h(reply)g(has)
+g(unde\002ned)h(v)n(alues.)29 b(The)21 b Fp(device)p
+2875 1344 V 30 w(list)d Fq(ar)n(gument)24 b(is)d(a)f(pointer)0
+1457 y(to)j(a)h Fp(NULL)p Fq(-terminated)g(array)g(of)f
+Fp(SANE)p 1349 1457 V 31 w(Device)d Fq(pointers.)0 1765
+y Fm(5.2.3)99 b Fc(SANE)p 545 1765 30 4 v 35 w(NET)p
+760 1765 V 35 w(OPEN)0 1998 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(open)
+i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)760
+2238 y Fr(r)n(equest:)996 b(r)n(eply:)760 2351 y Fp(SANE)p
+985 2351 28 4 v 31 w(String)52 b(device)p 1728 2351 V
+30 w(name)98 b(SANE)p 2296 2351 V 31 w(Word)52 b(status)2071
+2464 y(SANE)p 2296 2464 V 31 w(Word)g(handle)2071 2577
+y(SANE)p 2296 2577 V 31 w(String)f(resource)0 2815 y
+Fq(The)23 b Fp(device)p 499 2815 V 30 w(name)e Fq(ar)n(gument)k
+(speci\002es)g(the)f(name)g(of)f(the)h(de)n(vice)h(to)e(open.)0
+2986 y(In)35 b(the)h(reply)-6 b(,)40 b Fp(status)32 b
+Fq(indicates)37 b(the)f(completion)i(status.)66 b(If)35
+b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2986 V 31 w(STA-)0 3099 y(TUS)p 170 3099
+V 31 w(SUCCESS)p Fq(,)31 b(the)36 b(remainder)h(of)f(the)f(reply)i(has)
+e(unde\002ned)j(v)n(alues.)65 b(The)35 b Fp(handle)d
+Fq(ar)n(gument)37 b(speci\002es)g(the)0 3212 y(de)n(vice)23
+b(handle)g(that)f(uniquely)i(identi\002es)g(the)e(connection.)31
+b(The)21 b Fp(resource)c Fq(ar)n(gument)24 b(is)d(used)i(to)e(request)j
+(authenti-)0 3325 y(cation.)30 b(If)22 b(it)h(has)g(a)g(non-)p
+Fp(NULL)e Fq(v)n(alue,)j(the)f(netw)o(ork)h(back)o(end)h(should)g
+(authenticate)h(the)d(speci\002ed)h(resource)h(and)e(then)0
+3438 y(retry)h(this)g(operation)j(\(see)d(Section)g(5.2.10)g(for)g
+(details)h(on)f(ho)n(w)f(to)g(authorize)j(a)d(resource\).)0
+3746 y Fm(5.2.4)99 b Fc(SANE)p 545 3746 30 4 v 35 w(NET)p
+760 3746 V 35 w(CLOSE)0 3979 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(close)i(a)e(connection)j(to)e(a)f(remote)h(SANE)d(de)n(vice.)1077
+4201 y Fr(r)n(equest:)635 b(r)n(eply:)1077 4314 y Fp(SANE)p
+1302 4314 28 4 v 30 w(Word)53 b(handle)97 b(SANE)p 2252
+4314 V 31 w(Word)53 b(dummy)0 4552 y Fq(The)23 b Fp(handle)d
+Fq(ar)n(gument)26 b(identi\002es)f(the)e(connection)k(that)d(should)h
+(be)f(closed.)0 4723 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 4836 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)1905
+5381 y(51)p eop
+%%Page: 52 53
+52 52 bop 0 123 a Fm(5.2.5)99 b Fc(SANE)p 545 123 30
+4 v 35 w(NET)p 760 123 V 35 w(GET)p 975 123 V 35 w(OPTION)p
+1370 123 V 35 w(DESCRIPTORS)0 355 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(obtain)i Fl(all)f Fq(the)g(option)h(descriptors)h(for)e(a)f(remote)h
+(SANE)e(de)n(vice.)706 592 y Fr(r)n(equest:)635 b(r)n(eply:)706
+705 y Fp(SANE)p 931 705 28 4 v 31 w(Word)52 b(handle)97
+b(Option)p 1991 705 V 30 w(Descriptor)p 2571 705 V 28
+w(Array)53 b(odesc)0 940 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(remote)i(de)n(vice)f(whose)g(option)h
+(descriptors)i(should)e(be)f(obtained.)0 1110 y(In)29
+b(the)h(reply)-6 b(,)32 b(the)d Fp(odesc)e Fq(ar)n(gument)k(is)e(used)h
+(to)f(return)i(the)f(array)g(of)f(option)i(descriptors.)50
+b(The)29 b(option)h(descriptor)0 1223 y(array)24 b(has)g(the)g(follo)n
+(wing)h(structure:)227 1466 y Fp(struct)52 b(Option_Descript)o(or)o(_A)
+o(rra)o(y)336 1579 y({)445 1692 y(SANE_Word)f(num_options;)445
+1805 y(SANE_Option_Desc)o(ri)o(pt)o(or)d(**desc;)336
+1918 y(};)0 2225 y Fm(5.2.6)99 b Fc(SANE)p 545 2225 30
+4 v 35 w(NET)p 760 2225 V 35 w(CONTROL)p 1215 2225 V
+34 w(OPTION)0 2457 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(control)i
+(\(inquire,)h(set,)d(or)h(set)f(to)h(automatic\))h(a)e(speci\002c)i
+(option)g(of)e(a)g(remote)i(SANE)c(de)n(vice.)815 2694
+y Fr(r)n(equest:)832 b(r)n(eply:)815 2807 y Fp(SANE)p
+1040 2807 28 4 v 31 w(Word)52 b(handle)294 b(SANE)p 2187
+2807 V 31 w(Status)51 b(status)815 2920 y(SANE)p 1040
+2920 V 31 w(Word)h(option)294 b(SANE)p 2187 2920 V 31
+w(Word)52 b(info)815 3033 y(SANE)p 1040 3033 V 31 w(Word)g(action)294
+b(SANE)p 2187 3033 V 31 w(Word)52 b(value)p 2765 3033
+V 31 w(type)815 3146 y(SANE)p 1040 3146 V 31 w(Word)g(value)p
+1618 3146 V 31 w(type)98 b(SANE)p 2187 3146 V 31 w(Word)52
+b(value)p 2765 3146 V 31 w(size)815 3259 y(SANE)p 1040
+3259 V 31 w(Word)g(value)p 1618 3259 V 31 w(size)98 b(void)52
+b(*value)815 3371 y(void)g(*value)545 b(SANE)p 2187 3371
+V 31 w(String)51 b(*resource)0 3606 y Fq(The)21 b Fp(handle)e
+Fq(ar)n(gument)k(identi\002es)h(the)e(remote)g(de)n(vice)h(whose)f
+(option)i(should)f(be)f(controlled.)31 b(Ar)n(gument)23
+b Fp(option)0 3719 y Fq(is)33 b(the)g(number)h(\(inde)o(x\))h(of)e(the)
+g(option)h(that)g(should)h(be)e(controlled.)60 b(Ar)n(gument)34
+b Fp(action)c Fq(speci\002es)k(what)f(action)0 3832 y(should)40
+b(be)f(tak)o(en)g(\(get,)k(set,)f(or)d(set)g(automatic\).)75
+b(Ar)n(gument)40 b Fp(value)p 2430 3832 V 30 w(type)c
+Fq(speci\002es)k(the)f(type)g(of)g(the)g(option)0 3945
+y(v)n(alue)34 b(\(must)f(be)g(one)g(of)g Fp(SANE)p 1080
+3945 V 31 w(TYPE)p 1331 3945 V 31 w(BOOL)p Fq(,)d Fp(SANE)p
+1855 3945 V 31 w(TYPE)p 2106 3945 V 31 w(INT)p Fq(,)h
+Fp(SANE)p 2576 3945 V 30 w(TYPE)p 2826 3945 V 31 w(FIXED)p
+Fq(,)f Fp(SANE)p 3405 3945 V 31 w(TYPE)p 3656 3945 V
+31 w(STR-)0 4058 y(ING)p Fq(,)24 b Fp(SANE)p 437 4058
+V 31 w(TYPE)p 688 4058 V 31 w(BUTTON)p Fq(\).)f(Ar)n(gument)28
+b Fp(value)p 1793 4058 V 31 w(size)c Fq(speci\002es)k(the)f(size)g(of)g
+(the)g(option)h(v)n(alue)g(in)f(number)g(of)0 4171 y(bytes)f(\(see)f
+(Section)g(4.2.9)g(for)g(the)f(precise)j(meaning)f(of)e(this)h(v)n
+(alue\).)33 b(Finally)-6 b(,)26 b(ar)n(gument)g Fp(value)c
+Fq(is)i(a)g(pointer)i(to)f(the)0 4283 y(option)g(v)n(alue.)31
+b(It)24 b(must)g(be)g(a)f(writeable)j(area)e(that)g(is)g(at)g(least)h
+Fp(value)p 2291 4283 V 30 w(size)c Fq(bytes)k(lar)n(ge.)32
+b(\(Note)24 b(that)g(this)h(area)f(must)0 4396 y(be)i(writable)h(e)n(v)
+o(en)f(if)g(the)g(action)h(is)f(to)f(set)h(the)h(option)g(v)n(alue.)37
+b(This)25 b(is)h(because)i(the)e(back)o(end)i(may)e(not)g(be)g(able)g
+(to)g(set)0 4509 y(the)g(e)o(xact)f(option)i(v)n(alue,)f(in)g(which)f
+(case)h(the)g(option)h(v)n(alue)f(is)f(used)h(to)f(return)i(the)e(ne)o
+(xt)h(best)g(v)n(alue)g(that)f(the)h(back)o(end)0 4622
+y(has)e(chosen.\))0 4793 y(In)f(the)g(reply)-6 b(,)24
+b(ar)n(gument)g Fp(resource)19 b Fq(is)k(set)g(to)f(the)h(name)g(of)g
+(the)g(resource)i(that)f(must)e(be)h(authorized)j(before)e(this)g(call)
+0 4906 y(can)h(be)f(retried.)33 b(If)24 b(this)h(v)n(alue)h(is)e(non-)p
+Fp(NULL)p Fq(,)f(all)i(other)g(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)
+h(v)n(alues)g(\(see)f(Section)g(5.2.10)g(for)0 5019 y(details)i(on)f
+(ho)n(w)e(to)i(authorize)i(a)d(resource\).)37 b(Ar)n(gument)26
+b Fp(status)c Fq(indicates)28 b(the)e(completion)h(status.)36
+b(If)25 b(the)h(v)n(alue)g(is)0 5132 y(an)o(ything)e(other)f(than)f
+Fp(SANE)p 948 5132 V 31 w(STATUS)p 1309 5132 V 30 w(SUCCESS)p
+Fq(,)17 b(the)23 b(remainder)g(of)f(the)g(reply)h(has)f(unde\002ned)h
+(v)n(alues.)29 b(The)22 b Fp(info)1905 5381 y Fq(52)p
+eop
+%%Page: 53 54
+53 53 bop 0 123 a Fq(ar)n(gument)21 b(returns)g(the)f(information)i(on)
+d(ho)n(w)g(well)g(the)g(back)o(end)j(w)o(as)d(able)h(to)f(satisfy)i
+(the)e(request.)29 b(F)o(or)19 b(details,)i(see)f(the)0
+236 y(description)32 b(of)c(the)h(corresponding)j(ar)n(gument)e(in)f
+(Section)g(4.3.7.)43 b(Ar)n(guments)30 b Fp(value)p 2946
+236 28 4 v 31 w(type)c Fq(and)i Fp(value)p 3656 236 V
+31 w(size)0 349 y Fq(ha)n(v)o(e)c(the)f(same)h(v)n(alues)g(as)f(the)h
+(ar)n(guments)i(by)d(the)h(same)f(name)g(in)g(corresponding)28
+b(request.)i(The)23 b(v)n(alues)i(are)e(repeated)0 462
+y(here)j(to)f(ensure)i(that)f(both)g(the)f(request)i(and)f(the)f(reply)
+i(are)e(self-contained)30 b(\(i.e.,)25 b(the)o(y)g(can)h(be)f(encoded)i
+(and)f(decoded)0 574 y(independently\).)45 b(Ar)n(gument)28
+b Fp(value)c Fq(is)j(holds)i(the)f(v)n(alue)g(of)f(the)g(option)i(that)
+f(has)g(become)g(ef)n(fecti)n(v)o(e)h(as)e(a)g(result)h(of)0
+687 y(this)c(RPC.)0 995 y Fm(5.2.7)99 b Fc(SANE)p 545
+995 30 4 v 35 w(NET)p 760 995 V 35 w(GET)p 975 995 V
+35 w(PARAMETERS)0 1228 y Fq(This)23 b(RPC)f(is)h(used)i(to)e(obtain)i
+(the)f(scan)g(parameters)i(of)d(a)g(remote)h(SANE)e(de)n(vice.)886
+1469 y Fr(r)n(equest:)635 b(r)n(eply:)886 1582 y Fp(SANE)p
+1111 1582 28 4 v 31 w(Word)52 b(handle)97 b(SANE)p 2061
+1582 V 31 w(Status)52 b(status)1836 1695 y(SANE)p 2061
+1695 V 31 w(Parameters)e(params)0 1932 y Fq(The)33 b
+Fp(handle)d Fq(ar)n(gument)35 b(identi\002es)g(the)f(connection)i(to)e
+(the)f(remote)h(de)n(vice)h(whose)f(scan)g(parameters)h(should)g(be)0
+2045 y(returned.)0 2217 y(In)g(the)h(reply)-6 b(,)40
+b Fp(status)32 b Fq(indicates)37 b(the)f(completion)i(status.)66
+b(If)35 b(the)h(v)n(alue)g(is)g(an)o(ything)h(other)g(than)f
+Fp(SANE)p 3656 2217 V 31 w(STA-)0 2330 y(TUS)p 170 2330
+V 31 w(SUCCESS)p Fq(,)22 b(the)k(remainder)i(of)e(the)g(reply)h(has)g
+(unde\002ned)g(v)n(alues.)38 b(The)25 b(ar)n(gument)j
+Fp(params)22 b Fq(is)k(used)h(to)f(return)0 2443 y(the)e(scan)g
+(parameters.)0 2750 y Fm(5.2.8)99 b Fc(SANE)p 545 2750
+30 4 v 35 w(NET)p 760 2750 V 35 w(START)0 2983 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(start)h(image)g(acquisition)j(\(scanning\).)
+940 3224 y Fr(r)n(equest:)636 b(r)n(eply:)940 3337 y
+Fp(SANE)p 1165 3337 28 4 v 31 w(Word)53 b(handle)97 b(SANE)p
+2116 3337 V 31 w(Status)51 b(status)1891 3450 y(SANE)p
+2116 3450 V 31 w(Word)h(port)1891 3563 y(SANE)p 2116
+3563 V 31 w(Word)g(byte)p 2639 3563 V 31 w(order)1891
+3675 y(SANE)p 2116 3675 V 31 w(String)f(resource)0 3913
+y Fq(The)35 b Fp(handle)d Fq(ar)n(gument)37 b(identi\002es)f(the)g
+(connection)i(to)e(the)f(remote)h(de)n(vice)g(from)g(which)f(the)h
+(image)f(should)i(be)0 4026 y(acquired.)0 4198 y(In)23
+b(the)g(reply)-6 b(,)24 b(ar)n(gument)g Fp(resource)19
+b Fq(is)k(set)g(to)f(the)h(name)g(of)g(the)g(resource)i(that)f(must)e
+(be)h(authorized)j(before)e(this)g(call)0 4311 y(can)h(be)f(retried.)33
+b(If)24 b(this)h(v)n(alue)h(is)e(non-)p Fp(NULL)p Fq(,)f(all)i(other)g
+(ar)n(guments)i(ha)n(v)o(e)e(unde\002ned)h(v)n(alues)g(\(see)f(Section)
+g(5.2.10)g(for)0 4423 y(details)30 b(on)f(ho)n(w)f(to)h(authorize)i(a)d
+(resource\).)47 b(Ar)n(gument,)30 b Fp(status)c Fq(indicates)31
+b(the)e(completion)i(status.)45 b(If)28 b(the)h(v)n(alue)0
+4536 y(is)j(an)o(ything)j(other)f(than)f Fp(SANE)p 1073
+4536 V 31 w(STATUS)p 1434 4536 V 30 w(SUCCESS)p Fq(,)28
+b(the)33 b(remainder)h(of)f(the)g(reply)g(has)g(unde\002ned)i(v)n
+(alues.)57 b(The)0 4649 y(ar)n(gument)32 b Fp(port)27
+b Fq(returns)k(the)f(port)h(number)g(from)e(which)i(the)f(image)g(data)
+g(will)g(be)g(a)n(v)n(ailable.)50 b(T)-7 b(o)28 b(read)j(the)f(image)0
+4762 y(data,)d(a)e(netw)o(ork)j(client)f(must)f(connect)i(to)e(the)g
+(remote)g(host)h(at)f(the)g(indicated)j(port)d(number)-5
+b(.)37 b(Through)27 b(this)g(port,)g(the)0 4875 y(image)k(data)f(is)g
+(transmitted)j(as)d(a)g(sequence)i(of)e(data)h(records.)50
+b(Each)31 b(record)g(starts)g(with)f(the)h(data)g(length)g(in)f(bytes.)
+0 4988 y(The)22 b(data)h(length)h(is)f(transmitted)i(as)d(a)g(sequence)
+j(of)e(four)g(bytes.)30 b(These)22 b(bytes)i(should)g(be)f(interpreted)
+j(as)c(an)h(unsigned)0 5101 y(inte)o(ger)28 b(in)f(big-endian)j
+(format.)40 b(The)26 b(four)i(length)g(bytes)g(are)g(follo)n(wed)g(by)f
+(the)g(number)h(of)f(data)h(bytes)g(indicated)h(by)1905
+5381 y(53)p eop
+%%Page: 54 55
+54 54 bop 0 123 a Fq(the)24 b(length.)31 b(Except)25
+b(for)f(byte-order)l(,)j(the)d(data)g(is)g(in)g(the)g(same)g(format)g
+(as)g(de\002ned)h(for)f Fp(sane)p 3078 123 28 4 v 31
+w(read\(\))p Fq(.)i(Since)e(some)0 236 y(records)34 b(may)d(contain)j
+(no)e(data)g(at)g(all,)i(a)d(length)j(v)n(alue)f(of)e(zero)i(is)f
+(perfectly)i(v)n(alid.)54 b(The)32 b(special)h(length)h(v)n(alue)e(of)0
+349 y Fp(0xffffffff)27 b Fq(is)32 b(used)i(to)e(indicate)i(the)f(end)g
+(of)f(the)h(data)g(stream.)56 b(That)33 b(is,)h(after)f(recei)n(ving)i
+(a)d(record)h(length)h(of)0 462 y Fp(0xffffffff)p Fq(,)18
+b(the)24 b(netw)o(ork)g(client)h(should)g(close)g(the)f(data)g
+(connection)j(and)d(stop)g(reading)h(data.)0 629 y(Ar)n(gument)35
+b Fp(byte)p 625 629 V 31 w(order)c Fq(speci\002es)36
+b(the)e(byte-order)j(of)e(the)f(image)h(data.)61 b(A)33
+b(v)n(alue)i(of)f(0x1234)i(indicates)h(little-)0 742
+y(endian)26 b(format,)f(a)f(v)n(alue)i(of)e(0x4321)j(indicates)g
+(big-endian)h(format.)k(All)24 b(other)i(v)n(alues)g(are)e(presently)j
+(unde\002ned)g(and)0 855 y(reserv)o(ed)g(for)f(future)h(enhancements)i
+(of)c(this)h(protocol.)37 b(The)25 b(intent)i(is)e(that)h(a)g(netw)o
+(ork)g(serv)o(er)h(sends)f(data)h(in)e(its)h(o)n(wn)0
+968 y(byte-order)k(and)d(the)g(client)i(is)d(responsible)31
+b(for)c(adjusting)i(the)f(byte-order)l(,)i(if)d(necessary)-6
+b(.)42 b(This)26 b(approach)k(causes)e(no)0 1081 y(unnecessary)k(o)o(v)
+o(erheads)e(in)e(the)h(case)f(where)h(the)f(serv)o(er)i(and)e(client)i
+(byte-order)h(match)d(and)h(puts)g(the)g(e)o(xtra)f(b)n(urden)0
+1194 y(on)f(the)h(client)g(side)g(when)g(there)g(is)f(a)g(byte-order)j
+(mismatch.)41 b(Putting)28 b(the)g(b)n(urden)h(on)e(the)h(client-side)i
+(impro)o(v)o(es)e(the)0 1307 y(scalability)e(properties)h(of)c(this)h
+(protocol.)0 1609 y Fm(5.2.9)99 b Fc(SANE)p 545 1609
+30 4 v 35 w(NET)p 760 1609 V 35 w(CANCEL)0 1838 y Fq(This)23
+b(RPC)f(is)h(used)i(to)e(cancel)i(the)f(current)h(operation)h(of)e(a)f
+(remote)h(SANE)d(de)n(vice.)1077 2065 y Fr(r)n(equest:)635
+b(r)n(eply:)1077 2178 y Fp(SANE)p 1302 2178 28 4 v 30
+w(Word)53 b(handle)97 b(SANE)p 2252 2178 V 31 w(Word)53
+b(dummy)0 2403 y Fq(The)23 b Fp(handle)d Fq(ar)n(gument)26
+b(identi\002es)f(the)e(connection)k(whose)d(operation)i(should)f(be)f
+(cancelled.)0 2571 y(In)j(the)g(reply)-6 b(,)28 b(the)f
+Fp(dummy)d Fq(ar)n(gument)29 b(is)e(unused.)40 b(Its)27
+b(purpose)i(is)d(to)h(ensure)h(proper)h(synchronization)i(\(without)e
+(it,)e(a)0 2684 y(net)d(client)h(w)o(ould)f(not)g(be)f(able)h(to)g
+(determine)h(when)f(the)f(RPC)f(has)i(completed\).)0
+2986 y Fm(5.2.10)99 b Fc(SANE)p 595 2986 30 4 v 35 w(NET)p
+810 2986 V 35 w(AUTHORIZE)0 3215 y Fq(This)23 b(RPC)f(is)h(used)i(to)e
+(pass)h(authorization)k(data)c(from)f(the)h(net)g(client)h(to)e(the)h
+(net)g(serv)o(er)-5 b(.)967 3442 y Fr(r)n(equest:)854
+b(r)n(eply:)967 3555 y Fp(SANE)p 1192 3555 28 4 v 31
+w(String)52 b(resource)96 b(SANE)p 2361 3555 V 31 w(Word)53
+b(dummy)967 3668 y(SANE)p 1192 3668 V 31 w(String)f(username)967
+3781 y(SANE)p 1192 3781 V 31 w(String)g(password)0 4006
+y Fq(The)23 b Fp(resource)c Fq(ar)n(gument)26 b(speci\002es)e(the)g
+(name)g(of)f(the)h(resource)i(to)d(be)h(authorized.)31
+b(This)24 b(ar)n(gument)h(should)g(be)f(set)0 4119 y(to)d(the)h(string)
+h(returned)g(in)f(the)f Fp(resource)c Fq(ar)n(gument)24
+b(of)d(the)h(RPC)d(reply)j(that)g(required)i(this)e(authorization)j
+(call.)k(The)0 4232 y Fp(username)17 b Fq(and)22 b Fp(password)17
+b Fq(are)22 b(the)g(name)f(of)h(the)f(user)i(that)f(is)f(accessing)j
+(the)e(resource)h(and)f(the)g(passw)o(ord)h(for)f(the)0
+4345 y(speci\002ed)j(resource/user)i(pair)-5 b(.)0 4512
+y(Since)28 b(the)h(passw)o(ord)h(is)e(not)g(encrypted)j(during)f(netw)o
+(ork)f(transmission,)j(it)c(is)g(recommended)j(to)d(use)g(the)h(follo)n
+(wing)0 4625 y(e)o(xtension:)0 4793 y(If)j(the)g(serv)o(er)h(adds)g
+(the)f(string)h(`)p Fp($MD5$)p Fq(')d(to)i(the)g(resource-name)k(follo)
+n(wed)d(by)f(a)f(random)i(string)h(not)e(longer)h(then)0
+4906 y(128)24 b(bytes,)f(the)h(client)g(may)f(answer)g(with)g(the)g
+(MD5)f(digest)j(of)e(the)g(concatenation)k(of)c(the)g(passw)o(ord)i
+(and)e(the)g(random)0 5019 y(string.)31 b(T)-7 b(o)22
+b(dif)n(ferentiate)27 b(between)e(the)f(MD5)f(digest)i(and)g(a)e
+(strange)i(passw)o(ord)h(the)e(client)h(prepends)h(the)e(MD5)f(digest)0
+5132 y(with)g(the)h(string)h(`)p Fp($MD5$)p Fq('.)1905
+5381 y(54)p eop
+%%Page: 55 56
+55 55 bop 0 123 a Fq(In)20 b(the)h(reply)-6 b(,)22 b
+Fp(dummy)17 b Fq(is)k(completely)h(unused.)30 b(Note)20
+b(that)h(there)g(is)g(no)f(direct)i(f)o(ailure)g(indication.)30
+b(This)20 b(is)h(unnecessary)0 236 y(since)h(a)f(net)g(client)h(will)f
+(retry)h(the)f(RPC)e(that)j(resulted)h(in)e(the)h(authorization)j
+(request)d(until)g(that)g(call)g(succeeds)h(\(or)e(until)0
+349 y(the)27 b(request)h(is)e(cancelled\).)39 b(The)26
+b(RPC)e(that)j(resulted)i(in)d(the)g(authorization)k(request)f
+(continues)f(after)f(the)g(reply)g(from)0 462 y(the)d(client)h(and)f
+(may)f(f)o(ail)h(with)f Fp(SANE)p 1244 462 28 4 v 31
+w(STATUS)p 1605 462 V 30 w(ACCESS)p 1965 462 V 30 w(DENIED)p
+Fq(.)0 769 y Fm(5.2.11)99 b Fc(SANE)p 595 769 30 4 v
+35 w(NET)p 810 769 V 35 w(EXIT)0 1002 y Fq(This)28 b(RPC)f(is)i(used)g
+(to)g(disconnect)i(a)e(net)g(client)g(from)g(a)f(net)h(serv)o(er)-5
+b(.)45 b(There)29 b(are)g(no)g(request)h(or)f(reply)g(ar)n(guments)i
+(in)0 1115 y(this)23 b(call.)29 b(As)21 b(a)h(result)i(of)e(this)h
+(call,)g(the)g(connection)i(between)f(the)e(client)i(and)f(the)f(serv)o
+(er)i(that)f(w)o(as)f(established)j(by)e(the)0 1228 y
+Fp(SANE)p 225 1228 28 4 v 31 w(NET)p 421 1228 V 31 w(INIT)e
+Fq(call)j(will)f(be)h(closed.)1905 5381 y(55)p eop
+%%Page: 56 57
+56 56 bop 0 804 a Fo(Chapter)44 b(6)0 1278 y Fs(Contact)51
+b(Inf)-5 b(ormation)0 1782 y Fq(The)25 b(SANE)e(standard)28
+b(is)d(discussed)j(and)f(e)n(v)n(olv)o(ed)g(via)e(a)h(mailing)g(list.)
+35 b(An)o(ybody)27 b(with)e(email)h(access)h(to)e(the)h(Internet)0
+1895 y(can)e(automatically)j(join)d(and)g(lea)n(v)o(e)g(the)g
+(discussion)i(group)f(by)f(sending)h(mail)f(to)f(the)h(follo)n(wing)h
+(address.)227 2141 y Fp(sane-devel-requ)o(est)o(@m)o(os)o(ta)o(ng)o
+(.co)o(m)0 2387 y Fq(T)-7 b(o)22 b(subscribe,)k(send)f(a)e(mail)g(with)
+g(the)h(body)h(\223)p Fp(subscribe)51 b(sane-devel)p
+Fq(\224)18 b(to)24 b(the)f(abo)o(v)o(e)i(address.)0 2559
+y(A)e(complete)j(list)e(of)g(commands)i(supported)h(can)d(be)h
+(obtained)h(by)e(sending)j(a)c(mail)i(with)f(a)f(subject)j(of)e(\223)p
+Fp(help)p Fq(\224)f(to)h(the)0 2672 y(abo)o(v)o(e)g(address.)31
+b(The)23 b(mailing)h(list)g(is)g(archi)n(v)o(ed)h(and)f(a)n(v)n
+(ailable)h(through)h(the)e(SANE)d(home)j(page)g(at)f(URL:)227
+2918 y Fp(http://www.most)o(ang)o(.c)o(om)o(/s)o(an)o(e/)1905
+5381 y Fq(56)p eop
+%%Page: 57 58
+57 57 bop 0 586 a Fs(Index)0 1012 y Fq(analog)25 b(gamma)e(option,)i
+(42)0 1125 y(array)-6 b(,)24 b(48)0 1321 y(Batch)g(Scan)f(Options,)i
+(45)0 1434 y(bit)f(depth)g(option,)h(41)0 1547 y(br)n(-x,)f(40)0
+1659 y(br)n(-y)-6 b(,)24 b(40)0 1855 y(code)g(\003o)n(w)-6
+b(,)22 b(35)0 2051 y(de)n(vice-name,)k(16)0 2164 y(domain,)e(24)0
+2360 y(enumeration)i(types,)f(47)0 2556 y(gamma)e(table)h(options,)i
+(42)0 2752 y(hightlight)g(options,)g(43)0 2948 y(image)e(data)g
+(format,)g(8)0 3144 y(lamp-of)n(f)h(option,)f(44)0 3257
+y(lamp-on)h(option,)g(44)0 3453 y(mailing)g(list,)e(54)0
+3566 y(mode)h(options,)h(41)0 3762 y(netw)o(ork)g(authorization,)i(52)0
+3874 y(NUL,)21 b(14)0 4070 y(option)k(count,)g(39)0 4183
+y(Option)p 256 4183 28 4 v 34 w(Descriptor)p 671 4183
+V 36 w(Array)-6 b(,)23 b(50)0 4379 y(passw)o(ord,)i(24)0
+4492 y(pointer)l(,)g(47)0 4605 y(pre)n(vie)n(w)f(mode,)f(39)0
+4801 y(resolution)j(option,)f(39)0 4997 y(SANE)p 244
+4997 V 31 w(Action,)f(27)0 5110 y(SANE)p 244 5110 V 31
+w(A)l(CTION)p 616 5110 V 32 w(GET)p 826 5110 V 31 w(V)-12
+b(ALUE,)20 b(27)2095 1012 y(SANE)p 2339 1012 V 31 w(A)l(CTION)p
+2711 1012 V 32 w(SET)p 2906 1012 V 31 w(A)-5 b(UT)n(O,)21
+b(27)2095 1125 y(SANE)p 2339 1125 V 31 w(A)l(CTION)p
+2711 1125 V 32 w(SET)p 2906 1125 V 31 w(V)-12 b(ALUE,)20
+b(27)2095 1238 y(SANE)p 2339 1238 V 31 w(Authorization)p
+2871 1238 V 37 w(Callback,)25 b(24)2095 1351 y(SANE)p
+2339 1351 V 31 w(Bool,)f(13)2095 1463 y(SANE)p 2339 1463
+V 31 w(Byte,)g(12,)f(47)2095 1576 y(sane)p 2260 1576
+V 35 w(cancel,)h(33)2095 1689 y(SANE)p 2339 1689 V 31
+w(CAP)p 2548 1689 V 32 w(AD)l(V)-12 b(ANCED,)19 b(21)2095
+1802 y(SANE)p 2339 1802 V 31 w(CAP)p 2548 1802 V 32 w(AL)-7
+b(W)c(A)h(YS)p 2943 1802 V 31 w(SETT)i(ABLE,)19 b(21)2095
+1915 y(SANE)p 2339 1915 V 31 w(CAP)p 2548 1915 V 32 w(A)-5
+b(UT)n(OMA)-10 b(TIC,)20 b(21)2095 2028 y(SANE)p 2339
+2028 V 31 w(CAP)p 2548 2028 V 32 w(EMULA)-10 b(TED,)19
+b(21)2095 2141 y(SANE)p 2339 2141 V 31 w(CAP)p 2548 2141
+V 32 w(HARD)p 2839 2141 V 31 w(SELECT)-7 b(,)20 b(21)2095
+2254 y(SANE)p 2339 2254 V 31 w(CAP)p 2548 2254 V 32 w(HIDDEN,)h(21)2095
+2367 y(SANE)p 2339 2367 V 31 w(CAP)p 2548 2367 V 32 w(IN)m(A)l(CTIVE,)g
+(21)2095 2480 y(SANE)p 2339 2480 V 31 w(CAP)p 2548 2480
+V 32 w(SOFT)p 2804 2480 V 31 w(DETECT)-7 b(,)20 b(21)2095
+2593 y(SANE)p 2339 2593 V 31 w(CAP)p 2548 2593 V 32 w(SOFT)p
+2804 2593 V 31 w(SELECT)-7 b(,)20 b(21)2095 2705 y(SANE)p
+2339 2705 V 31 w(Char)l(,)k(14,)f(47)2095 2818 y(sane)p
+2260 2818 V 35 w(close,)h(26)2095 2931 y(SANE)p 2339
+2931 V 31 w(CONSTRAINT)p 2949 2931 V 30 w(NONE,)d(22)2095
+3044 y(SANE)p 2339 3044 V 31 w(CONSTRAINT)p 2949 3044
+V 30 w(RANGE,)f(22)2095 3157 y(SANE)p 2339 3157 V 31
+w(CONSTRAINT)p 2949 3157 V 30 w(STRING)p 3309 3157 V
+31 w(LIST)-7 b(,)21 b(22)2095 3270 y(SANE)p 2339 3270
+V 31 w(Constraint)p 2746 3270 V 36 w(T)-7 b(ype,)23 b(20)2095
+3383 y(SANE)p 2339 3383 V 31 w(CONSTRAINT)p 2949 3383
+V 30 w(W)o(ORD)p 3257 3383 V 31 w(LIST)-7 b(,)22 b(22)2095
+3496 y(sane)p 2260 3496 V 35 w(control)p 2550 3496 V
+35 w(option,)j(27)2095 3609 y(SANE)p 2339 3609 V 31 w(CURRENT)p
+2797 3609 V 30 w(MAJOR,)d(11)2095 3722 y(SANE)p 2339
+3722 V 31 w(De)n(vice,)i(15)2095 3835 y(sane)p 2260 3835
+V 35 w(e)o(xit,)f(25)2095 3948 y(SANE)p 2339 3948 V 31
+w(F)-7 b(ALSE,)21 b(13)2095 4060 y(SANE)p 2339 4060 V
+31 w(FIX,)h(14)2095 4173 y(SANE)p 2339 4173 V 31 w(Fix)o(ed,)i(13)2095
+4286 y(SANE)p 2339 4286 V 31 w(FIXED)p 2639 4286 V 32
+w(SCALE)p 2961 4286 V 30 w(SHIFT)-7 b(,)22 b(13)2095
+4399 y(SANE)p 2339 4399 V 31 w(Frame,)h(29)2095 4512
+y(SANE)p 2339 4512 V 31 w(FRAME)p 2685 4512 V 31 w(BLUE,)e(8,)i(29)2095
+4625 y(SANE)p 2339 4625 V 31 w(FRAME)p 2685 4625 V 31
+w(GRA)-10 b(Y)e(,)22 b(8,)h(29)2095 4738 y(SANE)p 2339
+4738 V 31 w(FRAME)p 2685 4738 V 31 w(GREEN,)e(8,)i(29)2095
+4851 y(SANE)p 2339 4851 V 31 w(FRAME)p 2685 4851 V 31
+w(MIME,)f(8,)h(10,)g(29)2095 4964 y(SANE)p 2339 4964
+V 31 w(FRAME)p 2685 4964 V 31 w(RA)-8 b(W)g(,)21 b(8,)i(29)2095
+5077 y(SANE)p 2339 5077 V 31 w(FRAME)p 2685 5077 V 31
+w(RED,)f(8,)g(29)1905 5381 y(57)p eop
+%%Page: 58 59
+58 58 bop 0 123 a Fq(SANE)p 244 123 28 4 v 31 w(FRAME)p
+590 123 V 31 w(RGB,)21 b(8,)i(29)0 236 y(sane)p 165 236
+V 34 w(get)p 309 236 V 34 w(de)n(vices,)i(25)0 349 y(sane)p
+165 349 V 34 w(get)p 309 349 V 34 w(option)p 573 349
+V 35 w(descriptor)l(,)i(26)0 462 y(sane)p 165 462 V 34
+w(get)p 309 462 V 34 w(parameters,)e(29)0 574 y(sane)p
+165 574 V 34 w(get)p 309 574 V 34 w(select)p 548 574
+V 35 w(fd,)e(34)0 687 y(SANE)p 244 687 V 31 w(Handle,)h(15,)f(47)0
+800 y(SANE)p 244 800 V 31 w(INFO)p 488 800 V 32 w(INEXA)l(CT)-7
+b(,)21 b(28)0 913 y(SANE)p 244 913 V 31 w(INFO)p 488
+913 V 32 w(INV)-12 b(ALID)l(A)i(TE)p 1052 913 V 30 w(PREVIEW)i(,)20
+b(28)0 1026 y(SANE)p 244 1026 V 31 w(INFO)p 488 1026
+V 32 w(RELO)m(AD)p 888 1026 V 30 w(OPTIONS,)g(28,)k(32)0
+1139 y(SANE)p 244 1139 V 31 w(INFO)p 488 1139 V 32 w(RELO)m(AD)p
+888 1139 V 30 w(P)-8 b(ARAMS,)20 b(28)0 1252 y(sane)p
+165 1252 V 34 w(init,)k(24)0 1365 y(SANE)p 244 1365 V
+31 w(Int,)g(13)0 1478 y(SANE)p 244 1478 V 31 w(NET)p
+453 1478 V 32 w(A)-5 b(UTHORIZE,)19 b(52)0 1591 y(SANE)p
+244 1591 V 31 w(NET)p 453 1591 V 32 w(CANCEL,)h(52)0
+1704 y(SANE)p 244 1704 V 31 w(NET)p 453 1704 V 32 w(CLOSE,)g(49)0
+1817 y(SANE)p 244 1817 V 31 w(NET)p 453 1817 V 32 w(CONTR)l(OL)p
+913 1817 V 30 w(OPTION,)h(50)0 1929 y(SANE)p 244 1929
+V 31 w(NET)p 453 1929 V 32 w(EXIT)-7 b(,)21 b(53)0 2042
+y(SANE)p 244 2042 V 31 w(NET)p 453 2042 V 32 w(GET)p
+663 2042 V 31 w(DEVICES,)f(49)0 2155 y(SANE)p 244 2155
+V 31 w(NET)p 453 2155 V 32 w(GET)p 663 2155 V 31 w(OPTION)p
+1029 2155 V 31 w(DESCRIPT)n(ORS,)f(50)0 2268 y(SANE)p
+244 2268 V 31 w(NET)p 453 2268 V 32 w(GET)p 663 2268
+V 31 w(P)-8 b(ARAMETERS,)18 b(51)0 2381 y(SANE)p 244
+2381 V 31 w(NET)p 453 2381 V 32 w(INIT)-7 b(,)22 b(48)0
+2494 y(SANE)p 244 2494 V 31 w(NET)p 453 2494 V 32 w(OPEN,)e(49)0
+2607 y(SANE)p 244 2607 V 31 w(NET)p 453 2607 V 32 w(ST)-8
+b(AR)j(T)e(,)19 b(51)0 2720 y(sane)p 165 2720 V 34 w(open,)24
+b(25)0 2833 y(SANE)p 244 2833 V 31 w(Option)p 526 2833
+V 34 w(Descriptor)l(,)i(17)0 2946 y(SANE)p 244 2946 V
+31 w(OPTION)p 610 2946 V 31 w(IS)p 722 2946 V 33 w(A)l(CTIVE,)21
+b(20)0 3059 y(SANE)p 244 3059 V 31 w(OPTION)p 610 3059
+V 31 w(IS)p 722 3059 V 33 w(SETT)-8 b(ABLE,)18 b(20)0
+3171 y(SANE)p 244 3171 V 31 w(P)o(arameters,)24 b(29)0
+3284 y(SANE)p 244 3284 V 31 w(Range,)g(22)0 3397 y(sane)p
+165 3397 V 34 w(read,)g(32)0 3510 y(sane)p 165 3510 V
+34 w(set)p 299 3510 V 34 w(io)p 403 3510 V 33 w(mode,)g(34)0
+3623 y(sane)p 165 3623 V 34 w(start,)g(32)0 3736 y(SANE)p
+244 3736 V 31 w(Status,)g(15)0 3849 y(SANE)p 244 3849
+V 31 w(ST)-8 b(A)e(TUS)p 603 3849 V 30 w(A)l(CCESS)p
+975 3849 V 30 w(DENIED,)21 b(15)0 3962 y(SANE)p 244 3962
+V 31 w(ST)-8 b(A)e(TUS)p 603 3962 V 30 w(CANCELLED,)19
+b(15)0 4075 y(SANE)p 244 4075 V 31 w(ST)-8 b(A)e(TUS)p
+603 4075 V 30 w(CO)-5 b(VER)p 938 4075 V 31 w(OPEN,)21
+b(15)0 4188 y(SANE)p 244 4188 V 31 w(ST)-8 b(A)e(TUS)p
+603 4188 V 30 w(DEVICE)p 968 4188 V 31 w(B)o(USY)e(,)21
+b(15)0 4301 y(SANE)p 244 4301 V 31 w(ST)-8 b(A)e(TUS)p
+603 4301 V 30 w(EOF)j(,)21 b(15)0 4413 y(SANE)p 244 4413
+V 31 w(ST)-8 b(A)e(TUS)p 603 4413 V 30 w(GOOD,)21 b(15,)i(24)0
+4526 y(SANE)p 244 4526 V 31 w(ST)-8 b(A)e(TUS)p 603 4526
+V 30 w(INV)e(AL,)21 b(15)0 4639 y(SANE)p 244 4639 V 31
+w(ST)-8 b(A)e(TUS)p 603 4639 V 30 w(IO)p 729 4639 V 32
+w(ERR)l(OR,)21 b(15)0 4752 y(SANE)p 244 4752 V 31 w(ST)-8
+b(A)e(TUS)p 603 4752 V 30 w(J)-5 b(AMMED,)21 b(15)0 4865
+y(SANE)p 244 4865 V 31 w(ST)-8 b(A)e(TUS)p 603 4865 V
+30 w(NO)p 765 4865 V 32 w(DOCS,)21 b(15)0 4978 y(SANE)p
+244 4978 V 31 w(ST)-8 b(A)e(TUS)p 603 4978 V 30 w(NO)p
+765 4978 V 32 w(MEM,)21 b(15)0 5091 y(SANE)p 244 5091
+V 31 w(ST)-8 b(A)e(TUS)p 603 5091 V 30 w(UNSUPPOR)-5
+b(TED,)17 b(15)2095 123 y(SANE)p 2339 123 V 31 w(String,)24
+b(14,)f(47)2095 236 y(SANE)p 2339 236 V 31 w(String)p
+2591 236 V 34 w(Const,)h(14)2095 349 y(sane)p 2260 349
+V 35 w(strstatus,)h(35)2095 462 y(SANE)p 2339 462 V 31
+w(TR)l(UE,)d(13)2095 574 y(SANE)p 2339 574 V 31 w(TYPE)p
+2599 574 V 31 w(BOOL,)f(19)2095 687 y(SANE)p 2339 687
+V 31 w(TYPE)p 2599 687 V 31 w(B)o(UTT)n(ON,)g(19)2095
+800 y(SANE)p 2339 800 V 31 w(TYPE)p 2599 800 V 31 w(FIXED,)g(19)2095
+913 y(SANE)p 2339 913 V 31 w(TYPE)p 2599 913 V 31 w(GR)l(OUP)-10
+b(,)21 b(19)2095 1026 y(SANE)p 2339 1026 V 31 w(TYPE)p
+2599 1026 V 31 w(INT)-7 b(,)23 b(19)2095 1139 y(SANE)p
+2339 1139 V 31 w(TYPE)p 2599 1139 V 31 w(STRING,)e(19)2095
+1252 y(SANE)p 2339 1252 V 31 w(Unit,)i(18)2095 1365 y(SANE)p
+2339 1365 V 31 w(UNFIX,)f(14)2095 1478 y(SANE)p 2339
+1478 V 31 w(UNIT)p 2588 1478 V 32 w(BIT)-7 b(,)22 b(19)2095
+1591 y(SANE)p 2339 1591 V 31 w(UNIT)p 2588 1591 V 32
+w(DPI,)g(19)2095 1704 y(SANE)p 2339 1704 V 31 w(UNIT)p
+2588 1704 V 32 w(MICR)l(OSECOND,)e(19)2095 1817 y(SANE)p
+2339 1817 V 31 w(UNIT)p 2588 1817 V 32 w(MM,)i(19)2095
+1929 y(SANE)p 2339 1929 V 31 w(UNIT)p 2588 1929 V 32
+w(NONE,)f(19)2095 2042 y(SANE)p 2339 2042 V 31 w(UNIT)p
+2588 2042 V 32 w(PERCENT)-7 b(,)20 b(19)2095 2155 y(SANE)p
+2339 2155 V 31 w(UNIT)p 2588 2155 V 32 w(PIXEL,)h(19)2095
+2268 y(SANE)p 2339 2268 V 31 w(V)-10 b(alue)p 2576 2268
+V 34 w(T)j(ype,)23 b(18)2095 2381 y(SANE)p 2339 2381
+V 31 w(VERSION)p 2766 2381 V 31 w(CODE,)e(12)2095 2494
+y(SANE)p 2339 2494 V 31 w(VERSION)p 2766 2494 V 31 w(MAJOR,)h(12)2095
+2607 y(SANE)p 2339 2607 V 31 w(W)-7 b(ord,)24 b(12,)f(47)2095
+2720 y(scan)i(area)f(options,)h(40)2095 2833 y(scan)g(resolution,)h(39)
+2095 2946 y(scanner)g(b)n(utton)f(options,)g(44)2095
+3059 y(shado)n(w)f(options,)i(43)2095 3171 y(source)f(options,)g(41)
+2095 3284 y(structure,)h(48)2095 3480 y(threshold)g(option,)f(41)2095
+3593 y(tl-x,)f(40)2095 3706 y(tl-y)-6 b(,)24 b(40)2095
+3819 y(T)-7 b(ype)24 b(Strings,)g(16)2095 4015 y(union,)h(48)2095
+4128 y(username,)g(24)2095 4324 y(V)-10 b(endor)25 b(Strings,)f(16)2095
+4520 y(well-kno)n(wn)h(options,)g(38)1905 5381 y(58)p
+eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/sane2/0.08/sane2-0.08.tex b/sane2/0.08/sane2-0.08.tex
new file mode 100644
index 00000000..c9d96da9
--- /dev/null
+++ b/sane2/0.08/sane2-0.08.tex
@@ -0,0 +1,2721 @@
+\documentclass[11pt,DVIps]{report}
+
+\usepackage{times,epsfig,changebar,html}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{1.5ex plus 0.5ex minus 0.5ex}
+\setlength{\textwidth}{6.5in}
+\setlength{\textheight}{8.5in}
+\setlength{\marginparwidth}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\evensidemargin}{0pt}
+\setlength{\marginparsep}{0pt}
+\addtolength{\topmargin}{-0.75in}
+
+\title{\huge SANE Standard Version 2.0 proposal 0.08 - rauch/beck}
+\author{}
+\date{Dec 8, 2002}
+
+\makeindex
+
+\begin{document}
+
+\newcommand{\filename}[1]{{\tt #1}}
+\newcommand{\code}[1]{{\tt #1}}
+\newcommand{\var}[1]{{\it #1}}
+\newcommand{\defn}[1]{#1\index{#1}}
+
+\begin{latexonly}
+ \setcounter{changebargrey}{0} % black change bars
+\end{latexonly}
+
+\maketitle
+\tableofcontents
+\listoffigures
+\listoftables
+
+
+\chapter{Preface}
+
+The SANE standard is being developed by a group of free-software
+developers. The process is open to the public and comments as well as
+suggestions for improvements are welcome. Information on how to join
+the SANE development process can be found in Chapter
+\ref{chap:contact}.
+
+The SANE standard is intended to streamline software development by
+providing a standard application programming interface to access
+raster scanner hardware. This should reduce the number of different
+driver implementations, thereby reducing the need for reimplementing
+similar code.
+
+
+\section{About This Document}
+
+This document is intended for developers who are creating either an
+application that requires access to raster scanner hardware and for
+developers who are implementing a SANE driver. It does not cover
+specific implementations of SANE components. Its sole purpose is to
+describe and define the SANE application interface that will enable
+any application on any platform to interoperate with any SANE backend
+for that platform.
+
+The remainder of this document is organized as follows.
+Chapter~\ref{chap:intro} provides introductional material.
+Chapter~\ref{chap:environ} presents the environment SANE is designed
+for. Chapter~\ref{chap:api} details the SANE Application Programmer
+Interface. Chapter~\ref{chap:net} specifies the network protocol that
+can be used to implement the SANE API in a network transparent
+fashion. Finally, Chapter~\ref{chap:contact} gives information on how
+to join the SANE development process.
+
+\subsection{Typographic Conventions}
+
+Changes since the last revision of this document are highlighted
+like this:
+
+\begin{changebar}
+ Paragraphs that changed since the last revision of the documention
+ are marked like this paragraph.
+\end{changebar}
+
+\chapter{Introduction}\label{chap:intro}
+
+SANE is an application programming interface (API) that provides
+standardized access to any raster image scanner hardware. The
+standardized interface allows to write just one driver for each
+scanner device instead of one driver for each scanner and application.
+The reduction in the number of required drivers provides significant
+savings in development time. More importantly, SANE raises the level
+at which applications can work. As such, it will enable applications
+that were previously unheard of in the UNIX world. While SANE is
+primarily targeted at a UNIX environment, the standard has been
+carefully designed to make it possible to implement the API on
+virtually any hardware or operating system.
+
+SANE is an acronym for ``Scanner Access Now Easy.'' Also, the hope is
+that SANE is sane in the sense that it will allow easy implementation
+of the API while accommodating all features required by today's
+scanner hardware and applications. Specifically, SANE should be broad
+enough to accommodate devices such as scanners, digital still and
+video cameras, as well as virtual devices like image file filters.
+
+\section{Terminology}
+
+An application that uses the SANE interface is called a SANE {\em
+ frontend}. A driver that implements the SANE interface is called a
+SANE {\em backend}. A {\em meta backend\/} provides some means to
+manage one or more other backends.
+
+
+\chapter{The SANE Environment}\label{chap:environ}
+
+SANE is defined as a C-callable library interface. Accessing a raster
+scanner device typically consists of two phases: first, various
+controls of the scanner need to be setup or queried. In the second
+phase, one or more images are acquired.
+
+Since the device controls are widely different from device to device,
+SANE provides a generic interface that makes it easy for a frontend to
+give a user access to all controls without having to understand each
+and every device control. The design principle used here is to
+abstract each device control into a SANE {\em option\/}. An option is
+a self-describing name/value pair. For example, the brightness
+control of a camera might be represented by an option called
+\code{brightness} whose value is an integer in the range from 0 to
+255.
+
+With self-describing options, a backend need not be concerned with
+{\em presentation\/} issues: the backend simply provides a list of
+options that describe all the controls available in the device.
+Similarly, there are benefits to the frontend: it need not be
+concerned with the {\em meaning\/} of each option. It simply provides
+means to present and alter the options defined by the backend.
+
+
+\section{Attaching to a SANE backend}
+
+The process through which a SANE frontend connects to a backend is
+platform dependent. Several possibilities exist:
+\begin{itemize}
+
+\item {\bf Static linking:} A SANE backend may be linked directly into
+ a frontend. While the simplest method of attaching to a backend, it
+ is somewhat limited in functionality since the available devices is
+ limited to the ones for which support has been linked in when the
+ frontend was built. But even so static linking can be quite useful,
+ particularly when combined with a backend that can access scanners
+ via a network. Also, it is possible to support multiple backends
+ simultaneously by implementing a meta backend that manages several
+ backends that have been compiled in such a manner that they export
+ unique function names. For example, a backend called \code{be}
+ would normally export a function called \code{sane\_read()}. If
+ each backend would provide such a function, static linking would
+ fail due to multiple conflicting definitions of the same symbol.
+ This can be resolved by having backend \code{be} include a
+ header file that has lines of the form:
+ \begin{quote}
+\begin{verbatim}
+#define sane_read be_sane_read
+\end{verbatim}
+ \end{quote}
+ With definitions of this kind, backend \code{be} will export
+ function name \code{be\_sane\_read()}. Thus, all backends will
+ export unique names. As long as a meta backend knows about these
+ names, it is possible to combine several backends at link time and
+ select and use them dynamically at runtime.
+
+\item {\bf Dynamic linking:} A simpler yet more powerful way to
+ support multiple backends is to exploit dynamic linking on platforms
+ that support it. In this case, a frontend is linked against a
+ shared library that implements any SANE backend. Since each
+ dynamically linked backend exports the same set of global symbols
+ (all starting with the prefix \code{sane\_}), the dynamic library
+ that gets loaded at runtime does not necessarily have to be the same
+ one as one the frontend got linked against. In other words, it is
+ possible to switch the backend by installing the appropriate backend
+ dynamic library.
+
+ More importantly, dynamic linking makes it easy to implement a meta
+ backend that loads other backends {\em on demand}. This is a
+ powerful mechanism since it allows adding new backends merely by
+ installing a shared library and updating a configuration file.
+
+\item {\bf Network connection:} Arguably the ultimate way to attach to
+ a scanner is by using the network to connect to a backend on a
+ remote machine. This makes it possible to scan images from any host
+ in the universe, as long as there is a network connection to that
+ host and provided the user is permitted to access that scanner.
+
+\end{itemize}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/hierarchy.eps,angle=270,width=\textwidth}
+ \caption{Example SANE Hiearchy}
+ \label{fig:hierarchy}
+ \end{center}
+\end{figure}
+
+The above discussion lists just a few ways for frontends to attach to
+a backend. It is of course possible to combine these solutions to
+provide an entire hierarchy of SANE backends. Such a hierarchy is
+depicted in Figure~\ref{fig:hierarchy}. The figure shows that machine
+A uses a dynamic-linking based meta backend called \code{dll} to
+access the backends called \code{pnm}, \code{mustek}, and \code{net}.
+The first two are real backends, whereas the last one is a meta
+backend that provides network transparent access to remote scanners.
+In the figure, machine B provides non-local access to its scanners
+through the SANE frontend called \code{saned}. The \code{saned} in
+turn has access to the \code{hp} and \code{autolum} backends through
+another instance of the \code{dll} backend. The \code{autolum} meta
+backend is used to automatically adjust the luminance (brightness) of
+the image data acquired by the camera backend called \code{qcam}.
+
+Note that a meta backend really is both a frontend and a backend at
+the same time. It is a frontend from the viewpoint of the backends
+that it manages and a backend from the viewpoint of the frontends that
+access it. The name ``meta backend'' was chosen primarily because the
+SANE standard describes the interface from the viewpoint of a (real)
+frontend.
+
+
+\section{Image Data Format}\label{sec:imageformat}\index{image data format}
+
+Arguably the most important aspect of an image acquisition system is how
+images are represented. The SANE approach is to define a simple yet powerful
+representation that is sufficient for vast majority of applications and
+devices. While the representation is simple, the interface has been defined
+carefully to allow extending it in the future without breaking backwards
+compatibility. Thus, it will be possible to accommodate future applications or
+devices that were not anticipated at the time this standard was created.
+
+A SANE image is a rectangular area. The rectangular area is subdivided into a
+number of rows and columns. At the intersection of each row and column is a
+(preferable quadratic) pixel. A pixel consists of one or more sample values.
+Each sample value represents one channel (e.g., the red channel).
+
+The SANE API transmits an image as a sequence of frames. Each frame covers
+the same rectangular area as the entire image, but may contain only a subset
+of the channels in the final image. For example, a red/green/blue image could
+either be transmitted as a single frame that contains the sample values for
+all three channels or it could be transmitted as a sequence of three frames:
+the first frame containing the red channel, the second the green channel, and
+the third the blue channel.
+
+When transmitting an image frame by frame, the frontend needs to know what
+part of the image a frame represents (and how many frames it should expect).
+For that purpose, the SANE API tags every frame with a type and a format
+descriptor.
+
+\begin{changebar}
+ There are two different types of frames: pixel oriented frames
+ \code{\defn{SANE\_FRAME\_RAW}} and arbitrary data frames
+ \code{\defn{SANE\_FRAME\_MIME}}. These types are discussed in detail in the
+ following sections. The frame types used by the previous version~1 of this
+ standard (\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}},
+ \code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and
+ \code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by
+ \code{\defn{SANE\_FRAME\_RAW}}.
+
+ \subsection{Pixel oriented frames}
+
+ The type of pixel oriented frames is \code{\defn{SANE\_FRAME\_RAW}}. The
+ frame contains one or more channels of data in a channel-interleaved format,
+ that represents sample values from a property of the individual pixels that
+ is subject to further description in the \code{format\_desc} member of the
+ \code{SANE\_Parameters} structured type. See section~\ref{sec:sanegetparameters}
+ on page~\pageref{sec:sanegetparameters} for details about the format
+ descriptions.
+\end{changebar}
+
+ Each sample value has a certain bit depth. The bit depth is fixed for the
+ entire image and can be as small as one bit. Valid bit depths are 1, 8, or
+ 16 bits per sample. If a device's natural bit depth is something else, it is
+ up to the driver to scale the sample values appropriately (e.g., a 4 bit
+ sample could be scaled by a factor of four to represent a sample value of
+ depth 8).
+
+\begin{changebar}
+ The complete image may consist of several different channels. The number of channels
+ is defined by member \code{channels\_per\_image} of \code{SANE\_Parameters}.
+ The image may be transmitted in an arbitrary number of frames which can be
+ determined by watching the \code{SANE\_PFLAG\_LAST\_FRAME} flag in said type (or by
+ counting the channels). Note: This frame type replaces all frame types of
+ the SANE standard version 1.
+\end{changebar}
+
+Conceptually, each pixel oriented frame is transmitted a byte at a time. Each
+byte may contain 8 sample values (for an image bit depth of 1), one full
+sample value (for an image bit depth of 8), or a partial sample value (for an
+image bit depth of 16 or bigger). In the latter case, the bytes of each
+sample value are transmitted in the machine's native byte order.
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ A network-based meta backend will have to ensure that the byte order
+ in image data is adjusted appropriately if necessary. For example,
+ when the meta backend attaches to the server proxy, the proxy may
+ inform the backend of the server's byte order. The backend can then
+ apply the adjustment if necessary. In essence, this implements a
+ ``receiver-makes-right'' approach.
+\end{quote}
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/xfer.eps,width=0.5\textwidth}
+ \caption{Transfer order of image data bytes}
+ \label{fig:xfer}
+ \end{center}
+\end{figure}
+
+The order in which the sample values in a frame are transmitted is illustrated
+in Figure~\ref{fig:xfer}. As can be seen, the values are transmitted row by
+row and each row is transmitted from left-most to right-most column. The
+left-to-right, top-to-bottom transmission order applies when the image is
+viewed in its normal orientation (as it would be displayed on a screen, for
+example).
+
+If a frame contains multiple channels, then the channels are transmitted in an
+interleaved fashion. Figure~\ref{fig:pixels} illustrates this for the case
+where a frame contains a complete red/green/blue image with a bit-depth of 8.
+
+\begin{figure}[htbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/image-data.eps,width=0.8\textwidth}
+ \caption{Bit and byte order of image data}
+ \label{fig:pixels}
+ \end{center}
+\end{figure}
+
+For a bit depth of 1, each byte contains 8 sample values of a {\em single\/}
+channel. In other words, a bit depth 1 frame is transmitted in a byte
+interleaved fashion. The first sample of each byte is represented by the most
+significant bit.
+
+\begin{changebar}
+For gray channels at a bit depth of 1 only two sample values are possible: 1
+represents minimum intensity (black) and 0 represents maximum intensity
+(white). For all other channel types and bit depths a sample value of 0
+represents minimum intensity and larger values represent increasing intensity.
+
+\subsection{Arbitrary data frames}
+
+It also is possible to transmit arbitrary (not necessaryly pixel oriented)
+data. This allows transmission of compressed images like jpeg, tiff, etc.
+
+The type of arbitrary data frames is \code{\defn{SANE\_FRAME\_MIME}}.
+The frame contains arbitrary data of the MIME (see RFC 1521/1522) type that is
+given in the \code{format\_desc} member of the \code{SANE\_Parameters}
+structured type (see section~\ref{sec:sanegetparameters} on
+page~\pageref{sec:sanegetparameters}). As such, it is assumed to be
+incomprehensible to the frontend, except for selected types the frontend is
+specifically capable of handling internally. The frontend is free to ignore
+those frames, or employ any appropriate means to otherwise handle this data
+(like saving them to disk or spawning an external viewer).
+\end{changebar}
+
+\chapter{The SANE Application Programmer Interface (API)}\label{chap:api}
+
+\begin{changebar}
+This Section defines version 2 of the SANE application
+programmer interface (API). Any SANE frontend must depend on the
+interface defined in this section only. Converseley, any SANE backend
+must implement its functionality in accordance with this
+specification. The interface as documented here is declared as a C
+callable interface in a file called \filename{sane/sane-2.h}. This file should
+normally be included via a C pre-processor directive of the form:
+\begin{verbatim}
+ #include
+\end{verbatim}
+\end{changebar}
+
+
+\section{Version Control}
+
+The SANE standard is expected to evolve over time. Whenever a change
+to the SANE standard is made that may render an existing frontend or
+backend incompatible with the new standard, the major version number
+must be increased. Thus, any frontend/backend pair is compatible
+provided the major version number of the SANE standard they implement
+is the same. A frontend may implement backwards compatiblity by
+allowing major numbers that are smaller than the expected major number
+(provided the frontend really can cope with the older version). In
+contrast, a backend always provides support for one and only one
+version of the standard. If a specific application does require that
+two different versions of the same backend are accessible at the same
+time, it is possible to do so by installing the two versions under
+different names.
+
+SANE version control also includes a minor version number and a build
+revision. While control of these numbers remains with the implementor
+of a backend, the recommended use is as follows. The minor version is
+incremented with each official release of a backend. The build
+revision is increased with each build of a backend.
+
+The SANE API provides the following five macros to manage version
+numbers.
+\begin{quote}
+ \begin{description}
+ \item[\code{\defn{SANE\_CURRENT\_MAJOR}}:] The value of this macro is the
+ number of the SANE standard that the interface implements.
+
+ \item[\code{\defn{SANE\_VERSION\_CODE}(\var{maj},\var{min},\var{bld})}:]
+ \label{sec:saneversioncode}
+ This macro can be used to build a monotonically increasing version
+ code. A SANE version code consists of the SANE standard major
+ version number (\var{maj}), the minor version number \var{min},
+ and the build revision of a backend (\var{bld}). The major and
+ minor version numbers must be in the range 0\ldots255 and the
+ build revision must be in the range 0\ldots65535.
+
+ Version codes are monotonic in the sense that it is possible to
+ apply relational operators (e.g., equality or less-than test)
+ directly on the version code rather than individually on the three
+ components of the version code.
+
+ Note that the major version number alone determines whether a
+ frontend/backend pair is compatible. The minor version and the
+ build revision are used for informational and bug-fixing purposes
+ only.
+
+ \item[\code{\defn{SANE\_VERSION\_MAJOR}(\var{vc})}:] This macro returns the
+ major version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_MINOR(\var{vc})}:] This macro returns the
+ minor version number component of the version code passed in
+ argument \var{vc}.
+ \item[\code{SANE\_VERSION\_BUILD(\var{vc})}:] This macro returns the
+ build revision component of the version code passed in argument
+ \var{vc}.
+ \end{description}
+\end{quote}
+
+
+\section{Data Types}
+
+\subsection{Base Types}
+
+The SANE standard is based on just two SANE-specific base types: the
+SANE byte and word.
+\begin{quote}
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Byte};} \\
+ \code{typedef \var{some-scalar-type\/} \defn{SANE\_Word};}
+\end{quote}
+\verb|SANE_Byte| must correspond to some scalar C type that is capable
+of holding values in the range 0 to 255. \verb|SANE_Word| must be
+capable of holding any of the following:
+\begin{itemize}
+ \item the truth values \verb|SANE_FALSE| and \verb|SANE_TRUE|
+ \item signed integers in the range $-2^{31}\ldots2^{31}-1$
+ \item fixed point values in the range $-32768\ldots32767.9999$ with
+ a resolution of $1/65536$
+ \item 32 bits (for bit sets)
+\end{itemize}
+Note that the SANE standard does not define what C type
+\verb|SANE_Byte| and \verb|SANE_Word| map to. For example, on some
+platforms, the latter may map to \verb|long int| whereas on others it
+may map to \verb|int|. A portable SANE frontend or backend must
+therefore not depend on a particular mapping.
+
+\subsection{Boolean Type}
+
+\code{\defn{SANE\_Bool}} is used for variables that can take one of
+the two truth values \code{\defn{SANE\_FALSE}} and
+\code{\defn{SANE\_TRUE}}. The former value is defined to be 0,
+whereas the latter is 1.\footnote{This is different from ANSI C where
+ any non-zero integer value represents logical TRUE.} The C
+declarations for this type are given below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FALSE 0
+#define SANE_TRUE 1
+typedef SANE_Word SANE_Bool;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Bool| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Bool| whenever a given variable or formal argument has a
+fixed interpretation as a boolean object.
+
+\subsection{Integer Type}
+
+\code{\defn{SANE\_Int}} is used for variables that can take integer
+values in the range $-2^{32}$ to $2^{31}-1$. Its C declaration is
+given below.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Word SANE_Int;
+\end{verbatim}
+\end{quote}
+Note that \verb|SANE_Int| is simply an alias of \verb|SANE_Word|. It
+is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Int| whenever a given variable or formal argument has a
+fixed interpretation as an integer object.
+
+
+\subsection{Fixed-point Type}
+
+\code{\defn{SANE\_Fixed}} is used for variables that can take fixed
+point values in the range $-32768$ to $32767.9999$ with a resolution
+of $1/65535$. The C declarations relating to this type are given
+below.
+\begin{quote}
+\begin{verbatim}
+#define SANE_FIXED_SCALE_SHIFT 16
+typedef SANE_Word SANE_Fixed;
+\end{verbatim}
+\end{quote}
+The macro \code{\defn{SANE\_FIXED\_SCALE\_SHIFT}} gives the location
+of the fixed binary point. This standard defines that value to be 16,
+which yields a resolution of $1/65536$.
+
+Note that \verb|SANE_Fixed| is simply an alias of \verb|SANE_Word|.
+It is therefore always legal to use the latter type in place of the
+former. However, for clarity, it is recommended to use
+\verb|SANE_Fixed| whenever a given variable or formal argument has a
+fixed interpretation as a fixed-point object.
+
+For convenience, SANE also defines two macros that convert fixed-point
+values to and from C double floating point values.
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_FIX}(\var{d})}:] Returns the largest SANE
+ fixed-point value that is smaller than the double value \var{d}.
+ No range checking is performed. If the value of \var{d} is out of
+ range, the result is undefined.
+
+ \item[\code{\defn{SANE\_UNFIX}(\var{w})}:] Returns the nearest
+ double machine number that corresponds to fixed-point value
+ \var{w}.
+
+ \end{description}
+\end{quote}
+SANE does {\em not\/} require that the following two expressions hold
+true (even if the values of \var{w} and \var{d} are in range):
+\begin{quote}
+\begin{verbatim}
+SANE_UNFIX(SANE_FIX(d)) == d
+SANE_FIX(SANE_UNFIX(w)) == w
+\end{verbatim}
+\end{quote}
+In other words, conversion between fixed and double values may be
+lossy. It is therefore recommended to avoid repeated conversions
+between the two representations.
+
+
+\subsection{Text}
+
+\subsubsection{Character Type}
+
+Type \code{\defn{SANE\_Char}} represents a single text character or
+symbol. At present, this type maps directly to the underlying C
+\verb|char| type (typically one byte). The encoding for such
+characters is currently fixed as ISO LATIN-1. Future versions of this
+standard may map this type to a wider type and allow multi-byte
+encodings to support internationalization. As a result of this, care
+should be taken to avoid the assumption that
+\verb|sizeof(SANE_Char)==sizeof(char)|.
+\begin{quote}
+\begin{verbatim}
+typedef char SANE_Char;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{String Type}
+
+Type \code{\defn{SANE\_String}} represents a text string as a sequence
+of C \verb|char| values. The end of the sequence is indicated by a
+\verb|'\0'| (\defn{NUL}) character.
+\begin{quote}
+\begin{verbatim}
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+\end{verbatim}
+\end{quote}
+The type \code{\defn{SANE\_String\_Const}} is provided by SANE to
+enable declaring strings whose contents is unchangable. Note that in
+ANSI C, the declaration
+\begin{quote}
+\begin{verbatim}
+const SANE_String str;
+\end{verbatim}
+\end{quote}
+declares a string pointer that is constant (not a string pointer that
+points to a constant value).
+
+
+\subsection{Scanner Handle Type}
+
+Access to a scanner is provided through an opaque type called
+\code{\defn{SANE\_Handle}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef void *SANE_Handle;
+\end{verbatim}
+\end{quote}
+While this type is declared to be a void pointer, an application must
+not attempt to interpret the value of a \verb|SANE_Handle|. In
+particular, SANE does not require that a value of this type is a legal
+pointer value.
+
+
+\subsection{Status Type}
+
+Most SANE operations return a value of type \code{\defn{SANE\_Status}}
+to indicate whether the completion status of the operation. If an
+operation completes successfully, \verb|SANE_STATUS_GOOD| is returned.
+In case of an error, a value is returned that indicates the nature of
+the problem. The complete list of available status codes is listed in
+Table \ref{tab:status}. It is recommended to use function
+\code{sane\_strstatus()} to convert status codes into a legible
+string.
+
+\begin{table}[htbp]
+ \begin{center}
+ \begin{tabular}{|l|r|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf Symbol} & \multicolumn{1}{c|}{\bf Code} &
+ \multicolumn{1}{c|}{\bf Description} \\
+ \hline\hline
+\code{\defn{SANE\_STATUS\_GOOD}}
+ & 0 & Operation completed succesfully. \\
+\code{\defn{SANE\_STATUS\_UNSUPPORTED}}
+ & 1 & Operation is not supported. \\
+\code{\defn{SANE\_STATUS\_CANCELLED}}
+ & 2 & Operation was cancelled. \\
+\code{\defn{SANE\_STATUS\_DEVICE\_BUSY}}
+ & 3 & Device is busy---retry later. \\
+\code{\defn{SANE\_STATUS\_INVAL}}
+ & 4 & Data or argument is invalid. \\
+\code{\defn{SANE\_STATUS\_EOF}}
+ & 5 & No more data available (end-of-file). \\
+\code{\defn{SANE\_STATUS\_JAMMED}}
+ & 6 & Document feeder jammed. \\
+\code{\defn{SANE\_STATUS\_NO\_DOCS}}
+ & 7 & Document feeder out of documents. \\
+\code{\defn{SANE\_STATUS\_COVER\_OPEN}}
+ & 8 & Scanner cover is open. \\
+\code{\defn{SANE\_STATUS\_IO\_ERROR}}
+ & 9 & Error during device I/O. \\
+\code{\defn{SANE\_STATUS\_NO\_MEM}}
+ & 10 & Out of memory. \\
+\code{\defn{SANE\_STATUS\_ACCESS\_DENIED}}
+ & 11 & Access to resource has been denied. \\
+ \hline
+ \end{tabular}
+ \caption{Status Codes}\label{tab:status}
+ \end{center}
+\end{table}
+
+
+\subsection{Device Descriptor Type}
+\begin{changebar}
+
+Each SANE device is represented by a structure of type
+\code{\defn{SANE\_Device}}. The C declaration of this type is given
+below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const vendor;
+ SANE_String_Const model;
+ SANE_String_Const type;
+ SANE_String_Const email_backend_author;
+ SANE_String_Const backend_website;
+ SANE_String_Const device_location;
+ SANE_String_Const comment;
+ SANE_String_Const reserved_string;
+ SANE_Int backend_version_code;
+ SANE_Int backend_capablity_flags;
+ SANE_Int reserved_int;
+ }
+SANE_Device;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+\index{device-name}
+The structure provides the unique name of the scanner in member
+\code{name}. It is this unique name that should be passed in a call
+to \code{sane\_open()}. The format of this name is completely up to
+the backend. The only constraints are that the name is unique among
+all devices supported by the backend and that the name is a legal SANE
+text string. To simplify presentation of unique names, their length
+should not be excessive. It is {\em recommended\/} that backends keep
+unique names below 32 characters in length. However, applications
+{\em must\/} be able to cope with arbitrary length unique names.
+
+The next three members in the device structure provide additional
+information on the device corresponding to the unique name.
+Specifically, members \code{vendor}, \code{model}, and \code{type} are
+single-line strings that give information on the vendor
+(manufacturer), model, and the type of the device. For consistency's
+sake, the following strings should be used when appropriate (the lists
+will be expanded as need arises):
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \hspace{\fill}
+ \begin{tabular}[t]{|ll|}
+ \hline
+ \multicolumn{2}{|c|}{\bf \defn{Vendor Strings}} \\
+ \hline\hline
+ \code{AGFA} & \code{Microtek} \\
+ \code{Abaton} & \code{Minolta} \\
+ \code{Acer} & \code{Mustek} \\
+ \code{Apple} & \code{NEC} \\
+ \code{Artec} & \code{Nikon} \\
+ \code{Avision} & \code{Plustek} \\
+ \code{CANON} & \code{Polaroid} \\
+ \code{Connectix} & \code{Ricoh} \\
+ \code{Epson} & \code{Sharp} \\
+ \code{Fujitsu} & \code{Siemens} \\
+ \code{Hewlett-Packard} & \code{Tamarack} \\
+ \code{IBM} & \code{UMAX} \\
+ \code{Kodak} & \code{Noname} \\
+ \code{Logitech} & \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \begin{tabular}[t]{|l|}
+ \hline
+ \multicolumn{1}{|c|}{\bf \defn{Type Strings}} \\
+ \hline\hline
+ \code{film scanner} \\
+ \code{flatbed scanner} \\
+ \code{frame grabber} \\
+ \code{handheld scanner} \\
+ \code{multi-function peripheral} \\
+ \code{sheetfed scanner} \\
+ \code{still camera} \\
+ \code{video camera} \\
+ \code{virtual device} \\
+ \hline
+ \end{tabular}
+ \hspace{\fill}
+ \caption{Predefined Device Information Strings}
+ \label{tab:devinfo}
+ \end{center}
+\end{table}
+Note that vendor string \code{Noname} can be used for virtual devices
+that have no physical vendor associated. Also, there are no
+predefined model name strings since those are vendor specific and
+therefore completely under control of the respective backends.
+
+\begin{changebar}
+The backend has to set up the string \code{email\_backend\_author}
+with the name and the email address of the backend author or a contact person
+in the format:
+\begin{verbatim}
+Firstname Lastname
+\end{verbatim}
+
+The string \code{backend\_website} should be set up by the backend
+with the website or ftp address of the backend in the format:
+\begin{verbatim}
+http://www.domain.org/sane-hello/index.html
+\end{verbatim}
+
+The backend should fill the string \code{device\_location} with a
+text that describes where a user can find this device. The text
+should be configurable by the administrator. This could e.g. look
+like this:
+\begin{verbatim}
+building 93, 2nd plane, room 2124
+\end{verbatim}
+
+The string \code{comment} can be used to display any comment about the device
+to the user. The text should be configurable by the administrator.
+
+The string \code{reserved\_string} is unused currently but planned for
+future use.
+
+All unused strings must be set to ``'' by the backend.
+
+With member \code{backend\_version\_code} a frontend can find
+out the version of a backend it is connected to via one or more meta
+backends.
+
+The member \code{backend\_capability\_flags} contains 32 bits that
+are planned to give the backend the chance to inform the frontend about
+its capabilities. The meaning of the flags will be defined when there
+is the need for it. The backend has to set all not defined bits
+(in the moment all 32 bits) to 0.
+
+The member \code{reserved\_int} is planned for future use, the backend has
+to set the value of the integer to 0.
+\end{changebar}
+
+\subsection{Option Descriptor Type}\label{sec:odesc}
+
+Option descriptors are at the same time the most intricate and
+powerful type in the SANE standard. Options are used to control
+virtually all aspects of device operation. Much of the power of the
+SANE API stems from the fact that most device controls are completely
+described by their respective option descriptor. Thus, a frontend can
+control a scanner abstractly, without requiring knowledge as to what
+the purpose of any given option is. Conversely, a scanner can
+describe its controls without requiring knowledge of how the frontend
+operates. The C declaration of the
+\code{\defn{SANE\_Option\_Descriptor}} type is given below.
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_String_Const name;
+ SANE_String_Const title;
+ SANE_String_Const desc;
+ SANE_Value_Type type;
+ SANE_Unit unit;
+ SANE_Int size;
+ SANE_Int cap;
+ SANE_Constraint_Type constraint_type;
+ union
+ {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+ }
+ constraint;
+ }
+SANE_Option_Descriptor;
+\end{verbatim}
+\end{quote}
+
+\subsubsection{Option Name}
+
+Member \code{name} is a string that uniquely identifies the option.
+The name must be unique for a given device (i.e., the option names
+across different backends or devices need not be unique). The option
+name must consist of lower-case ASCII letters (\code{a}--\code{z}),
+digits (\code{0}--\code{9}), or the dash character (\code{-}) only.
+The first character must be a lower-case ASCII character (i.e., not a
+digit or a dash).
+
+\subsubsection{Option Title}
+
+Member \code{title} is a single-line string that can be used by the
+frontend as a title string. This should typically be a short (one or
+two-word) string that is chosen based on the function of the option.
+
+\subsubsection{Option Description}
+
+Member \code{desc} is a (potentially very) long string that can be
+used as a help text to describe the option. It is the responsibility
+of the frontend to break the string into managable-length lines.
+Newline characters in this string should be interpreted as paragraph
+breaks.
+
+\subsubsection{Option Value Type}
+
+Member \code{type} specifies the type of the option value. The
+possible values for type \code{\defn{SANE\_Value\_Type}} are described
+in Table \ref{tab:valuetype}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|p{0.6\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_TYPE\_BOOL}} & 0 & Option value is of type
+ \verb|SANE_Bool|. \\
+
+\code{\defn{SANE\_TYPE\_INT}} & 1 & Option value is of type
+ \verb|SANE_Int|. \\
+
+\code{\defn{SANE\_TYPE\_FIXED}}&2 & Option value is of type
+ \verb|SANE_Fixed|. \\
+
+\code{\defn{SANE\_TYPE\_STRING}}&3 & Option value is of type
+ \verb|SANE_String|. \\
+
+\code{\defn{SANE\_TYPE\_BUTTON}} & 4 & An option of this type has no value.
+Instead, setting an option of this type has an option-specific
+side-effect. For example, a button-typed option could be used by a
+backend to provide a means to select default values or to the tell an
+automatic document feeder to advance to the next sheet of paper. \\
+
+\code{\defn{SANE\_TYPE\_GROUP}} & 5 & An option of this type has no value.
+This type is used to group logically related options. A group option
+is in effect up to the point where another group option is encountered
+(or up to the end of the option list, if there are no other group
+options). For group options, only members \code{title} and
+\code{type} are valid in the option descriptor. \\
+
+ \hline
+ \end{tabular}
+ \caption{Option Value Types (\code{SANE\_Value\_Type})}
+ \label{tab:valuetype}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Unit}
+
+Member \code{unit} specifies what the physical unit of the option
+value is. The possible values for type \code{\defn{SANE\_U\-nit}} are
+described in Table \ref{tab:units}. Note that the specified unit is
+what the SANE backend expects. It is entirely up to a frontend as to
+how these units a presented to the user. For example, SANE expresses
+all lengths in millimeters. A frontend is generally expected to
+provide appropriate conversion routines so that a user can express
+quantities in a customary unit (e.g., inches or centimeters).
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|l|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_UNIT\_NONE}} & 0 & Value is unit-less (e.g., page count).\\
+\code{\defn{SANE\_UNIT\_PIXEL}} & 1 & Value is in number of pixels. \\
+\code{\defn{SANE\_UNIT\_BIT}} & 2 & Value is in number of bits. \\
+\code{\defn{SANE\_UNIT\_MM}} & 3 & Value is in millimeters. \\
+\code{\defn{SANE\_UNIT\_DPI}} & 4 & Value is a resolution in dots/inch. \\
+\code{\defn{SANE\_UNIT\_PERCENT}}& 5 & Value is a percentage. \\
+\code{\defn{SANE\_UNIT\_MICROSECOND}}& 6 & Value is time in $\mu$-seconds. \\
+
+\hline
+ \end{tabular}
+ \caption{Physical Units (\code{SANE\_Unit})}
+ \label{tab:units}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Size}\label{sec:valuesize}
+
+Member \code{size} specifies the size of the option value (in bytes).
+This member has a slightly different interpretation depending on the
+type of the option value:
+\begin{quote}
+ \begin{description}
+ \item[\code{SANE\_TYPE\_STRING}:] The size is the maximum size of
+ the string. For the purpose of string size calcuations, the
+ terminating \code{NUL} character is considered to be part of the
+ string. Note that the terminating \code{NUL} character must
+ always be present in string option values.
+ \item[\code{SANE\_TYPE\_INT}, \code{SANE\_TYPE\_FIXED}:] The size
+ must be a positive integer multiple of the size of a
+ \verb|SANE_Word|. The option value is a vector of length
+ \[ \code{size}/\code{sizeof(SANE\_Word)}. \]
+ \item[\code{SANE\_TYPE\_BOOL}:] The size must be set to
+ \code{sizeof(SANE\_Word)}.
+ \item[\code{SANE\_TYPE\_BUTTON}, \code{SANE\_TYPE\_GROUP}:] The
+ option size is ignored.
+ \end{description}
+\end{quote}
+
+\subsubsection{Option Capabilities}
+
+Member \code{cap} describes what capabilities the option posseses.
+This is a bitset that is formed as the inclusive logical OR of the
+capabilities described in Table \ref{tab:capabilities}. The SANE API
+provides the following to macros to test certain features of a given
+capability bitset:
+\begin{quote}
+ \begin{description}
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_ACTIVE}(\var{cap})}:] This macro
+ returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is currently active.
+
+ \item[\code{\defn{SANE\_OPTION\_IS\_SETTABLE}(\var{cap})}:] This
+ macro returns \code{SANE\_TRUE} if and only if the option with the
+ capability set \var{cap} is software settable.
+ \end{description}
+\end{quote}
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.59\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{c|}{\bf Code} &
+\multicolumn{1}{c|}{\bf Description} \\
+\hline\hline
+
+\code{\defn{SANE\_CAP\_SOFT\_SELECT}} & 1 & The option
+ value can be set by a call to \code{sane\_con\-trol\_opt\-ion()}.\\
+
+\code{\defn{SANE\_CAP\_HARD\_SELECT}} & 2 & The option value can be set by
+ user-intervention (e.g., by flipping a switch). The user-interface
+ should prompt the user to execute the appropriate action to set such
+ an option. This capability is mutually exclusive with
+ SANE\_CAP\_SOFT\_SELECT (either one of them can be set, but not both
+ simultaneously). \\
+
+\code{\defn{SANE\_CAP\_SOFT\_DETECT}} & 4 & The option
+ value can be detected by software. If
+ \code{SANE\_\-CAP\_\-SO\-FT\_SEL\-ECT} is set, this capability {\em must\/}
+ be set. If \code{SANE\_CAP\_HARD\_SELECT} is set, this capability
+ may or may not be set. If this capability is set but neither
+ \code{SANE\_CAP\_SO\-FT\_SEL\-ECT} nor \code{SANE\_CAP\_HA\-RD\_SEL\-ECT}
+ are, then there is no way to control the option. That is, the
+ option provides read-out of the current value only. \\
+
+\code{\defn{SANE\_CAP\_EMULATED}} & 8 & If set, this capability indicates
+ that an option is not directly supported by the device and is
+ instead emulated in the backend. A sophisticated frontend may
+ elect to use its own (presumably better) emulation in lieu of an emulated
+ option. \\
+
+\code{\defn{SANE\_CAP\_AUTOMATIC}} & 16 & If set, this capability indicates
+ that the backend (or the device) is capable to picking a reasonable
+ option value automatically. For such options, it is possible to
+ select automatic operation by calling \code{sane\_control\_option()}
+ with an action value of \code{SANE\_ACTION\_SET\_AUTO}. \\
+
+\code{\defn{SANE\_CAP\_INACTIVE}} & 32 & If set, this capability indicates
+ that the option is not currently active (e.g., because it's
+ meaningful only if another option is set to some other value). \\
+
+\code{\defn{SANE\_CAP\_ADVANCED}} & 64 &
+ If set, this capability indicates that the option should be
+ considered an ``advanced user option''.
+\begin{changebar}
+ If this capability is set for an option of type
+ \code{SANE\_TYPE\_GROUP}, all options belonging to the group are also
+ advanced, even if they don't set the capabilty themselves.
+\end{changebar}
+ A frontend typically
+ displays such options in a less conspicuous way than regular options
+ (e.g., a command line interface may list such options last or a
+ graphical interface may make them available in a seperate ``advanced
+ settings'' dialog).
+ \\
+
+\code{\defn{SANE\_CAP\_HIDDEN}} & 128 &
+\begin{changebar}
+ If set, this capability indicates that the option shouldn't be
+ displayed to and used by the user directly. Instead a hidden option
+ is supposed to be automatically used by the frontend, like e.g. the
+ ``preview'' option.
+ If this capability is set for an option of type
+ \code{SANE\_TYPE\_GROUP}, all options belonging to the group are also
+ hidden, even if they don't set the capabilty themselves.
+ A frontend typically doesn't display such options by default but there
+ should be a way to override this default behaviour.
+\end{changebar}
+ \\
+
+\code{\defn{SANE\_CAP\_ALWAYS\_SETTABLE}} & 256 &
+\begin{changebar}
+ If set, this capability indicates that the option may be at any time between
+ \code{sane\_open()} and \code{sane\_close()}. I.e. it's allowed to set it
+ even while an image is acquired.
+\end{changebar}
+\\
+
+\hline
+ \end{tabular}
+ \caption{Option Capabilities}
+ \label{tab:capabilities}
+ \end{center}
+\end{table}
+
+\subsubsection{Option Value Constraints}
+
+It is often useful to constrain the values that an option can take.
+For example, constraints can be used by a frontend to determine how to
+represent a given option. Member \code{constraint\_type} indicates
+what constraint is in effect for the option. The constrained values
+that are allowed for the option are described by one of the union
+members of member \code{constraint}. The possible values of type
+\code{\defn{SANE\_Constraint\_Type}} and the interpretation of the
+\code{constraint} union is described in Table~\ref{tab:constraints}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_CONSTRAINT\_NONE}} & 0 & The value is unconstrained.
+ The option can take any of the values possible for the option's
+ type. \\
+
+ \code{\defn{SANE\_CONSTRAINT\_RANGE}} & 1 & This constraint is
+ applicable to integer and fixed-point valued options only. It
+ constrains the option value to a possibly quantized range of
+ numbers. Option descriptor member \code{constraint.range} points to
+ a range of the type \code{\defn{SANE\_Range}}. This type is illustrated
+ below:
+ \begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Word min;
+ SANE_Word max;
+ SANE_Word quant;
+ }
+SANE_Range;
+\end{verbatim}
+ \end{quote}
+ All three members in this structure are interpreted according to the
+ option value type (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|).
+ Members \code{min} and \code{max} specify the minimum and maximum
+ values, respectively. If member \code{quant} is non-zero, it
+ specifies the quantization value. If $l$ is the minimum value, $u$
+ the maximum value and $q$ the (non-zero) quantization of a range,
+ then the legal values are $v=k\cdot q+l$ for all non-negative
+ integer values of $k$ such that $v<=u$. \\
+
+\code{\defn{SANE\_CONSTRAINT\_WORD\_LIST}} & 2 & This constraint is applicable
+ to integer and fixed-point valued options only. It constrains the
+ option value to a list of numeric values. Option descriptor member
+ \code{constraint.word\_list} points to a list of words that
+ enumerates the legal values. The first element in that list is an
+ integer (\verb|SANE_Int|) that specifies the length of the list (not
+ counting the length itself). The remaining elements in the list are
+ interpreted according to the type of the option value
+ (\verb|SANE_TYPE_INT| or \verb|SANE_TYPE_FIXED|). \\
+
+\code{\defn{SANE\_CONSTRAINT\_STRING\_LIST}} & 3 & This constraint is
+ applicable to string-valued options only. It constrains the option
+ value to a list of strings. The option descriptor member
+ \code{con\-strai\-nt.str\-ing\_list} points to a \code{NULL} terminated
+ list of strings that enumerate the legal values for the option
+ value.
+\\\hline
+ \end{tabular}
+ \caption{Option Value Constraints}
+ \label{tab:constraints}
+ \end{center}
+\end{table}
+
+
+\subsection{Internationalization}\label{sec:i18n}
+\begin{changebar}
+All backend texts should be written in english.
+Localization (translation of backend texts) has to be done
+in the frontend. To automatically prepare translation tables
+(e.g. english to german) it is necessary to mark the texts
+that shall be translated.
+
+\subsubsection{How is a text marked for translation}
+
+The keyword \code{SANE\_I18N} is used to mark a text for translation.
+\code{SANE\_I18N} has to be defined as a dummy prototype:
+
+ \begin{quote}
+\begin{verbatim}
+#ifndef SANE_I18N
+# define SANE_I18N(text) text
+#endif
+\end{verbatim}
+ \end{quote}
+
+You should not mark prototypes or variables with \code{SANE\_I18N}
+because it is not possible (or very hard) to find out the
+texts that are covered by prototypes (\verb|SANE_I18N(START_SCAN_TEXT)|) and
+variables (\verb|SANE_I18N(option[7].name)|).
+
+A correct marked text can look like this:\\
+\verb|snprintf(buf, sizeof(buf), SANE_I18N("Start scan")|\\
+or\\
+\verb|#define START_SCAN_TEXT SANE_I18N("Start scan")|.\\
+It also is allowed to mark texts in structs because the
+prototype \code{SANE\_I18N} has no effect to the compiler.
+
+\subsubsection{Which texts shall be marked for translation?}
+All option texts that are visible for the user should be marked for
+translation. This is:
+\begin{itemize}
+\item
+member \code{title}
+\item
+member \code{desc}
+\item
+member \code{string\_list}
+\end{itemize}
+of \code{SANE\_Option\_Descriptor}.
+
+It is not allowed to mark/translate member \code{name}.
+Please also do not mark any error or debug messages that are
+displayed by the backend.
+
+\subsubsection{File formats and translation functions}
+The recommended file formats for translation tables are the \code{po} files
+and \code{mo} or \code{gmo} files.
+The po file contains the original text marked with the keyword \code{msgid}
+and the translated text marked with the keyword \code{msgstr}.
+A \code{po} file that contains all needed \code{msgid}s can be created
+e.g. by the gnu gettext tool \verb|xgettext| with the option
+\verb|-k SANE_I18N|.
+The translator adds the translated texts to the \code{po} files.
+The gettext tool \code{msgfmt} converts the \code{po} files to the
+\code{mo} or \code{gmo} files.\\
+
+Translation is done in the frontend. A backend has nothing
+to do with the translation of texts.
+The frontend should use the function \code{gettext}
+to translate the texts. This e.g. can look like this:\\
+\verb|snprintf(buf, sizeof(buf), gettext("english text"));|
+
+If a frontend author decides to use translation functions that
+need different translation tables, then the frontend is
+responsible to create/convert the translation tables.
+In this case it should use the \code{po} files to create its
+own translation tables from it.\\
+
+Note that it is strongly recommended to use the gettext tools.
+\end{changebar}
+
+
+\section{Operations}
+
+\subsection{\code{sane\_init}}
+
+This function must be called before any other SANE function can be called.
+The behavior of a SANE backend is undefined if this function is not called
+first or if the status code returned by \code{sane\_init} is different from
+\code{\defn{SANE\_STATUS\_GOOD}}. The version code of the backend is returned
+in the value pointed to by \code{version\_code}. If that pointer is
+\code{NULL}, no version code is returned. Argument \code{authorize} is either
+a pointer to a function that is invoked when the backend requires
+authentication for a specific resource or \code{NULL} if the frontend does not
+support authentication.
+\begin{quote}\index{sane\_init}
+\begin{verbatim}
+SANE_Status sane_init (SANE_Int * version_code,
+ SANE_Authorization_Callback authorize);
+\end{verbatim}
+\end{quote}
+
+The authorization function may be called by a backend in response to
+any of the following calls:
+\begin{quote}
+ \code{sane\_open}, \code{sane\_control\_option}, \code{sane\_start}
+\end{quote}
+If a backend was initialized without authorization function, then
+authorization requests that cannot be handled by the backend itself
+will fail automatically and the user may be prevented from accessing
+protected resources. Backends are encouraged to implement means of
+authentication that do not require user assistance. E.g., on a
+multi-user system that authenticates users through a login process a
+backend could automatically lookup the apporpriate password based on
+resource- and user-name.
+
+The authentication function type has the following declaration:
+\begin{quote}\index{SANE\_Authorization\_Callback}
+ \index{domain}\index{username}\index{password}
+\begin{verbatim}
+#define SANE_MAX_USERNAME_LEN 128
+#define SANE_MAX_PASSWORD_LEN 128
+
+typedef void (*SANE_Authorization_Callback)
+ (SANE_String_Const resource,
+ SANE_Char username[SANE_MAX_USERNAME_LEN],
+ SANE_Char password[SANE_MAX_PASSWORD_LEN]);
+\end{verbatim}
+\end{quote}
+Three arguments are passed to the authorization function:
+\code{resource} is a string specifying the name of the resource that
+requires authorization. A frontend should use this string to build a
+user-prompt requesting a username and a password. The \code{username}
+and \code{password} arguments are (pointers to) an array of
+\code{SANE\_MAX\_USERNAME\_LEN} and \code{SANE\_MAX\_PASSWORD\_LEN}
+characters, respectively. The authorization call should place the
+entered username and password in these arrays. The returned strings
+{\em must\/} be ASCII-NUL terminated.
+
+\subsection{\code{sane\_exit}}
+
+This function must be called to terminate use of a backend. The
+function will first close all device handles that still might be open
+(it is recommended to close device handles explicitly through a call
+to \code{sane\_clo\-se()}, but backends are required to release all
+resources upon a call to this function). After this function returns,
+no function other than \code{sane\_init()} may be called (regardless
+of the status value returned by \code{sane\_exit()}. Neglecting to
+call this function may result in some resources not being released
+properly.
+\begin{quote}\index{sane\_exit}
+\begin{verbatim}
+void sane_exit (void);
+\end{verbatim}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_devices}}
+
+This function can be used to query the list of devices that are
+available. If the function executes successfully, it stores a pointer
+to a \code{NULL} terminated array of pointers to \verb|SANE_Device|
+structures in \code{*device\_list}. The returned list is guaranteed
+to remain unchanged and valid until (a) another call to this function
+is performed or (b) a call to \code{sane\_exit()} is performed. This
+function can be called repeatedly to detect when new devices become
+available. If argument \code{local\_only} is true, only local devices
+are returned (devices directly attached to the machine that SANE is
+running on). If it is false, the device list includes all remote
+devices that are accessible to the SANE library.
+\begin{quote}\index{sane\_get\_devices}
+\begin{verbatim}
+SANE_Status sane_get_devices (const SANE_Device *** device_list,
+ SANE_Bool local_only);
+\end{verbatim}
+\end{quote}
+
+This function may fail with \code{SANE\_STATUS\_NO\_MEM} if an
+insufficient amount of memory is available.
+
+\begin{quote}
+ \begin{center}
+ {\bf Backend Implementation Note}
+ \end{center}
+ SANE does not require that this function is called before a
+ \code{sane\_open()} call is performed. A device name may be
+ specified explicitly by a user which would make it unnecessary and
+ undesirable to call this function first.
+\begin{changebar}
+ The same information about
+ a device has to be returned when \code{sane\_open} is called.
+\end{changebar}
+\end{quote}
+
+
+\subsection{\code{sane\_open}}
+
+This function is used to establish a connection to a particular
+device. The name of the device to be opened is passed in argument
+\code{name}. If the call completes successfully, a handle for the
+device is returned in \code{*h}.
+\begin{changebar}
+The description of the device
+is returned in \code{**device\_description}. This is the
+same description that is returned in the list by \code{sane\_get\_devices}.
+The returned data \code{*h} and \code{*device\_description} is guaranteed
+to remain unchanged and valid until a call to \code{sane\_close()}
+is performed.
+\end{changebar}
+As a special case, specifying a zero-length string as the device requests
+opening the first available device (if there is such a device).
+\begin{quote}\index{sane\_open}
+\begin{verbatim}
+SANE_Status sane_open (SANE_String_Const name, SANE_Handle * h,
+const SANE_Device ** device_description);
+\end{verbatim}
+\end{quote}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is currently
+ busy (in use by somebody else).
+\item[\code{SANE\_STATUS\_INVAL}:] The device name is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_close}}
+
+This function terminates the association between the device handle
+passed in argument \code{h} and the device it represents. If the
+device is presently active, a call to \code{sane\_cancel()} is
+performed first. After this function returns, handle \code{h} must
+not be used anymore.
+
+\begin{quote}\index{sane\_close}
+\begin{verbatim}
+void sane_close (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_get\_option\_descriptor}}
+
+This function is used to access option descriptors. The function
+returns the option descriptor for option number \code{n} of the device
+represented by handle \code{h}. Option number 0 is guaranteed to be a
+valid option. Its value is an integer that specifies the number of
+options that are available for device handle \code{h} (the count
+includes option 0). If $n$ is not a valid option index, the function
+returns \code{NULL}. The returned option descriptor is guaranteed to
+remain valid (and at the returned address) until the device is closed.
+
+\begin{quote}\index{sane\_get\_option\_descriptor}
+\begin{verbatim}
+const SANE_Option_Descriptor *
+ sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
+\end{verbatim}
+\end{quote}
+
+\subsection{\code{sane\_control\_option}}\label{sec:control}
+
+This function is used to set or inquire the current value of option
+number \code{n} of the device represented by handle \code{h}. The
+manner in which the option is controlled is specified by parameter
+\code{a}. The possible values of this parameter are described in more
+detail below. The value of the option is passed through argument
+\code{v}. It is a pointer to the memory that holds the option value.
+The memory area pointed to by \code{v} must be big enough to hold the
+entire option value (determined by member \code{size} in the
+corresponding option descriptor). The only exception to this rule is
+that when setting the value of a string option, the string pointed to
+by argument \code{v} may be shorter since the backend will stop
+reading the option value upon encountering the first \code{NUL}
+terminator in the string. If argument \code{i} is not \code{NULL},
+the value of \code{*i} will be set to provide details on how well the
+request has been met. The meaning of this argument is described in
+more detail below.
+\begin{quote}\index{sane\_control\_option}
+\begin{verbatim}
+SANE_Status sane_control_option (SANE_Handle h, SANE_Int n,
+ SANE_Action a, void *v,
+ SANE_Int * i);
+\end{verbatim}
+\end{quote}
+
+The way the option is affected by a call to this function is
+controlled by parameter \code{a} which is a value of type
+\code{\defn{SANE\_Action}}. The possible values and their meaning is
+described in Table~\ref{tab:actions}.
+
+\begin{table}[h]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_ACTION\_GET\_VALUE}} & 0 & Get current option value. \\
+
+\code{\defn{SANE\_ACTION\_SET\_VALUE}} & 1 & Set option value. The
+ option value passed through argument \code{v} may be modified by the
+ backend if the value cannot be set exactly. \\
+
+\code{\defn{SANE\_ACTION\_SET\_AUTO}} & 2 & Turn on automatic mode. Backend
+ or device will automatically select an appropriate value. This mode
+ remains effective until overridden by an explicit set value request.
+ The value of parameter \code{v} is completely ignored in this case and
+ may be \code{NULL}. \\
+
+\hline
+ \end{tabular}
+ \caption{Action Values (\code{SANE\_Action})}
+ \label{tab:actions}
+ \end{center}
+\end{table}
+
+After setting a value via an action value of
+\verb|SANE_ACTION_SET_VALUE|, additional information on how well the
+request has been met is returned in \code{*i} (if \code{i} is
+non-\code{NULL}). The returned value is a bitset that may contain any
+combination of the values described in Table~\ref{tab:info}.
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|p{0.5\textwidth}|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_INFO\_INEXACT}} & 1 & This value is returned when
+ setting an option value resulted in a value being selected that does
+ not exactly match the requested value. For example, if a scanner
+ can adjust the resolution in increments of 30dpi only, setting the
+ resolution to 307dpi may result in an actual setting of 300dpi.
+ When this happens, the bitset returned in \code{*i} has this member
+ set. In addition, the option value is modified to reflect the
+ actual (rounded) value that was used by the backend. Note that
+ inexact values are admissible for strings as well. A backend may
+ choose to ``round'' a string to the closest matching legal string
+ for a constrained string value. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} & 2 &
+The setting of an option may affect the
+\begin{changebar}
+ value, the availability, or the constraint of one or more {\em
+ other\/} options.
+\end{changebar}
+ When this happens, the SANE backend sets this
+ member in \code{*i} to indicate that the application should reload
+ all options. This member may be set if and only if at least one
+ option changed. \\
+
+\code{\defn{SANE\_INFO\_RELOAD\_PARAMS}} & 4 &
+The setting of an option may affect the parameter values (see
+\code{sane\_get\_parameters()}).
+If setting an option affects the parameter values, this member will
+be set in \code{*i}. Note that this member may be set even if the
+parameters did not actually change. However, it is guaranteed that
+the parameters never change without this member being set.
+\\
+
+\code{\defn{SANE\_INFO\_INVALIDATE\_PREVIEW}} & 8 &
+The setting of an option may affect the validity of the preview that
+was acquired by the frontend earlier. When the preview image would change
+significantly if it was scanned again, the SANE backend
+sets this member in \code{*i} to indicate that the application should inform the
+user of the invalidity of the preview. Examples for such option
+settings may include setting a different scan source or significantly
+changing the exposure.
+\\
+
+
+\hline
+ \end{tabular}
+ \caption{Additional Information Returned When Setting an Option}
+ \label{tab:info}
+ \end{center}
+\end{table}
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The operation is not
+ supported for the specified handle and option number.
+\item[\code{SANE\_STATUS\_INVAL}:] The option value is not valid.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occured while
+ communicating with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the option has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+
+\subsection{\code{sane\_get\_parameters}\label{sec:sanegetparameters}}
+
+This function is used to obtain the current scan parameters. The
+returned parameters are guaranteed to be accurate between the time a
+scan has been started (\code{sane\_start()} has been called) and the
+completion of that request. Outside of that window, the returned
+values are best-effort estimates of what the parameters will be when
+\code{sane\_start()} gets invoked. Calling this function before a
+scan has actually started allows, for example, to get an estimate of
+how big the scanned image will be. The parameters passed to this
+function are the handle \code{h} of the device for which the
+parameters should be obtained and a pointer \code{p} to a parameter
+structure. The parameter structure is described in more detail below.
+
+\begin{quote}\index{sane\_get\_parameters}
+\begin{verbatim}
+SANE_Status sane_get_parameters (SANE_Handle h,
+ SANE_Parameters * p);
+\end{verbatim}
+\end{quote}
+
+The scan parameters are returned in a structure of type
+\code{\defn{SANE\_Parameters}}. The C declaration of this structure
+is given below.
+\begin{changebar}
+\begin{quote}
+\begin{verbatim}
+typedef struct
+ {
+ SANE_Frame format;
+ SANE_Int flags;
+ SANE_Int lines;
+ SANE_Int depth;
+ SANE_Int pixels_per_line;
+ SANE_Int bytes_per_line;
+ SANE_Int channels_per_image;
+ SANE_String format_desc;
+ SANE_String proposed_filename;
+ SANE_String proposed_comment;
+ SANE_Int dpi_x;
+ SANE_Int dpi_y;
+ char reserved[32]; /* 32 bytes for future use */
+ }
+SANE_Parameters;
+\end{verbatim}
+\end{quote}
+\end{changebar}
+
+\begin{changebar}
+Member \code{format} specifies the format of the next frame to be
+returned. The possible values for type \code{\defn{SANE\_Frame}} are
+described in Table~\ref{tab:frameformat}. The meaning of these
+values is described in more detail in section~\ref{sec:imageformat}.
+The frame types used by version~1 of this standard
+(\code{\defn{SANE\_FRAME\_GRAY}}, \code{\defn{SANE\_FRAME\_RGB}},
+\code{\defn{SANE\_FRAME\_RED}}, \code{\defn{SANE\_FRAME\_GREEN}}, and
+\code{\defn{SANE\_FRAME\_BLUE}}) are obsolete and superseded by the
+frame type \code{\defn{SANE\_FRAME\_RAW}}.
+
+\begin{table}[htbp]
+ \begin{center}
+ \leavevmode
+ \begin{tabular}{|l|r|l|}
+\hline
+\multicolumn{1}{|c|}{\bf Symbol} &
+\multicolumn{1}{|c|}{\bf Code} &
+\multicolumn{1}{|c|}{\bf Description} \\
+
+\hline\hline
+
+\code{\defn{SANE\_FRAME\_RAW}} & 5 & Arbitrary pixel property transmission. \\
+\code{\defn{SANE\_FRAME\_MIME}} & 6 & Data described by a mime descriptor. \\
+
+\hline
+ \end{tabular}
+ \caption{Frame Format (\code{SANE\_Frame})}
+ \label{tab:frameformat}
+ \end{center}
+\end{table}
+
+The \code{flags} member is a 32 bit bitfield, for which up to now 4
+informational bits are defined, all unused bits have to be set to 0:
+
+\begin{itemize}
+
+\item
+\code{SANE\_PFLAG\_LAST\_FRAME} (bit 0, bitvalue 1) is set to 1 if and
+only if the frame that is currently being acquired (or the frame that
+will be acquired next if there is no current frame) is the only frame
+or the last frame
+of a multi frame image (e.g., the current frame is the blue component
+of a red, green, blue image).
+
+\item
+\code{SANE\_PFLAG\_MORE\_IMAGES} (bit 1, bitvalue 2) is set to 1 to indicate
+further pending images. The frontend is expected to call \code{sane\_start}
+again after the end of the current scan to get more images, e.g.
+from an automatic document feeder. It is permissible to set that value to 1 ``in good
+faith'', as it has to be determined at a very early time, where it might
+not be detectable, if there actually are more images to transfer. E.g.
+you will usually not know if the document feeder contains further pages
+when starting to scan the current one. Thus you are allowed to set that
+bit but later fail at \code{sane\_start()}.
+
+\item
+\code{SANE\_PFLAG\_NEW\_PAGE} (bit 2, bitvalue 4) is set to 1 to indicate
+that the current frame comes from a new physical page. This bit is of
+informational character only to help frontends to group multi-image
+scans.
+
+\item
+\code{SANE\_PFLAG\_BACKSIDE} (bit 3, bitvalue 8) tells if the current image
+was acquired from the front (0) or backside (1) of the currently processed
+sheet. It is of informational character and allows to group and order
+multi-image transfers regardless of scanner acquisition order (front
+first/back first).
+
+\end{itemize}
+
+Note, that \code{flags} is compatible to member \code{last\_frame} of
+\code{SANE\_Parameters} of SANE standard version 1 (same size
+and only bit 0 (bitvalue 1) was used with same function).
+\end{changebar}
+
+Member \code{lines} specifies how many scan lines the frame is
+comprised of. If this value is -1, the number of lines is not known a
+priori and the frontend should call \code{sane\_read()} until it
+returns a status of \code{SANE\_STATUS\_EOF}.
+\begin{changebar}
+Note, that even when transferring formats that have this information
+inband, it is recommended to set that member, if available. If
+unavailable or not applicable, set to -1 as mentioned above.
+\end{changebar}
+
+Member \code{bytes\_per\_line} specifies the number of bytes that comprise one
+scan line.
+\begin{changebar}
+If this value is not applicable for image data of type
+\code{SANE\_FRAME\_MIME}, it must be set to -1. In this case the frontend
+should just call \code{sane\_read} until \code{SANE\_STATUS\_EOF} is returned.
+\end{changebar}
+
+Member \code{depth} specifies the number of bits per sample.
+\begin{changebar}
+Note, that only -1 (for not applicable), 1, and multiples of 8 are
+allowed values. Data with other depths has to be scaled up accordingly.
+Depth 1 is only allowed if the image consists of a single channel (lineart or
+halftone modes).
+\end{changebar}
+
+Member \code{pixels\_per\_line} specifies the number of pixels that
+comprise one scan line.
+\begin{changebar}
+If unavailable or not applicable, set to -1.
+\end{changebar}
+
+Assume $B$ is the number of channels in the frame, then the bit depth
+$d$ (as given by member \code{depth}) and the number of pixels per
+line $n$ (as given by this member \code{pixels\_per\_line}) are
+related to $c$, the number of bytes per line (as given by member
+\code{bytes\_per\_line}) as follows:
+\begin{changebar}
+\[
+ c >= \left\{
+ \begin{array}{ll}
+ \lceil B\cdot n / 8\rceil & \mbox{if $d=1$}\\
+ B\cdot n \cdot d / 8 & \mbox{if $d>1$}
+ \end{array}
+ \right.
+\]
+\end{changebar}
+Note that the number of bytes per line can be larger than the minimum
+value imposed by the right side of this equation. A frontend must be
+able to properly cope with such ``padded'' image formats.
+
+\begin{changebar}
+Member \code{channels\_per\_image} specifies the number of channels the
+image consists of. When the image is transmitted in more than one frame
+\code{channels\_per\_image} has to be the same for all frames for this image.
+
+Member \code{format\_desc} is used to describe the details of the frame
+formats. Its meaning differs between the two formats:
+
+\begin{itemize}
+\item
+\code{SANE\_FRAME\_RAW}:
+The \code{format\_desc} contains a description of the channel data and
+an optional depth information separated by a colon(:).
+
+A plane is descibed by one channel, e.g. ``\code{gray}'' or ``\code{gray:12}''.
+
+Channel interleaved data is described by a comma separated list of channel descriptions,
+for example ``\code{red,green,blue}'' or ``\code{red:8,green:8,blue:8}'',
+the channel data is sent in the given order.
+
+The depth information does {\bf not} define the size of the transmitted
+channel data, it is only an information for the frontend. The channel data has
+to be sent in the size defined by member \code{depth}.
+
+Well known channels are \code{red}, \code{green}, \code{blue} and \code{gray}.
+It also is allowed to use other channel descriptions, e.g. if you
+use an infrared camera or scanner it could be \code{infrared} or
+a wavelength description like \code{1100nm}, but be aware that a
+frontend may not be able to display such channels with useful colors.
+
+Note that an image can be sent in single planes, in one interleaved
+frame that contains all channels or in several frames that contain
+one or more (interleaved) channels. When an RGB image is sent it
+is prefered to send the image data in one interleaved frame
+that consist of red, green and blue data in this order.
+The number of channels is defined in member \code{channels\_per\_image}.
+
+\item
+\code{SANE\_FRAME\_MIME}:
+
+\code{format\_desc} contains the MIME Content-Type: header field as described
+in RFC 1521 (section 4) without the prefixing "Content-Type:". MIME Types and
+subtypes should be either chosen from the RFC or from the list of
+IANA-approved values. The data stream must be compliant with the corresponding
+specification.
+
+When data is transmitted with the frame type \code{SANE\_FRAME\_MIME}
+all data has to be transmitted within one frame, multiple frames
+are not allowed (so the flag \code{last\_frame} has to be set
+when using this frame type).
+
+A SANE backend must be able to at least optionally transmit
+\code{SANE\_FRAME\_RAW} (possibly with the help of a meta backend), if the
+hardware supports delivering image data at all. For data that doesn't
+comprise images, it's admisable to only provide MIME frames. As a
+general principle, if there are several choices in MIME types, the
+format that is most widely implemented should be used.
+\end{itemize}
+
+The member \code{proposed\_filename} can be used to suggest a reasonable
+default filename or -extension in case the backend can make such a
+suggestion, like e.g. an image database.
+If no such suggestion is intended, set the field to ``''.
+
+In the case of raw frames, \code{proposed\_filename} is expected to hold
+the basename for the image, with the extension determined by the save function
+of the frontend, as the frontend can fully understand the data and is thus
+able to encode it in any format it wishes.
+
+For MIME frames \code{proposed\_filename} can contain either:
+
+\begin{itemize}
+\item
+A name with a leading dot, which is considered to be a proposed
+filename extension. This could also be gotten from the mime database,
+but for systems lacking it, this might be convenient. Or:
+
+\item
+A complete filename, including extension.
+\end{itemize}
+
+Note, that for frontends that are able to parse a given MIME type
+internally, it is perfectly permissible to ignore the extension
+part of the proposed filename and only make use of the basename,
+when using internal save algorithms for different formats.
+
+The string \code{proposed\_comment} can be used to transmit additional
+image information, that can be stored in the comment areas several file formats
+offer. It can contain any textual information the backend wishes to
+convey to the user, like date/time of exposure, enganged filters,
+etc. Set to ``'' if unused.
+
+The members \code{dpi\_x} and \code{dpi\_y} encode the horizontal and vertical
+resolution. Note, that multiple-image scans may have different resolutions of
+each image. It is not permissible to change resolution between frames of the
+same image. If not applicable, set to -1.
+
+The member \code{reserved} is an array of 32 bytes (char) to keep
+the size of the struct unchanged when future extensions are done.
+The backend has to set the reserved bytes to 0.
+\end{changebar}
+
+
+\subsection{\code{sane\_start}}
+
+This function initiates aquisition of an image from the device
+represented by handle \code{h}.
+\begin{quote}\index{sane\_start}
+\begin{verbatim}
+SANE_Status sane_start (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_DEVICE\_BUSY}:] The device is busy. The
+ operation should be retried later.
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_INVAL}:] The scan cannot be started with the current
+ set of options. The frontend should reload the option descriptors, as if
+ \code{\defn{SANE\_INFO\_RELOAD\_OPTIONS}} had been returned from a call to
+ \code{sane\_control\_option()}, since the device's capabilities may have
+ changed.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_read}}
+
+This function is used to read image data from the device represented
+by handle \code{h}. Argument \code{buf} is a pointer to a memory area
+that is at least \code{maxlen} bytes long. The number of bytes
+returned is stored in \code{*len}. A backend must set this to zero
+when a status other than \code{SANE\_STA\-TUS\_GOOD} is returned).
+When the call succeeds, the number of bytes returned can be anywhere in
+the range from 0 to \code{maxlen} bytes.
+\begin{quote}\index{sane\_read}
+\begin{verbatim}
+SANE_Status sane_read (SANE_Handle h, SANE_Byte * buf,
+ SANE_Int maxlen, SANE_Int * len);
+\end{verbatim}
+\end{quote}
+\begin{changebar}
+For efficiency reasons, medium to large
+block sizes (in the range of a few kilobytes) should be used.
+Returning short reads is allowed to allow for small buffers
+in the backend.
+\end{changebar}
+If this function is called when no data is available, one of two
+things may happen, depending on the I/O mode that is in effect for
+handle \code{h}.
+\begin{enumerate}
+\item If the device is in blocking I/O mode (the default mode), the
+ call blocks until at least one data byte is available (or until some
+ error occurs).
+
+\item If the device is in non-blocking I/O mode, the call returns
+ immediately with status \code{SANE\_STA\-TUS\_GOOD} and with
+ \code{*len} set to zero.
+\end{enumerate}
+The I/O mode of handle \code{h} can be set via a call to
+\code{sane\_set\_io\_mode()}.
+
+This function may fail with one of the following status codes.
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_CANCELLED}:] The operation was cancelled through
+ a call to \code{sane\_cancel}.
+\item[\code{SANE\_STATUS\_EOF}:] No more data is available for the
+ current frame.
+\begin{changebar}
+If \code{sane\_read} sends back any image data it
+is not allowed to return with \code{SANE\_STATUS\_EOF}.
+\end{changebar}
+\item[\code{SANE\_STATUS\_JAMMED}:] The document feeder is jammed.
+\item[\code{SANE\_STATUS\_NO\_DOCS}:] The document feeder is out of
+ documents.
+\item[\code{SANE\_STATUS\_COVER\_OPEN}:] The scanner cover is open.
+\item[\code{SANE\_STATUS\_IO\_ERROR}:] An error occurred while communicating
+ with the device.
+\item[\code{SANE\_STATUS\_NO\_MEM}:] An insufficent amount of memory
+ is available.
+\item[\code{SANE\_STATUS\_ACCESS\_DENIED}:] Access to the device has
+ been denied due to insufficient or invalid authentication.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_cancel}}
+
+This function is used to immediately or as quickly as possible cancel
+the currently pending operation of the device represented by handle
+\code{h}.
+\begin{quote}\index{sane\_cancel}
+\begin{verbatim}
+void sane_cancel (SANE_Handle h);
+\end{verbatim}
+\end{quote}
+This function can be called at any time (as long as handle \code{h} is
+a valid handle) but usually affects long-running operations only (such
+as image is acquisition). It is safe to call this function
+asynchronously (e.g., from within a signal handler). It is important
+to note that completion of this operaton does {\em not\/} imply that
+the currently pending operation has been cancelled. It only
+guarantees that cancellation has been {\em initiated}. Cancellation
+completes only when the cancelled call returns (typically with a
+status value of \code{SANE\_STATUS\_CANCELLED}). Since the SANE API
+does not require any other operations to be re-entrant, this implies
+that a frontend must {\em not\/} call any other operation until the
+cancelled operation has returned.
+
+
+\subsection{\code{sane\_set\_io\_mode}}
+
+This function is used to set the I/O mode of handle \code{h}. The I/O mode
+can be either blocking or non-blocking. If argument \code{m} is
+\code{SANE\_TRUE}, the mode is set to non-blocking mode, otherwise it's set to
+blocking mode. This function can be called only after a call to
+\code{sane\_start()} has been performed.
+\begin{quote}\index{sane\_set\_io\_mode}
+\begin{verbatim}
+SANE_Status sane_set_io_mode (SANE_Handle h, SANE_Bool m);
+\end{verbatim}
+\end{quote}
+By default, newly opened handles operate in blocking mode. A backend
+may elect not to support non-blocking I/O mode. In such a case the
+status value \code{SANE\_STATUS\_UNSUPPORTED} is returned. Blocking
+I/O must be supported by all backends, so calling this function with
+argument \code{m} set to \code{SANE\_FALSE} is guaranteed to complete
+successfully.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+the requested I/O mode.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_get\_select\_fd}}
+
+This function is used to obtain a (platform-specific) file-descriptor
+for handle \code{h} that is readable if and only if image data is
+available (i.e., when a call to \code{sane\_read()} will return at
+least one byte of data). If the call completes successfully, the
+select file-descriptor is returned in \code{*fd}.
+\begin{quote}\index{sane\_get\_select\_fd}
+\begin{verbatim}
+SANE_Status sane_get_select_fd (SANE_Handle h, SANE_Int *fd);
+\end{verbatim}
+\end{quote}
+This function can be called only after a call to \code{sane\_start()}
+has been performed and the returned file-descriptor is guaranteed to
+remain valid for the duration of the current image acquisition (i.e.,
+until \code{sane\_cancel()} or \code{sane\_start()} get called again
+or until \code{sane\_read()} returns with status
+\code{SANE\_STA\-TUS\_EOF}). Indeed, a backend must guarantee to
+close the returned select file descriptor at the point when the next
+\code{sane\_read()} call would return \code{SANE\_STA\-TUS\_EOF}.
+This is necessary to ensure the application can detect when this
+condition occurs without actually having to call \code{sane\_read()}.
+
+A backend may elect not to support this operation. In such a case,
+the function returns with status code
+\code{SANE\_STATUS\_UNSUPPORTED}.
+
+Note that the only operation supported by the returned file-descriptor
+is a host operating-system dependent test whether the file-descriptor
+is readable (e.g., this test can be implemented using \code{select()}
+or \code{poll()} under UNIX). If any other operation is performed on
+the file descriptor, the behavior of the backend becomes
+unpredictable. Once the file-descriptor signals ``readable'' status,
+it will remain in that state until a call to \code{sane\_read()} is
+performed. Since many input devices are very slow, support for this
+operation is strongly encouraged as it permits an application to do
+other work while image acquisition is in progress.
+
+This function may fail with one of the following status codes:
+\begin{quote}
+\begin{description}
+\item[\code{SANE\_STATUS\_INVAL}:] No image acquisition is pending.
+\item[\code{SANE\_STATUS\_UNSUPPORTED}:] The backend does not support
+ this operation.
+\end{description}
+\end{quote}
+
+
+\subsection{\code{sane\_strstatus}}
+
+This function can be used to translate a SANE status code into a
+printable string. The returned string is a single line of text that
+forms a complete sentence, but without the trailing period
+(full-stop). The function is guaranteed to never return \code{NULL}.
+The returned pointer is valid at least until the next call to this
+function is performed.
+\begin{quote}\index{sane\_strstatus}
+\begin{verbatim}
+SANE_String_Const sane_strstatus (SANE_Status status);
+\end{verbatim}
+\end{quote}
+
+\section{Code Flow}\index{code flow}
+
+The code flow for the SANE API is illustrated in
+Figure~\ref{fig:flow}. Functions \code{sane\_init()} and
+\code{sane\_exit()} initialize and exit the backend, respectively.
+All other calls must be performed after initialization and before
+exiting the backend.
+
+\begin{figure}[htb]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/flow.eps,height=0.5\textheight}
+ \caption{Code flow}
+ \label{fig:flow}
+ \end{center}
+\end{figure}
+
+Function \code{sane\_get\_devices()} can be called any time after
+\code{sane\_init()} has been called. It returns the list of the
+devices that are known at the time of the call. This list may change
+over time since some devices may be turned on or off or a remote host
+may boot or shutdown between different calls. It should be noted that
+this operation may be relatively slow since it requires contacting all
+configured devices (some of which may be on remote hosts). A frontend
+may therefore want to provide the ability for a user to directly
+select a desired device without requiring a call to this function.
+
+Once a device has been chosen, it is opened using a call to
+\code{sane\_open()}. Multiple devices can be open at any given time.
+A SANE backend must not impose artificial constraints on how many
+devices can be open at any given time.
+
+An opened device can be setup through the corresponding device handle
+using functions \code{sane\_get\_opt\-ion\_desc\-riptor()} and
+\code{sane\_control\_option()}. While setting up a device, obtaining
+option descriptors and setting and reading of option values can be
+mixed freely. It is typical for a frontend to read out all available
+options at the beginning and then build a dialog (either graphical or
+a command-line oriented option list) that allows to control the
+available options. It should be noted that the number of options is
+fixed for a given handle.
+\begin{changebar}
+ However, as options are set, other options may become active or inactive or
+ their constraint may change. Thus, after setting an option, it may be
+ necessary to re-read the descriptors.
+\end{changebar}
+While
+setting up the device, it is also admissible to call
+\code{sane\_get\_parameters()} to get an estimate of what the image
+parameters will look like once image acquisition begins.
+
+The device handle can be put in blocking or non-blocking mode by a
+call to \code{sane\_set\_io\_mode()}. Devices are required to support
+blocking mode (which is the default mode), but support for
+non-blocking I/O is strongly encouraged for operating systems such as
+UNIX.
+
+After the device is setup properly, image acquisition can be started
+by a call to \code{sane\_start()}. The backend calculates the exact
+image parameters at this point. So future calls to
+\code{sane\_get\_parameters()} will return the exact values, rather
+than estimates. Whether the physical image acquisition starts at this
+point or during the first call to \code{sane\_read()} is unspecified
+by the SANE API. If non-blocking I/O and/or a select-style interface
+is desired, the frontend may attempt to call
+\code{sane\_set\_io\_mode()} and/or \code{sane\_get\_select\_fd()} at
+this point. Either of these functions may fail if the backend does
+not support the requested operation.
+
+\begin{changebar}
+Image data is collected by repeatedly calling \code{sane\_read()}
+until this function will return an end-of-file status
+(\code{SANE\_STATUS\_EOF}). This indicates the end of the current
+frame. If the frontend expects additional frames (e.g., the
+individual channels of a red/green/blue image or multiple images),
+it can call \code{sane\_start()} again.
+If the \code{SANE\_PFLAG\_LAST\_FRAME} bit is set in \code{flags}, the
+current image is complete. In this case, it should be tested, if
+\code{flags} has the \code{SANE\_PFLAG\_MORE\_IMAGES} bit set.
+If yes, further calls to \code{sane\_start()} can be made to acquire
+more images. Please note, that as this bit has to be set at the beginning
+of a the transmission of the last frame before the new image, it is possible,
+that no reliable decision can be made at this time. It is thus permissible
+for a backend to set this bit, and then later at the actual call to
+\code{sane\_start()} return an error like \code{SANE\_STATUS\_NO\_DOCS}.
+Such a sequence is permitted to transmit multiple images from a single
+page as well as multiple pages. This behaviour should be controlled by
+backend options as required, to allow single-page scanning as well as
+ADF-batch-scanning. The frontend should always continue reading all images
+until a frame with \code{SANE\_PFLAG\_LAST\_FRAME} on
+and \code{SANE\_PFLAG\_MORE\_IMAGES} off is encountered, or an error other
+than \code{SANE\_STATUS\_EOF} occurs in a SANE function.
+Note that \code{SANE\_STATUS\_NO\_DOCS} also is an allowed way for the backend
+to indicate the end of a multiple image scan.
+
+A frontend may choose to skip frames (e.g. because it cannot parse them),
+which is accomplished by simply calling \code{sane\_start} again, which will get
+you to the next frame, without having to read and discard the current one.
+
+In order to prematurely stop scanning and to reset the backend state,
+\code{sane\_cancel()} can be called at any time. This call is required
+as well after normal termination of a multiple image scan as described above.
+\end{changebar}
+
+When done using the device, the handle should be closed by a call to
+\code{sane\_close()}. Finally, before exiting the application,
+function \code{sane\_exit()} must be called. It is important not to
+forget to call this function since otherwise some resources (e.g.,
+temporary files or locks) may remain unclaimed.
+
+\begin{changebar}
+The following C sample code implements a reference loop for acquiring
+multiple images:
+
+\begin{verbatim}
+SANE_Parameters parms;
+SANE_Status status;
+
+do
+ {
+ do
+ {
+ /* Now start acquiring the next frame. */
+ status = sane_start (handle);
+
+ /* if that failed, we have a problem, and no more frames can be
+ * read at this time. Due to SANE_PFLAG_MORE_IMAGES still
+ * being clear, this will break out of _BOTH_ loops.
+ */
+ if (status != SANE_STATUS_GOOD)
+ break;
+
+ /* Now let us see what the next frame brings. */
+ status = sane_get_parameters (handle, &parms);
+
+ /* This actually should not fail, but maybe the doc feeder
+ * jammed or something, so we break as well, if something
+ * is wrong.
+ */
+ if (status != SANE_STATUS_GOOD)
+ break;
+
+ /* Now we check the announced parameters, if we can make use
+ * of the frame data. If not, we skip over to the next frame.
+ */
+ if (do_i_like_that (&parms) == NO)
+ continue;
+
+ /* Set up for reading the data here. Mangle filenames,
+ * allocate memory, rewind multiframe files, ask user
+ * for confirmation, ...
+ */
+ setup_for_transfer (...);
+
+ /* Now we read in the frame data and process it. This should
+ * return SANE_STATUS_GOOD, until the frame is complete,
+ * what causes SANE_STATUS_EOF to be returned.
+ */
+ while (SANE_STATUS_GOOD == (status = sane_read (...)))
+ read_in_and_process_data_as_required ();
+
+ /* If transfer was broken due to anything but EOF, break out. */
+ if (status != SANE_STATUS_EOF)
+ break;
+
+ /* Now loop until we have all frames of an image. */
+ }
+ while (!(parms.flag & SANE_PFLAG_LAST_FRAME));
+
+ /* O.K. - we now have a complete image. Fit it together, save it,
+ * flush buffers, transmit it, increment filenames, etc.
+ */
+
+ /* Now check for more pending images. If we have more, redo from start.
+ * Some backends might cheat here and send us for an extra round which
+ * will fail at sane_start, as they were not able to determine if they
+ * would have more data at the start of the last frame we read.
+ */
+ }
+while (parms.flags & SANE_PFLAG_MORE_IMAGES);
+
+/* No more data. Fine. Reset the backend and go back to option-control
+ * loop.
+ */
+
+sane_cancel (handle);
+\end{verbatim}
+
+\end{changebar}
+
+
+\section{Well-Known Options}\index{well-known options}
+
+While most backend options are completely self-describing, there are
+cases where a user interface might want to special-case the handling
+of certain options. For example, the scan area is typically defined
+by four options that specify the top-left and bottom-right corners of
+the area. With a graphical user interface, it would be tedious to
+force the user to type in these four numbers. Instead, most such
+interfaces will want to present to the user a preview (low-resolution
+scan of the full scanner surface or a high(er) resolution scan of a subpart
+of the scanner surface) and let the user pick the scan area by
+dragging a rectangle into the desired position. For this reason, the
+SANE API specifies a small number of option names that have
+well-defined meanings.
+
+\subsection{Option Number Count}\index{option count}
+
+Option number 0 has an empty string as its name. The value of this
+option is of type \code{SANE\_TYPE\_INT} and it specifies the total
+number of options available for a given device (the count includes
+option number 0). This means that there are two ways of counting the
+number of options available: a frontend can either cycle through all
+option numbers starting at one until
+\code{sane\_get\_option\_descriptor()} returns \code{NULL}, or a
+frontend can directly read out the value of option number 0.
+
+\subsection{Scan Resolution Options}\index{scan resolution}\index{resolution option}
+
+Option \code{resolution} is used to select the resolution at which an
+image should be acquired.
+\begin{changebar}
+When the backend wants to allow different
+values for x- and y-resolution it has to define the options
+\code{x-resolution} and \code{y-resolution}. Note that only
+the option \code{resolution} {\bf or} the options
+\code{x-resolution} {\bf and} \code{y-resolution} may be active at the
+same time.
+\end{changebar}
+
+The type of this option is either \code{SANE\_TYPE\_INT} or
+\code{SANE\_TYPE\_FIXED}. The unit is \code{SANE\_UNIT\_DPI} (dots/inch).
+
+These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+
+\subsection{Preview Mode Option}\index{preview mode}
+
+The boolean option \code{preview} is used by a frontend to inform the
+backend when image acquisition should be optimized for speed, rather
+than quality (``preview mode''). When set to \code{SANE\_TRUE},
+preview mode is in effect, when set to \code{SANE\_FALSE} image
+acquisition should proceed in normal quality mode. The setting of
+this option \emph{must not\/} affect any other option. That is, as
+far as the other options are concerned, the preview mode is completely
+side effect free. A backend can assume that the frontend will take
+care of appropriately setting the scan resolution for preview mode
+(through option \code{resolution}). A backend is free to override the
+\code{resolution} value with its own choice for preview mode, but it
+is advised to leave this choice to the frontend wherever possible.
+\begin{changebar}
+When the \code{preview} option is set the backend should transfer
+the image in frame type \code{SANE\_FRAME\_RAW} if possible.
+\end{changebar}
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+
+\subsection{Scan Area Options\label{subsec:scanarea}}\index{scan area options}
+
+The four most important well-known options are the ones that define
+the scan area. The scan area is defined by two points (x/y coordinate
+pairs) that specify the top-left and the bottom-right corners. This
+is illustrated in Figure~\ref{fig:area}. Note that the origin of the
+coordinate system is at the top-left corner of the scan surface as
+seen by the sensor (which typically is a mirror image of the scan
+surface seen by the user). For this reason, the top-left corner is
+the corner for which the abscissa and ordinate values are
+simultaneously the {\em smallest} and the bottom-right corner is the
+corner for which the abscissa and ordinate values are simulatenously
+the {\em largest}. If this coordinate system is not natural for a
+given device, it is the job of the backend to perform the necessary
+conversions.
+\begin{figure}[tbp]
+ \begin{center}
+ \leavevmode
+ \psfig{file=figs/area.eps,height=0.3\textheight}
+ \caption{Scan area options}
+ \label{fig:area}
+ \end{center}
+\end{figure}
+
+The names of the four options that define the scan area are given in
+the table below:
+\begin{center}
+\begin{tabular}{ll}
+{\bf Name} & {\bf Description} \\
+\code{\defn{tl-x}} & Top-left $x$ coordinate value \\
+\code{\defn{tl-y}} & Top-left $y$ coordinate value \\
+\code{\defn{br-x}} & Bottom-right $x$ coordinate value \\
+\code{\defn{br-y}} & Bottom-right $y$ coordinate value \\
+\end{tabular}
+\end{center}
+There are several rules that should be followed by front and backends
+regarding these options:
+\begin{itemize}
+
+\item Backends must attach a unit of either pixels
+ (\code{SANE\_UNIT\_PIXEL}) or millimeters (\code{SANE\_UNIT\_MM}) to
+ these options. The unit of all four options must be identical.
+
+\item Whenever meaningful, a backend should attach a range or a
+ word-list constraint to these options.
+
+\item A frontend can determine the size of the scan surface by first
+ checking that the options have range constraints associated. If a
+ range or word-list constraints exist, the frontend can take the
+ minimum and maximum values of one of the x and y option
+ range-constraints to determine the scan surface size.
+
+\item A frontend must work properly with any or all of these options
+ missing.
+
+\begin{changebar}
+\item A frontend may temporarily set the values in a way that
+\code{tl-x} is larger than \code{br-x} and \code{tl-y} is larger than
+\code{br-y}.
+\end{changebar}
+
+\end{itemize}
+
+\begin{changebar}
+These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Depth Option}\index{bit depth option}
+Option \code{depth} is used to select the image depth in bits/sample
+in multi bit mode (e.g. for 24 bit RGB mode this value must be 8).
+The type of this option is \code{SANE\_TYPE\_INT}.
+The unit is \code{SANE\_UNIT\_BIT}. For 1 bit modes
+(Lineart or Halftone) this option has to be inactive.
+For selection of 1 bit modes (Lineart or Halftone) the
+backend should use the well-known option \code{mode}.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Scan Mode Options}\index{mode options}
+The option \code{mode} defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+It is used to select the scanmode (e.g. Color or Gray).
+Well known modes are: \code{Color}, \code{Gray}, \code{Halftone}
+and \code{Lineart}. \code{Color} and \code{Gray} are multi bit
+modes (8 or 16 bits/sample), \code{Halftone} and \code{Lineart}
+are single bit modes. When well-known scan modes are used,
+a frontend is able to automatically decide which mode is appropriate
+for a specific task, e.g the mode \code{Gray}
+for scanning a fax.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Scan Source Options}\index{source options}
+The option \code{source} is used to select the scan source
+(e.g. Automatic Document Feeder).
+It defines a \code{SANE\_CONSTRAINT\_STRING\_LIST}
+of type \code{SANE\_TYPE\_STRING}.
+Well known sources are: \code{Flatbed}, \code{Transparancy Adapter} and
+\code{Automatic Document Feeder}.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Threshold Option}\index{threshold option}
+The option \code{threshold} is used to define the threshold
+for Lineart and maybe Halftone mode. In multi bit modes
+this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It defines the minimum intensity to get a white point / full intensity.
+
+The backend has to scale the values in the following way:
+A value of 0.0 means all pixels get white / full intensity. A value of 50.0
+means intensities brighter than medium gray get white / full intensity. A
+value of 100.0 means all pixels get black. If the
+scanner is not able to cover the full range the backend has to define a
+reduced value range (e.g. 30\ldots70 percent).
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Gamma Table Options}\index{gamma table options}
+The \code{gamma-table} option defines a \code{SANE\_CONSTRAINT\_RANGE}
+of the type \code{SANE\_TYPE\_INT} which represents the gamma correction
+table for gray. In color mode the \code{gamma-table} may be used to set
+a common gamma correction for red, green and blue. The options
+\code{red-gamma-table}, \code{green-gamma-table} and \code{blue-gamma-table}
+are used in color mode to set a gamma correction for each color
+separately. In color mode the backend is free to use only the
+\code{gamma-table} option, only the \code{red-}, \code{green-} and
+\code{blue-gamma-table} or all four options. When all four options
+are used then the color tables should do a gamma correction with
+the same input and output bit depth and the gray gamma table should
+reduce (if necessary) the bit depth from the scanner internal
+bit depth to the output bit depth. This should e.g. look like this:
+\begin{verbatim}
+red_value = gamma-table(red-gamma-table(value))
+green_value = gamma-table(green-gamma-table(value))
+blue_value = gamma-table(blue-gamma-table(value))
+\end{verbatim}
+
+The backend should not use the gamma tables to emulate other functions or options
+like highlight, shadow, contrast, brightness, threshold, analog\_gamma.
+These functions are common for all backends and should be added to the frontend
+or a meta-backend.
+
+It is also discouraged to emulate gamma tables in the backend. The backend
+should disable (or not define) this option when the scanner does not support
+gamma tables in hardware.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+\begin{changebar}
+\subsection{Analog Gamma}\index{analog gamma option}
+The option \code{analog-gamma} is used to define the gamma value
+for an analog gamma function of the scanner in multi bit modes.
+In 1 bit modes this option should be set inactive.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_NONE}. The value range
+can be defined by the backend as supported. The values
+have to be positive. A gamma value of 1.0 means that
+the gamma correction has no effect. A value larger than
+1.0 increases the brightness of the image.
+In color mode there also can be options \code{analog-gamma-red},
+\code{analog-gamma-green} and \code{analog-gamma-blue}.
+It is not allowed to emulate an analog gamma function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) gamma function.
+
+When analog gamma, highlight and shadow functions are available
+at the same time then the backend author has to care about the order
+in which the functions are implemented in the scanner hardware.
+The SANE standard expects that changing the analog gamma value
+has no effect on the shadow and highlight function. When the
+analog gamma function is executed in the scanner hardware
+before the shadow and highlight functions then the backend
+should do a compensation. For this the shadow and highlight
+values have to be gamma corrected with the relevant analog gamma value.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+
+\begin{changebar}
+\subsection{Shadow Option}\index{shadow options}
+The option \code{shadow} is used to define the shadow level / black point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the maximum intensity level that creates an image data value
+of 0 (black).
+
+The backend has to scale the values in the following way:
+A value of 0.0 means that the sensitivity range is not reduced, only the
+minimum intensity produces an image data value of 0 (black).
+A value of 50.0 means that that a medium intensity and everything that is darker
+produces an image data value of 0 (black).
+A value of 100.0 means the sensitivity range is reduced to 0, all image
+data values are 0 (black). If the scanner is not able to
+cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{shadow-red}, \code{shadow-green}
+and \code{shadow-blue}, in this case the \code{shadow} function has to be disabled.
+It is not allowed to emulate a shadow function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) shadow function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+
+\begin{changebar}
+\subsection{Highlight Option}\index{hightlight options}
+The option \code{highlight} is used to define the highlight level / white point level.
+The type of this option is \code{SANE\_TYPE\_FIXED}.
+The unit is \code{SANE\_UNIT\_PERCENT}. The value range
+should be 0.0\ldots100.0 if possible.
+It is used to define the minimum intensity level that creates the maximum possible
+image data value (white/full intensity).
+
+The backend has to scale the values in the following way:
+A value of 0.0 means the sensitivity range is reduced to 0, all image
+data have maximum value (white / full intensity).
+A value of 50.0 means that a medium intensity and everything that is brighter
+produces the maximum possible image data value (white / full intensity).
+A value of 100.0 means that the sensitivity range is not reduced, only the
+maximum intensity produces an image data with maximum possible value (white / full intensity).
+If the scanner is not able to cover the full range the backend has to define a reduced
+value range (e.g. 30\ldots70 percent).
+In color mode there can be options \code{highlight-red}, \code{highlight-green}
+and \code{highlight-blue}, in this case \code{highlight} has to be disabled.
+It is not allowed to emulate a highlight function by
+a digital gamma table. The backend has to disable (or not
+define) this option when the scanner does not support an
+analog (hardware) highlight function.
+
+This option is not mandatory, but if a backend does support it, it
+must implement it in a manner consistent with the above definition.
+\end{changebar}
+
+
+\begin{changebar}
+\subsection{Lamp Options}\index{lamp-on option}\index{lamp-off option}
+
+The options \code{lamp-on} and \code{lamp-off} are button options
+(\code{SANE\_TYPE\_BUTTON}) and don't have a unit (\code{SANE\_UNIT\_NONE}).
+
+Option \code{lamp-on} is used to turn on the lamp of the scanner while
+\code{lamp-off} turns it off.
+
+These options are not mandatory, but if a backend does support them, it
+must implement them in a manner consistent with the above definition.
+\end{changebar}
+
+
+\begin{changebar}
+\subsection{Scanner Button Options}\index{scanner button options}
+Some scanners have buttons which state can be read by the scanner driver.
+It is necessary to implement a locking function for the buttons
+because it is possible that several frontends try to connect to the
+same backend/scanner at the same time. Imagine what could happen
+when no locking would be implemented:
+Five people have started a scanning application which is connected
+via network to the scanner you want to use. You start a frontend,
+put a paper to the scanner and press the scan-button on the scanner.
+The scanner does scan three times (because three frontends asked the
+button status when you pressed the button). For three people the
+image is saved to the harddisk, but it is not sure that your
+frontend did scan the image.
+
+A backend that does make available the scanner-buttons has to
+implement the following options:\\
+\code{scanner-buttons-lock} is of type \code{SANE\_TYPE\_BOOL}, default = \code{SANE\_FALSE}\\
+\code{scanner-buttons-status} is of type \code{SANE\_TYPE\_INT}, default = 0\\
+\code{scanner-buttons-status-update} is of type \code{SANE\_TYPE\_BUTTON}\\
+When setting these options the backend does not set \code{SANE\_INFO\_RELOAD\_OPTIONS}
+or \code{SANE\_INFO\_RELOAD\_PARAMS} if not explictly defined.
+
+A frontend has to disable the usage of the scanner-buttons by default. This is important
+because other frontends will not be able to use the buttons when the button-functions are locked.
+Another important thing is that some scanners do not turn off their lamp when the driver
+does frequently talk to the scanner (what is done when reading the button status from the scanner).
+
+\begin{itemize}
+
+\item
+A frontend that wants to read the button status has to lock the
+button functions at first. For this it does set the option
+\code{scanner-buttons-lock} to \code{SANE\_TRUE}.
+While setting the value of option \code{scanner-buttons-lock} to \code{SANE\_TRUE}
+the backend does check if a lockfile (e.g. ``backend''-buttons.lock) does exist.
+The lockfile has to be placed in a directory where every user has read and write access to.
+
+ \begin{itemize}
+ \item
+ If the lockfile does not exist then the backend creates the lockfile and writes the
+ process ID (PID) of the backend to the file. Button access is allowed: the value
+ of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \item
+ If the file does exist and the backend PID is not the file PID then the
+ backend has to check if the process with the PID stored in the lockfile
+ still is running. If yes then the button access is not allowed: the value of
+ option \code{scanner-buttons-lock} is set to \code{SANE\_FALSE}. If not then the lockfile
+ is recreated and the PID of the backend is stored in the lockfile, button
+ access is allowed: the value of option \code{scanner-buttons-lock} is set to \code{SANE\_TRUE}
+ \end{itemize}
+
+\item
+The frontend does read the value of option \code{scanner-buttons-lock}. If
+it is \code{SANE\_TRUE} then the frontend has access to the scanner buttons.
+If it is \code{SANE\_FALSE} then access has been denied.
+
+\item
+If the button access is allowed the frontend has to do the following about
+once per second (while not scanning):
+ \begin{itemize}
+ \item
+ The frontend does set option \code{scanner-buttons-status-update}.
+ The backend checks if access to the buttons is allowed by comparing
+ the backend PID with the lockfile PID. If access is allowed it
+ does read the button status from the scanner and stores it in
+ the option \code{scanner-buttons-status}, each bit represents a button, a
+ value of 0 means the button is not pressed, a value of 1 means that the button
+ is pressed. When the scanner is busy the backend must not wait, it has to
+ return immediately and the button state keeps unchanged.
+ The backend has to implement a timeout function. When no button has been pressed
+ within a predefined time (e.g. 15 minutes) then the access permission is lost.
+ In this case the backend does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}
+ and does set \code{SANE\_INFO\_RELOAD\_OPTIONS} to inform the frontend that it has
+ lost permission to access the scanner-button functions.
+ If access is not allowed it does set the \code{scanner-buttons-status} to 0.
+
+ \item
+ The frontend does read the value of option \code{scanner-buttons-status}
+ \end{itemize}
+
+\item
+When the frontend does exit or it does not want to use the buttons
+it does set option \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+The backend does check if the backend PID and the lockfile PID are
+the same. If this is true then it removes the lockfile and sets the value
+of \code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\code{sane\_close()} should do the same as setting option
+\code{scanner-buttons-lock} to \code{SANE\_FALSE}.
+
+\end{itemize}
+\end{changebar}
+
+\begin{changebar}
+\subsection{Batch Scan Options}\index{Batch Scan Options}
+
+The batch scan options can be used by a frontend to indicate that more than
+one image will be scanned in a batch. The backend can optimize for such scans
+by e.g. avoiding calibration and not moving home the sensor array in this case.
+The backend provides the options \code{batch-scan},
+\code{batch-scan-next-tl-x}, \code{batch-scan-next-tl-y},
+\code{batch-scan-next-br-x}, and \code{batch-scan-next-br-y}. The option
+\code{batch-scan} provides a string list with the values of \code{No} if
+batch scanning isn't used, \code{Start} for the first, \code{End} for the last
+and \code{Loop} for any other (intermediate) image. The batch-scan-next
+options specify the coordinates of the next scan and follow the same rules as
+the scan area options (see section \ref{subsec:scanarea}).
+
+These options are not mandatory, but if a backend does support them, it must
+implement them in a manner consistent with the above definition. In this
+case, all options must be implemented.
+\end{changebar}
+
+
+
+
+\input{net.tex}
+
+\chapter{Contact Information}\label{chap:contact}
+
+The SANE standard is discussed and evolved via a mailing list.
+Anybody with email access to the Internet can automatically join and
+leave the discussion group by sending mail to the following address.
+\begin{quote}\index{mailing list}
+\begin{verbatim}
+sane-devel-request@mostang.com
+\end{verbatim}
+\end{quote}
+To subscribe, send a mail with the body ``\verb|subscribe sane-devel|'' to the
+above address.
+
+A complete list of commands supported can be obtained by sending a
+mail with a subject of ``\code{help}'' to the above address. The
+mailing list is archived and available through the SANE home page at
+URL:
+\begin{quote}
+\url{http://www.mostang.com/sane/}
+\end{quote}
+
+\newpage
+\input{sane.ind}
+
+\end{document}
diff --git a/sane2/sane2-api-todo.txt b/sane2/sane2-api-todo.txt
new file mode 100644
index 00000000..00811ebb
--- /dev/null
+++ b/sane2/sane2-api-todo.txt
@@ -0,0 +1,205 @@
+Suggestions for changes for sane-api-2 (2002-12-24)
+
+(x = already included into sane2.tex)
+
+ - SANE_FRAME_*:
+
+x - SANE_FRAME_RAW, formatdesc="red:8,green:8,blue:8", replaces old SANE_FRAME_* types
+
+x - SANE_FRAME_MIME, formatdesc=MIME-desciptor, only one frame/image, arbitary data
+ this allows transmission of e.g. jpeg, tiff and any other data format
+
+x - SANE_FRAME_GRAY/RGB/RED/GREEN/BLUE only allowed for sane-1 backends.
+
+ - remove multi-frame paradigm at all?
+
+ - remove multi-channel 1 Bit mode?
+
+ - define 0 = black for all modes?
+
+
+ - parameter.flags
+
+x - compatible to sane-1
+
+x - adds more_images, new_page, front/backside info, 28 more flags available
+
+x - dpi_x, dpi_y, proposed_filename, formatdesc, channels_per_image
+
+(x)- 32 bytes for future extension (set to 0)
+ Check how to do this without creating portability nightmares.
+ Keep in mind that the size of SANE_Int is unknown, same is true for
+ SANE_String and even char.
+
+ - define the following well known options:
+
+x - BIT_DEPTH = Word_List with bits/sample
+
+x - GAMMA_VECTOR, and GAMMA_VECTOR_[RGB]
+
+x - RESOLUTION or (X_RESOLUTION and Y_RESOLUTION)
+
+x - scanmode COLOR, GRAY, LINEART (for frontend defaults, e.g. for fax => Gray)
+
+x - scansource FLATBED/DOCUMENTFEEDER/TRANSPARENCY
+
+x - ANALOG_GAMMA
+
+x - HIGHLIGHT
+
+x - SHADOW
+
+x - THRESHOLD
+
+x - LAMP_CONTROL
+
+x - Scanner button options and protocol
+
+ - set focus position FOCUS_POS_X, FOCUS_POS_Y
+
+ - multi pass for film scanners
+ - number of passes (either native or EMULATED)
+ SANE_TYPE_INT, word_list or range
+
+ - direct selection of image number?
+ SANE_TYPE_INT
+
+ - exposure time
+
+x - SANE_CAP_ADVANCED for a group
+
+x - SANE_CAP_ALWAYS_SETTABLE ??? (xcam/quickcam?)
+
+x - SANE_CAP_HIDDEN: Don't display option at all
+
+
+x- add to SANE_Device
+ - email_backend_author (string)
+ - device_location (string)
+ - comment (string)
+ - reserved_string (string)
+ - version_code (integer)
+ - backend_capability_flags (integer)
+ - reserved_int (integer)
+
+(x)- define recommended file formats for internationalization
+ in sane_i18n definition files:
+ *.po, default translation tables: *.(g)mo
+
+x- sane_open does return sane_device:
+ A frontend may decide not to call sane_get_devices
+ because it already knows which device shall be
+ opened. In this case it does not get any information
+ about the device (vendor, model, ...). So it makes
+ sense to return the SANE_Device in sane_open
+
+!- saned or a stand alone "turn lamp off deamon" should get
+ an internal timer to turn off the lamp of some scanners.
+ This has to be defined closer.
+ May be it is necessary to find out how long a scanner
+ has not been used. For this saned needs a function
+ like sane_get_offline_time()...
+
+!- define a way how multiple scanareas can be handled
+ before the scanning is started:
+ Create well-known options to set the next tl-y
+
+ - define error codes for sane_get_parameters
+
+x- define return value of sane_init - also necessary for SANE1
+
+x- define bit order of 1 bit modes - also necessary for SANE1
+
+!- implementation note for select_fd - also necessary for SANE1
+
+!- all texts and translations: UTF-8 format
+ (this is used in KDE and gtk+-2.x)
+ may be UTF-8 should be forced as SANE_Char format.
+
+!- download backend translation and documentation:
+ The Download function does not care about the file
+ format, this propably also has to be defined in the sane standard.
+ - sane_download_backend_file(filename). The backend
+ has to load the file from a fixed directory. The path
+ to the directory has to contain the backend name,
+ e.g: /usr/local/share/sane/sane-umax/
+ The frontend can not change the directory due to security!!!
+
+!- let backend display a frontend-info or -selection (ok/cancel)
+ dialog-box (e.g. "Calibration in progress: wait 10/9/8/... seconds")
+ this has to be done with a callback, eg.:
+ sane_frontend_dialog_display(**window, text, ok_text, cancel_text, backend_dialog_callback_function)
+ sane_frontend_dialog_close(window)
+ the frontend function has to be implemented in a way that the backend
+ can change the text.
+ A good place to define the callback functions could be sane_init,
+ where already the authorization_callback is defined.
+
+!- give backend the chance to tell the frontend while/after scan
+ that the options have changed (e.g. film scanner reduces
+ number of available images):
+ may be a flag (comparable to int *i in sane_control_option)
+ Maybe the frontend should reload the decriptors after a scan anyway?
+
+-- add sane_get_device_info function that allows the frontend
+ to ask for information about all involved backends and meta backends
+ that are used.
+ is this still needed with version_code in sane_device?
+
+-- sane_extended_call() and sane_extended_callback() ?
+ I don`t like this because it makes it too simple
+ to add proprietary functions that are not defined
+ in the sane standard
+
+(x)- define what parts in a option_descriptor may be changed after
+ it has been set up and passed to the frontend
+ Maybe add size to list of members that can be changed?
+ Move definition to sane_get_select_fd?
+
+?- add #define SANE_OPTION_IS_GETTABLE(cap) (((cap) & (SANE_CAP_SOFT_DETECT | SANE_CAP_INACTIVE)) == SANE_CAP_SOFT_DETECT)
+
+x- define endianess for SANE_FRAME_RAW
+
+ - add a pointer "next" to the device handle to make linked lists instead of arrays(?)
+
+ - when an option is set with sane_control_option that changes the image significantly
+ (e.g. exposure) invalidate the preview by setting SANE_INFO_INVALIDATE_PREVIEW
+
+x- fix sane_strstatus (remove const)
+
+ - add SANE_String sane_verbose_error(Sane_Handle h), to show backend-specific
+ error messages. The error string always refers to the last error reported by the backend.
+ So the frontend would call this when a SANE API call returned with an error status.
+ E.g. out-of-memory in scanner hardware or "Couldn't open file foo".
+ Check for therad-safety problems. If the handle parameters is used, no errors can
+ be printed before sane_open has succeeded.
+
+ - The network protocoll must be updated to reflect the changes to the SANE standard
+ - there were ideas to use UDP instead of TCP
+ - let the server define a port number for the data port to avoid firewall
+ problems?
+ - maybe it's possible to avoid the data port at all?
+ - add the numbers of the RPCs
+ - check if the callbacks are implemented according to the standard
+
+ - How to name the SANE2 header? sane-2.h or sane2.h?
+
+ - Split sane_cancel and add sane_end()?
+
+x- Update contact section
+
+ - section with implementation notes (currently in backend-writing.txt).
+
+ - Check grammar & spelling
+
+ - check too long lines
+
+ - check defective references
+
+ - update index
+
+ - Check that all headlines are in capital letters
+
+x- Changebar for sane_read
+
+x- check for correct quotation marks
\ No newline at end of file
|