extend.c 1.44 KB
Newer Older
eg's avatar
eg committed
1 2
/*
 *
3
 * e x t e n d . c			-- All the stuff dealing with
eg's avatar
eg committed
4 5
 *					   extended types
 *
6 7
 * Copyright © 1995-2006 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
 *
eg's avatar
eg committed
8 9 10 11
 * 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 of the License, or
 * (at your option) any later version.
12
 *
eg's avatar
eg committed
13 14 15 16
 * 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.
17
 *
eg's avatar
eg committed
18 19
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
eg's avatar
eg committed
21 22 23 24
 * USA.
 *
 *           Author: Erick Gallesio [eg@kaolin.unice.fr]
 *    Creation date: 15-Mar-1995 11:31
25
 * Last file update:  6-Aug-2006 22:09 (eg)
eg's avatar
eg committed
26 27 28 29 30 31 32 33 34 35 36
 */

#include "stklos.h"

/*
 * The array of extended type descriptors
 */
struct extended_type_descr *STk_xtypes[MAX_CELL_TYPES] = {NULL};

static int user_extended_type = tc_last_standard;

37 38

int STk_new_user_type(struct extended_type_descr *descr)
eg's avatar
eg committed
39
{
40 41 42 43 44 45 46 47
  MUT_DECL(lck);

  MUT_LOCK(lck);
  user_extended_type += 1;
  STk_xtypes[user_extended_type]= descr;
  MUT_UNLOCK(lck);

  return user_extended_type;
eg's avatar
eg committed
48 49 50 51 52 53 54
}


int STk_init_extend(void)
{
  return TRUE;
}