Library configuration


Detailed Description

The behavior of the library can be influencent by setting an environment variable, whose name is defined by FID_OPTIONS_VARNAME. See the documentation for fid_options_parse() to find a list of values it may take.

Defines

#define FID_OPTIONS_VARNAME   "FID_OPTIONS"
 Name of environment variable parsed by libfid.

Functions

void fid_options_parse (void)
 Parse environment variable for library configuration.

Variables

int fid_options_prefetch
int fid_options_smart_prefetch

Define Documentation

#define FID_OPTIONS_VARNAME   "FID_OPTIONS"

Name of environment variable parsed by libfid.

Definition at line 31 of file options.h.

Referenced by fid_options_parse().


Function Documentation

void fid_options_parse ( void   ) 

Parse environment variable for library configuration.

This function is called automatically by functions that can be influenced by an environment variable whose name is defined by FID_OPTIONS_VARNAME, and is usually not called directly from client code. The function parses the content of the environment variable once only.

The environment variable is expected to contain a colon separated list of option names. Currently, the following options are recognized (unknown options are silently ignored).

  • NOPREFETCH Usually every file opened for reading is prefetched automatically to fill the file cache in order to prevent excessive time consumption for searching within files. Setting this option disables automatic prefetching entirely.
  • FORCEPREFETCH If prefetching is not disabled, then the default behavior is to prefetch a file only if it is very small, or if the kernel reports that it, or large parts thereof, are not present in file cache already. Setting this option causes the library to always read the whole file (still quite fast when cached already, but much slower than asking the kernel beforehand and relying on these information).

Note:
Global variables fid_options_prefetch and fid_options_smart_prefetch are set by this function according to the content of environment variable FID_OPTIONS_VARNAME. Do not set these variables manually.

Definition at line 60 of file options.c.

References fid_options_prefetch, fid_options_smart_prefetch, and FID_OPTIONS_VARNAME.

Referenced by fid_file_map().


Variable Documentation

For internal use only.

Definition at line 31 of file options.c.

Referenced by fid_file_map(), and fid_options_parse().

For internal use only.

Definition at line 32 of file options.c.

Referenced by fid_file_map(), and fid_options_parse().


Generated on Wed Jul 8 17:21:16 2009 for Full-text Index Data structure library by  doxygen 1.5.9