ia64/xen-unstable

view tools/xfrd/enum.h @ 1820:3d4f8eb89670

bitkeeper revision 1.1106.1.2 (40faa780dekT3E5arFwcbQDu1MbX6g)

Cleaned up Xen's instruction emulator.
author kaf24@scramble.cl.cam.ac.uk
date Sun Jul 18 16:38:24 2004 +0000 (2004-07-18)
parents 0e23f01219c6
children
line source
1 /*
2 * Copyright (C) 2002, 2004 Mike Wray <mike.wray@hp.com>
3 *
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of the
7 * License, or (at your option) any later version. This library is
8 * distributed in the hope that it will be useful, but WITHOUT ANY
9 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE.
11 * See the GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
18 #ifndef _XUTIL_ENUM_H_
19 #define _XUTIL_ENUM_H_
21 /** Mapping of an enum value to a name. */
22 typedef struct EnumDef {
23 int val;
24 char *name;
25 } EnumDef;
27 extern int enum_name_to_val(char *name, EnumDef *defs);
28 extern char *enum_val_to_name(int val, EnumDef *defs);
30 #endif /* _XUTIL_ENUM_H_ */