1 /* 2 * HT Editor 3 * analy_names.h 4 * 5 * Copyright (C) 1999-2002 Sebastian Biallas (sb@biallas.net) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 #ifndef ANALY_NAMES_H 22 #define ANALY_NAMES_H 23 24 #include "data.h" 25 26 char *import_func_name(const char *dllname, const char *funcname, int ordinal); 27 char *export_func_name(const char *funcname, int ordinal); 28 const char *label_type(int lt); 29 const char *label_type_short(int lt); 30 const char *xref_type(int xt); 31 char xref_type_short(int xt); 32 33 #define LPRFX_LOC "loc" 34 #define LPRFX_SUB "sub" 35 #define LPRFX_STUB "stub" 36 #define LPRFX_WRAP "wrapper" 37 #define LPRFX_OFS "offset" 38 #define LPRFX_DTA "data" 39 #define LPRFX_DTU "?data" 40 #define LPRFX_STR "str" 41 42 bool valid_name(const char *str); 43 void make_valid_name(char *result, const char *str); 44 void make_valid_name(String &str); 45 46 /* 47 * generated names 48 */ 49 #define M_PREFIX_DUP ' ' 50 #define M_PREFIX_DUPs " " 51 #define M_PREFIX_REF '*' 52 #define M_PREFIX_REFs "*" 53 #define M_PREFIX_LABEL 'l' 54 #define M_PREFIX_LABELs "l" 55 #define QUOTED_STRING(s) M_PREFIX_DUPs##s 56 #define REF_STRING(s) M_PREFIX_REFs##s 57 58 #endif 59