Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#   		 Crown Copyright (c) 1997
2
#   
3
#   This TenDRA(r) Computer Program is subject to Copyright
4
#   owned by the United Kingdom Secretary of State for Defence
5
#   acting through the Defence Evaluation and Research Agency
6
#   (DERA).  It is made available to Recipients with a
7
#   royalty-free licence for its use, reproduction, transfer
8
#   to other parties and amendment for any purpose not excluding
9
#   product development provided that any such use et cetera
10
#   shall be deemed to be acceptance of the following conditions:-
11
#   
12
#       (1) Its Recipients shall ensure that this Notice is
13
#       reproduced upon any copies or amended versions of it;
14
#   
15
#       (2) Any amended version of it shall be clearly marked to
16
#       show both the nature of and the organisation responsible
17
#       for the relevant amendment or amendments;
18
#   
19
#       (3) Its onward transfer from a recipient to another
20
#       party shall be deemed to be that party's acceptance of
21
#       these conditions;
22
#   
23
#       (4) DERA gives no warranty or assurance as to its
24
#       quality or suitability for any purpose and DERA accepts
25
#       no liability whatsoever in relation to any use to which
26
#       it may be put.
27
#
28
+SUBSET "srch_proto" := {
29
    +USE "ansi", "stddef.h", "size_t" (!?) ;
30
 
31
    +FIELD struct entry { char *key ; } ;
32
    +TYPEDEF struct entry ENTRY ;
33
 
34
    +ENUM ACTION := { FIND, ENTER } ;
35
    +ENUM VISIT := { preorder, postorder, endorder, leaf } ;
36
 
37
    +FUNC void hdestroy ( void ) ;
38
    +FUNC ENTRY *hsearch ( ENTRY, ACTION ) ;
39
    +FUNC void *tsearch ( const void *, void **,
40
			  int (*) ( const void *, const void * ) ) ;
41
    +FUNC void *tdelete ( const void *, void **, 
42
			  int (*) ( const void *, const void * ) ) ;
43
    +FUNC void *tfind ( const void *, void * const *,
44
			int (*) ( const void *, const void * ) ) ;
45
    +FUNC void *lfind ( const void *, const void *, size_t *, size_t,
46
			int (*) ( const void *, const void * ) ) ;
47
    +FUNC void *lsearch ( const void *, void *, size_t *, size_t,
48
			  int (*) ( const void *, const void * ) ) ;
49
} ;
50
 
51
+FIELD struct entry { char *data ; } ;
52
+FUNC void twalk ( void *, void (*) ( const void *, VISIT, int ) ) ;
53
+IFNDEF ~building_libs
54
+FUNC int hcreate ( unsigned ) ;
55
+ELSE
56
+FUNC int __old_hcreate | hcreate.1 ( unsigned ) ;
57
%%%
58
#define __old_hcreate( X )	hcreate ( X )
59
%%%
60
+ENDIF
61
 
62
%%%
63
/* This is sufficiently common to put here */
64
#pragma TenDRA begin
65
#pragma TenDRA compatible type : char * == void * : allow
66
%%%