Here is a script I just wrote to allows xved to be used from
the OpenWindows file manager. It would probably be better to get
Poplog to understand Drag n Drop and the ToolTalk process
but that would take me too long to work out.
Enjoy.
Anthony.Worrall@Reading.ac.uk
#!/bin/csh
# This script is used to edit file(s) selected from the OpenWindows
# filemgr using the POPLOG xved editor.
#
# If a pop11 process is running it is sent the signal USR1
# The pop11 handler for this signal should be set as follows
#
# uses sigdefs
# #_IF DEF SIG_USR1
# erase<>compile(%'/tmp/pop11_client.'><poppid%)
# -> sys_signal_handler(SIG_USR1);
# #_ENDIF;
#
# This can be done in the file $poplib/initx.p
#
# The script should probably have some options to allow pop11
# procedures other than edit to be used.
set command = edit
set release = `/usr/bin/uname -r | cut -c1`
# Find a pop11 process running with arguments %x or +xved
if ( $release == 4) then
set pid=`ps xw | egrep '[0-9] pop11' | egrep '[%+]x' | awk -e '{print $1}'`
else
set user = `who am i | awk -e '{print $1}'`
set pid=`ps -fu $user | egrep '[0-9] pop11' | egrep '[%+]x' | awk -e '{print $2}'`
endif
if ($pid != "" ) then
# If a pop11 prosess is found put and edit instruction in a file
# and tell the pop11 process to compile it
/bin/rm /tmp/pop11_client.$pid
foreach file ($*)
echo "$command('$*');" >> /tmp/pop11_client.$pid
end
kill -USR1 $pid
else
# If no pop11 process found start a cmdtool (iconified) which
# then runs xved on the file
cmdtool -Wi pop11 +xved $*
endif
|