Form.find revision 7c478bd95313f5f23a4c958a745db2134aa03244
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */
#
# 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
# or http://www.opensolaris.org/os/licensing.
# 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
#
form=Find `pathconv -t -v "${ARG1:-$OPWD}"`
init=`regex -v "${ARG1:-$OPWD}" '^/$' &&
message -f "Can not invoke the \"find\" command from root (/)." &&
set -l RETVAL=false || set -l RETVAL=true`$RETVAL
help=OPEN TEXT OBJECTS/Text.h "$TITLE" T.hfind"$ITEM"
begrow=any
begcol=any
done=`echo "${F4}" | tr -d " " | set -l NF4`OPEN MENU OBJECTS/Menu.find "${ARG1:-$OPWD}" "$F1" "$F2" "$F3" "$NF4"
name=Name:
nrow=0
ncol=5
frow=0
fcol=11
flen=16
rows=1
columns=16
scroll=true
lininfo=`set -l TITLE="Name" -l ITEM=1; message -f "Enter the name of a file. Press SAVE when you complete the form."`
value=const *
valid=`regex -v "${F1}" '^$' false '^.+$' true`
name=Type:
nrow=1
ncol=5
frow=1
fcol=11
flen=16
rows=1
columns=16
lininfo=`set -l TITLE="Type" -l ITEM=2; message -f "Press CHOICES to select type. Press SAVE when you complete the form."`
rmenu=const { Any `regex '^.* (.*)$0$' '$m0' < $OASYS/info/OH/externals/allobjs` }
value=const Any
valid=`regex -v "$F2" '\*' false '^[aA][nN][yY]$' || regex "^.* $F2\$" < $OASYS/info/OH/externals/allobjs`
name=Owner:
nrow=2
ncol=4
frow=2
fcol=11
flen=16
rows=1
columns=8
lininfo=`set -l TITLE="Owner" -l ITEM=3; message -f "Press CHOICES to select owner. Press SAVE when you complete the form."`
rmenu=const { `regex '^([^:]*)$0:' '$m0' < /etc/passwd ` "Any" }
valid=`regex -v "$F3" '^[aA][nN][yY]$' || regex "^$F3:" < /etc/passwd`
value=const Any
name=Age:
nrow=3
ncol=6
frow=3
fcol=11
flen=16
rows=1
columns=11
lininfo=`set -l TITLE="Age" -l ITEM=4; message -f "Enter a number or range of days. Press SAVE when you complete the form."`
valid=`regex -v "$F4"
'^ *[><]{0,1} *[0-9]+$' 'true'
'^ *([0-9]+)$0 *- *([0-9]+)$1$' '$m0 -le $m1'
'^ *([0-9]+)$0 *\.\. *([0-9]+)$1$' '$m0 -le $m1'
'^ *[aA][nN][yY]$' 'true'
'^.*$' 'false' | set -l EXPR;
if [ ( "${EXPR}" = "true" ) -o ( "${EXPR}" = "false" ) ];
then
set -l MSG="Input is not valid";
echo ${EXPR};
else
if [ ${EXPR} ];
then
echo true;
else
set -l MSG="Range values must be in increasing order";
echo false;
fi;
fi`
value=const Any
invalidmsg="${MSG}"
name=RESET
button=8
action=reset