1N/A/*
1N/A * CDDL HEADER START
1N/A *
1N/A * The contents of this file are subject to the terms of the
1N/A * Common Development and Distribution License, Version 1.0 only
1N/A * (the "License"). You may not use this file except in compliance
1N/A * with the License.
1N/A *
1N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A * or http://www.opensolaris.org/os/licensing.
1N/A * See the License for the specific language governing permissions
1N/A * and limitations under the License.
1N/A *
1N/A * When distributing Covered Code, include this CDDL HEADER in each
1N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A * If applicable, add the following below this CDDL HEADER, with the
1N/A * fields enclosed by brackets "[]" replaced with your own identifying
1N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1N/A *
1N/A * CDDL HEADER END
1N/A */
1N/A/*
1N/A * Copyright (c) 1999 by Sun Microsystems, Inc.
1N/A * All rights reserved.
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A/*
1N/A * Utils.xs contains XS wrappers for utility functions needed initially by
1N/A * Sun::Solaris::Kstat, but that should prove generally useful as well.
1N/A */
1N/A
1N/A/* Solaris includes */
1N/A#include <libgen.h>
1N/A#include <libintl.h>
1N/A
1N/A/* Perl XS includes */
1N/A#include "EXTERN.h"
1N/A#include "perl.h"
1N/A#include "XSUB.h"
1N/A
1N/A/*
1N/A * The XS code exported to perl is below here. Note that the XS preprocessor
1N/A * has its own commenting syntax, so all comments from this point on are in
1N/A * that form.
1N/A */
1N/A
1N/AMODULE = Sun::Solaris::Utils PACKAGE = Sun::Solaris::Utils
1N/APROTOTYPES: ENABLE
1N/A
1N/A #
1N/A # See gmatch(3GEN)
1N/A #
1N/A
1N/Aint
1N/Agmatch(str, pattern)
1N/A char *str;
1N/A char *pattern;
1N/A
1N/A #
1N/A # See gettext(3C)
1N/A #
1N/A
1N/Achar *
1N/Agettext(msgid)
1N/A char *msgid
1N/A
1N/A #
1N/A # See dcgettext(3C)
1N/A #
1N/A
1N/Achar *
1N/Adcgettext(domainname, msgid, category)
1N/A char *domainname
1N/A char *msgid
1N/A int category
1N/A
1N/A #
1N/A # See dgettext(3C)
1N/A #
1N/A
1N/Achar *
1N/Adgettext(domainname, msgid)
1N/A char *domainname
1N/A char *msgid
1N/A
1N/A #
1N/A # See textdomain(3C)
1N/A #
1N/A
1N/Achar *
1N/Atextdomain(domain)
1N/A char *domain
1N/A
1N/A #
1N/A # See bindtextdomain(3C)
1N/A #
1N/A
1N/Achar *
1N/Abindtextdomain(domain, dirname)
1N/A char *domain
1N/A char *dirname