User Tools

Site Tools


CIGAL Reference Manual, Chapter 1 (Topics): startup

Startup -- CIGAL Start-Up Procedures

When CIGAL begins to run, it goes through a series of steps to initialize its hardware and software settings. The first step is an internal initialization hard-coded inside CIGAL itself and involves detecting how it was launched and what kind of computer you are using. All other steps are controlled by running a series of CIGAL script programs (.IMP files), which are simple text files. The start-up process is divided into different program modules to provide flexible customization. The following is an overview of this start-up sequence:

  • sysstart.imp – in CIGAL system folder (where CIGAL.exe is located)
  • userconfig.imp – if found in current folder, otherwise
  • sysconfig.imp – if found in CIGAL system folder (and no userconfig), otherwise
  • generic_sysconfig.imp – in CIGAL system folder (not run if userconfig or sysconfig found)
  • start.imp – if found in current folder

If you use the behavioral paradigm software (e.g. Showplay), CIGAL will run through a paradigm initialization sequence (pdigminit) the first time you access any paradigm menus or commands. This involves running the following command files:

  • pdigminit.imp – in CIGAL system PDIGMS folder
  • generic_pdigmconfig.imp – in CIGAL system folder
  • pdigmconfig.imp – if found in CIGAL system folder

The following sections describe various aspects of the startup sequence in more detail.

Automatic internal initialization

The first thing CIGAL does is to create and initialize a number of special internal variables (see Data variables). The most important of these are:

  • OPSYS – operating system version
  • CMDLIN – command used to start CIGAL
  • SYSDIR – CIGAL system directory
  • CURDIR – your current working directory
  • PATH – list of directories to search for CIGAL programs
  • USER – your computer login name
  • STACK – CIGAL's working memory
  • CURSOR – the cursor control parameter
  • STATE – CIGAL's current state variable

System-wide start-up script -- sysstart.imp and local_sysstart.imp

Once it has finished its internal startup routines, CIGAL then looks in its SYSDIR directory for a file called:


If the SYSSTART.IMP file is found, CIGAL sets the SYSSTART flag in its internal STATE variable and then runs the SYSSTART.IMP file as a CIGAL program. SYSSTART.IMP contains standard global variable declarations and character string definitions that need to always be available. A standard SYSSTART.IMP file is provided with the CIGAL software distribution. SYSSTART allocates memory and runs the configuration setting scripts (see below) to initialize hardware and software settings.

When it finishes, SYSSTART checks to see if there is another file named


in the same SYSDIR directory, and if found that file is then run as a CIGAL program. If you want to add your own system-wide CIGAL startup commands that will be run for every user, the “local_sysstart.imp” file is the place to put them. That startup program can also call other CIGAL macro programs if you want. The CIGAL distribution does not contain a “local_sysstart.imp” file, so any commands you put in that file will not be affected by future CIGAL software upgrades.

Hardware configuration menus

In addition to initializing software variables, the standard SYSSTART.IMP program attempts to run a hardware configuration script by looking for one of the following files:

  • userconfig.imp in your current working directory (CURDIR) – user or task-specific settings. This file is generally created by using the Configuration Settings dialog while in this same directory.
  • sysconfig.imp in the CIGAL system directory (SYSDIR) – standard system-wide settings. This file is generally created by using the Configuration Settings dialog in the SYSDIR directory.
  • generic_sysconfig.imp in the CIGAL system directory (SYSDIR) – default file provided with CIGAL.

The above files are looked for in the order listed and the search stops as soon as it finds one. That file is run as a standard CIGAL macro program. Even if all 3 files exist, CIGAL will only run the first one it finds.

The CIGAL distribution does not contain “sysconfig.imp” or “userconfig.imp” files, so any commands you put into those files will not be affected by future CIGAL software upgrades. The “generic_sysconfig.imp” file is part of the standard distribution so do not change that file because your changes will be lost f you upgrade CIGAL versions.

CommandLine script

The standard SYSSTART.IMP program also checks to see if it was started with a file name as a command line argument. In Windows that can happen by dropping a text file onto the CIGAL.exe file (or its shortcut), by selecting CIGAL.exe to open a text file, or by using a Windows “Command Prompt” window and explicitly entering a CIGAL command line with a file argument. In any of those situations, the CMDLIN string variable in CIGAL will indicate the name of the file you want it to open. If a file name is specified in CMDLIN, the SYSSTART program will assume that file is a CIGAL macro program and will automatically attempt to run that program as soon as it finishes the rest of its start up procedures.

This option is rarely used but may prove convenient for some applications.

User-specific start-up script

After the SYSSTART.IMP startup macro has completed, CIGAL next looks in your current working directory (CURDIR for a file called:


If found, it sets the START flag in its internal STATE variable and then runs the START.IMP file as a CIGAL program. If START.IMP is not found in the local directory, this step is simply skipped; no other directories will be searched.

The START.IMP file is the place to put user or task specific initialization routines such as loading useful menus, assigning default data file names (see DATADIR(4)), or setting up a particular graphics configuration.

Interactive mode

Once the START.IMP macro has completed, CIGAL changes its STATE variable to INTERACTIVE and then enters its normal interactive mode and waits for you to enter commands either by typing on the keyboard or, if menus are active, by selecting a menu command by moving the cursor.

See Also:
CIGAL Home, CIGAL Manual, Topics List, Manual Help

jvs/cigal/manual/chapter1/startup.txt · Last modified: 2024/06/21 15:44 by