1 //%% (c) Copyright 1993, 1994 Hewlett-Packard Company
2 //%% (c) Copyright 1993, 1994 International Business Machines Corp.
3 //%% (c) Copyright 1993, 1994 Sun Microsystems, Inc.
4 //%% (c) Copyright 1993, 1994 Novell, Inc.
5 //%% $XConsortium: ttrm.C /main/3 1995/10/20 16:37:34 rswiston $
6 /* @(#)ttrm.C 1.12 93/07/30
7 * ttrm.cc - Link Service/ToolTalk wrapper for rm(1).
9 * Copyright (c) 1990 by Sun Microsystems, Inc.
15 #include <util/copyright.h>
16 #include <tt_options.h>
26 static char PatchID[] = "Patch Id: 100626_03.";
27 static int Patch_ID100626_03;
34 main(int argc, char **argv)
36 Tt_status tterr = TT_OK;
37 remover *ttrm = new remover( argv[0] );
39 setlocale( LC_ALL, "" );
40 ttrm->parse_args( argc, argv );
41 tterr = ttrm->open_tt();
43 if (ttrm->tt_opened()) {
44 tterr = ttrm->do_ttrm();
46 if ( ttrm->should_rm()
47 && ((tterr <= TT_WRN_LAST) || ttrm->force()))
49 int err = ttrm->do_rm();
51 (void)ttrm->close_tt();
56 (void)ttrm->close_tt();
58 if ((tterr > TT_WRN_LAST) && (! ttrm->force())) {