00001 /* 00002 Copyright (c) 2009 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 00037 typedef void *pGcElem; 00038 00045 typedef struct sGcCtx { 00046 pGcElem head; 00047 pGcElem tail; 00048 } sGcCtx; 00049 00056 typedef void *pMToken; 00057 00063 void release_gc (sGcCtx *gc); 00064 00070 sGcCtx *generate_gc (void); 00071 00077 void dump_tok (FILE *fp, pMToken p); 00078 00085 void print_decl (FILE *fp, pMToken p); 00086 00094 char *sprint_decl (pMToken r); 00095 00106 pMToken decode_ms_name (sGcCtx *gc, const char *name); 00107 char *encode_ms_name (sGcCtx *gc, pMToken tok); 00108 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 00113 #endif