1 /* 2 * CDDL HEADER START 3 * 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. 8 * 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. 13 * 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] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1999 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 /* 30 * Utils.xs contains XS wrappers for utility functions needed initially by 31 * Sun::Solaris::Kstat, but that should prove generally useful as well. 32 */ 33 34 /* Solaris includes */ 35 #include <libgen.h> 36 #include <libintl.h> 37 38 /* Perl XS includes */ 39 #include "EXTERN.h" 40 #include "perl.h" 41 #include "XSUB.h" 42 43 /* 44 * The XS code exported to perl is below here. Note that the XS preprocessor 45 * has its own commenting syntax, so all comments from this point on are in 46 * that form. 47 */ 48 49 MODULE = Sun::Solaris::Utils PACKAGE = Sun::Solaris::Utils 50 PROTOTYPES: ENABLE 51 52 # 53 # See gmatch(3GEN) 54 # 55 56 int 57 gmatch(str, pattern) 58 char *str; 59 char *pattern; 60 61 # 62 # See gettext(3C) 63 # 64 65 char * 66 gettext(msgid) 67 char *msgid 68 69 # 70 # See dcgettext(3C) 71 # 72 73 char * 74 dcgettext(domainname, msgid, category) 75 char *domainname 76 char *msgid 77 int category 78 79 # 80 # See dgettext(3C) 81 # 82 83 char * 84 dgettext(domainname, msgid) 85 char *domainname 86 char *msgid 87 88 # 89 # See textdomain(3C) 90 # 91 92 char * 93 textdomain(domain) 94 char *domain 95 96 # 97 # See bindtextdomain(3C) 98 # 99 100 char * 101 bindtextdomain(domain, dirname) 102 char *domain 103 char *dirname 104