MYSHELL XCOMM XTEXT.CSH -- Startup xtext version of the ximtool program XCOMM XCOMM Eric Mandel 12/29/93 XCOMM set noglob XCOMM initialize SAORD variables if ( $?SAORD_ROOT == 0 ) then setenv SAORD_ROOT HERE endif if ( -e ${SAORD_ROOT}/xpa1 ) then setenv XPA_VERSION 1 else setenv XPA_VERSION 2 endif if ( $?SAORD_BIN == 0 ) then setenv SAORD_BIN ${SAORD_ROOT}/bin.`${SAORD_ROOT}/getarch` endif if ( $?SAORD_TMPDIR == 0 ) then setenv SAORD_TMPDIR /tmp endif setenv SAORD_VERSION "`cat ${SAORD_ROOT}/VERSION`" XCOMM end of SAORD initialization XCOMM This initialization variable was used for older X programs if ( $?SAORD_GUIFLAVOR == 0 ) setenv SAORD_GUIFLAVOR DEFAULT XCOMM make sure we have a program if ( $?XTEXTEXE == 0 ) then setenv XTEXTEXE ${SAORD_BIN}/XText else echo "Using alternate XTEXT program: ${XTEXTEXE}" endif if (! -e $XTEXTEXE) then echo "$XTEXTEXE program could not be found ... exiting ..." exit(1) endif if ( $?XTEXT == 0 ) setenv XTEXT XText if ( $?XTEXT_TITLE == 0 ) setenv XTEXT_TITLE XText if ( $?XTEXT_APPDEFS == 0 ) setenv XTEXT_APPDEFS ${SAORD_ROOT}/app-defaults if ( $?XTEXT_TITLE == 0 ) setenv XTEXT_TITLE XText XCOMM Seed the XRM variable set XRM = "" if ( $?XTEXT_FILE != 0 ) then set XRM = "${XRM} -xrm XTextdisplay*file:${XTEXT_FILE}" endif if ( $?XTEXT_STRING != 0 ) then set XRM = "${XRM} -xrm XTextdisplay*string:${XTEXT_STRING}" endif set n = 1 while ("$n" <= "$#argv") if ( "$argv[$n]" == "-echo" ) set echo if ( "$argv[$n]" == "-display" ) then @ n++ setenv DISPLAY "$argv[$n]" endif if ( "$argv[$n]" == "-file" ) then @ n++ set XRM = "${XRM} -xrm XTextdisplay*file:$argv[$n]" endif if ( "$argv[$n]" == "-string" ) then @ n++ set XRM = "${XRM} -xrm XTextdisplay*string:$argv[$n]" endif if ( "$argv[$n]" == "-title" ) then @ n++ setenv XTEXT "$argv[$n]" setenv XTEXT_TITLE "$XTEXT" endif if ( "$argv[$n]" == "-xrm" ) then @ n++ set XRM = "${XRM} -xrm $argv[$n]" endif if ( "$argv[$n]" == "-b" || "$argv[$n]" == "-beautiful" ) then setenv SAORD_GUIFLAVOR BEAUTIFUL endif if ( "$argv[$n]" == "-bland" ) then setenv SAORD_GUIFLAVOR BLAND endif @ n++ end XCOMM Add the icon title set XRM = "${XRM} -xrm XTextdisplay*iconName:${XTEXT_TITLE}" XCOMM Set up application defaults directory if ($?XFILESEARCHPATH == 0) then setenv XFILESEARCHPATH "${XTEXT_APPDEFS}/%N%S" else setenv XFILESEARCHPATH "${XFILESEARCHPATH}:${XTEXT_APPDEFS}/%N%S" endif if ($?XAPPLRESDIR == 0) then setenv XAPPLRESDIR "${XTEXT_APPDEFS}" else if ( ! -e ${XAPPLRESDIR}/XTextdisplay ) then setenv XAPPLRESDIR "${XTEXT_APPDEFS}" endif endif ${XTEXTEXE} -title ${XTEXT_TITLE} ${XRM}