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]
23 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SORT_FIELDS_H
28 #define _SORT_FIELDS_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
46 #include "statistics.h"
50 #define FCV_REALLOC 0x1
53 #define INITIAL_COLLATION_SIZE 1024
55 #define COLL_NONUNIQUE 0x0
56 #define COLL_UNIQUE 0x1
57 #define COLL_DATA_ONLY 0x2
58 #define COLL_REVERSE 0x4
60 extern void field_initialize(sort_t
*);
62 extern field_t
*field_new(sort_t
*);
63 extern void field_delete(field_t
*);
64 extern void field_add_to_chain(field_t
**, field_t
*);
65 extern void field_print(field_t
*);
67 extern ssize_t
field_convert_alpha(field_t
*, line_rec_t
*, vchar_t
,
68 ssize_t
, ssize_t
, ssize_t
);
69 extern ssize_t
field_convert_alpha_simple(field_t
*, line_rec_t
*, vchar_t
,
70 ssize_t
, ssize_t
, ssize_t
);
71 extern ssize_t
field_convert_month(field_t
*, line_rec_t
*, vchar_t
,
72 ssize_t
, ssize_t
, ssize_t
);
73 extern ssize_t
field_convert_numeric(field_t
*, line_rec_t
*, vchar_t
,
74 ssize_t
, ssize_t
, ssize_t
);
76 extern int collated(line_rec_t
*, line_rec_t
*, ssize_t
, flag_t
);
77 extern ssize_t
field_convert(field_t
*, line_rec_t
*, flag_t
, vchar_t
);
79 extern ssize_t
field_convert_alpha_wide(field_t
*, line_rec_t
*, vchar_t
,
80 ssize_t
, ssize_t
, ssize_t
);
81 extern ssize_t
field_convert_month_wide(field_t
*, line_rec_t
*, vchar_t
,
82 ssize_t
, ssize_t
, ssize_t
);
83 extern ssize_t
field_convert_numeric_wide(field_t
*, line_rec_t
*, vchar_t
,
84 ssize_t
, ssize_t
, ssize_t
);
86 extern int collated_wide(line_rec_t
*, line_rec_t
*, ssize_t
, flag_t
);
87 extern ssize_t
field_convert_wide(field_t
*, line_rec_t
*, flag_t
, vchar_t
);
93 #endif /* _SORT_FIELDS_H */