1 /* $Id: $ */
2 
3 /* Copyright (C) 1997 Sverre Hvammen Johansen and Terje Mjoes,
4  * Department of Informatics, University of Oslo.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 #include "cim.h"
21 
22 
23 /******************************************************************************
24                                                             RutineCallThunk  */
25 
26 /* Denne rutinen oppretter et thunk-objekt, og setter dens statiske og
27  * dynamiske omgivelse. I tillegg kalles rss hvis det ligger noe p} en av rt-
28  * stakkene. Den dynamiske omgivelsen er gitt av __pb mens den statiske
29  * er overf|rt i den globale variablen sl.
30  *
31  * Parametere:
32  * ar, av, at -> henholdsvis antall referanse, value og text-variable
33  *               som ligger p} rt-stakkene.
34  * Returnerer: Ingen ting. */
35 
36 void
__rct(as)37 __rct (as)
38      long as;
39 {
40   __dhp x;
41   if (as)
42     __rss (as);
43   x = __ralloc ((long) sizeof (__thunk));
44   x->pp = (__pty) __THUNK;
45   x->sl = __sl;
46   x->dl = __pb;
47   /* p->pm=__FALSE; Er implisitt satt */
48   __pb = x;
49 }
50