1*753d2d2eSraf /* 2*753d2d2eSraf * CDDL HEADER START 3*753d2d2eSraf * 4*753d2d2eSraf * The contents of this file are subject to the terms of the 5*753d2d2eSraf * Common Development and Distribution License, Version 1.0 only 6*753d2d2eSraf * (the "License"). You may not use this file except in compliance 7*753d2d2eSraf * with the License. 8*753d2d2eSraf * 9*753d2d2eSraf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*753d2d2eSraf * or http://www.opensolaris.org/os/licensing. 11*753d2d2eSraf * See the License for the specific language governing permissions 12*753d2d2eSraf * and limitations under the License. 13*753d2d2eSraf * 14*753d2d2eSraf * When distributing Covered Code, include this CDDL HEADER in each 15*753d2d2eSraf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*753d2d2eSraf * If applicable, add the following below this CDDL HEADER, with the 17*753d2d2eSraf * fields enclosed by brackets "[]" replaced with your own identifying 18*753d2d2eSraf * information: Portions Copyright [yyyy] [name of copyright owner] 19*753d2d2eSraf * 20*753d2d2eSraf * CDDL HEADER END 21*753d2d2eSraf */ 22*753d2d2eSraf /* 23*753d2d2eSraf * Copyright (c) 1997-1999 by Sun Microsystems, Inc. 24*753d2d2eSraf * All rights reserved. 25*753d2d2eSraf */ 26*753d2d2eSraf 27*753d2d2eSraf #ifndef _UTIL_H 28*753d2d2eSraf #define _UTIL_H 29*753d2d2eSraf 30*753d2d2eSraf #pragma ident "%Z%%M% %I% %E% SMI" 31*753d2d2eSraf 32*753d2d2eSraf 33*753d2d2eSraf #ifdef __cplusplus 34*753d2d2eSraf extern "C" { 35*753d2d2eSraf #endif 36*753d2d2eSraf 37*753d2d2eSraf /* String tables */ 38*753d2d2eSraf typedef struct table_head_t { 39*753d2d2eSraf int nelem; 40*753d2d2eSraf int used; 41*753d2d2eSraf char *elements[1]; /* Actually elements[nelem] */ 42*753d2d2eSraf } table_t; 43*753d2d2eSraf 44*753d2d2eSraf 45*753d2d2eSraf /* Debugging information */ 46*753d2d2eSraf extern void print_metainfo(const Meta_info *); 47*753d2d2eSraf extern void print_translatorinfo(const Translator_info *); 48*753d2d2eSraf 49*753d2d2eSraf extern char *get_string_table(table_t *, int); 50*753d2d2eSraf extern table_t *add_string_table(table_t *, char *); 51*753d2d2eSraf extern table_t *create_string_table(int); 52*753d2d2eSraf extern table_t *free_string_table(table_t *); 53*753d2d2eSraf extern int in_string_table(table_t *, char *); 54*753d2d2eSraf extern int in_string_set(char *, char *); 55*753d2d2eSraf extern void print_string_table(table_t *); 56*753d2d2eSraf extern void sort_string_table(table_t *); 57*753d2d2eSraf 58*753d2d2eSraf /* Generic parsing of strings */ 59*753d2d2eSraf extern char *strnormalize(char *); 60*753d2d2eSraf extern char *strtrim(char *); 61*753d2d2eSraf extern char *strlower(char *); 62*753d2d2eSraf extern char *strset(char *, char *); 63*753d2d2eSraf extern char *strend(char *); 64*753d2d2eSraf extern char *lastspace(char *); 65*753d2d2eSraf extern char *skipb(char *); 66*753d2d2eSraf extern char *nextb(char *); 67*753d2d2eSraf extern char *skipsep(char *); 68*753d2d2eSraf extern char *nextsep(char *); 69*753d2d2eSraf extern char *nextsep2(char *); 70*753d2d2eSraf extern char *objectname(char *); 71*753d2d2eSraf 72*753d2d2eSraf #ifdef __cplusplus 73*753d2d2eSraf } 74*753d2d2eSraf #endif 75*753d2d2eSraf 76*753d2d2eSraf #endif /* _UTIL_H */ 77