pkgname.c revision 9781:ccf49524d5dc
1243789Sdim/* 2243789Sdim * CDDL HEADER START 3353358Sdim * 4353358Sdim * The contents of this file are subject to the terms of the 5353358Sdim * Common Development and Distribution License (the "License"). 6243789Sdim * You may not use this file except in compliance with the License. 7243789Sdim * 8243789Sdim * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9341825Sdim * or http://www.opensolaris.org/os/licensing. 10243789Sdim * See the License for the specific language governing permissions 11243789Sdim * and limitations under the License. 12243789Sdim * 13243789Sdim * When distributing Covered Code, include this CDDL HEADER in each 14243789Sdim * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15243789Sdim * If applicable, add the following below this CDDL HEADER, with the 16243789Sdim * fields enclosed by brackets "[]" replaced with your own identifying 17243789Sdim * information: Portions Copyright [yyyy] [name of copyright owner] 18243789Sdim * 19243789Sdim * CDDL HEADER END 20243789Sdim */ 21243789Sdim 22243789Sdim/* 23243789Sdim * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24243789Sdim * Use is subject to license terms. 25243789Sdim */ 26243789Sdim 27243789Sdim/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28243789Sdim/* All Rights Reserved */ 29243789Sdim 30341825Sdim 31341825Sdim#include <stdio.h> 32243789Sdim#include <stdlib.h> 33243789Sdim#include <locale.h> 34341825Sdim#include <libadm.h> 35243789Sdim 36243789Sdimint 37341825Sdimmain(int argc, char *argv[]) 38341825Sdim{ 39243789Sdim (void) setlocale(LC_ALL, ""); 40243789Sdim 41243789Sdim#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ 42341825Sdim#define TEXT_DOMAIN "SYS_TEST" 43243789Sdim#endif 44341825Sdim (void) textdomain(TEXT_DOMAIN); 45341825Sdim 46243789Sdim while (--argc > 0) { 47243789Sdim if (pkgnmchk(argv[argc], (char *)0, 1)) 48341825Sdim exit(1); 49243789Sdim } 50243789Sdim return (0); 51243789Sdim} 52341825Sdim