/*
 *
 * u s e r i n i t . c			-- The place where user put his/her
 *					   initialization
 *
 * Copyright (C) 1993,1994,1995 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
 * 
 *
 * Permission to use, copy, and/or distribute this software and its
 * documentation for any purpose and without fee is hereby granted, provided
 * that both the above copyright notice and this permission notice appear in
 * all copies and derived works.  Fees for distribution or use of this
 * software or derived works may only be charged with express written
 * permission of the copyright holder.  
 * This software is provided ``as is'' without express or implied warranty.
 *
 * This software is a derivative work of other copyrighted softwares; the
 * copyright notices of these softwares are placed in the file COPYRIGHTS
 *
 *
 *           Author: Erick Gallesio [eg@kaolin.unice.fr]
 *    Creation date: 23-Jan-1994 19:09
 * Last file update: 25-Feb-1995 15:45
 */

#include "stk.h"

PRIMITIVE make_point(SCM l, int unused_length)
{
  static char keyx[] = ":x";
  static char keyy[] = ":y";
  SCM x, y;
  
  x = STk_get_keyword(STk_makekey(keyx), l, STk_makeinteger(0));
  if (NINTEGERP(x)) Err("make-point: bad value for x", x);

  y = STk_get_keyword(STk_makekey(keyy), l, STk_makeinteger(0));
  if (NINTEGERP(y)) Err("make-point: bad value for y", y);

  return Cons(x, y);
}


void STk_user_init(void)
{
  /* Put here the code you want to be run at init time */
  STk_add_new_primitive("make-point", tc_lsubr, make_point);
}
