objop.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdarg.h>
#include "wish.h"
#include "typetab.h"
#include "optabdefs.h"
#include "terror.h"
#include "procdefs.h"
#include "moremacros.h"
#include "message.h"
#include "sizes.h"
#define NUM_REQ_OPS (4)
/*
* Caution: MAX_ARGS is defined in other files and should ultimately reside
* in wish.h
*/
#define MAX_ARGS (25)
extern int (*Function[])();
bool isfolder();
int
{
register int argc;
va_list a;
/* decode the args into the argv structure */
#ifdef _DEBUG
#else
;
#endif
va_end(a);
}
int
char *argv[];
{
char *object;
char *bsd_path_to_title();
struct operation **obj_to_oot();
char *path_to_full();
/*
* Test to see if the object is "/" ... if it is
* then specify its objtype (DIRECTORY) since there is
* no "parent" ott in which to determine its type
*/
objtype = "DIRECTORY";
}
;
/* if no object type given, find it by getting ott */
return(FAIL);
}
mess_temp("I do not recognize that kind of object.");
return(FAIL);
}
break;
}
}
if (!found) {
return(FAIL);
}
return(FAIL);
return(FAIL);
}
}
/* gather up the arguments */
case OP_SNG: /* Single, no other args needed than the first */
for (i = 1; argv[i]; i++)
break;
case OP_DIR: /* move-like */
case OP_CUR:
if (argc <= 1) {
return(SUCCESS);
} else {
;
argc--;
} else
;
}
/* first two args are paths, third arg is alternate name */
for (i = 1; argvhold[i]; i++) {
if (i < 2)
else
}
if (argc == 2) {
char *errstr;
return(FAIL);
return(FAIL);
return(SUCCESS);
}
}
break;
case OP_NEW: /* rename-like */
if (argc <= 1) {
return(SUCCESS);
} else {
} else
for (i = 1; argv[i]; i++)
}
break;
default:
for (i = 1; argv[i]; i++)
#ifdef _DEBUG
#endif
break;
}
#ifdef _DEBUG
for (i = 0; argvhold[i]; i++)
#endif
/* execute the function */
case F_NOP:
break;
case F_ILL:
break;
case F_INT:
break;
case F_EXEC:
case F_SHELL:
{
int length;
for (i = 0; argv[i]; i++)
else {
}
}
break;
default:
#ifdef _DEBUG
#endif
break;
}
for (i = 0; argvhold[i]; i++)
return(ret);
}
bool
char *path;
{
struct ott_entry *path_to_ott();
char *bsd_path_to_title();
return(FALSE);
" is not a folder", NULL));
return(FALSE);
}
return(TRUE);
}