00001 // $Id: binreloc.h 1082 2006-05-16 14:42:54Z alex $ 00002 // The following line makes normalize.pl skip type fixing 00003 /* SKIPFIXTYPES: START */ 00004 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE 00005 ================================XARAHEADERSTART=========================== 00006 00007 Xara LX, a vector drawing and manipulation program. 00008 Copyright (C) 1993-2006 Xara Group Ltd. 00009 Copyright on certain contributions may be held in joint with their 00010 respective authors. See AUTHORS file for details. 00011 00012 LICENSE TO USE AND MODIFY SOFTWARE 00013 ---------------------------------- 00014 00015 This file is part of Xara LX. 00016 00017 Xara LX is free software; you can redistribute it and/or modify it 00018 under the terms of the GNU General Public License version 2 as published 00019 by the Free Software Foundation. 00020 00021 Xara LX and its component source files are distributed in the hope 00022 that it will be useful, but WITHOUT ANY WARRANTY; without even the 00023 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00024 See the GNU General Public License for more details. 00025 00026 You should have received a copy of the GNU General Public License along 00027 with Xara LX (see the file GPL in the root directory of the 00028 distribution); if not, write to the Free Software Foundation, Inc., 51 00029 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00030 00031 00032 ADDITIONAL RIGHTS 00033 ----------------- 00034 00035 Conditional upon your continuing compliance with the GNU General Public 00036 License described above, Xara Group Ltd grants to you certain additional 00037 rights. 00038 00039 The additional rights are to use, modify, and distribute the software 00040 together with the wxWidgets library, the wxXtra library, and the "CDraw" 00041 library and any other such library that any version of Xara LX relased 00042 by Xara Group Ltd requires in order to compile and execute, including 00043 the static linking of that library to XaraLX. In the case of the 00044 "CDraw" library, you may satisfy obligation under the GNU General Public 00045 License to provide source code by providing a binary copy of the library 00046 concerned and a copy of the license accompanying it. 00047 00048 Nothing in this section restricts any of the rights you have under 00049 the GNU General Public License. 00050 00051 00052 SCOPE OF LICENSE 00053 ---------------- 00054 00055 This license applies to this program (XaraLX) and its constituent source 00056 files only, and does not necessarily apply to other Xara products which may 00057 in part share the same code base, and are subject to their own licensing 00058 terms. 00059 00060 This license does not apply to files in the wxXtra directory, which 00061 are built into a separate library, and are subject to the wxWindows 00062 license contained within that directory in the file "WXXTRA-LICENSE". 00063 00064 This license does not apply to the binary libraries (if any) within 00065 the "libs" directory, which are subject to a separate license contained 00066 within that directory in the file "LIBS-LICENSE". 00067 00068 00069 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS 00070 ---------------------------------------------- 00071 00072 Subject to the terms of the GNU Public License (see above), you are 00073 free to do whatever you like with your modifications. However, you may 00074 (at your option) wish contribute them to Xara's source tree. You can 00075 find details of how to do this at: 00076 http://www.xaraxtreme.org/developers/ 00077 00078 Prior to contributing your modifications, you will need to complete our 00079 contributor agreement. This can be found at: 00080 http://www.xaraxtreme.org/developers/contribute/ 00081 00082 Please note that Xara will not accept modifications which modify any of 00083 the text between the start and end of this header (marked 00084 XARAHEADERSTART and XARAHEADEREND). 00085 00086 00087 MARKS 00088 ----- 00089 00090 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara 00091 designs are registered or unregistered trademarks, design-marks, and/or 00092 service marks of Xara Group Ltd. All rights in these marks are reserved. 00093 00094 00095 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK. 00096 http://www.xara.com/ 00097 00098 =================================XARAHEADEREND============================ 00099 */ 00100 /* 00101 * BinReloc - a library for creating relocatable executables 00102 * Written by: Hongli Lai <h.lai@chello.nl> 00103 * http://autopackage.org/ 00104 * 00105 * This source code is public domain. You can relicense this code 00106 * under whatever license you want. 00107 * 00108 * See http://autopackage.org/docs/binreloc/ for 00109 * more information and how to use this. 00110 */ 00111 00112 #ifndef __BINRELOC_H__ 00113 #define __BINRELOC_H__ 00114 00115 #ifdef __cplusplus 00116 extern "C" { 00117 #endif /* __cplusplus */ 00118 00119 00121 typedef enum { 00123 BR_INIT_ERROR_NOMEM, 00125 BR_INIT_ERROR_OPEN_MAPS, 00127 BR_INIT_ERROR_READ_MAPS, 00129 BR_INIT_ERROR_INVALID_MAPS, 00131 BR_INIT_ERROR_DISABLED 00132 } BrInitError; 00133 00134 00135 #ifndef BINRELOC_RUNNING_DOXYGEN 00136 /* Mangle symbol names to avoid symbol collisions with other ELF objects. */ 00137 #define br_init SlLp57100427862049_br_init 00138 #define br_init_lib SlLp57100427862049_br_init_lib 00139 #define br_find_exe SlLp57100427862049_br_find_exe 00140 #define br_find_exe_dir SlLp57100427862049_br_find_exe_dir 00141 #define br_find_prefix SlLp57100427862049_br_find_prefix 00142 #define br_find_bin_dir SlLp57100427862049_br_find_bin_dir 00143 #define br_find_sbin_dir SlLp57100427862049_br_find_sbin_dir 00144 #define br_find_data_dir SlLp57100427862049_br_find_data_dir 00145 #define br_find_locale_dir SlLp57100427862049_br_find_locale_dir 00146 #define br_find_lib_dir SlLp57100427862049_br_find_lib_dir 00147 #define br_find_libexec_dir SlLp57100427862049_br_find_libexec_dir 00148 #define br_find_etc_dir SlLp57100427862049_br_find_etc_dir 00149 #define br_strcat SlLp57100427862049_br_strcat 00150 #define br_build_path SlLp57100427862049_br_build_path 00151 #define br_dirname SlLp57100427862049_br_dirname 00152 00153 00154 #endif 00155 int br_init (BrInitError *error); 00156 int br_init_lib (BrInitError *error); 00157 00158 char *br_find_exe (const char *default_exe); 00159 char *br_find_exe_dir (const char *default_dir); 00160 char *br_find_prefix (const char *default_prefix); 00161 char *br_find_bin_dir (const char *default_bin_dir); 00162 char *br_find_sbin_dir (const char *default_sbin_dir); 00163 char *br_find_data_dir (const char *default_data_dir); 00164 char *br_find_locale_dir (const char *default_locale_dir); 00165 char *br_find_lib_dir (const char *default_lib_dir); 00166 char *br_find_libexec_dir (const char *default_libexec_dir); 00167 char *br_find_etc_dir (const char *default_etc_dir); 00168 00169 /* Utility functions */ 00170 char *br_strcat (const char *str1, const char *str2); 00171 char *br_build_path (const char *dir, const char *file); 00172 char *br_dirname (const char *path); 00173 00174 00175 #ifdef __cplusplus 00176 } 00177 #endif /* __cplusplus */ 00178 00179 #endif /* __BINRELOC_H__ */