comb.c revision 355b4669e025ff377602b6fc7caaf30dbc218371
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <assert.h>
#include <signal.h>
#include <string.h>
#include <locale.h>
#include "lp.h"
#include "msgs.h"
#include "oam.h"
#define NULL 0
int
{
char *p;
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
(void) textdomain(TEXT_DOMAIN);
p++;
else
p = argv[0];
return (0);
}
#if defined(__STDC__)
void catch();
#else
int catch();
#endif
void
int argc;
char *argv[];
{
short status;
extern char *optarg;
cleanup();
}
startup();
opterr = 0; /* disable printing of errors by getopt */
for(i = 1; i < argc; i++) {
optind = i;
switch (c) {
case 'r':
optind--;
else
{
}
break;
case '?':
if (optopt == '?')
goto usage;
err_exit();
}
i = optind-1;
} else {
dests++;
/* reject(dest, reason) */
err_exit();
}
err_exit();
}
if (type != R_REJECT_DEST
err_exit();
}
switch (status) {
case MOK:
continue;
case MERRDEST:
break;
case MNODEST:
rc = 1;
break;
case MNOPERM:
rc = 1;
break;
default:
rc = 1;
}
}
}
cleanup();
if(dests == 0) {
exit(1);
}
}
void
int argc;
char *argv[];
{
short status;
cleanup();
}
startup();
for(i = 1; i < argc; i++) {
goto usage;
err_exit();
}
err_exit();
}
err_exit();
}
switch (status) {
case MOK:
continue;
case MERRDEST:
rc = 1;
break;
case MNODEST:
rc = 1;
break;
case MNOPERM:
rc = 1;
break;
default:
rc = 1;
}
}
cleanup();
}
void
int argc;
char *argv[];
{
short status;
cleanup();
}
startup();
for(i = 1; i < argc; i++) {
goto usage;
continue; /* MR bl88-02715 */
}
err_exit();
}
err_exit();
}
err_exit();
}
switch (status) {
case MOK:
continue;
case MERRDEST:
rc = 1;
break;
case MNODEST:
rc = 1;
break;
case MNOPERM:
rc = 1;
break;
default:
}
}
cleanup();
}
#define TRUE 1
#define FALSE 0
void
int argc;
char **argv;
{
extern char *optarg;
cleanup();
}
opterr = 0; /* disable printing of errors by getopt */
switch(c) {
case 'c':
if (cancel)
break;
case 'W':
if (Wait)
break;
case 'r':
optind--;
else
{
}
break;
case '?':
if (optopt == '?')
goto usage;
exit(1);
}
exit(1);
}
startup();
switch (c) {
case 'r':
optind--;
else
break;
case '?':
err_exit();
}
optind--;
} else {
continue; /* MR bl88-02715 */
}
dests++;
/* disable(dest, reason, cancel, Wait); */
err_exit();
}
err_exit();
}
if (type != R_DISABLE_DEST
err_exit();
}
switch (status) {
case MOK:
break;
case MERRDEST:
break;
case MNODEST:
rc = 1;
break;
case MNOPERM:
rc = 1;
break;
default:
rc = 1;
}
}
}
cleanup();
if(dests == 0) {
exit(1);
}
}
void
startup()
{
#if defined(__STDC__)
void catch();
#endif
}
/* catch -- catch signals */
#if defined(__STDC__)
void catch()
#else
int catch()
#endif
{
err_exit();
}
void
cleanup()
{
(void)mclose ();
}
void
err_exit()
{
cleanup();
exit(1);
}