#ifndef APPCONST_H1#define APPCONST_H23/*4Planarity-Related Graph Algorithms Project5Copyright (c) 1997-2010, John M. Boyer6All rights reserved. Includes a reference implementation of the following:78* John M. Boyer. "Simplified O(n) Algorithms for Planar Graph Embedding,9Kuratowski Subgraph Isolation, and Related Problems". Ph.D. Dissertation,10University of Victoria, 2001.1112* John M. Boyer and Wendy J. Myrvold. "On the Cutting Edge: Simplified O(n)13Planarity by Edge Addition". Journal of Graph Algorithms and Applications,14Vol. 8, No. 3, pp. 241-273, 2004.1516* John M. Boyer. "A New Method for Efficiently Generating Planar Graph17Visibility Representations". In P. Eades and P. Healy, editors,18Proceedings of the 13th International Conference on Graph Drawing 2005,19Lecture Notes Comput. Sci., Volume 3843, pp. 508-511, Springer-Verlag, 2006.2021Redistribution and use in source and binary forms, with or without modification,22are permitted provided that the following conditions are met:2324* Redistributions of source code must retain the above copyright notice, this25list of conditions and the following disclaimer.2627* Redistributions in binary form must reproduce the above copyright notice, this28list of conditions and the following disclaimer in the documentation and/or29other materials provided with the distribution.3031* Neither the name of the Planarity-Related Graph Algorithms Project nor the names32of its contributors may be used to endorse or promote products derived from this33software without specific prior written permission.3435THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"36AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE37IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE38DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR39ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES40(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;41LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON42ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT43(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS44SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.45*/4647// When PROFILE is defined, prints out run-time stats on a number of subordinate48// routines in the embedder4950//#define PROFILE51#ifdef PROFILE52#include "platformTime.h"53#endif5455/* Define DEBUG to get additional debugging. The default is to define it when MSC does */5657#ifdef _DEBUG58#define DEBUG59#endif6061/* Some low-level functions are replaced by faster macros, except when debugging */6263#define SPEED_MACROS64#ifdef DEBUG65#undef SPEED_MACROS66#endif6768/* Return status values; OK/NOTOK behave like Boolean true/false,69not like program exit codes. */7071#define OK 172#define NOTOK 07374#ifdef DEBUG75#undef NOTOK76extern int debugNOTOK();77#include <stdio.h>78#define NOTOK (printf("NOTOK on Line %d of %s\n", __LINE__, __FILE__), debugNOTOK())79#endif8081#define NONEMBEDDABLE -38283#ifndef TRUE84#define TRUE 185#endif8687#ifndef FALSE88#define FALSE 089#endif9091#ifndef NULL92#define NULL 0L93#endif9495/* Array indices are used as pointers, and this means bad pointer */9697#define NIL -198#define NIL_CHAR 0xFF99100/* Defines fopen strings for reading and writing text files on PC and UNIX */101102#ifdef WINDOWS103#define READTEXT "rt"104#define WRITETEXT "wt"105#else106#define READTEXT "r"107#define WRITETEXT "w"108#endif109110#endif111112113