1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
/* $Id: common.h,v 1.5 2005/10/18 19:12:37 ellson Exp $ $Revision: 1.5 $ */
/* 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 *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _COMMON_H
#define _COMMON_H
/* some config and conversion definitions from graphviz distribution */
#ifdef HAVE_CONFIG_H
#include "config.h"
/* we set some parameters which graphviz assumes.
* At some point, we could consider allowing these to be set in configure
* See Makefile.old for others.
*/
#define FEATURE_MINTSIZE 1
#define FEATURE_DOT 1
#ifndef MSWIN32
#define FEATURE_X11 1
#endif
#endif
#ifdef _PACKAGE_ast
#include <ast.h>
#define HAVE_STRERROR 1
#else
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef MSWIN32
#include <sys/time.h>
#endif
#endif
#include <math.h>
#include <stdio.h>
#include <setjmp.h>
#include <ctype.h>
#ifdef FEATURE_WIN32
#include <windows.h>
#include <commdlg.h>
#endif
#ifdef FEATURE_MS
#include <malloc.h>
#endif
#define POS __FILE__, __LINE__
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#ifndef L_SUCCESS
#define L_SUCCESS 1
#define L_FAILURE 0
#endif
#define CHARSRC 0
#define FILESRC 1
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
extern int warnflag;
extern char *leftypath, *leftyoptions, *shellpath;
extern jmp_buf exitljbuf;
extern int idlerunmode;
extern fd_set inputfds;
int init (char *);
void term (void);
char *buildpath (char *, int);
char *buildcommand (char *, char *, int, int, char *);
void warning (char *, int, char *, char *, ...);
void panic (char *, int, char *, char *, ...);
void panic2 (char *, int, char *, char *, ...);
#endif /* _COMMON_H */
#ifdef __cplusplus
}
#endif
|