• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • edu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • extragear
  • edu
  • kstars
  • kstars
  • libtess
dict.h
Go to the documentation of this file.
1 /*
2  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice including the dates of first publication and
13  * either this permission notice or a reference to
14  * http://oss.sgi.com/projects/FreeB/
15  * shall be included in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  *
25  * Except as contained in this notice, the name of Silicon Graphics, Inc.
26  * shall not be used in advertising or otherwise to promote the sale, use or
27  * other dealings in this Software without prior written authorization from
28  * Silicon Graphics, Inc.
29  */
30 /*
31 ** Author: Eric Veach, July 1994.
32 **
33 */
34 
35 #ifndef __dict_list_h_
36 #define __dict_list_h_
37 
38 /* Use #define's so that another heap implementation can use this one */
39 
40 #define DictKey DictListKey
41 #define Dict DictList
42 #define DictNode DictListNode
43 
44 #define dictNewDict(frame, leq) __gl_dictListNewDict(frame, leq)
45 #define dictDeleteDict(dict) __gl_dictListDeleteDict(dict)
46 
47 #define dictSearch(dict, key) __gl_dictListSearch(dict, key)
48 #define dictInsert(dict, key) __gl_dictListInsert(dict, key)
49 #define dictInsertBefore(dict, node, key) __gl_dictListInsertBefore(dict, node, key)
50 #define dictDelete(dict, node) __gl_dictListDelete(dict, node)
51 
52 #define dictKey(n) __gl_dictListKey(n)
53 #define dictSucc(n) __gl_dictListSucc(n)
54 #define dictPred(n) __gl_dictListPred(n)
55 #define dictMin(d) __gl_dictListMin(d)
56 #define dictMax(d) __gl_dictListMax(d)
57 
58 typedef void *DictKey;
59 typedef struct Dict Dict;
60 typedef struct DictNode DictNode;
61 
62 Dict *dictNewDict(void *frame, int (*leq)(void *frame, DictKey key1, DictKey key2));
63 
64 void dictDeleteDict(Dict *dict);
65 
66 /* Search returns the node with the smallest key greater than or equal
67  * to the given key. If there is no such key, returns a node whose
68  * key is NULL. Similarly, Succ(Max(d)) has a NULL key, etc.
69  */
70 DictNode *dictSearch(Dict *dict, DictKey key);
71 DictNode *dictInsertBefore(Dict *dict, DictNode *node, DictKey key);
72 void dictDelete(Dict *dict, DictNode *node);
73 
74 #define __gl_dictListKey(n) ((n)->key)
75 #define __gl_dictListSucc(n) ((n)->next)
76 #define __gl_dictListPred(n) ((n)->prev)
77 #define __gl_dictListMin(d) ((d)->head.next)
78 #define __gl_dictListMax(d) ((d)->head.prev)
79 #define __gl_dictListInsert(d, k) (dictInsertBefore((d), &(d)->head, (k)))
80 
81 /*** Private data structures ***/
82 
83 struct DictNode
84 {
85  DictKey key;
86  DictNode *next;
87  DictNode *prev;
88 };
89 
90 struct Dict
91 {
92  DictNode head;
93  void *frame;
94  int (*leq)(void *frame, DictKey key1, DictKey key2);
95 };
96 
97 #endif
dictInsertBefore
#define dictInsertBefore(dict, node, key)
Definition: dict.h:49
DictNode::prev
DictNode * prev
Definition: dict-list.h:87
dictDeleteDict
#define dictDeleteDict(dict)
Definition: dict.h:45
DictNode
Definition: dict-list.h:83
Dict::head
DictNode head
Definition: dict-list.h:92
Dict
Definition: dict-list.h:90
dictSearch
#define dictSearch(dict, key)
Definition: dict.h:47
dictNewDict
#define dictNewDict(frame, leq)
Definition: dict.h:44
DictKey
void * DictKey
Definition: dict-list.h:58
DictNode::next
DictNode * next
Definition: dict-list.h:86
Dict::frame
void * frame
Definition: dict-list.h:93
DictNode::key
DictKey key
Definition: dict-list.h:85
Dict::leq
int(* leq)(void *frame, DictKey key1, DictKey key2)
Definition: dict-list.h:94
DictKey
#define DictKey
Definition: dict.h:40
dictDelete
#define dictDelete(dict, node)
Definition: dict.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 02:11:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

edu API Reference

Skip menu "edu API Reference"
  •     core
  • kstars

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal