/* ########################################################################

		    SMAC FILE USED BY XCORAL EDITOR

   File: 
   Path: 
   Description: 
   Created: Sun Aug  7 16:56:10 MET 1994
   Author: Lionel Fournigault
   Modified: Sun Aug  7 16:56:11 MET 1994
   Last maintained by: Lionel Fournigault

   RCS $Revision$ $State$
   

   ########################################################################

   Note: 

   Requires: 

   Defines: 

   Suggested bindings: 

   Procedure: 

   ########################################################################

   Copyright (c) : Lionel Fournigault

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

   ######################################################################## */

{
  if (! function("rcs_check_in"))
    load_file("rcs.sc");
}

void cv_check_in ()
{
  rcs_check_in();
}

void cv_check_out_locked ()
{
  rcs_check_out_locked();
}

void cv_check_out_unlocked ()
{
  rcs_check_out_unlocked();
}

void cv_check_in_and_out_locked ()
{
  rcs_check_in_and_out_locked();
}

void cv_check_in_and_out_unlocked ()
{
  rcs_check_in_and_out_unlocked();
}

void cv_diff ()
{
  rcs_diff();
}


void cv_log ()
{
  rcs_log();
}

void cv_repository ()
{
  rcs_repository();
}

void cv_lock_revision()
{
    rcs_lock_revision();
}

void cv_unlock_revision()
{
    rcs_unlock_revision();
}

void cv_initialize()
{
    rcs_initialize();
}


rcs_commands()
{
    char *str;
    int num=0;
    int win = current_window();
    
    clear_list();
    
    add_list_item("1:  Initialize version");
    add_list_item("2:  Check in");
    add_list_item("3:  Check out locked");
    add_list_item("4:  Check out unlocked");
    add_list_item("5:  Check in and out locked");
    add_list_item("6:  Check in and out unlocked");
    add_list_item("7:  Lock revision");
    add_list_item("8:  Unlock revision");
    add_list_item("9:  Display diff");
    add_list_item("10: Display log");
    add_list_item("11: Display repository");
    str = select_from_list("Revision control system");

    redisplay();
    select_window(win);
    
    num = extract_number(str);
    switch(num) {
    case 1:
      cv_initialize();
      break;
    case 2:
      cv_check_in();
      break;
    case 3:
      cv_check_out_locked();
      break;
    case 4:
      cv_check_out_unlocked();
      break;
    case 5:
      cv_check_in_and_out_locked();
      break;
    case 6:
      cv_check_in_and_out_unlocked();
      break;
    case 7:
      cv_repository();
      break;
    case 8:
      cv_unlock_revision();
    case 9:
      cv_diff();
      break;
    case 10:
      cv_log();
    case 11:
      cv_repository();
      break;
    default:
      break;
    }
}
