return to first page linux journal archive
keywordscontents

Listing 7. DtChmod Command-line Action

#!/usr/dt/bin/dtksh
chmodCB()
{
DtActionInvoke $TOPLEVEL DtChmod `' `' `' True \
	NULL "FILE" "$FILE" "FILE" "$MODE"
}
main()
{
XtInitialize TOPLEVEL dtChmod DtChmod "$@"
DtDbLoad
XmCreateMessageDialog CHMOD $TOPLEVEL motd \
	dialogTitle:"DtChmod" \
	helpLabelString:"Chmod" \
	messageString:"$(print Chmod $FILE to $MODE)"
XmMessageBoxGetChild OK $CHMOD DIALOG_OK_BUTTON
XtUnmanageChild $OK
XtAddCallback $CHMOD helpCallback chmodCB
XtAddCallback $CHMOD cancelCallback exit
XtManageChild $CHMOD
XtMainLoop
}
MODE=$1
FILE=$2
main