~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to lefty/common.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This software may only be used by you under license from AT&T Corp.
 
3
    ("AT&T").  A copy of AT&T's Source Code Agreement is available at
 
4
    AT&T's Internet website having the URL:
 
5
    <http://www.research.att.com/sw/tools/graphviz/license/source.html>
 
6
    If you received this software without first entering into a license
 
7
    with AT&T, you have an infringing copy of this software and cannot use
 
8
    it without violating AT&T's intellectual property rights.
 
9
*/
 
10
 
 
11
#pragma prototyped
 
12
/* Lefteris Koutsofios - AT&T Bell Laboratories */
 
13
 
 
14
#ifndef _COMMON_H
 
15
#define _COMMON_H
 
16
 
 
17
/* some config and conversion definitions from graphviz distribution */
 
18
#ifdef HAVE_CONFIG_H
 
19
#include "gvconfig.h"
 
20
#endif
 
21
#ifdef MSWIN32
 
22
#define FEATURE_WIN32
 
23
#define FEATURE_MS
 
24
#else
 
25
#define FEATURE_X11
 
26
#endif
 
27
#ifdef HAVECS
 
28
#define FEATURE_CS
 
29
#endif
 
30
#ifdef HAVENETSCAPE
 
31
#define FEATURE_NETSCAPE
 
32
#endif
 
33
#ifdef HAVEGMAP
 
34
#define FEATURE_GMAP
 
35
#define FEATURE_MINTSIZE
 
36
#endif
 
37
#ifdef HAVEDOT
 
38
#define FEATURE_DOT
 
39
#endif
 
40
#ifdef GNU
 
41
#define FEATURE_GNU
 
42
#endif
 
43
#ifdef HAVERUSAGE
 
44
#define FEATURE_RUSAGE
 
45
#endif
 
46
/* */
 
47
 
 
48
#ifdef FEATURE_CS
 
49
#include <ast.h>
 
50
#else
 
51
#include <stdlib.h>
 
52
#include <stdarg.h>
 
53
#include <string.h>
 
54
#include <limits.h>
 
55
#include <sys/types.h>
 
56
#include <sys/stat.h>
 
57
#endif
 
58
 
 
59
#include <math.h>
 
60
#include <stdio.h>
 
61
#include <setjmp.h>
 
62
#include <ctype.h>
 
63
 
 
64
#ifdef FEATURE_WIN32
 
65
#include <windows.h>
 
66
#include <commdlg.h>
 
67
#endif
 
68
#ifdef FEATURE_MS
 
69
#include <malloc.h>
 
70
#endif
 
71
 
 
72
#define POS __FILE__, __LINE__
 
73
 
 
74
#ifndef TRUE
 
75
#define TRUE  1
 
76
#define FALSE 0
 
77
#endif
 
78
 
 
79
#ifndef L_SUCCESS
 
80
#define L_SUCCESS 1
 
81
#define L_FAILURE 0
 
82
#endif
 
83
 
 
84
#define CHARSRC 0
 
85
#define FILESRC 1
 
86
 
 
87
#ifndef M_PI
 
88
#define M_PI 3.14159265358979323846
 
89
#endif
 
90
 
 
91
#ifndef REALSTRCMP
 
92
#define Strcmp(s1, s2) ( \
 
93
    *(s1) == *(s2) ? ( \
 
94
        (*s1) ? strcmp ((s1) + 1, (s2) + 1) : 0 \
 
95
    ) : (*(s1) < *(s2) ? -1 : 1) \
 
96
)
 
97
#else
 
98
#define Strcmp(s1, s2) strcmp ((s1), (s2))
 
99
#endif
 
100
 
 
101
extern int warnflag;
 
102
extern char *leftypath, *leftyoptions, *shellpath;
 
103
extern jmp_buf exitljbuf;
 
104
extern int idlerunmode;
 
105
extern fd_set inputfds;
 
106
 
 
107
int init (char *);
 
108
void term (void);
 
109
char *buildpath (char *, int);
 
110
char *buildcommand (char *, char *, int, int, char *);
 
111
void warning (char *, int, char *, char *, ...);
 
112
void panic (char *, int, char *, char *, ...);
 
113
void panic2 (char *, int, char *, char *, ...);
 
114
#endif /* _COMMON_H */