Modified the UGetCursor() routine to return a valid response if the
[xcircuit.git] / spiceparser / names.h
blob94e2ec802572432b87a5ecb74d9adb26e5203c16
1 /********************
2 This file is part of the software library CADLIB written by Conrad Ziesler
3 Copyright 2003, Conrad Ziesler, all rights reserved.
5 *************************
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 ******************/
21 /* names.h, definitions for name storage
22 Conrad Ziesler
25 #ifndef __NAMES_H__
26 #define __NAMES_H__
27 #ifdef __NAMES_PRIVATE__
29 #define NAME_MAGIC 0x52a01250
30 typedef struct name_hash_st
32 int magic;
33 struct name_hash_st *cref,*cstr;
34 int refp;
35 char str[1];
36 }namehash_t;
38 typedef struct names_st
40 namehash_t **cref,**cstr;
41 int avg_refl;
42 int avg_strl;
43 int qtybins;
44 int qtynames;
45 int namebytes;
46 int bytesalloc;
47 }names_t;
48 #else
50 struct names_st;
51 typedef struct names_st names_t;
52 #endif
54 char *names_stats(names_t *nt);
55 char *names_lookup(names_t *nt, int refp);
56 int names_check(names_t *nt, const char *name);
57 void names_add(names_t *nt, int refp, const char *name);
58 names_t *names_new(void);
59 void names_free(names_t *nt);
60 void names_rehash(names_t *nt, int newbins); /* private-ish */
62 #endif