summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-08-01 13:18:02 +0000
committerAdrian Thurston <thurston@complang.org>2012-08-01 13:18:02 +0000
commit6bc9727d3ac615090bf5086cae43d225d3fb552f (patch)
tree695c7894d54b8b9de40e4cf347063e99238b7b0a /src/map.h
parent39c9b4a6f1014cb30ee535d4f534d0dcc4fe5905 (diff)
downloadcolm-6bc9727d3ac615090bf5086cae43d225d3fb552f.tar.gz
revert "moved 'colm' dir to 'src'"
Colm includes a library component with headers installed to a private dir inside include: $prefix/include/colm. We need our headers to reference each other using this colm prefix. This needs to be true for compiling our source and also for compiling external programs. It is conventient to have all the source in a directory called colm and then to use -I <source-root> when building colm. We use $prefix/include when building external programs. This reverts commit 247904a84430b8c9151fa6afb68f01b60afb92c9.
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/map.h b/src/map.h
deleted file mode 100644
index acb415b9..00000000
--- a/src/map.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2010-2012 Adrian Thurston <thurston@complang.org>
- */
-
-/* This file is part of Colm.
- *
- * Colm is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Colm is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Colm; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _MAP_H
-#define _MAP_H
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#include <program.h>
-
-typedef struct _MapEl
-{
- /* Must overlay Kid. */
- Tree *tree;
- struct _MapEl *next;
- struct _MapEl *prev;
-
- struct _MapEl *left, *right, *parent;
- long height;
- Tree *key;
-} MapEl;
-
-typedef struct _Map
-{
- /* Must overlay Tree. */
- short id;
- unsigned short flags;
- long refs;
- MapEl *head;
-
- MapEl *tail;
- MapEl *root;
- long treeSize;
- GenericInfo *genericInfo;
-} Map;
-
-void mapListAbandon( Map *map );
-
-void mapListAddBefore( Map *map, MapEl *next_el, MapEl *new_el );
-void mapListAddAfter( Map *map, MapEl *prev_el, MapEl *new_el );
-MapEl *mapListDetach( Map *map, MapEl *el );
-void mapAttachRebal( Map *map, MapEl *element, MapEl *parentEl, MapEl *lastLess );
-void mapDeleteChildrenOf( Map *map, MapEl *element );
-void mapEmpty( Map *map );
-MapEl *mapRebalance( Map *map, MapEl *n );
-void mapRecalcHeights( Map *map, MapEl *element );
-MapEl *mapFindFirstUnbalGP( Map *map, MapEl *element );
-MapEl *mapFindFirstUnbalEl( Map *map, MapEl *element );
-void mapRemoveEl( Map *map, MapEl *element, MapEl *filler );
-void mapReplaceEl( Map *map, MapEl *element, MapEl *replacement );
-MapEl *mapInsertEl( Program *prg, Map *map, MapEl *element, MapEl **lastFound );
-MapEl *mapInsertKey( Program *prg, Map *map, Tree *key, MapEl **lastFound );
-MapEl *mapImplFind( Program *prg, Map *map, Tree *key );
-MapEl *mapDetachByKey( Program *prg, Map *map, Tree *key );
-MapEl *mapDetach( Program *prg, Map *map, MapEl *element );
-MapEl *mapCopyBranch( Program *prg, Map *map, MapEl *el, Kid *oldNextDown, Kid **newNextDown );
-
-long cmpTree( Program *prg, const Tree *tree1, const Tree *tree2 );
-
-void mapImplRemoveEl( Program *prg, Map *map, MapEl *element );
-int mapImplRemoveKey( Program *prg, Map *map, Tree *key );
-
-/*
- * Iterators.
- */
-
-void initTreeIter( TreeIter *treeIter, const Ref *rootRef, int searchId, Tree **stackRoot );
-void initRevTreeIter( RevTreeIter *revTriter, const Ref *rootRef,
- int searchId, Tree **stackRoot, int children );
-
-
-void initUserIter( UserIter *userIter, Tree **stackRoot, long argSize, long searchId );
-
-Tree *mapFind( Program *prg, Map *map, Tree *key );
-long mapLength( Map *map );
-Tree *mapUnstore( Program *prg, Map *map, Tree *key, Tree *existing );
-int mapInsert( Program *prg, Map *map, Tree *key, Tree *element );
-void mapUnremove( Program *prg, Map *map, Tree *key, Tree *element );
-Tree *mapUninsert( Program *prg, Map *map, Tree *key );
-Tree *mapStore( Program *prg, Map *map, Tree *key, Tree *element );
-
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
-