/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
// Purpose:   If ch is used as a login shell,
//            chlogin and ~/.chlogin will be executed 
//            after execution of chrc, adminshrc, and ~/.chrc. 
//            copy this file to your home directory as .chlogin
// Note: (1) The mode of this file .chlogin 
//           should be set to readable 
//#########################################################
#include <stdio.h>
FILE *stream;

/***** get tty and term type ******/
#if defined(_SUN_) || defined(_SOLARIS_)
  putenv("OPENWINHOME=/usr/openwin");
/*
  if(!strcmp(`tty`, "/dev/console") || !strcmp(getenv("TERM"),"sun"))
  {
    printf("\n\n\nStarting OpenWindows in 5 seconds (type Control-C to interrupt)\n");
    sleep 5 
    openwin
    clear            // get rid of annoying cursor rectangle
  }
*/
#elif defined(_LINUX_)
/*
  if(!strcmp(`tty`, "/dev/console") || !strcmp(getenv("TERM"),"linux"))
  {
    printf("\n\n\nStarting X-Windows in 5 seconds (type Control-C to interrupt)\n");
    sleep 5 
    startx
  }
*/
#endif 
/* for BackSpace and Del keys to work properly */
stty intr '^C' erase '^?' kill '^U' susp '^Z'
