From 8057e87c52983c0016ab73ee4193bc29537ee76d Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 8 Jul 2011 18:47:07 +0000 Subject: [PATCH] Move intset to common --- lib/ortho/Makefile.am | 4 +-- lib/ortho/intset.c | 61 ------------------------------------------- lib/ortho/intset.h | 25 ------------------ 3 files changed, 2 insertions(+), 88 deletions(-) delete mode 100644 lib/ortho/intset.c delete mode 100644 lib/ortho/intset.h diff --git a/lib/ortho/Makefile.am b/lib/ortho/Makefile.am index e295982a1..dc5a52e46 100644 --- a/lib/ortho/Makefile.am +++ b/lib/ortho/Makefile.am @@ -21,13 +21,13 @@ if WITH_ORTHO AM_CFLAGS = -D_BLD_gvc=1 endif -noinst_HEADERS = fPQ.h ortho.h intset.h maze.h partition.h rawgraph.h sgraph.h structures.h trap.h +noinst_HEADERS = fPQ.h ortho.h maze.h partition.h rawgraph.h sgraph.h structures.h trap.h if WITH_ORTHO noinst_LTLIBRARIES = libortho_C.la endif -libortho_C_la_SOURCES = fPQ.c intset.c maze.c ortho.c partition.c rawgraph.c sgraph.c trapezoid.c +libortho_C_la_SOURCES = fPQ.c maze.c ortho.c partition.c rawgraph.c sgraph.c trapezoid.c EXTRA_DIST = Makefile.old gvortho.vcproj diff --git a/lib/ortho/intset.c b/lib/ortho/intset.c deleted file mode 100644 index 70d45b455..000000000 --- a/lib/ortho/intset.c +++ /dev/null @@ -1,61 +0,0 @@ -/* $Id$Revision: */ -/* vim:set shiftwidth=4 ts=8: */ - -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - *************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -static Void_t* -mkIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) -{ - intitem* np = NEW(intitem); - np->id = obj->id; - return (Void_t*)np; -} - -static void -freeIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc) -{ - free (obj); -} - -static int -cmpid(Dt_t* d, int* key1, int* key2, Dtdisc_t* disc) -{ - if (*key1 > *key2) return 1; - else if (*key1 < *key2) return -1; - else return 0; -} - -static Dtdisc_t intSetDisc = { - offsetof(intitem,id), - sizeof(int), - offsetof(intitem,link), - (Dtmake_f)mkIntItem, - (Dtfree_f)freeIntItem, - (Dtcompar_f)cmpid, - 0, - 0, - 0 -}; - -Dt_t* -openIntSet (void) -{ - return dtopen(&intSetDisc,Dtoset); -} - diff --git a/lib/ortho/intset.h b/lib/ortho/intset.h deleted file mode 100644 index 8325329a2..000000000 --- a/lib/ortho/intset.h +++ /dev/null @@ -1,25 +0,0 @@ -/* $Id$Revision: */ -/* vim:set shiftwidth=4 ts=8: */ - -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - *************************************************************************/ - -#ifndef INTSET_H -#define INTSET_H - -#include - -typedef struct { - int id; - Dtlink_t link; -} intitem; - -extern Dt_t* openIntSet (void); -#endif -- 2.40.0