资源简介
graphviz-2.24.0.tar.gz
代码片段和文件信息
/* $Id: dot.cv 1.48 2009/06/15 16:05:00 erg Exp $ $Revision: 1.48 $ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research Florham Park NJ *
**********************************************************/
/*
* Written by Stephen North and Eleftherios Koutsofios.
*/
#ifdef HAVE_CONFIG_H
#include “config.h“
#endif
#include “gvc.h“
#include “gvio.h“
#ifndef WIN32_DLL
#ifdef GVDLL
__declspec(dllimport) boolean MemTest;
#else
#include “globals.h“
#endif
#endif
#ifdef WIN32_DLL
__declspec(dllimport) boolean MemTest;
#endif
#include
#ifdef HAVE_UNISTD_H
#include
#endif
#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
/* _GNU_SOURCE is needed for feenableexcept to be defined in fenv.h on GNU
* systems. Presumably it will do no harm on other systems. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
# include
#elif HAVE_FPU_CONTROL_H
# include
#elif HAVE_SYS_FPU_H
# include
#endif
static GVC_t *Gvc;
static graph_t * G;
#ifndef WIN32
static void intr(int s)
{
if (G)
gvRenderJobs(Gvc G);
exit (gvFreeContext(Gvc));
}
#ifndef NO_FPERR
static void fperr(int s)
{
fprintf(stderr “caught SIGFPE %d\n“ s);
/* signal (s SIG_DFL); raise (s); */
exit(1);
}
static void fpinit(void)
{
#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
int exc = 0;
# ifdef FE_DIVBYZERO
exc |= FE_DIVBYZERO;
# endif
# ifdef FE_OVERFLOW
exc |= FE_OVERFLOW;
# endif
# ifdef FE_INVALID
exc |= FE_INVALID;
# endif
feenableexcept(exc);
#ifdef HAVE_FESETENV
#ifdef FE_NONIEEE_ENV
fesetenv (FE_NONIEEE_ENV);
#endif
#endif
#elif HAVE_FPU_CONTROL_H
/* On s390-ibm-linux the header exists but the definitions
* of the masks do not. I assume this is temporary but until
* there‘s a real implementation it‘s probably safest to not
* adjust the FPU on this platform.
*/
# if defined(_FPU_MASK_IM) && defined(_FPU_MASK_DM) && defined(_FPU_MASK_ZM) && defined(_FPU_GETCW)
fpu_control_t fpe_flags = 0;
_FPU_GETCW(fpe_flags);
fpe_flags &= ~_FPU_MASK_IM; /* invalid operation */
fpe_flags &= ~_FPU_MASK_DM; /* denormalized operand */
fpe_flags &= ~_FPU_MASK_ZM; /* zero-divide */
/*fpe_flags &= ~_FPU_MASK_OM; overflow */
/*fpe_flags &= ~_FPU_MASK_UM; underflow */
/*fpe_flags &= ~_FPU_MASK_PM; pre
评论
共有 条评论