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
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]
25 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 %#pragma ident "%Z%%M% %I% %E% SMI"
32 % /* A 'counted' string. */
40 #if RPC_HDR || RPC_XDR
54 %/* Constructor: creates item using given character sequence and length */
55 % item( char* str, int len);
57 %/* Constructor: creates item by copying given item */
60 %/* Constructor: creates empty item (zero length and null value). */
61 % item() {len = 0; value = NULL;}
63 %/* Destructor: recover space occupied by characters and delete item. */
64 % ~item() {delete value;}
66 %/* Equality test. 'casein' TRUE means case insensitive test. */
67 % bool_t equal( item *, bool_t casein = FALSE );
69 %/* Equality test. 'casein' TRUE means case insensitive test. */
70 % bool_t equal( char *, int, bool_t casein = FALSE );
72 %/* Assignment: update item by setting pointers. No space is allocated. */
73 % void update( char* str, int n) {len = n; value = str;}
75 %/* Return contents of item. */
76 % void get_value( char** s, int * n ) { *s = value; *n=len;}
78 %/* Prints contents of item to stdout */
81 %/* Return hash value. 'casein' TRUE means case insensitive test. */
82 % unsigned int get_hashval( bool_t casein = FALSE );
88 %#endif /* _DB_ITEM_H */