Jspice3
ftegraph.h File Reference
#include "fteconst.h"
#include "ftedata.h"
Include dependency graph for ftegraph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  graph
 
struct  graph::_keyed
 
struct  request
 
struct  response
 

Macros

#define NUMCOLORS   32
 
#define GR_PLOT   0
 
#define GR_GRAF   1
 
#define GR_MPLT   2
 
#define GR_SCED   3
 
#define NEWGRAPH   (GRAPH *) calloc(1, sizeof(GRAPH))
 
#define rnd(x)   (int) ((x)+0.5)
 

Typedefs

typedef char * GRDATA
 
typedef struct graph GRAPH
 
typedef struct request REQUEST
 
typedef struct response RESPONSE
 

Enumerations

Functions

GRAPHNewGraph ()
 
GRAPHFindGraph ()
 
GRAPHCopyGraph ()
 
int DestroyGraph ()
 
void FreeGraphs ()
 
void SetGraphContext ()
 
void PushGraphContext ()
 
void PopGraphContext ()
 

Variables

GRAPHcurrentgraph
 
int numgraphcxsw
 

Macro Definition Documentation

#define GR_GRAF   1

Definition at line 21 of file ftegraph.h.

#define GR_MPLT   2

Definition at line 22 of file ftegraph.h.

#define GR_PLOT   0

Definition at line 20 of file ftegraph.h.

#define GR_SCED   3

Definition at line 23 of file ftegraph.h.

#define NEWGRAPH   (GRAPH *) calloc(1, sizeof(GRAPH))

Definition at line 151 of file ftegraph.h.

#define NUMCOLORS   32

Definition at line 18 of file ftegraph.h.

#define rnd (   x)    (int) ((x)+0.5)

Definition at line 203 of file ftegraph.h.

Typedef Documentation

typedef struct graph GRAPH
typedef char* GRDATA

Definition at line 26 of file ftegraph.h.

typedef struct request REQUEST
typedef struct response RESPONSE

Enumeration Type Documentation

enum OPTION
Enumerator
error_option 
button_option 
char_option 
click_option 
point_option 
checkup_option 

Definition at line 177 of file ftegraph.h.

177  {
178  error_option, /* a reply option only */
179  button_option, /* get a button press */
180  char_option, /* get a char */
181  click_option, /* point at a widget */
182  point_option, /* get a char or button, return coords */
183  checkup_option /* see if events in queue */
184 } OPTION;
OPTION
Definition: ftegraph.h:177

Function Documentation

GRAPH* CopyGraph ( )
int DestroyGraph ( )
GRAPH* FindGraph ( )
void FreeGraphs ( )

Definition at line 208 of file graphdb.c.

211 {
212  GBUCKET *gbucket;
213  LISTGRAPH *list, *deadl;
214 
215  for (gbucket = GBucket; gbucket < &GBucket[NUMGBUCKETS]; gbucket++) {
216  list = gbucket->list;
217  while (list) {
218  deadl = list;
219  list = list->next;
220  txfree((char*)deadl);
221  }
222  }
223 }
static GBUCKET GBucket[NUMGBUCKETS]
Definition: graphdb.c:47
#define NUMGBUCKETS
Definition: graphdb.c:40
struct listgraph * next
Definition: graphdb.c:36
void txfree()
Definition: dir.c:53
LISTGRAPH * list
Definition: graphdb.c:43
GRAPH* NewGraph ( )

Definition at line 59 of file graphdb.c.

62 {
63 
64  GRAPH *pgraph;
65  LISTGRAPH *list;
66  int BucketId = RunningId % NUMGBUCKETS;
67 
68  if (!(list = NEWLISTGRAPH)) {
69  internalerror("can't allocate a listgraph");
70  return ((GRAPH *) NULL);
71  }
72 
73  pgraph = &list->graph;
74  SETGRAPH(pgraph, RunningId);
75 
76  if (!GBucket[BucketId].list) {
77  GBucket[BucketId].list = list;
78  }
79  else {
80  /* insert at front of current list */
81  list->next = GBucket[BucketId].list;
82  GBucket[BucketId].list = list;
83  }
84 
85  RunningId++ ;
86 
87  return (pgraph);
88 
89 }
static GBUCKET GBucket[NUMGBUCKETS]
Definition: graphdb.c:47
GRAPH graph
Definition: graphdb.c:35
#define SETGRAPH(pgraph, id)
Definition: graphdb.c:53
internalerror(char *message)
Definition: error.c:91
#define NUMGBUCKETS
Definition: graphdb.c:40
struct listgraph * next
Definition: graphdb.c:36
#define NEWLISTGRAPH
Definition: graphdb.c:38
Definition: ftegraph.h:29
Definition: dir.c:53
#define NULL
Definition: graphdb.c:17
LISTGRAPH * list
Definition: graphdb.c:43
static RunningId
Definition: graphdb.c:50
void PopGraphContext ( )

Definition at line 270 of file graphdb.c.

272 {
273  GCSTACK *dead;
274 
276  dead = gcstacktop;
278  txfree((char*)dead);
279  numgraphcxsw++;
280 }
GRAPH * currentgraph
Definition: graphdb.c:21
int numgraphcxsw
Definition: graphdb.c:24
struct gcstack * next
Definition: graphdb.c:237
GCSTACK * gcstacktop
Definition: graphdb.c:239
void txfree()
GRAPH * pgraph
Definition: graphdb.c:236
void PushGraphContext ( )
void SetGraphContext ( )

Variable Documentation

GRAPH* currentgraph

Definition at line 21 of file graphdb.c.

int numgraphcxsw

Definition at line 24 of file graphdb.c.