00001 /* 00002 Copyright (c) 2009, 2010 mingw-w64 project 00003 00004 Contributing authors: Kai Tietz, Jonathan Yong 00005 00006 Permission is hereby granted, free of charge, to any person obtaining a 00007 copy of this software and associated documentation files (the "Software"), 00008 to deal in the Software without restriction, including without limitation 00009 the rights to use, copy, modify, merge, publish, distribute, sublicense, 00010 and/or sell copies of the Software, and to permit persons to whom the 00011 Software is furnished to do so, subject to the following conditions: 00012 00013 The above copyright notice and this permission notice shall be included in 00014 all copies or substantial portions of the Software. 00015 00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00019 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00020 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00021 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00022 DEALINGS IN THE SOFTWARE. 00023 */ 00024 00025 #ifndef _LIBMANGLE_HXX 00026 #define _LIBMANGLE_HXX 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00038 typedef void *libmangle_gc_t; 00039 00046 typedef struct libmangle_gc_context_t { 00047 libmangle_gc_t head; 00048 libmangle_gc_t tail; 00049 } libmangle_gc_context_t; 00050 00057 typedef void *libmangle_tokens_t; 00058 00064 void libmangle_release_gc (libmangle_gc_context_t *gc); 00065 00071 libmangle_gc_context_t *libmangle_generate_gc (void); 00072 00078 void libmangle_dump_tok (FILE *fp, libmangle_tokens_t p); 00079 00086 void libmangle_print_decl (FILE *fp, libmangle_tokens_t p); 00087 00095 char *libmangle_sprint_decl (libmangle_tokens_t r); 00096 00107 libmangle_tokens_t libmangle_decode_ms_name (libmangle_gc_context_t *gc, const char *name); 00108 char *libmangle_encode_ms_name (libmangle_gc_context_t *gc, libmangle_tokens_t tok); 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif 00113 00114 #endif