Previous: , Up: Conditionals   [Index]


6.4.3 Usage example for Conditionals

Here are some more useful examples for Conditionals in the configuration file:

Specifying a swap file for the 16 bit version:
IF DOS16
  Swappath c:\temp\msged.swp
ENDIF
Selecting the proper Origin string:
IF OS2
  Origin "Warp 4, Mister Sulu!"
ELSEIF W32
  Origin "My employer forces me to use Windows ..."
ELSEIF DOS
  Origin "DOSwidanja!"
ELSEIF UNIX
  IF LINUX
    Origin "Penguins ahead!"
  ELSE
    Origin "UNIX - a professional's choice"
  ENDIF
ENDIF
Fine-tuning the terminal setup on Unix
IF UNIX

  ;By default, switch colors off (might cause problems with
  ;VT100 and xterm), as well as shadows (too slow)

  Switch Shadows Off
  Switch Colors Off

  IF TERM=linux
    ;The peculiarities of the Linux console ...
    switch bs127 on
    switch colors on
  ENDIF

  IF TERM=vt220
    switch colors on
  ENDIF

  IF TERM=ansi
    switch colors on
  ENDIF

ENDIF