Next Previous Up Top Contents Index

18 The SYSTEM Package

guess-external-format

Function

Summary

Tries to work out the external format
Package

system

Signature

guess-external-format pathname ef-spec buffer length => ef-spec

Arguments

pathname

Pathname identifying location of buffer.

ef-spec

An external format spec.

buffer

A buffer whose contents are examined.

length

Length (an integer) up to which buffer should be examined.

Values

ef-spec

An external format spec.

Description

This calls, in turn, functions on the list*file-encoding-detection-algorithm*. If a complete external format spec is returned it is used, otherwise the return value is passed to the next function. If the name of the external format spec returned by the last function on this list is:default, an error of typefile-encoding-resolution-error is signalled. The caller offers a restart for trying again with respecifiedexternal-format and/orelement-type arguments. Otherwise, functions on the list*FILE-EOL-STYLE-DETECTION-ALGORITHM* are called in turn. If a complete external format spec is returned it is used, otherwise the return value is passed to the next function. If the external format spec returned by the last function on this list does not contain:eol-style, an error of typefile-encoding-resolution-error is signalled.
See also

*file-encoding-detection-algorithm*
*file-eol-style-detection-algorithm*
file-encoding-resolution-error


LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker