cancel.c revision d6083ba53b4a1af428be83ca08578cf93a9038c5
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: cancel.c 147 2006-04-25 16:51:06Z njacobs $ */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <locale.h>
#include <libintl.h>
#include <papi.h>
#include "common.h"
static void
{
char *name;
else
name++;
exit(1);
}
int
int i, exit_code;
} else {
}
exit(0);
"Failed to contact service for %s: %s\n"),
exit(1);
}
&user);
if (exit_code != 0)
break;
}
return (exit_code);
}
int
{
int exit_code = 0;
int c;
(void) textdomain("SUNW_OST_OSCMD");
if (ac == 1)
switch (c) {
case 'E':
break;
case 'u':
break;
default:
}
gettext("Failed to contact service for %s: %s\n"),
exit(1);
}
char *mesg = "cancelled";
if (status == PAPI_NOT_AUTHORIZED) {
exit_code = 1;
exit_code = 1;
}
} else { /* it's a printer */
/* Remove first job from printer */
"ListJobs %s: %s\n"), printer,
exit_code = 1;
}
char jobid[32];
char *jid;
papiJobGetId(*jobs));
}
} else {
/* Purging user's print jobs */
}
}
}
return (exit_code);
}