8158 Want named threads API
[unleashed.git] / usr / src / cmd / mdb / common / mdb / mdb_string.h
blobd07b9a48daeffe2f5b6d1791e30435c3f90da097
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
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _MDB_STRING_H
28 #define _MDB_STRING_H
30 #include <sys/types.h>
31 #include <strings.h>
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 #define NTOS_UPCASE 0x1 /* Use upper-case hexadecimal digits */
38 #define NTOS_UNSIGNED 0x2 /* Value is meant to be unsigned */
39 #define NTOS_SIGNPOS 0x4 /* Prefix positive values with sign '+' */
40 #define NTOS_SHOWBASE 0x8 /* Show base under appropriate circumstances */
42 extern const char *numtostr(uintmax_t, int, uint_t);
43 extern uintmax_t mdb_strtonum(const char *, int);
44 extern ulong_t strntoul(const char *, size_t, int);
45 extern int strisnum(const char *);
46 extern int strisbasenum(const char *);
47 extern int strtoi(const char *);
49 extern char *strdup(const char *);
50 extern char *strndup(const char *, size_t);
51 extern void strfree(char *);
53 extern size_t stresc2chr(char *);
54 extern char *strchr2esc(const char *, size_t);
55 extern char *strchr2adb(const char *, size_t);
57 extern char *strnchr(const char *, int, size_t);
59 extern char *strsplit(char *, char);
60 extern char *strrsplit(char *, char);
61 extern const char *strnpbrk(const char *, const char *, size_t);
62 extern char *strabbr(char *, size_t);
64 extern const char *strbasename(const char *);
65 extern char *strdirname(char *);
67 extern const char *strbadid(const char *);
68 extern int strisprint(const char *);
70 extern char *mdb_inet_ntop(int, const void *, char *, size_t);
72 #ifdef __cplusplus
74 #endif
76 #endif /* _MDB_STRING_H */