www.delorie.com/gnu/docs/gcal/gcal_20.html   search  
 
Buy GNU books!


Gcal 3.01

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 Resource file

5.1.1 Structure of resource file  How to write a Resource file.
5.1.2 Date part of a line  How to write the Date part.
5.1.3 Further date part attributes  What are Further date part attributes?
5.1.4 Text part of a line  How to write the Text part.
5.1.5 %?... Special Texts  What are %?... Special Texts?
5.1.6 Comment line  What is a Comment line?
5.1.7 Include directives  What are Include directives.
5.1.8 Date variables  How Date variables can be used.
5.1.9 Text variables  How Text variables can be used.

This section describes how to use a resource file that contains fixed dates and appointments. The name of the standard resource file is `HOME/.gcalrc'(37).

Gcal uses a special file searching mechanism:

  1. The Gcal program scans the file directories which are referenced in the environment variable GCALPATH (see section Environment Variable GCALPATH) to find the standard resource file. The GCALPATH environment variable contains a (`:') colon-separated(38) list of file directories. If no such environment variable is defined and set, Gcal omits this step.

  2. If the above action fails, Gcal looks for the standard resource file in the file directory which is referenced in the environment variable HOME. If no HOME environment variable is defined and set, Gcal also omits this step. See section Environment Variable HOME.

  3. If the above action fails, Gcal inspects the user data file directory(39) to find the standard resource file. This file directory is a file directory relative to the HOME file directory. If an environment variable GCAL_USR_DATADIR is set, Gcal appends the contents of this environment variable to the contents of the HOME environment variable, and tries to use this file directory instead of using the burned-in default name of this file directory (see section Environment Variable GCAL_USR_DATADIR). If no HOME environment variable is defined and set, Gcal of course also omits this step.

  4. If all above actions fail, Gcal inspects the system data file directory(40) to find the standard resource file. This file directory is a file directory absolute to the root/$prefix file directory. If an environment variable GCAL_SYS_DATADIR is set, Gcal tries to use this file directory instead of using the burned-in default name of this file directory (see section Environment Variable GCAL_SYS_DATADIR).

If the standard resource file is not found during the steps 1...4 of the file searching mechanism, no fixed date messages will be created!

In case the `--debug=abort' option is given and no standard resource file is found during the steps 1...4 of the file searching mechanism, the Gcal program will be aborted with an error code. See section Error Code 118, and Global option `--debug=abort', for more information.

If a `-f|F name[+...]' respectively `--resource-file=name' command line argument is given, a file name will be used for the resource file instead of the standard resource file. See section Fixed date option `--resource-file=name'.

Annotation:

An extended file name contains one ore more `/' (slash) characters(41) and denotes a file, whose fixed access path either starts from the root file directory, like `/foo/bar/file', or from the actual file directory, like `./bar/file' or `../bar/file'. If name is an extended file name:

A simple file name denotes a file, whose access-path either does not start from the root file directory or from the actual file directory, like `file' or `bar/file'. If name is a simple file name:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003