3.2. demo.g - The Demo Start-Up mini-program

/*--------------------------------------------------------------------
 * File:        demo.g
 *
 * Description: This program starts the demo. 
 *------------------------------------------------------------------*/

/*--------------------------------------------------------------------
 * Function:    main
 * Returns:     doesn't return
 * Description: Calls gtkcontrol.g or phcontrol.g, depending on the OS
 *              and/or a command line argument.
 *------------------------------------------------------------------*/
function main()
{
  if (_os_ == "Linux")
    system("gamma gtkcontrol.g");
  else if (_os_ == "QNX4")
    system("phgamma phcontrol.g");
  else if (_os_ == "QNX6")
    {
      if (cadr(argv) == nil)
        system("gamma phcontrol.g");
      else if (cadr(argv) == "photon")
        system("gamma phcontrol.g");
      if (cadr(argv) == "gtk")
        system("gamma gtkcontrol.g");
    }
}