/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/gvc/dot_builtins.c

Go to the documentation of this file.
00001 /* $Id: dot_builtins.c,v 1.10 2007/05/30 22:28:27 erg Exp $ $Revision: 1.10 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020 
00021 #include "gvplugin.h"
00022 
00023 #if defined(GVDLL) && !defined(ENABLE_LTDL)
00024 #define extern  __declspec(dllimport)
00025 #endif
00026 
00027 extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
00028 extern gvplugin_library_t gvplugin_neato_layout_LTX_library;
00029 #ifdef HAVE_LIBGD
00030 extern gvplugin_library_t gvplugin_gd_LTX_library;
00031 #endif
00032 #ifdef HAVE_PANGOCAIRO
00033 extern gvplugin_library_t gvplugin_pango_LTX_library;
00034 #endif
00035 extern gvplugin_library_t gvplugin_core_LTX_library;
00036 
00037 #if defined(GVDLL) && !defined(ENABLE_LTDL)
00038 lt_symlist_t lt_preloaded_symbols[] = {
00039         { "gvplugin_dot_layout_LTX_library", 0},
00040         { "gvplugin_neato_layout_LTX_library", 0},
00041 #ifdef HAVE_PANGOCAIRO
00042         { "gvplugin_pango_LTX_library", 0},
00043 #endif
00044 #ifdef HAVE_LIBGD
00045         { "gvplugin_gd_LTX_library", 0},
00046 #endif
00047         { "gvplugin_core_LTX_library", 0},
00048         { 0, 0 }
00049 };
00050 
00051 static void*
00052 lt_lookup (const char* name) 
00053 {
00054     void* addr = 0;
00055     switch (*(name + 9)) { /* skip "gvplugin_" */
00056     case 'c' :
00057         addr = &gvplugin_core_LTX_library;
00058         break;
00059     case 'd' :
00060         addr = &gvplugin_dot_layout_LTX_library;
00061         break;
00062 #ifdef HAVE_LIBGD
00063     case 'g' :
00064         addr = &gvplugin_gd_LTX_library;
00065         break;
00066 #endif
00067     case 'n' :
00068         addr = &gvplugin_neato_layout_LTX_library;
00069         break;
00070 #ifdef HAVE_PANGOCAIRO
00071     case 'p' :
00072         addr = &gvplugin_pango_LTX_library;
00073         break;
00074 #endif
00075     }
00076     return addr;
00077 }
00078 
00079 void
00080 init_lt_preloaded_symbols()
00081 {
00082     const char* s;
00083     int i;
00084     for (i = 0; (s = lt_preloaded_symbols[i].name); i++) {
00085         lt_preloaded_symbols[0].address = lt_lookup (s);
00086     }
00087 }
00088 #else
00089 const lt_symlist_t lt_preloaded_symbols[] = {
00090         { "gvplugin_dot_layout_LTX_library", (void*)(&gvplugin_dot_layout_LTX_library) },
00091         { "gvplugin_neato_layout_LTX_library", (void*)(&gvplugin_neato_layout_LTX_library) },
00092 #ifdef HAVE_PANGOCAIRO
00093         { "gvplugin_pango_LTX_library", (void*)(&gvplugin_pango_LTX_library) },
00094 #endif
00095 #ifdef HAVE_LIBGD
00096         { "gvplugin_gd_LTX_library", (void*)(&gvplugin_gd_LTX_library) },
00097 #endif
00098         { "gvplugin_core_LTX_library", (void*)(&gvplugin_core_LTX_library) },
00099         { 0, 0 }
00100 };
00101 #endif

Generated on Mon Mar 31 19:03:26 2008 for Graphviz by  doxygen 1.5.1