#!	/bin/csh -f
#
# Copyright 1993, 1994, 1995 by the Regents of the University of California.
# see the file "Copyright" in the distribution for conditions of use.
#
#
#	consider an individual file
#
set noglob

lp1:
echo ' '
echo File: $8
echo Size: $2 Kilobytes
echo Modified: $3 $4 $5 $6 $7
lp2:
echo ' '
if( $?expanded ) then
	echo "Enter r to remove file, d to display it, e to edit it,"
	echo -n "s to skip to next file, q to quit, ? for help: "
	unset expanded
else
	echo -n "Enter r to remove file, s to skip, ? for help: (r/d/e/q/s/?) "
endif
set x = $<
set y = ( $x )
if( $#y != 1 ) set x = "ERR"
if( $x == "r" ) then
retry:
	echo -n  "Do you really want to remove it (y/n): "
	set a = $<
	set b = ( $x )
	if( $#b != 1 ) set a = "ERR"
	if( $a == "y" ) then
		/bin/rm $8
		exit 0
	else if( $a == "n" ) then
		echo " "
		goto lp2
	else
		echo "*** You must enter "y" or "n"."
		echo " "
		goto retry
	endif
else if( $x == "s" ) then
	exit 0
else if( $x == "q" ) then
	exit 1
else if( $x == "d" ) then
	$PAGER $8
	echo " "
	goto lp1
else if( $x == "e" ) then
	set file = $8
	source $MENU_LIB/edit_file
	goto lp1
else if( $x == "?" ) then
	set expanded
	goto lp2
else
	echo "*** You must enter one of the listed letters."
	set expanded
	goto lp2
endif
