File: dict.h

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (49 lines) | stat: -rw-r--r-- 1,522 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*  File: dict.h
 *  Author: Richard Durbin (rd@sanger.ac.uk)
 *  Copyright (C) J Thierry-Mieg and R Durbin, 1995
 *-------------------------------------------------------------------
 * This file is part of the ACEDB genome database package, written by
 * 	Richard Durbin (MRC LMB, UK) rd@mrc-lmb.cam.ac.uk, and
 *	Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.cnrs-mop.fr
 *
 * Description: public header for cut-out lex package in dict.c
 * Exported functions:
 * HISTORY:
 * Last edited: Dec  4 14:50 1998 (fw)
 * Created: Tue Jan 17 17:34:44 1995 (rd)
 *-------------------------------------------------------------------
 */

/* @(#)dict.h	1.4 9/16/97 */
#ifndef DICT_H
#define DICT_H

#include "regular.h"

	/* The DICT structure is private to lexhash.c
	   DO NOT LOOK AT OR TOUCH IT IN CLIENT CODE!!
	   Only use it via the subroutine interface.
	*/

typedef struct {
  int dim ;
  int max ;
  Array table ;			/* hash table */
  Array names ;			/* mark in text Stack per name */
  Stack nameText ;		/* holds names themselves */
} DICT ;

DICT *dictCreate (int size) ;
DICT *dictHandleCreate (int size, STORE_HANDLE handle) ;
void uDictDestroy (DICT *dict) ;
#define dictDestroy(_dict) {uDictDestroy(_dict) ; _dict=0;}
BOOL dictFind (DICT *dict, char *s, int *ip) ;
BOOL dictAdd (DICT *dict, char *s, int *ip) ;
char *dictName (DICT *dict, int i) ;
int dictMax (DICT *dict) ;		/* 1 + highest index = number of names */
DICT *dictCopy (DICT *dict) ;

#endif /* ndef DICT_H */
/******* end of file ********/