| 1 | /* This file is part of the program psim. |
| 2 | |
| 3 | Copyright (C) 1994-1995,1997, Andrew Cagney <cagney@highland.com.au> |
| 4 | |
| 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation; either version 3 of the License, or |
| 8 | (at your option) any later version. |
| 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, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | */ |
| 19 | |
| 20 | |
| 21 | /* Export a capability data base that maps between internal data |
| 22 | values and those given to a simulation */ |
| 23 | |
| 24 | #ifndef _CAP_H_ |
| 25 | #define _CAP_H_ |
| 26 | |
| 27 | #include "basics.h" |
| 28 | |
| 29 | typedef struct _cap cap; |
| 30 | |
| 31 | INLINE_CAP\ |
| 32 | (cap *) cap_create |
| 33 | (const char *name); |
| 34 | |
| 35 | INLINE_CAP\ |
| 36 | (void) cap_init |
| 37 | (cap *db); |
| 38 | |
| 39 | INLINE_CAP\ |
| 40 | (signed_cell) cap_external |
| 41 | (cap *db, |
| 42 | void *internal); |
| 43 | |
| 44 | INLINE_CAP\ |
| 45 | (void *) cap_internal |
| 46 | (cap *db, |
| 47 | signed_cell external); |
| 48 | |
| 49 | INLINE_CAP\ |
| 50 | (void) cap_add |
| 51 | (cap *db, |
| 52 | void *internal); |
| 53 | |
| 54 | INLINE_CAP\ |
| 55 | (void) cap_remove |
| 56 | (cap *db, |
| 57 | void *internal); |
| 58 | |
| 59 | #endif |