4393 /etc/rpc: 100133 and 100169 should be added
[unleashed.git] / usr / src / cmd / sh / hash.h
blobdad7833a8de94a3a7de23cb2f678882ceeda7453
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
24 * Copyright 1990 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
29 /* All Rights Reserved */
31 #ifndef _HASH_H
32 #define _HASH_H
34 #pragma ident "%Z%%M% %I% %E% SMI"
36 * UNIX shell
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 #define HASHZAP 0x03FF
43 #define CDMARK 0x8000
45 #define NOTFOUND 0x0000
46 #define BUILTIN 0x0100
47 #define FUNCTION 0x0200
48 #define COMMAND 0x0400
49 #define REL_COMMAND 0x0800
50 #define PATH_COMMAND 0x1000
51 #define DOT_COMMAND 0x8800 /* CDMARK | REL_COMMAND */
53 #define hashtype(x) (x & 0x1F00)
54 #define hashdata(x) (x & 0x00FF)
57 typedef struct entry
59 unsigned char *key;
60 short data;
61 unsigned char hits;
62 unsigned char cost;
63 struct entry *next;
64 } ENTRY;
66 extern ENTRY *hfind();
67 extern ENTRY *henter();
68 extern void hcreate(void);
70 #ifdef __cplusplus
72 #endif
74 #endif /* !_HASH_H */