From: gordon@maxwell.uwaterloo.ca (Gordon R. Strachan)
Subject: XControl program and terminal emulator 4/4
Reply-To: gordon@maxwell.uwaterloo.ca (Gordon R. Strachan)
Organization: University of Waterloo
Date: Sun, 24 Jan 1993 03:50:09 GMT


# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Gordon R. Strachan <gordon@maxwell> on Sat Jan 23 22:18:43 1993
#
# This archive contains:
#	GenTerm/translators	GenTerm/xterm.par	
#	xcontrol/Command.c	xcontrol/XControl.c	
#	xcontrol/XControl.h	xcontrol/XControl.man	
#	xcontrol/XVi.ad		MANIFEST		
#
# Error checking via wc(1) will be performed.

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

echo x - GenTerm/translators
cat >GenTerm/translators <<'@EOF'
# Valid Special parsers
#
# <Digits(def,sep,n)> : Matches a list of 0 or more digits.  def is the
#                       default value to return if no digits are encountered.
#                       sep is the single character which each integer in its
#                       list.  n is the optional length of each character
# <Int(n)>            : Matches an integer n digits long (if no arg arbitrary
#                       length)
# <Select(c1,c2...cn) : Matches either c1 or c2 or ... cn where c1 etc are
#                       single characters
# <String(n)>         : Matches an arbitrary string of n characters long
# <Upto(c)>           : Matches an arbitrary string upto character c
#
# Valid Translators
# 
# CarriageReturn()             : Move cursor to leftmost column
# CheckModifiers(m,which,p)    : Query the information in the modifier returned
#                                by GetLastButtonEvent.  m is the modifier
#                                value,  which is either "Shift" "Meta" or
#                                "Control".   If the modifier is set, argument
#                                p is set to one, otherwise it is set to 0
# ClearDisplay(top,bottom)     : Clear the display from row top to bottom
# ClearLine(flag)              : Clear line flag=0 clears entire line flag=1
#                                clears from cursor to end of line flag=2
#                                clears from start of line to the cursor
# ClearMemory(which)           : Clears the off screen memory.  which=0, clears
#                                allmemory, which=1 clears memory below the
#                                screen, which=2 clears the memory above the
#                                screen
# ConvertPosition(x,y,r,c)     : The row and columns number which correspond
#                                to the given x and y position are returned in
#                                position r and c.
# DefinePen(n,fr,fg,fb,
#           br,bg,bb)          : Defines the foreground and background colour
#                                of the given pen.  N is the pen number.  fr,
#                                fg,fb are floating point numbers between 0
#                                and 1 which specify the rgb (or hsl)
#                                components of the desired foreground pen.  br,
#                                bg,bb define the colour of the background.
# DeleteCharacters(n)          : Delete the next n characters on the line
# DeleteLines(n)               : This function deletes n lines starting at the
#                                current cursor position
# DownLine(n,wrap)             : Move cursor down n lines.  Screen will be
#                                scrolled up if wrap = 0 if wrap = 1 the cursor
#                                will wrap around to the top.  If wrap = 2
#                                the cursor will stick at the bottom.
# Emit(s1,s2,...)              : Invokes the keybd Callback with the given
#                                arguements as the data
# EscapeCallback(s1,s2...)     : Invoke the esc callback with the given
#                                arguments as the data
# ExecuteFunctionKey(n)        : Causes the terminal to execute the specified
#                                functionkey.
# Fetch(a,b)                   : Get the global variable a and return it in
#                                argument number b
# GetArg(a,b)                  : Get the value of argument number a and return
#                                it in arg b.  i.e. implement and indirect
#                                reference to $a
# GetBottomText(arg)           : Find the last row which has data on it and
#                                return the row number in argument number arg
# GetFont(f)                   : Returns the current font (0 or 1) in argument
#                                number f
# GetLine(r,c,where)           : Get the text on the screen starting at
#                                position (r,c) and put the result in argument
#                                where
# GetLastButtonEvent(b,x,y,m)  : Get information on the last button press
#				 event.  The button number is placed in
#                                position b.  The x and y position is put in
#                                positions x and y.  Finally, the modifiers are
#                                put in position m.
# GetPen(p)                    : Get the number of the current pen and put it
#                                in argument number p
# GetPosition(r,c)             : Get the current cursor position and return the
#                                row number in argument number r and the
#                                column number in argument number c
# GetResource(name,pos)        : Get the value of resource "name" and return
#                                it in argument number pos
# GetScreenSize(r,c)           : Get the current size of the screen and put the
#                                number of rows in paramter r and the number of
#			         columns in parameter c
# GetStringLen(s,p)            : Gets the length of string s and returns it
#                                in parameter p
# GetSubString(s,start,end,p)  : Gets the context of string s from positions
#                                start to end inclusive and returns the result
#                                in parameter p.
# GetTop(arg)          	       : Get the number of the line at the top of the
#                                screen and returns it in argument number arg
# GetTopOfScrollRegion(n,a)    : Finds the top of scroll region n and returns
#                                the result in argument a.  If the scroll
#                                region does not exist then row zero is
#                                returned 
# If(c1,cond,c2,label)         : If the expression c1 cond c2 is true then
#                                branch to the function whose label is label.
# Ignore()                     : do nothing
# InsertLines(n,where)         : Insert n lines.  If where=1 inserts after
#                                current row where=0 inserts before current row
# IntToString(n,len,s)         : Performs an explicit integer to string
#                                conversion.  n is the integer value, len is
#                                the number of digits the final result should
#                                contain.  The number will be truncated or
#                                padded with zeros if needed.  s is the
#                                argument number to return the result in.
# LoadAttribute(r,c)   	       : Set the current attribute to the attribute of
#                                position r and c.  If the position is invalid
#                                load the default attribute
# LoadMapTable(n)              : Changes the current output character mapping
#                                table to the table whose number is given by
#                                n.
# LoadParseTable(name)         : Change the current parse table to the one
#                                specified by name.
# Math(o1,op,o2,r)             : Perform the math operation o1 "op" o2 and put
#                                the result in argument number r.  Valid op's
#                                are "+","-","*", "/" and '%'.  If an error
#                                occures, the result is 0
# MoveCursor(r,c)              : Move cursor to row r and column c
# MoveLeft(n,wrap,roll)        : Move cursor left n columns. Cursor stays at
#                                column zero if wrap = 0 otherwise wraps around
#                                to previous row. If roll=0 the cursor moves
#                                the upper left to the lower right, otherwise
#                                the screen is rolled
# MoveRight(m,wrap,roll)       : Move cursor right n columns.
# NewLine()                    : Move cursor down one line possibly performing
#                                a scroll
# NextTab()                    : Move cursor to next tab stop
# OutputString(s1,s2...)       : Outputs the passed string on the terminal
#                                widget.  The strings are run through the
#                                parser prior to printing.  The input stack
#                                is not re-entrant so this function can cause
#                                confusion on the input stack.
# PreviousTab()                : Moves the cursor to the previous tab stop
# ProgramKey(t,n,lab,str)      : Program a function key.  t is the type of
#                                function to be implemented t=0 is a normal
#                                function, t=1 is a function whose string is
#                                sent to the terminal only and t=2 is a
#                                function whose string is sent but not echoed.
#                                n is the number of the function key. lab is
#                                the label string to be assigned to the key
#                                and str is the string to which the function is
#                                evaluated to
# ProgramMapTable(n,s,e,sp,ep) : Program map table n.  The values in the
#                                range s to e and set to the values sp to ep
# Quit()                       : Cause the parser to quit executing translators
#                                and continue parsing
# Reject()                     : Cause the parser to reject the matched
#                                characters
# SetBlinkMode(flag)           : If flag=1 then the blink attribute is set. 
#                                If it is zero then it is turned off
# SetField(a)                  : Sets the attributes for the current field. The
#                                argument specifies the type of field and can
#                                be 0,1,2 or, 3
# SetFlow(flag)                : If flag is 0 flow control is turned off on
#                                the input file descriptor, otherwise it is
#                                turned on.
# SetFont(arg)                 : Set font to base font if arg=0 and alternate
#                                font if arg = 1
# SetHalfBrightMode(flag)      : Turns on halfbright mode if arg=1, turns off
#                                if flag=1
# SetInsertMode(flag)          : If flag=1, turn on intersert mode.  If flag=0,
#                                turn it off
# SetInverseVideo(flag)        : If flag = 1, reverse foreground and background
#                                colour.  If flag = 0 then set normal
# SetKeyTable(name)            : Change the current key translation table to
#                                the one specified by name.
# SetParseTable(name)          : Change the current parse table to the one
#                                specified by name.
# SetPen(num)                  : Sets the pen number
# SetResource(name,val)        : Set the X resource whose name is "name" to the
#                                value given by val.  Currently only integer
#                                and boolean variables can be set
# SetScrollRegion(s,e,n)       : Set the scroll region.  S and E are the
#                                starting and ending row numbers of the scroll
#                                region. N is the number for the scroll region
# SetUnderLineMode(flag)       : if flag=1 underlining mode is turned on.  If
#                                flag=0, it is turned off
# SetTab(col)                  : Set a tab stop at column col
# SetTop(n)                    : Sets the top of the screen to line n
# SoundBell()                  : Perform a Beep
# Store(a,b)                   : Store argument a as a global storage variable
#                                at position b
# ToAscii(n,s)                 : Returns the ascii character in parameter s
#                                that corresponds to number n
# UpLine(m,wrap)               : Move cursor up n lines.  Screen will be
#                                scrolled up if wrap = 0.  If wrap = 1, the
#                                cursor will wrap around to the bottom.  If
#                                wrap = 2, the cursor will stick to the top.
# UnSetTab(col)                : Unset the tab stop at column col.  If col=-1
#                                all tabs are removed.
@EOF
set `wc -lwc <GenTerm/translators`
if test $1$2$3 != 186158412543
then
	echo ERROR: wc results of GenTerm/translators are $* should be 186 1584 12543
fi

chmod 644 GenTerm/translators


rm -f /tmp/uud$$
(echo "begin 666 /tmp/uud$$\n#;VL*n#6%@x\n \nend" | uudecode) >/dev/null 2>&1
if [ X"`cat /tmp/uud$$ 2>&1`" = Xok ]
then
	unpacker=uudecode
else
	echo Compiling unpacker for non-ascii files
	pwd=`pwd`; cd /tmp
	cat >unpack$$.c <<'EOF'
#include <stdio.h>
#define C (*p++ - ' ' & 077)
main()
{
	int n;
	char buf[128], *p, a,b;

	scanf("begin %o ", &n);
	gets(buf);

	if (freopen(buf, "w", stdout) == NULL) {
		perror(buf);
		exit(1);
	}

	while (gets(p=buf) && (n=C)) {
		while (n>0) {
			a = C;
			if (n-- > 0) putchar(a << 2 | (b=C) >> 4);
			if (n-- > 0) putchar(b << 4 | (a=C) >> 2);
			if (n-- > 0) putchar(a << 6 | C);
		}
	}
	exit(0);
}
EOF
	cc -o unpack$$ unpack$$.c
	rm unpack$$.c
	cd $pwd
	unpacker=/tmp/unpack$$
fi
rm -f /tmp/uud$$

echo x - GenTerm/xterm.par '[non-ascii]'
$unpacker <<'@eof'
begin 644 GenTerm/xterm.par
M(R!4:&ES(&ES('1H92!P87)S92!T86)L92!F;W(@=&AE('AT97)M(&5M=6QAX
M=&]R"B,O*B!(:7-T;W)Y.B @(" @(" @(" @(" @(" @(" @(" @(" @(" @X
M(" @("HO"B,O*B @(" @(" @(%=R:71T96X@8GD@1RX@4BX@4W1R86-H86X@X
M,3DY,B J+PHC"B,O*B @0V]P>7)I9VAT($=O<F1O;B!2+B!3=')A8VAA;B QX
M.3DR("HO"B,O*B @5&AI<R!C;V1E(&ES('!R;W9I9&5D(&%S(&ES+"!N96ETX
M:&5R('1H92!5;FEV97)S:71Y(&]F(%=A=&5R;&]O(&YO<B J+PHC+RH@('1HX
M92!A=71H;W(@:7,@;&EA8FQE(&9O<B!A;GD@9&%M86=E(&-A=7-E9"!B>2!TX
M:&4@=7-E(&]R(&UI<W5S92!O9B!T:&ES("HO"B,O*B @8V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BLB+#,R+#$I.U1O07-CX
M:6DH)#$L,2D[7 H)0V]N=F5R=%!O<VET:6]N*"0R+"0S+#4L-BD[36%T:"@DX
M-2PB*R(L,S,L-2D[36%T:"@D-BPB*R(L,S,L-BD[7 H)5&]!<V-I:2@D-2PRX
M*3M4;T%S8VEI*"0V+#,I.T5M:70H(EY;6TTB+"0Q+"0S+"0R*3M<"B!1=6ETX
M*"DL,GT*?0H*4&%R<V5486)L92A"=71T;VY296QE87-E5')A;G-L871O<BD]X
M"GL*>T9E=&-H*#$S+#$I.TEF*"0Q+"(A/2(L,BPQ*3M<"@E'971,87-T0G5TX
M=&]N179E;G0H,2PR+#,L-"D[36%T:"@S+"(K(BPP+#$I.UP*"4-H96-K36]DX
M:69I97)S*"0T+")3:&EF="(L-2D[0VAE8VM-;V1I9FEE<G,H)#0L(DUO9#$BX
M+#8I.UP*"4-H96-K36]D:69I97)S*"0T+")#;VYT<F]L(BPW*3M-871H*"0UX
M+"(\/"(L,RPU*3M-871H*"0V+"(\/"(L-"PV*3M<"@E-871H*"0W+"(\/"(LX
M-2PW*3M-871H*"0Q+"(K(BPD-2PQ*3M-871H*"0Q+"(K(BPD-BPQ*3M<"@E-X
M871H*"0Q+"(K(BPD-RPQ*3M-871H*"0Q+"(K(BPS,BPQ*3M4;T%S8VEI*"0QX
M+#$I.UP*"4-O;G9E<G10;W-I=&EO;B@D,BPD,RPU+#8I.TUA=&@H)#4L(BLBX
M+#,S+#4I.TUA=&@H)#8L(BLB+#,S+#8I.UP*"51O07-C:6DH)#4L,BD[5&]!X
M<V-I:2@D-BPS*3M%;6ET*")>6UM-(BPD,2PD,RPD,BD[7 H@475I="@I+#%]X
""GUI                                                        X
                                                             X
end
@eof
set `wc -lwc <GenTerm/xterm.par`
if test $1$2$3 != 38757112287
then
	echo ERROR: wc results of GenTerm/xterm.par are $* should be 387 571 12287
fi

chmod 644 GenTerm/xterm.par

echo x - xcontrol/Command.c
cat >xcontrol/Command.c <<'@EOF'
/* Command.c : This function contains the command execution code */
/* History:                                 */
/*         Written by G. R. Strachan 1992 */

/*  Copyright Gordon R. Strachan 1992 */
/*  This code is provided as is, neither the University of Waterloo nor */
/*  the author is liable for any damage caused by the use or misuse of this */
/*  code.  */

/* Permission is granted to copy, use and modify this code provided it is */
/* not sold for profit and the above copyright remains intact. */

#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include "../GenTerm/Pty.h"
#include "XControl.h"

extern void TimeOutCB();
extern struct CallStruct *BuildCallStruct();
extern struct CommandList *ParseString();

/* ExecuteCommandList:  This function executes the list of commands */

ExecuteCommandList(XControl,Commands)

struct XControl *XControl;
struct CommandList *Commands;

{
 struct CommandList *temp;
 int val;

 temp = Commands;

 while(temp != NULL)
  {
   val = (temp->Command)(XControl,temp->Args,temp->NumberArguments);
   
   if(val == XCERROR)
    break;
   temp = temp->Next;
  }
}

/* ArgToInt:  This function locates and returns an integer value from the */
/*  argument list.  If the argument is not in the list then the default */
/*  value is returned. */

ArgToInt(XControl,Args,NumArgs,Position,Default)

struct XControl *XControl;
struct Argument *Args;
int Position;
int Default;

{
 int Value;

 if(Position > NumArgs)
  Value = Default;
 else
  {
   Position--;
   switch(Args[Position].Type)
    {
   case INTEGERARG:
     Value = Args[Position].Value;
     break;
   case STRINGARG:
     Value = atoi(Args[Position].String);
     break;
   case POSITIONARG:
     Value = GetInt(XControl,Args[Position].Value);
     break;
    }
  }
 return(Value);
}

/* ArgToString:  This function locates and returns a string value from the */
/*  argument list.  If the argument is not in the list then the default value*/
/*  is returned. */

ArgToString(XControl,Args,NumArgs,Position,String,Len,Default)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;
int Position;
char *String;
int Len;
char *Default;

{
 char buffer[1024];

 if(Position > NumArgs)
  {
   strncpy(String,Default,Len-1);
  }
 else
  {
   Position--;
   switch(Args[Position].Type)
    {
   case STRINGARG:
     strncpy(String,Args[Position].String,Len-1);
     break;
   case INTEGERARG:
     sprintf(buffer,"%d",Args[Position].Value);
     strncpy(String,buffer,Len-1);
     break;
   case POSITIONARG:
     GetString(XControl,Args[Position].Value,String,Len);
     break;
    }
  }
 String[Len-1] = NULL;
}

/* StoreInt:  This function stores an integer into the positional argument */
/*  list. */

StoreInt(XControl,Position,Value)

struct XControl *XControl;
int Position;
int Value;

{
 char buffer[1024];
 int i;

 if(Position > XControl->NumberPositions)
  {
   XControl->PositionalArgs = (char **) XtRealloc(XControl->PositionalArgs,
						 sizeof(char *)*Position);
   for(i = XControl->NumberPositions; i < Position; i++)
    XControl->PositionalArgs[i] = NULL;
   XControl->NumberPositions = Position;
  }
 Position--;
 sprintf(buffer,"%d",Value);

 if(Position < -0)
  Warning(XControl,"Attempt to access a negative positional argument\n");
 else
  {
   XControl->PositionalArgs[Position] = 
    (char *)XtRealloc(XControl->PositionalArgs[Position],strlen(buffer)+1);
   strcpy(XControl->PositionalArgs[Position],buffer);
  }
}

/* StoreString:  This function stores a string into the positional argument */

StoreString(XControl,Position,Value)

struct XControl *XControl;
int Position;
char *Value;

{
 int i;

 if(Position > XControl->NumberPositions)
  {
   XControl->PositionalArgs = (char **)XtRealloc(XControl->PositionalArgs,
						 sizeof(char *)*Position);
   for(i = XControl->NumberPositions; i < Position; i++)
    XControl->PositionalArgs[i] = NULL;
   XControl->NumberPositions = Position;
  }
 Position--;
 
 if(Position < 0)
  Warning(XControl,"Attempt to access a negative positional argument\n");
 else
  {
   XControl->PositionalArgs[Position] =
    (char *)XtRealloc(XControl->PositionalArgs[Position],strlen(Value)+1);
   strcpy(XControl->PositionalArgs[Position],Value);
  }
}

/* GetInt:  This function gets an integer from the positional argument list */

GetInt(XControl,Position)

struct XControl *XControl;
int Position;

{
 if((Position > XControl->NumberPositions) || (Position < 1))
  return(0);
 else
  return(atoi(XControl->PositionalArgs[Position-1]));
}

/* GetString:  This function gets a character string from the positional */
/*  argument list */

GetString(XControl,Position,String,Len)

struct XControl *XControl;
int Position;
char *String;
int Len;

{
 if((Position > XControl->NumberPositions) || (Position < 1))
  String[0] = NULL;
 else
  strncpy(String,XControl->PositionalArgs[Position-1],Len-1);
 String[Len-1] = NULL;
}

/* Reap:  This function reaps a child process and returns the pid number in */
/*  specified argument.  If no child was reaped, the returned pid is 0 */

int ReapCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);
 int child;

 child = waitpid(-1,NULL,WNOHANG | WUNTRACED);

 if(child >= 0)
  {
   StoreInt(XControl,Pos,child);
   return(XCOKAY);
  }
 else
  return(XCERROR);
}


/* QuitCommand:  This function causes the XControl program to exit.  It does */
/*  not return.  It takes as a argument, the exist status of the program */

QuitCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int status = ArgToInt(XControl,Args,NumArgs,1,0);

 exit(status);
}

/* WriteCommand:  This function writes the passed arguments to the child */
/*  process. */

WriteCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int i;
 char buffer[1024];

 for(i = 1; i <= NumArgs; i++)
  {
   ArgToString(XControl,Args,NumArgs,i,buffer,1024,"");
   PtyWrite(XControl->Terminal,buffer,strlen(buffer));
  }
 return(XCOKAY);
}

/* SignalCommand:  This function sends a signal to the process group attached*/
/*  to the slave side of the pty. */

SignalCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Sig = ArgToInt(XControl,Args,NumArgs,1,-1);

 if((Sig < 0) || (Sig >NSIG))
  return(XCERROR);
 else
  PtySignal(XControl->Terminal,Sig);
 return(XCOKAY);
}

/* PromptCommand:  This command puts up a message dialog to ask the user */
/*  a question.  The user can hit 3 buttons, yes, no or cancel.  The */
/*  arguments for the command are as follows:                        */
/*  Prompt(Title,Prompt,Yes,No,Cancel,YesCommand,NoCommand,CancelCommand) */
/*  Title is the character string to appear in the title bar of the dialog. */
/*  Prompt is the message to be displayed.  Yes,No and Cancel are the */
/*  strings to be placed in the three buttons.  The YesCommand, NoCommand */
/*  and CancelCommands are the commands to be executed when any of the */
/*  buttons are hit. */

PromptCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int n = 0;
 Arg XArgs[20];
 char Title[40];
 char Prompt[40];
 char Affirm[40];
 char Neg[40];
 char Cancel[40];
 char Commands[1024];

 if(XControl->PromptYesCommands != NULL)
  DestroyCommandList(XControl,XControl->PromptYesCommands);
 if(XControl->PromptNoCommands != NULL)
  DestroyCommandList(XControl,XControl->PromptNoCommands);
 if(XControl->PromptCancelCommands != NULL)
  DestroyCommandList(XControl,XControl->PromptCancelCommands);

 ArgToString(XControl,Args,NumArgs,1,Title,40,"Prompt");
 ArgToString(XControl,Args,NumArgs,2,Prompt,40,"Yes or no?");
 ArgToString(XControl,Args,NumArgs,3,Affirm,40,"Yes");
 ArgToString(XControl,Args,NumArgs,4,Neg,40,"No");
 ArgToString(XControl,Args,NumArgs,5,Cancel,40,"Cancel");

 ArgToString(XControl,Args,NumArgs,6,Commands,1024,"");
 XControl->PromptYesCommands = ParseString(XControl,Commands);

 ArgToString(XControl,Args,NumArgs,7,Commands,1024,"");
 XControl->PromptNoCommands = ParseString(XControl,Commands);

 ArgToString(XControl,Args,NumArgs,8,Commands,1024,"");
 XControl->PromptCancelCommands = ParseString(XControl,Commands);

 XtSetArg(XArgs[n],XmNdialogTitle,
	  XmStringCreateLtoR(Title,XmSTRING_DEFAULT_CHARSET)); n++;
 XtSetArg(XArgs[n],XmNmessageString,
	  XmStringCreateLtoR(Prompt,XmSTRING_DEFAULT_CHARSET));n++;
 XtSetArg(XArgs[n],XmNcancelLabelString,
	   XmStringCreateLtoR(Cancel,XmSTRING_DEFAULT_CHARSET)); n++;
 XtSetArg(XArgs[n],XmNhelpLabelString,
	   XmStringCreateLtoR(Neg,XmSTRING_DEFAULT_CHARSET)); n++;
 XtSetArg(XArgs[n],XmNokLabelString,
	   XmStringCreateLtoR(Affirm,XmSTRING_DEFAULT_CHARSET)); n++;
 XtSetArg(XArgs[n],XmNmessageAlignment,XmALIGNMENT_CENTER); n++;
 XtSetValues(XControl->Message,XArgs,n);
 XtManageChild(XControl->Message);

 return(XCOKAY);
}

/* TimeOutCommand:  This command will cause a set of commands to be */
/*  executed after a set period of time has been elapsed.  The timeout can */
/*  be removed with the RemoveTimeOutCommand.  The first argument is the */
/*  duration of the timeout (in milliseconds), the second argument is where */
/*  timeout id is to be stored and the third argument is the command string */
/*  to execute when the timeout expires. */

TimeOutCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Duration = ArgToInt(XControl,Args,NumArgs,1,1000);
 int Pos = ArgToInt(XControl,Args,NumArgs,2,1);
 char buffer[1024];
 XtIntervalId Id;
 struct CommandList *Commands;

 ArgToString(XControl,Args,NumArgs,3,buffer,1024,"");
 Commands = ParseString(XControl,buffer);

 Id = XtAppAddTimeOut(XControl->App,(unsigned long)Duration,TimeOutCB,
		      BuildCallStruct(XControl,Commands,True,True));
 StoreInt(XControl,Pos,(int)Id);
 return(XCOKAY);
}

/* RemoveTimeOutCommand:  This function cancels a pending timeout.  The */
/*  argument is the timeout id number that was saved by the TimeOut command. */
/*  Note that this function can not find the memory allocated by the */
/*  TimeOut command to store the command string in and so we have a small */
/*  memory leak here. */

RemoveTimeOutCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 XtIntervalId Id = (XtIntervalId) ArgToInt(XControl,Args,NumArgs,1,0);

 XtRemoveTimeOut(Id);
 return(XCOKAY);
}

/* SleepCommand:  This function causes the application to sleep for certain */
/*  amount of seconds.  The first argument is the number of seconds to sleep*/
/*  for. */

SleepCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Interval = ArgToInt(XControl,Args,NumArgs,1,1);

 sleep(Interval);

 return(XCOKAY);
}

/* AbortCommand:  This function causes the currently executing command */
/*  string to be aborted. */

AbortCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 return(XCABORT);
}

/* GetEnvCommand: This function gets an environment variable and returns */
/*  the result in a variable.  The first argument is the name of the */
/*  variable to return and the second argument is the position to store it */
/*  in. */

GetEnvCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 char Name[1024];
 char *Value;
 int Pos = ArgToInt(XControl,Args,NumArgs,2,1);

 ArgToString(XControl,Args,NumArgs,1,Name,1024,"");

 Value = (char *) getenv(Name);

 StoreString(XControl,Pos,Value);

 return(XCOKAY);
}

/* SetEnvCommand:  This function sets an environment variable for the current*/
/*  process.  If performed prior to forking the child process, it will be */
/*  inherited by the child. The first argument is the name of the variable */
/*  to set and the second argument is its value. */

SetEnvCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 char Name[80];
 char Value[256];
 char *buffer;

 ArgToString(XControl,Args,NumArgs,1,Name,80,"");
 ArgToString(XControl,Args,NumArgs,2,Value,256,"");
 
 buffer = XtMalloc(strlen(Name) + strlen(Value) + 2);
 strcpy(buffer,Name);
 strcat(buffer,"=");
 strcat(buffer,Value);

 putenv(buffer);

 return(XCOKAY);
}

/* IfCommand:  This function implements a structure if statement. The first */
/*  third arguments are the operands to test.  The second argument is the */
/*  is the boolean operation to perform.  The fourth argument is the command */
/*  list to execute if the boolean expression is true and the fifth argument */
/*  to execute if the boolean expression is false. */

IfCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int op1,op2;
 char Operation[3];
 char Arg1[256],Arg2[256];
 int result = 0;
 char buffer[1024];
 struct CommandList *Commands;

 op1 = ArgToInt(XControl,Args,NumArgs,1,0);
 op2 = ArgToInt(XControl,Args,NumArgs,3,0);
 ArgToString(XControl,Args,NumArgs,2,Operation,3,"");

 if(strcmp(Operation,"==") == 0)
  result = op1 == op2;
 else if(strcmp(Operation,"!=") == 0)
  result = op1 != op2;
 else if(strcmp(Operation,">=") == 0)
  result = op1 >= op2;
 else if(strcmp(Operation,"<=") == 0)
  result = op1 <= op2;
 else if(strcmp(Operation,"<") == 0)
  result = op1 < op2;
 else if(strcmp(Operation,">") == 0)
  result = op1 > op2;
 else if(strcmp(Operation,"%") == 0)
  {
   ArgToString(XControl,Args,NumArgs,1,Arg1,256,"");
   ArgToString(XControl,Args,NumArgs,3,Arg2,256,"");
   result = (strcmp(Arg1,Arg2) == 0);
  }
 else if(strcmp(Operation,"!%") == 0)
  {
   ArgToString(XControl,Args,NumArgs,1,Arg1,256,"");
   ArgToString(XControl,Args,NumArgs,3,Arg2,256,"");
   result = (strcmp(Arg1,Arg2) != 0);
  }
 else
  return(XCERROR);

 if(result)
  ArgToString(XControl,Args,NumArgs,4,buffer,1024,"");
 else
  ArgToString(XControl,Args,NumArgs,5,buffer,1024,"");

 Commands = ParseString(XControl,buffer);
 ExecuteCommandList(XControl,Commands);
 DestroyCommandList(XControl,Commands);

 return(XCOKAY);
}
 
/* GetChildPidCommand:  This function returns the process id of the child */
/*  process it launched.  The argument is the number of the positional */
/*  agument to put the pid into. */

GetChildPidCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);

 StoreInt(XControl,Pos,XControl->ChildPid);

 return(XCOKAY);
}

/* GetPidCommand:  This function returns the process id of this process. */
/*  The argument is the number of the positional argument to put the pid */
/*  into. */

GetPidCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);

 StoreInt(XControl,Pos,getpid());

 return(XCOKAY);
}

/* MathCommand:  This function performs a mathematical operation on the */
/*  passed arguments.  The first and third arguments are the operands while */
/*  the second argument is the operation.  The fourth argument is the number */
/*  of the positional argument to store the result in. */

MathCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 int Op1 = ArgToInt(XControl,Args,NumArgs,1,0);
 int Op2 = ArgToInt(XControl,Args,NumArgs,3,0);
 int Pos = ArgToInt(XControl,Args,NumArgs,4,1);
 int result;
 char Operation[2];

 ArgToString(XControl,Args,NumArgs,2,Operation,2,"");

 switch(Operation[0])
  {
 case '+':
  result = Op1 + Op2;
  break;
 case '-':
  result = Op1 - Op2;
  break;
 case '*':
  result = Op1 * Op2;
  break;
 case '/':
  result = Op1 / Op2;
  break;
 case '%':
  result = Op1 % Op2;
  break;
 case '&':
  result = Op1 & Op2;
  break;
 case '|':
  result = Op1 | Op2;
  break;
 default:
  return(XCERROR);
 }
 
 StoreInt(XControl,Pos,result);
 return(XCOKAY);
}

/* StoreStringCommand:  This function takes the first argument and stores */
/*  it in the positional argument given by the second argument. */

StoreStringCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 char StringVal[1024];
 int Pos;

 ArgToString(XControl,Args,NumArgs,1,StringVal,1024,"");
 Pos = ArgToInt(XControl,Args,NumArgs,2,1);

 StoreString(XControl,Pos,StringVal);

 return(XCOKAY);
}

/* StringCatCommand:  This function concatenates the first two arguments */
/*  and returns the result in the positional argument specified by the third */
/*  argument. */

StringCatCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 char String1[1024];
 char String2[512];
 int Pos;

 ArgToString(XControl,Args,NumArgs,1,String1,512,"");
 ArgToString(XControl,Args,NumArgs,2,String2,512,"");
 Pos = ArgToInt(XControl,Args,NumArgs,3,1);

 strcat(String1,String2);

 StoreString(XControl,Pos,String1);

 return(XCOKAY);
}

/* SaveSessionCommand:  This function save the current program state into */
/*  the session file.  It is used so that the session manager can restart */
/*  us at a later date. It takes no arguments. */

SaveSessionCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Argument *Args;
int NumArgs;

{
 char *SessionFileName;
 char *SessionPathName;
 FILE *SaveFile;
 char *NewArgv[3];
 int NewArgc;
 int Value = XCOKAY;
 int i;

 if(!XvSessionSavePath(XControl->Top,&SessionFileName,&SessionPathName))
  Value = XCERROR;
 else
  {
   if((SaveFile = fopen(SessionFileName,"w")) == NULL)
    Value = XCERROR;
   else
    {
     fprintf(SaveFile,"%s\n",SESSION_HEADER);
     fprintf(SaveFile,"%d\n$%s\n",strlen(XControl->TerminalType),
	     XControl->TerminalType);
     fprintf(SaveFile,"%d\n$%s\n",strlen(XControl->ChildCommand),
	     XControl->ChildCommand);
     fprintf(SaveFile,"%d\n$%s\n",strlen(XControl->ChildCommandArguments),
	     XControl->ChildCommandArguments);
     DumpCommandList(XControl,XControl->StartCommands,SaveFile);
     for(i = 0; i < NSIG; i++)
      DumpCommandList(XControl,XControl->SignalCommands[i],SaveFile);
     DumpCommandList(XControl,XControl->CloseWindowCommands,SaveFile);
     DumpCommandList(XControl,XControl->SaveCommands,SaveFile);
     DumpCommandList(XControl,XControl->EscapeCommands,SaveFile);
     DumpCommandList(XControl,XControl->TopCommands,SaveFile);
     DumpCommandList(XControl,XControl->ResizeCommands,SaveFile);
     DumpCommandList(XControl,XControl->WakeUpCommands,SaveFile);
     DumpCommandList(XControl,XControl->FlowCommands,SaveFile);
     DumpCommandList(XControl,XControl->ParentForkCommands,SaveFile);
     DumpCommandList(XControl,XControl->ChildForkCommands,SaveFile);
     DumpCommandList(XControl,XControl->DropCommands,SaveFile);
     DumpCommandList(XControl,XControl->PromptYesCommands,SaveFile);
     DumpCommandList(XControl,XControl->PromptNoCommands,SaveFile);
     DumpCommandList(XControl,XControl->PromptCancelCommands,SaveFile);
     fclose(SaveFile);
    }
  }

 if(Value == XCOKAY)
  {
   NewArgv[0] = XControl->ProgramName;
   NewArgv[1] = "-session";
   NewArgv[2] = SessionFileName;
   NewArgc = 3;
  }
 else
  {
   NewArgv[0] = XControl->ProgramName;
   NewArgc = 1;
  }
 XSetCommand(XtDisplay(XControl->Top),XtWindow(XControl->Top),NewArgv,NewArgc);

 return(XCOKAY);
}

/* WarningCommand:  This function puts up a warning dialog on the screen. */
/*  Note that this function returns and the command list continues executing*/
/*  while the dialog is still on the screen.  It does not wait until the */
/*  the dialog is acknowledged. */

WarningCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 char buffer[1024];

 ArgToString(XControl,Args,NumArgs,1,buffer,1024,"");
 XWarning(XControl,buffer);

 return(XCOKAY);
}


/* GetDropNumberCommand:  This function gets the number of file types and */
/*  files that was dropped onto us last.  The first argument is the position */
/*  to return the number for file types and the second argument is the */
/*  position to return the file argument. */

GetDropNumberCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int TypePosition = ArgToInt(XControl,Args,NumArgs,1,1);
 int FilePosition = ArgToInt(XControl,Args,NumArgs,2,2);

 StoreInt(XControl,TypePosition,XControl->NumberTypesDropped);
 StoreInt(XControl,FilePosition,XControl->NumberFilesDropped);

 return(XCOKAY);
}

/* GetDropHost:  This function gets the name of the host that the last drop */
/*  came from and puts it into the argument given by the first argument */

GetDropHostCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);

 StoreString(XControl,Pos,XControl->DropFiles[0]);

 return(XCOKAY);
}

/* GetDropType: This function returns the type of specific entry in the last */
/*  drop.  The first argument is the number of the entry to return and the */
/*  second argument is the position to return the value in. */

GetDropTypeCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;
{
 int Which = ArgToInt(XControl,Args,NumArgs,1,1);
 int Pos = ArgToInt(XControl,Args,NumArgs,2,1);

 if((Which > XControl->NumberTypesDropped) || (Which <= 0))
  return(XCERROR);

 StoreString(XControl,Pos,XControl->DropTypes[Which - 1]);
 return(XCOKAY);
}

/* GetDropDirectory:  This function returns the name of the directory that */
/*  drop to place from, if it was specified or a zero length string if not. */
/*  The first argument is the position to put the directory name. */

GetDropDirectoryCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);

 if(strcmp(XControl->DropFiles[1],"-") == 0)
  StoreString(XControl,Pos,"");
 else
  StoreString(XControl,Pos,XControl->DropFiles[1]);

 return(XCOKAY);
}

/* GetDropFile:  This function returns the spefied drop file from the last */
/*  drop.  The first argument is the particular file to return.  The second */
/*  argument is the position to return the result in. */

GetDropFileCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int Which = ArgToInt(XControl,Args,NumArgs,1,1);
 int Pos = ArgToInt(XControl,Args,NumArgs,2,1);

 if((Which > XControl->NumberFilesDropped) || (Which < 0))
  return(XCERROR);
 else
  StoreString(XControl,Pos,XControl->DropFiles[Which+1]);
 return(XCOKAY);
}

/* GetTerminalType:  This function returns the name of the type of terminal */
/*  that is being used.  The first argument is the number of the positional */
/*  where the result is stored. */

GetTerminalTypeCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int Pos = ArgToInt(XControl,Args,NumArgs,1,1);

 StoreString(XControl,Pos,XControl->TerminalType);

 return(XCOKAY);
}

/* GetWindowSize:  This function returns the size of the pty widget in */
/*  rows and columns.  The first argument is the position to store the */
/*  row number in and the second is the position for the column. */

GetWindowSizeCommand(XControl,Args,NumArgs)

struct XControl *XControl;
struct Arguments *Args;
int NumArgs;

{
 int RowPosition = ArgToInt(XControl,Args,NumArgs,1,1);
 int ColPosition = ArgToInt(XControl,Args,NumArgs,2,2);
 int rows,cols;
 Arg XArgs[10];
 int n = 0;

 XtSetArg(XArgs[n],XtNrows,&rows); n++;
 XtSetArg(XArgs[n],XtNcolumns,&cols); n++;
 XtGetValues(XControl->Terminal,XArgs,n);
 
 StoreInt(XControl,RowPosition,rows);
 StoreInt(XControl,ColPosition,cols);

 return(XCOKAY);
}
@EOF
set `wc -lwc <xcontrol/Command.c`
if test $1$2$3 != 933250923854
then
	echo ERROR: wc results of xcontrol/Command.c are $* should be 933 2509 23854
fi

chmod 644 xcontrol/Command.c

echo x - xcontrol/XControl.c
cat >xcontrol/XControl.c <<'@EOF'
/* XControl.c : This file contains the XControl program.  It is X window */
/*  client which is designed to control window dumb program.  It is like */
/*  an hpterm in slave mode only much more intelligent. */
/* History:                                 */
/*         Written by G. R. Strachan 1992 */

/*  Copyright Gordon R. Strachan 1992 */
/*  This code is provided as is, neither the University of Waterloo nor */
/*  the author is liable for any damage caused by the use or misuse of this */
/*  code.  */

/* Permission is granted to copy, use and modify this code provided it is */
/* not sold for profit and the above copyright remains intact. */

#include <stdio.h>
#include <varargs.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#include <X11/Protocols.h>

#include "XControl.h"
#include "Pty.h"

#define XCCommands "CommandList"
#define SigResource(a,b,c,d) a,b,XCCommands,sizeof(struct CommandList *),\
XtOffset(XControlPtr,SignalCommands[(c)]),XtRString,d

extern ReapCommand();
extern QuitCommand();
extern WriteCommand();
extern SignalCommand();
extern PromptCommand();
extern TimeOutCommand();
extern RemoveTimeOutCommand();
extern SleepCommand();
extern AbortCommand();
extern GetEnvCommand();
extern SetEnvCommand();
extern IfCommand();
extern GetChildPidCommand();
extern GetPidCommand();
extern MathCommand();
extern StoreStringCommand();
extern StringCatCommand();
extern SaveSessionCommand();
extern WarningCommand();
extern GetDropNumberCommand();
extern GetDropHostCommand();
extern GetDropTypeCommand();
extern GetDropDirectoryCommand();
extern GetDropFileCommand();
extern GetTerminalTypeCommand();
extern GetWindowSizeCommand();

extern struct CommandList *LoadCommandList();

XtPointer BuildCallStruct();
char **BuildArgList();
void PtyCB();
void KeyCB();
void SignalCB();
void SignalHandler();
void CommandCB();
void PopDownCB();
void TimeOutCB();
char *LoadString();
void ActionCB();
void DropCB();
void ResizeCB();
void RequestCB();

CommandListConverter();

typedef struct XControl *XControlPtr;
extern int errno;

struct FunctionList Functions[]=
{
 {"Reap",ReapCommand},
 {"Quit",QuitCommand},
 {"Write",WriteCommand},
 {"Signal",SignalCommand},
 {"Prompt",PromptCommand},
 {"TimeOut",TimeOutCommand},
 {"RemoveTimeOut",RemoveTimeOutCommand},
 {"Sleep",SleepCommand},
 {"Abort",AbortCommand},
 {"GetEnv",GetEnvCommand},
 {"SetEnv",SetEnvCommand},
 {"If",IfCommand},
 {"GetChildPid",GetChildPidCommand},
 {"GetPid",GetPidCommand},
 {"Math",MathCommand},
 {"StoreString",StoreStringCommand},
 {"StringCat",StringCatCommand},
 {"SaveSession",SaveSessionCommand},
 {"Warning",WarningCommand},
 {"GetDropNumber",GetDropNumberCommand},
 {"GetDropHost",GetDropHostCommand},
 {"GetDropType",GetDropTypeCommand},
 {"GetDropDirectory",GetDropDirectoryCommand},
 {"GetDropFile",GetDropFileCommand},
 {"GetTerminalType",GetTerminalTypeCommand},
 {"GetWindowSize",GetWindowSizeCommand},
 {NULL,NULL},
};

static XtResource resources[] = 
{
 {"startCommands","StartCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,StartCommands),XtRString,NULL},
 {"terminalType","TerminalType",XtRString,sizeof(char *),
   XtOffset(XControlPtr,TerminalType),XtRString,"hpterm"},
 {"childCommand","ChildCommand",XtRString,sizeof(char *),
   XtOffset(XControlPtr,ChildCommand),XtRString,"/bin/csh"},
 {"childArguments","ChildArguments",XtRString,sizeof(char *),
   XtOffset(XControlPtr,ChildCommandArguments),XtRString,NULL},
 {SigResource("SigHangUpCommands","SigHangUpCommands",SIGHUP,NULL)},
 {SigResource("sigInterruptCommands","SigInterruptCommands",SIGINT,NULL)},
 {SigResource("sigQuitCommmands","SigQuitCommands",SIGQUIT,NULL)},
 {SigResource("sigPipeCommands","SigPipeCommands",SIGPIPE,NULL)},
 {SigResource("sigAlarmCommands","SigAlarmCommands",SIGALRM,NULL)},
 {SigResource("sigTermCommands","SigTermCommands",SIGTERM,NULL)},
 {SigResource("sigUsr1Commands","SigUsr1Commands",SIGUSR1,NULL)},
 {SigResource("sigUsr2Commands","SigUsr2Commands",SIGUSR2,NULL)},
 {SigResource("sigChildCommands","SigChildCommands",SIGCHLD,
	      "Reap(1);Quit(1)")},
 {SigResource("sigIOCommands","SigIOCommands",SIGIO,NULL)},
 {SigResource("sigWindowCommands","SigWindowCommands",SIGWINDOW,NULL)},
 {SigResource("sigStopCommands","SigStopCommands",SIGSTOP,NULL)},
 {SigResource("sigContinueCommands","SigContinueCommands",SIGCONT,NULL)},
 {SigResource("sigUrgentCommands","SigUrgentCommands",SIGURG,NULL)},
 {"closeWindowCommands","CloseWindowCommands",XCCommands,
   sizeof(struct CommandList *),XtOffset(XControlPtr,CloseWindowCommands),
    XtRString,"Quit(0)"},
 {"saveCommands","SaveCommands",XCCommands,
   sizeof(struct CommandList *),XtOffset(XControlPtr,SaveCommands),
   XtRString,"SaveSession()"},
 {"topCommands","TopCommands",XCCommands,sizeof(struct CommandList*),
   XtOffset(XControlPtr,TopCommands),XtRString,NULL},
 {"escapeCommands","EscapeCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,EscapeCommands),XtRString,NULL},
 {"resizeCommands","ResizeCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,ResizeCommands),XtRString,NULL},
 {"wakeUpCommands","WakeUpCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,WakeUpCommands),XtRString,NULL},
 {"flowCommands","FlowCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,FlowCommands),XtRString,NULL},
 {"parentForkCommands","ParentForkCommands",XCCommands,
   sizeof(struct CommandList *),XtOffset(XControlPtr,ParentForkCommands),
   XtRString,NULL},
 {"childForkCommands","ChildForkCommands",XCCommands,
   sizeof(struct CommandList *),XtOffset(XControlPtr,ChildForkCommands),
   XtRString,NULL},
 {"dropCommands","DropCommands",XCCommands,sizeof(struct CommandList *),
   XtOffset(XControlPtr,DropCommands),XtRString,NULL},
 {"sessionFile","SessionFile",XtRString,sizeof(char *),
   XtOffset(XControlPtr,SessionFile),XtRString,NULL},
 {"dropZoneType","DropZoneType",XtRString,sizeof(char *),
   XtOffset(XControlPtr,DropZoneType),XtRString,"FileEdit"},
 {"remoteDropsAllowed","RemoteDropsAllowed",XtRBoolean,sizeof(Boolean),
   XtOffset(XControlPtr,RemoteDropsAllowed),XtRImmediate,False},
};

static XrmOptionDescRec options[] =
{
 {"-hpterm","*terminalType",XrmoptionNoArg,"hpterm"},
 {"+hpterm","*terminalType",XrmoptionNoArg,"xterm"},
 {"-xterm","*terminalType",XrmoptionNoArg,"xterm"},
 {"-command","*childCommand",XrmoptionSepArg,NULL},
 {"-arguments","*childArguments",XrmoptionSepArg,NULL},
 {"-session","*sessionFile",XrmoptionSepArg,NULL},
};

char Syntax[] =
"-hpterm\n\
+hpterm\n\
-xterm\n\
-command command_path\n\
-arguments \"child command arguments\"\n\
-session sessionfile\n\
";

static XtConvertArgRec CvtArgs[] =
{
 {XtAddress,(XtPointer) NULL,sizeof(struct XControl *)},
};

static XtActionsRec Actions[]=
{
 {"execute_command",ActionCB},
};

int SigSink;     /* the pipeline signals are written into */
struct XControl XControl;

main(argc,argv)

int argc;
char **argv;

{
 Widget MainWindow;
 Widget Terminal;
 Widget button;
 Arg args[20];
 int n = 0;
 int i;
 Atom DeleteWindow;
 Atom SaveAtom;

 CvtArgs[0].address_id = (XtPointer) &XControl;

 XControl.ProgramName = argv[0];
 XControl.Functions = Functions;
 XControl.NumberPositions = 0;
 XControl.PositionalArgs = NULL;
 
 
 i = strlen(argv[0]);
 while((--i >= 0) && (argv[0][i] != '/'));
 XControl.Top = XtAppInitialize(&(XControl.App),&argv[0][i+1],options,
			       XtNumber(options),&argc,argv,NULL,0,0);
 if(argc != 1)  /* if left over options then there is a mistake */
  {
   Warning(&XControl,"Invalid option %s\n",argv[1]);
   Warning(&XControl,"%s accepts all normal Xt options plus:\n%s",argv[0],
	   Syntax);
   exit(1);
  }

 XtAppAddActions(XControl.App,Actions,XtNumber(Actions));

 XvAppInit(XControl.App,XtDisplay(XControl.Top),argv[0]);
 XvRegisterDropCallback(DropCB);
 XtSetTypeConverter(XtRString,"CommandList",CommandListConverter,&CvtArgs,
		    1,XtCacheAll,NULL);
 XtGetApplicationResources(XControl.Top,&XControl,resources,
			   XtNumber(resources),NULL,0);

 if(XControl.SessionFile != NULL)
  LoadSession(&XControl);

 BuildChildCommand(&XControl);

 SetUpSignals(&XControl,XControl.App);


 MainWindow = XmCreateMainWindow(XControl.Top,"main",args,n);
 XtManageChild(MainWindow);

 Terminal = XtCreateWidget(XControl.TerminalType,ptyWidgetClass,MainWindow,
			   args,n);
 XtManageChild(Terminal);
 XtAddCallback(Terminal,XtNptyCallback,PtyCB,(XtPointer)&XControl);
 XtAddCallback(Terminal,XtNkbdCallback,KeyCB,(XtPointer)&XControl);
 XtAddCallback(Terminal,XtNresizeCallback,ResizeCB,(XtPointer)&XControl);
 XControl.Terminal = Terminal;

 n = 0;
 XControl.Message = XmCreateMessageDialog(MainWindow,"message",args,n);
 XtAddCallback(XControl.Message,XmNokCallback,CommandCB,
	       BuildCallStruct(&XControl,&XControl.PromptYesCommands,False,
			       True));
 XtAddCallback(XControl.Message,XmNcancelCallback,CommandCB,
	       BuildCallStruct(&XControl,&XControl.PromptCancelCommands,
			       False,True));
 XtAddCallback(XControl.Message,XmNhelpCallback,CommandCB,
	       BuildCallStruct(&XControl,&XControl.PromptNoCommands,False,
			       True));
 XtAddCallback(XControl.Message,XmNhelpCallback,PopDownCB,XControl.Message);

 n = 0;
 XtSetArg(args[n],XmNtitle,"Warning!"); n++;
 XControl.Warning = XmCreateWarningDialog(MainWindow,"Error",args,n);
 button = XmMessageBoxGetChild(XControl.Warning,XmDIALOG_CANCEL_BUTTON);
 XtUnmanageChild(button);
 button = XmMessageBoxGetChild(XControl.Warning,XmDIALOG_HELP_BUTTON);
 XtUnmanageChild(button);

 XtRealizeWidget(XControl.Top);

/* we now add call backs to handle any of the functions that have commands */
/* bound to them. */

 if(XControl.CloseWindowCommands != NULL)
  {
   DeleteWindow = XmInternAtom(XtDisplay(XControl.Top),"WM_DELETE_WINDOW",
			       False);
   XmAddWMProtocolCallback(XControl.Top,DeleteWindow,CommandCB,
			   BuildCallStruct(&XControl,
					   XControl.CloseWindowCommands,
					   True,False));
  }
 if(XControl.SaveCommands != NULL)
  {
   SaveAtom = XmInternAtom(XtDisplay(XControl.Top),"WM_SAVE_YOURSELF",False);
   XmAddWMProtocolCallback(XControl.Top,SaveAtom,CommandCB,
			   BuildCallStruct(&XControl,
					   XControl.SaveCommands,
					   True,False));
  }
 if(XControl.ResizeCommands != NULL)
  XtAddCallback(Terminal,XtNresizeCallback,CommandCB,
		BuildCallStruct(&XControl,XControl.ResizeCommands,
				True,False));
 if(XControl.EscapeCommands != NULL)
  XtAddCallback(Terminal,XtNescCallback,CommandCB,
		BuildCallStruct(&XControl,XControl.EscapeCommands,
				True,False));
 if(XControl.WakeUpCommands != NULL)
  XtAddCallback(Terminal,XtNwakeUpCallback,CommandCB,
		BuildCallStruct(&XControl,XControl.WakeUpCommands,
				True,False));
 if(XControl.FlowCommands != NULL)
  XtAddCallback(Terminal,XtNflowCallback,CommandCB,
		BuildCallStruct(&XControl,XControl.FlowCommands,True,False));
 if(XControl.TopCommands != NULL)
  XtAddCallback(Terminal,XtNtopCallback,CommandCB,
		BuildCallStruct(&XControl,XControl.TopCommands,True,False));
 
 if(XControl.CloseWindowCommands != NULL) 
  {   /* these commands will handle the close*/
   n = 0;
   XtSetArg(args[n],XmNdeleteResponse,XmDO_NOTHING); n++;
   XtSetValues(XControl.Top,args,n);
  }

 XtAppMainLoop(XControl.App);
}

Error(va_alist)

va_dcl
{
 va_list args;
 struct XControl *XControl;
 char *format;

 va_start(args);
 XControl = va_arg(args,struct XControl *);
 format = va_arg(args,char *);
 vfprintf(stderr,format,args);
 va_end(args);
 exit(1);
}


Warning(va_alist)

va_dcl
{
 va_list args;
 struct XControl *XControl;
 char *format;

 va_start(args);
 XControl = va_arg(args,struct XControl *);
 format = va_arg(args,char *);
 vfprintf(stderr,format,args);
 va_end(args);
}

/* BuildCallStruct:  This function returns a call structure which contains */
/*  all the information a callback routine will need. */

XtPointer BuildCallStruct(XControl,Commands,Direct,Dynamic)

struct XControl *XControl;
struct CommandList *Commands;
int Direct;
int Dynamic;

{
 struct CallStruct *new;

 new = (struct CallStruct *) XtMalloc(sizeof(struct CallStruct));

 new->XControl = XControl;
 new->Commands = Commands;
 new->Direct = Direct;
 new->Dynamic = Dynamic;

 return(new);
}

/* BuildChildCommand:  This function takes the ChildCommand and the */
/*  ChildCommandArguments and generates the argument list that will be passed*/
/*  to exec to launch the child. */

BuildChildCommand(XControl)


struct XControl *XControl;

{
 int i,k;
 int nargs = 1;
 char *buffer;
 char *p;
 char **args;
 int len;
 
 len = strlen(XControl->ChildCommand);
 buffer = (char *) XtMalloc(sizeof(char) * (len + 1));
 strcpy(buffer,XControl->ChildCommand);

 i = len;
 while((--i >= 0) && (buffer[i] != '/'));
 XControl->ChildArgv = (char**)XtMalloc(sizeof(char *));
 XControl->ChildArgv[0] = &buffer[i+1];

 len = strlen(XControl->ChildCommandArguments) + 1;
 buffer = (char *) XtMalloc(sizeof(char) * (len + 1));

 args = BuildArgList(XControl,XControl->ChildCommandArguments,&nargs);
 XControl->ChildArgv = (char **)XtRealloc(XControl->ChildArgv,
					  sizeof(char *) * (nargs + 1));
 for(i = 0; i < nargs; i++)
  XControl->ChildArgv[i+1] = args[i];
}

/* BuildArgList:  This function takes a character string and builds an */
/*  arglist (array of character strings) from it.  The individual pieces */
/*  in the string are delimited by spaces unless they are imbedded in quotes */

char **BuildArgList(XControl,string,nargs)

struct XControl *XControl;
char *string;
int *nargs;
{
 int i,k;
 char *p;
 char *buffer;
 char **args = NULL;

 *nargs = 0;
 i = 0;
 p = string;
 buffer = XtMalloc(strlen(string) + 1);
 
 while(*p != NULL)
  {
   k = 0;
   while((*p == ' ') &&  (*p != NULL))
    *p++;
   while((*p != ' ') && (*p != NULL))
    {
     if(*p == '\\')
      buffer[k++] = *++p;
     else if(*p == '\"')
      {
       while((*++p != '\"') && (*p != NULL))
	{
	 if(*p == '\\')
	  buffer[k++] = *++p;
	 else
	  buffer[k++] = *p;
	}
      }
     else
      buffer[k++] = *p;
     p++;
    }
   buffer[k] = NULL;
   if(k != 0)
    {
     (*nargs)++;
     args = (char **)XtRealloc(args,sizeof(char *) * (*nargs));
     args[*nargs-1] = (char *) XtMalloc(sizeof(char) * strlen(buffer) + 1);
     strcpy(args[*nargs-1],buffer);
    }
  }
 (*nargs)++;
 args = (char **) XtRealloc(args,  sizeof(char *) * (*nargs));
 args[*nargs-1] = NULL;
 XtFree(buffer);
 return(args);
}

/* SetUpSignals:  This function sets up the signal handler routines for the */
/*  program.  Since X is not safe for signals, we us a pipe to store the */
/*  signals in.  When ever a signal occures, the signal handler simply writes*/
/*  the number of the signal into the pipe.  An input handler will then be */
/*  called to read in the signal number and it will be properly handled */
/*  there. */

SetUpSignals(XControl,App)

struct XControl *XControl;
XtAppContext App;
{
 int pipeline[2];
 XtInputId SigInputId;
 struct sigvec Sig;

 pipe(pipeline);
 XControl->SignalPipeline = pipeline[0];
 SigSink = pipeline[1];

 SigInputId = XtAppAddInput(App,pipeline[0],XtInputReadMask,SignalCB,
			    (XtPointer)XControl);

 Sig.sv_handler = SignalHandler;
 Sig.sv_mask = 0;
 Sig.sv_flags = SV_RESETHAND;

 sigvector(SIGHUP,&Sig,NULL);
 sigvector(SIGINT,&Sig,NULL);
 sigvector(SIGQUIT,&Sig,NULL);
 /*sigvector(SIGPIPE,&Sig,NULL);*/
 sigvector(SIGALRM,&Sig,NULL);
 sigvector(SIGUSR1,&Sig,NULL);
 sigvector(SIGUSR2,&Sig,NULL);
 sigvector(SIGCHLD,&Sig,NULL);
 sigvector(SIGIO,&Sig,NULL);
 sigvector(SIGWINDOW,&Sig,NULL);
 sigvector(SIGSTOP,&Sig,NULL);
 sigvector(SIGCONT,&Sig,NULL);
 sigvector(SIGURG,&Sig,NULL);
}

/* SignalHandler:  This is the signal handler routine.  It simply writes the */
/*  signal number into the signal pipeline.  The XtInput handler will do the */
/*  rest of the work. */

void SignalHandler(sig)

int sig;

{
 write(SigSink,&sig,sizeof(int));
}

/* SignalCB:  This is the signal callback routine.  It is called whenever */
/*  there is a signal waiting to be read from the signal pipeline.  It reads */
/*  in the signal number and then executes whatever command list is bound */
/*  to the signal.  */

void SignalCB(client,source,id)

XtPointer client;
int *source;
XtInputId *id;

{
 struct XControl *XControl = (struct XControl *) client;
 struct sigvec Sigv;
 int Sig;

 read(XControl->SignalPipeline,&Sig,sizeof(int));
 
 if(Sig < NSIG)
  {
   ExecuteCommandList(XControl,XControl->SignalCommands[Sig]);
   Sigv.sv_handler = SignalHandler;
   Sigv.sv_mask = 0;
   Sigv.sv_flags = SV_RESETHAND;
   sigvector(Sig,&Sigv,NULL);
  }
 else
  Warning(XControl,"Caught a funny Signal %d\n",Sig);
}

/* CommandListConverter:  This is the XtResource converter for the */
/*  CommandList.  It takes a character string and builds the command list */
/*  from it. */

CommandListConverter(display,args,num_args,from,to,converter_data)

Display *display;
XrmValue *args;
Cardinal *num_args;
XrmValue *from;
XrmValue *to;
XrmValue *converter_data;

{
 struct XControl *XControl = (struct XControl *)args->addr;
 struct CommandList *temp;
 struct CommandList **position;

 temp = ParseString(XControl,from->addr);
 position = (struct CommandList **)to->addr;
 *position = temp;
 to->size = sizeof(struct CommandList *);

 return(True);
}

/* PtyCB:  This is the Pty callback handler.  When called with a reason */
/*  reason of open it launches the child process and then installs our  */
/*  Vue drop callback handler. */

void PtyCB(w,XControl,reason)

Widget w;
struct XControl *XControl;
PtyCallback *reason;

{
 Arg args[10];
 int n = 0;
 char *name;

 if(reason->reason == PTY_OPEN)
  {
   XtSetArg(args[n],XtNslavePtyName,&name); n++;
   XtGetValues(w,args,n);

   LaunchChild(w,XControl,reason,name);

   SetDragWindow(XControl);
  }
}

/* SetDragWindow:  This function registers the terminal widget window as a */
/*  valid drop window with the drag controller.  Drops will be allowed in */
/*  the entire window. */

SetDragWindow(XControl)

struct XControl *XControl;

{
 Arg args[10];
 int n = 0;
 char buffer[256];
 char *string;
 Pixel top,bottom;
 Dimension width,height;

 XSync(XtDisplay(XControl->Terminal),False);
 n = 0;
 XtSetArg(args[n],XmNtopShadowColor,&top); n++;
 XtSetArg(args[n],XmNbottomShadowColor,&bottom); n++;
 XtSetArg(args[n],XmNwidth,&width); n++;
 XtSetArg(args[n],XmNheight,&height); n++;
 XtGetValues(XControl->Terminal,args,n);

 sprintf(buffer,"=%dx%d+1+1-%s",width-2,height-2,XControl->DropZoneType);
 errno = 0;
 XvRegisterDragWindow(XtDisplay(XControl->Terminal),
		      XtWindow(XControl->Terminal),1,top,bottom,buffer,buffer,
		      (XtPointer)XControl);
 if(errno != 0)
  perror("XvRegisterDragWindow");
 XvFlushBatchRequests();
 /*XeSendRequest("FILEMGR"," REMOVE_TRASH",NULL,
	       "maxwell:/users/gordon/general/xcontrol/core",NULL);
 string = buffer;
 n = 256;
 XeAddMsgCallback(RequestCB,"* * R XCONTROL * * * ",
		  "blah2",NULL);*/
 /*XeSendRequest("XCONTROL","TEST",NULL," ",NULL);*/
}

/* LaunchChild:  This function launches the child process.  It first executes*/
/*  any commands bound to the StartCommands resource.  It then forks and */
/*  sets up the child environment and executes any command bound to the */
/*  PreLaunch resource.  Finally, it exec's the child process. */

LaunchChild(w,XControl,reason,SlaveName)

Widget w;
struct XControl *XControl;
PtyCallback *reason;
char *SlaveName;


{
 int fd;
 int i;
 int tblsize;

/* first execute the startup commands (if any) */

 ExecuteCommandList(XControl,XControl->StartCommands);

 close(reason->SlavePtyDescriptor);

 if((XControl->ChildPid = fork()) == 0)
  {   /* child process */
   tblsize = sysconf(_SC_OPEN_MAX);
   for(i = 0; i < tblsize; i++)
    close(i);

   setsid();
   
   fd = open(SlaveName,O_RDWR);
   dup(fd);
   dup(fd); 

   ExecuteCommandList(XControl,XControl->ChildForkCommands);

   execv(XControl->ChildCommand,XControl->ChildArgv);
   exit(999);  /* we only get here if execl fails */
  }
 else
  { /* parent process */
   if(XControl->ChildPid < 0)
    Error(XControl,"Can't fork!\n");
   ExecuteCommandList(XControl,XControl->ParentForkCommands);
  }
}

/* KeyCB:  This is the Keyboard call back handler.  It is called whenever */
/*  the user types in a key.  It simply sends it to the pty for processing */

void KeyCB(w,XControl,reason)

Widget w;
struct XControl *XControl;
GenTermEmCallback *reason;

{
 PtyWrite(w,reason->string,reason->len);
}

/* CommandCB:  This is the command callback handler.  It is called when a */
/* specific event has happened which has had a command list bound to it. */

void CommandCB(w,CallData,reason)

Widget w;
struct CallStruct *CallData;
XtPointer reason;

{
 struct CommandList *Commands;

 CallData->XControl->CallbackReason = reason;

 if(CallData->Direct == True)
  Commands = CallData->Commands;
 else
  Commands = *((struct CommandList **)CallData->Commands);

 ExecuteCommandList(CallData->XControl,Commands);

 if(CallData->Dynamic == True)
  {
   DestroyCommandList(CallData->XControl,Commands);
   if(CallData->Direct == False)
    *((struct CommandList **)CallData->Commands) = NULL;
  }

}

/* TimeOutCB:  This is the timeout callback handler.  It simply calls the */
/*  command callback function to perform all the work and then frees up the */
/*  mempry associated with the calling structure. */

void TimeOutCB(CallData,reason)

struct CallStruct *CallData;
XtPointer reason;

{
 CommandCB(NULL,CallData,reason);
 XtFree(CallData);
}

/* ActionCB:  This is the action handler routine.  It takes the action */
/*  string can compiles it into a command sequence.  It then executes the */
/*  command list and then returns. */

void ActionCB(w,event,CommandString,NString)

Widget w;
XEvent *event;
String *CommandString;
Cardinal *NString;

{
 struct CommandList *Commands;
 int i;
 
 XControl.CallbackReason = event;

 for(i = 0; i < *NString; i++)
  {
   Commands = ParseString(&XControl,CommandString[i]);
   ExecuteCommandList(&XControl,Commands);
   DestroyCommandList(&XControl,Commands);
  }
}

/* PopDownCB:  This callback unmanages a dialog.  It is called from the */
/*  the help callback on the MessageDialog. */

void PopDownCB(w,Calldata,reason)

Widget w;
Widget Calldata;
XtPointer reason;

{
 XtUnmanageChild(w);
}

/* LoadSession:  This function reads in a previously saved session file. */
/*  It is used to restart a session that was saved by the session manager. */

LoadSession(XControl)

struct XControl *XControl;

{
 FILE *SaveFile;
 char buffer[1024];
 int i;

 if((SaveFile = fopen(XControl->SessionFile,"r")) == NULL)
  Error(XControl,"Can't open session file %s\n",XControl->SessionFile);
 
 fgets(buffer,1024,SaveFile);
 buffer[strlen(buffer)-1] = NULL;  /* get rid of newline */
 if(strcmp(buffer,SESSION_HEADER) != 0)
  {
   Warning(XControl,"Session file contains invalid data, ignoring\n");
   return(0);
  }

 XtFree(XControl->TerminalType);
 XControl->TerminalType = LoadString(XControl,SaveFile);
 XtFree(XControl->ChildCommand);
 XControl->ChildCommand = LoadString(XControl,SaveFile);
 XtFree(XControl->ChildCommandArguments);
 XControl->ChildCommandArguments = LoadString(XControl,SaveFile);

 DestroyCommandList(XControl,XControl->StartCommands);
 XControl->StartCommands = LoadCommandList(XControl,SaveFile);

 for(i = 0; i < NSIG; i++)
  {
   DestroyCommandList(XControl,XControl->SignalCommands[i]);
   XControl->SignalCommands[i] = LoadCommandList(XControl,SaveFile);
  }
 DestroyCommandList(XControl,XControl->CloseWindowCommands);
 XControl->CloseWindowCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->SaveCommands);
 XControl->SaveCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->EscapeCommands);
 XControl->EscapeCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->TopCommands);
 XControl->TopCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->ResizeCommands);
 XControl->ResizeCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->WakeUpCommands);
 XControl->WakeUpCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->FlowCommands);
 XControl->FlowCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->ParentForkCommands);
 XControl->ParentForkCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->ChildForkCommands);
 XControl->ChildForkCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->DropCommands);
 XControl->DropCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->PromptYesCommands);
 XControl->PromptYesCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->PromptNoCommands);
 XControl->PromptNoCommands = LoadCommandList(XControl,SaveFile);
 DestroyCommandList(XControl,XControl->PromptCancelCommands);
 XControl->PromptCancelCommands = LoadCommandList(XControl,SaveFile);

 fclose(SaveFile);
}

/* LoadString:  This function reads a string from the session file. */

char *LoadString(XControl,File)

struct XControl *XControl;
FILE *File;

{
 int n,i;
 char *string;

 if(fscanf(File,"%d\n",&n) != 1)
  Error(XControl,"Can't find string length is session file!\n");

 if(n < 0)
  return(NULL);
 fgetc(File);  /* first character is dummy to stop scanf from going to far */
 if(n == 0)
  return(NULL);

 string = XtMalloc(sizeof(char) * (n+1));
 
 for(i = 0; i < n; i++)
  string[i] = fgetc(File);
 fgetc(File);  /* read trailing newline */
 string[n] = NULL;

 return(string);
}

/* DropCB:  This is the Vue drop callback handler.  It is called whenever */
/*  an icon is dropped on our window.  It stores the required drop */
/*  information and executes any command associated with the action. */

void DropCB(display,win,x,y,root,root_x,root_y,mods,types,objects,XControl)

Display *display;
Window win;
Position x,y;
Window root;
Position root_x,root_y;
unsigned int mods;
char *types;
char *objects;
struct XControl *XControl;

{
 int i;
 char Name[256];

 for(i = 0; i < strlen(types); i++)
  if(types[i] == ',')
   types[i] = ' ';
 XControl->DropTypes = BuildArgList(XControl,types,
				    &XControl->NumberTypesDropped);
 XControl->DropTypes -= 1;
 XControl->DropFiles = BuildArgList(XControl,objects,
				    &XControl->NumberFilesDropped);
 XControl->NumberFilesDropped -= 3;

 gethostname(Name,256);
 
 if((strcmp(Name,XControl->DropFiles[0]) != 0) && 
    (XControl->RemoteDropsAllowed == False))
  {
   XWarning(XControl,"Error!!\nCan not accept a drop from a remote host");
  }
 else
  ExecuteCommandList(XControl,XControl->DropCommands);
}

/* XWarning:  This function pops up a warning dialog with the given text */
/*  as its message. */

XWarning(XControl,Message)

struct XControl *XControl;
char *Message;

{
 int n = 0;
 Arg args[10];

 XtSetArg(args[n],XmNmessageString,
	  XmStringCreateLtoR(Message,XmSTRING_DEFAULT_CHARSET)); n++;
 XtSetValues(XControl->Warning,args,n);
 XtManageChild(XControl->Warning);
}


void ResizeCB(w,XControl,reason)

Widget w;
struct XControl *XControl;
XtPointer reason;

{
 SetDragWindow(XControl);
}

void RequestCB(c1,c2,c3,c4,c5,c6,c7,c8)

char *c1,*c2,*c3,*c4,*c5,*c6,*c7,*c8;

{
 fprintf(stderr,"Got a callback!\n%s\n",c6);
 XeSendSuccessNotification("XCONTROL",NULL,"TEST",NULL,"blah4","blah5");
}
@EOF
set `wc -lwc <xcontrol/XControl.c`
if test $1$2$3 != 984234927562
then
	echo ERROR: wc results of xcontrol/XControl.c are $* should be 984 2349 27562
fi

chmod 644 xcontrol/XControl.c

echo x - xcontrol/XControl.h
cat >xcontrol/XControl.h <<'@EOF'
/* XControl.h  This is the include file for the XControl program */
/* History:                                 */
/*         Written by G. R. Strachan 1992 */

/*  Copyright Gordon R. Strachan 1992 */
/*  This code is provided as is, neither the University of Waterloo nor */
/*  the author is liable for any damage caused by the use or misuse of this */
/*  code.  */

/* Permission is granted to copy, use and modify this code provided it is */
/* not sold for profit and the above copyright remains intact. */

#define SESSION_HEADER "XControl version 1.0 Session File"

struct CommandList
{
 int (*Command)();
 struct Argument *Args;
 int NumberArguments;
 struct CommandList *Next;
};

struct Argument
{
 char *String;
 int Type;
 int Value;
};

struct FunctionList
{
 char *Name;
 int (*Function)();
};

struct CallStruct

{
 struct XControl *XControl;
 struct CommandList *Commands;
 int Direct;
 int Dynamic;
};

struct XControl
{
 char *ProgramName;
 XtAppContext App;
 struct FunctionList *Functions;
 int ChildPid;
 char *TerminalType;
 char *ChildCommand;
 char *ChildCommandArguments;
 char **ChildArgv;
 int SignalPipeline;
 char **PositionalArgs;
 int NumberPositions;
 char *SessionFile;
 struct CommandList *StartCommands;
 struct CommandList *SignalCommands[NSIG];
 struct CommandList *CloseWindowCommands;
 struct CommandList *SaveCommands;
 struct CommandList *EscapeCommands;
 struct CommandList *TopCommands;
 struct CommandList *ResizeCommands;
 struct CommandList *WakeUpCommands;
 struct CommandList *FlowCommands;
 struct CommandList *ParentForkCommands;
 struct CommandList *ChildForkCommands;
 struct CommandList *DropCommands;
 struct CommandList *PromptYesCommands;
 struct CommandList *PromptNoCommands;
 struct CommandList *PromptCancelCommands;
 caddr_t CallbackReason;
 Widget Top;
 Widget Terminal;
 Widget Message;
 Widget Warning;
 char **DropTypes;
 char **DropFiles;
 char *DropZoneType;
 int NumberFilesDropped;
 int NumberTypesDropped;
 Boolean RemoteDropsAllowed;
};

#define STRINGARG   1
#define POSITIONARG 2
#define INTEGERARG  3

#define XCOKAY  1
#define XCERROR 0
#define XCABORT 2
@EOF
set `wc -lwc <xcontrol/XControl.h`
if test $1$2$3 != 932582132
then
	echo ERROR: wc results of xcontrol/XControl.h are $* should be 93 258 2132
fi

chmod 644 xcontrol/XControl.h

echo x - xcontrol/XControl.man '[non-ascii]'
$unpacker <<'@eof'
begin 644 xcontrol/XControl.man
M+EPB($UA;B!P86=E(&9O<B!T:&4@6$-O;G1R;VP@<')O9W)A;2 M*BUN<F]FX
M9BTJ+0HN7"(*+EPB(%=R:71T96X@8GD@1RX@4W1R86-H86X@,3DY,@HN7"(*X
M+EPB($%D9"!S:6UP;&4@:V5E<',@=&\@34%.(&UA8W)O<R!S;R N5%,O+E1%X
M('=I;&P@=V]R:PHN7"(*+F1E($M3("!<(B @(" @($ME97 @<W1A<G0*+F)RX
M"BYI;B P"BYD:2!+4 HN+@HN9&4@2T4@(%PB(" @(" @2V5E<"!E;F0*+F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EN9&]WX
M+@HN25 @(EQF0F1R;W!:;VYE5'EP95QF4"(*5&AI<R!R97-O=7)C92!S<&5CX
M:69I97,@=&AE('1Y<&4@;V8@9')O<"!Z;VYE(&ET('-H;W5L9"!I;G-T86QLX
M+B @5&AI<PID969I;F5S('1H92!T>7!E(&]F(&9I;&5S('1H870@=V4@87)EX
M('=I;&QI;F<@=&\@86-C97!T+B @270@<VAO=6QD"F%G<F5E('=I=&@@;VYEX
M(&]F('1H92!D<F]P('IO;F4@='EP97,@9V5N97)A=&5D(&)Y('1H92!F:6QEX
M(&UA;F%G97(N"BY)4" B7&9"97-C87!E0V]M;6%N9'-<9E B"E1H:7,@<F5SX
M;W5R8V4@<W!E8VEF:65S('1H92!C;VUM86YD<R!T;R!B92!E>&5C=71E9"!WX
M:&5N('1H92!0='D*=VED9V5T(&%S<V5R=',@86X@17-C87!E($-A;&QB86-KX
M+@HN25 @(EQF0F9L;W=#;VUM86YD<UQF4"(*5&AI<R!R97-O=7)C92!S<&5CX
M:69I97,@=&AE(&-O;6UA;F1S('1O(&)E(&5X96-U=&5D('=H96X@=&AE(%!TX
M>2!W:61G970*87-S97)T<R!A($9L;W<@0V%L;&)A8VLN"BY)4" B7&9"<&%RX
M96YT1F]R:T-O;6UA;F1S7&90(@I4:&ES(')E<V]U<F-E('-P96-I9FEE<R!TX
M:&4@8V]M;6%N9',@=&\@8F4@97AE8W5T960@8GD@=&AE('!A<F5N= IP<F]CX
M97-S(&EM;65D:6%T96QY(&%F=&5R(&ET(&9O<FMS('1H92!C:&EL9"!P<F]CX
M97-S+@HN25 @(EQF0G)E;6]T941R;W!S06QL;W=E9%QF4"(*5&AI<R!R97-OX
M=7)C92!S<&5C:69I97,@=VAE=&AE<B!T:&4@<')O9W)A;2!S:&]U;&0@86QLX
M;W<@:6-O;G,@=&\@8F4*9')O<'!E9"!F<F]M('!R;V=R86US(')U;FYI;F<@X
M;VX@86YO=&AE<B!H;W-T+B @5&AI<R!S:&]U;&0@;VYL>2!B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VYA;"X*+DE0(")<9D)S:6=3=&]P0V]M;6%N9'-<9E B"E1HX
M:7,@<F5S;W5R8V4@<W!E8VEF:65S('1H92!C;VUM86YD<R!T;R!E>&5C=71EX
M('=H96X@=&AE('!R;V=R86T*<F5C96EV97,@82!324=35$]0('-I9VYA;"X*X
M+DE0(")<9D)S:6=497)M0V]M;6%N9'-<9E B"E1H:7,@<F5S;W5R8V4@<W!EX
M8VEF:65S('1H92!C;VUM86YD<R!T;R!E>&5C=71E('=H96X@=&AE('!R;V=RX
M86T*<F5C96EV97,@82!324=415)-('-I9VYA;"X*+DE0(")<9D)S:6=5<F=EX
M;G1#;VUM86YD<UQF4"(*5&AI<R!R97-O=7)C92!S<&5C:69I97,@=&AE(&-OX
M;6UA;F1S('1O(&5X96-U=&4@=VAE;B!T:&4@<')O9W)A;0IR96-E:79E<R!AX
M(%-)1U521TY4('-I9VYA;"X*+DE0(")<9D)S:6=5<W(Q0V]M;6%N9'-<9E BX
M"E1H:7,@<F5S;W5R8V4@<W!E8VEF:65S('1H92!C;VUM86YD<R!T;R!E>&5CX
M=71E('=H96X@=&AE('!R;V=R86T*<F5C96EV97,@82!324=54U(Q('-I9VYAX
M;"X*+DE0(")<9D)S:6=5<W(R0V]M;6%N9'-<9E B"E1H:7,@<F5S;W5R8V4@X
M<W!E8VEF:65S('1H92!C;VUM86YD<R!T;R!E>&5C=71E('=H96X@=&AE('!RX
M;V=R86T*<F5C96EV97,@82!324=54U(R('-I9VYA;"X*+DE0(")<9D)S:6=7X
M:6YD;W=#;VUM86YD<UQF4"(*5&AI<R!R97-O=7)C92!S<&5C:69I97,@=&AEX
M(&-O;6UA;F1S('1O(&5X96-U=&4@=VAE;B!T:&4@<')O9W)A;0IR96-E:79EX
M<R!A(%-)1U=)3D-(('-I9VYA;"X*+DE0(")<9D)S=&%R=$-O;6UA;F1S7&90X
M(@I4:&ES(')E<V]U<F-E('-P96-I9FEE<R!T:&4@8V]M;6%N9',@=&\@97AEX
M8W5T92!A9G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;G5M8F5R(&]F('1H92!P;W-IX
M=&EO;F%L(&%R9W5M96YT('=H97)E('1H90IP<F]C97-S(&ED(&]F('1H92!RX
M96%P960@8VAI;&0@<VAO=6QD(&)E('-T;W)E9"X@($EF(&YO(&-H:6QD('!RX
M;V-E<W,*=V%S(&9O=6YD('1H96X@82!V86QU92!O9B P(&ES('-T;W)E9"X*X
M+DE0(")<9D)296UO=F54:6UE3W5T*%1I;65/=71)9"E<9E B"E1H:7,@8V]MX
M;6%N9"!R96UO=F5S(&$@<')E=FEO=7-L>2!S=&%R=&5D('1I;64@;W5T+B @X
M7&9)5&EM94]U=$ED7&90"FES('1H92!V86QU92!R971U<FYE9"!F<F]M('1HX
M92!<9D)4:6UE3W5T7&90(&-O;6UA;F0N"BY)4" B7&9"4V%V95-E<W-I;VXHX
M*5QF4"(*5&AI<R!C;VUM86YD(&-A=7-E<R!T:&4@<')O9W)A;2!T;R!G96YEX
M<F%T92!A('-E<W-I;VX@9FEL92!I;B!W:&EC: IA;&P@=&AE(&-U<G)E;G0@X
M<W1A=&4@:6YF;W)M871I;VX@:7,@<V%V960N("!4:&ES(&9I;&4@8V%N('1HX
M96X@8F4*=7-E9"!T;R!R97-T87)T('1H92!P<F]G<F%M(&%T(&$@;&%T97(@X
M9&%T92!W:71H('1H92!<9DDM<V5S<VEO;EQF4"!O<'1I;VXN"BY)4" B7&9"X
M4V5T16YV*$YA;64L5F%L=64I7&90(@I4:&ES(&-O;6UA;F0@<V5T<R!A;B!EX
M;G9I<F]N;65N="!V87)I86)L92!I;B!T:&4@<')O9W)A;2X@(%QF24YA;65<X
M9E *:7,@=&AE(&YA;64@;V8@=&AE('9A<FEA8FQE('1O('-E="X@(%QF259AX
M;'5E7&90(&ES('1H92!V86QU92!T;R!S970*:70@=&\N"BY)4" B7&9"4VEGX
M;F%L*&XI7&90(@I4:&ES(&-O;6UA;F1S('-E;F1S(&$@<VEG;F%L('1O('1HX
M92!P<F]C97-S(&=R;W5P('=H:6-H(&ES(&%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ER<W0@<W1R:6YG(&%N9"!<9DE3=')I;F<R7&90(&ES('1H90ISX
M96-O;F0@<W1R:6YG+B @7&9)4F5S=6QT7&90(&ES('1H92!N=6UB97(@;V8@X
M=&AE('!O<VET:6]N86P@87)G=6UE;G0*=&\@<W1O<F4@=&AE(')E<W5L="!IX
M;BX*+DE0(")<9D)4:6UE3W5T*$1U<F%T:6]N+%!O<VET:6]N+$-O;6UA;F1SX
M*5QF4"(*5&AI<R!C;VUM86YD(&EN<W1A;&QS(&$@=&EM96]U="!C86QL8F%CX
M:R!I;B!T:&4@<')O9W)A;2X*7&9)1'5R871I;VY<9E @:7,@=&AE(&%M;W5NX
M="!O9B!T:6UE+"!I;B!M:6QL:7-E8V]N9',L('1H870@87)E"F%L;&]W960@X
M=&\@96QL87!S92!B969O<F4@=&AE('1I;65O=70@:7,@=')I9V=E<F5D+B @X
M7&9)4&]S=&EO;EQF4"!I<PIT:&4@;G5M8F5R(&]F('1H92!P;W-I=&EO;F%LX
M(&%R9W5M96YT('=H97)E('1H92!T:6UE;W5T(&ED(&ES('-T;W)E9"X*5&AIX
M<R!I<R!N965D960@<V\@=&AA="!T:&4@=&EM96]U="!C86X@8F4@<F5M;W9EX
M9"!A="!A(&QA=&5R('1I;64N"EQF24-O;6UA;F1S7&90(&ES('1H92!C;VUMX
M86YD(&QI<W0@=&\@8V]M<&EL92!A;F0@97AE8W5T92!W:&5N('1H90IT:6UEX
M;W5T(&5X<&ER97,N"BY)4" B7&9"5V%R;FEN9RA497AT*5QF4"(*5&AI<R!CX
M;VUM86YD(&-A=7-E<R!A('=A<FYI;F<@9&EA;&]G('1O('!U="!U<"!O;B!TX
M:&4@<V-R965N+@I<9DE497AT7&90(&ES('1H92!M97-S86=E('1O(&1I<W!LX
M87D@:6X@=&AE('=A<FYI;F<@9&EA;&]G+B @5&AE"F1I86QO9R!W:6QL('-TX
M87D@=7 @=6YT:6P@9&ES;6ES<V5D(&)Y('1H92!U<V5R+B @3F]T92!T:&%TX
M('1H90IC;VUM86YD(&QI<W0@8V]N=&EN=65S('1O(&5X96-U=&4@869T97(@X
M=&AI<R!F=6YC=&EO;B!H87,@8V]M<&QE=&5D+@I4:&%T(&ES('1O('-A>2P@X
M=&AE('!R;V=R86T@9&]E<R!N;W0@=V%I="!F;W(@=&AE('5S97(@=&\@9&ESX
M;6ES<R!T:&4*=V%R;FEN9R!D:6%L;V<@8F5F;W)E(&-O;G1I;G5I;F<@=&AEX
M(&-O;6UA;F0@;&ES="X*+DE0(")<9D)7<FET92A3=')I;F<Q+%-T<FEN9S(LX
M+BXN*5QF4"(*5&AI<R!C;VUM86YD('-E;F1S('1H92!A<F=U;65N="!S=')IX
M;F=S('1O('1H92!C:&EL9"!P<F]C97-S(&%S(&EF"G1H97D@=V5R92!T>7!EX
M9"!I;B!A="!T:&4@:V5Y8F]A<F0N("!!;GD@;G5M8F5R(&]F(&%R9W5M96YTX
M<R!C86X@8F4*<W!E8VEF:65D+@HN<W @,0HN4T@@(E-%12!!3%-/(@I<9D)HX
M<'1E<FTH,2DL('AT97)M*#$I+"!0='DH,U@I+"!'96Y497)M16TH,W@I+" *X
.1V5N5&5R;2@S6"E<9E!M                                        X
                                                             X
end
@eof
set `wc -lwc <xcontrol/XControl.man`
if test $1$2$3 != 409279618959
then
	echo ERROR: wc results of xcontrol/XControl.man are $* should be 409 2796 18959
fi

chmod 644 xcontrol/XControl.man

echo x - xcontrol/XVi.ad
cat >xcontrol/XVi.ad <<'@EOF'
*Pty*literalMode:	False
*Pty*autoLineWrap:	True
*Pty*saveLines:		48
*Pty*destructiveTab:	False
*Pty*ttyMode:		rows 24 columns 80 \
9600 susp ^z dsusp ^z intr ^c quit ^\\ erase ^H kill ^u swtch ^@ eof ^d \
eol ^@ stop ^s start ^q -parenb -parodd cs8 -cstopb hupcl cread -clocal \
-loblk -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr \
icrnl -iuclc ixon -ixany ixoff -ienqak isig icanon iexten -xcase echo echoe \
echok -echonl -noflsh opost -olcuc onlcr -ocrnl -onocr -onlret -ofill \
-ofdel -tostop tab3
*Pty*ignoreNull:	True
*hpterm*parseFile:	PARSEDIR/hpterm.par
*hpterm*fieldAttributes: True
*hpterm*saveScrollRegion:	True
*hpterm*penColors:	Default:Default:red:Default:green:Default:yellow:\
Default:blue:Default:magenta:Default:cyan:Default:black:yellow"
*xterm*parseFile:	PARSEDIR/xterm.par
*xterm*fieldAttributes:	False
*xterm*saveScrollRegion:	True
*xterm*scrollOnOutput:	True
*xterm*numberMapTables:	4
*xterm*cursorFloats:	False
*xterm*scrollDownClear:	True
*xterm*fullScroll:	False
*xterm*cursorKeyScrollRegion:	True
*xterm*eolStick:	True
*xterm*translations:	#override\n\
<ButtonPress>:invokeTranslation(ButtonTranslator)\n\
<ButtonRelease>:invokeTranslation(ButtonReleaseTranslator)\n
!
*childCommand:		/usr/bin/vi
*closeWindowCommands:	Prompt("Closing...","Save File Before Closing Window?"\
,"Yes^JSave File","No^JDon't Save File","Cancel Close",\
"TimeOut(100000,11,\\"Signal(9);Quit(0)\\");Signal(2);\
Write(\\":w!^J\\",\\":q^J\\")",\
"TimeOut(100000,11,\\"Signal(9);Quit(0)\\");Signal(2);Write(\\":q!^J\\")",\
"Abort()")
*remoteDropsAllowed:	True
!*dropCommands:		GetDropNumber(1,2);GetDropHost(3);GetDropDirectory(4);\
!GetDropType(1,5);GetDropFile(1,6);\
!Write("T=",$1," F=",$2," Host ",$3," Dir ",$4," Type ",$5," Name ",$6);
*dropZoneType:		FileEdit
*sigChildCommands:	Reap(1);GetChildPid(2);If($1,"==",$2,"Quit(0)",\
"Abort()")
*childForkCommands:	GetTerminalType(2);SetEnv("TERM",$2);
*saveSessionCommands:	Signal(2);Write(":w^J");SaveSession();
*dropCommands:		GetDropNumber(1,2);GetDropFile(1,3);\
GetDropDirectory(4);StringCat($4,$3,3);\
StoreString("Signal(2);Write(\\":e \\",$3,\\"^J\\");",5);\
StoreString("Signal(2);Write(\\":w!^J\\");",6);\
StringCat($6,$5,7);\
StoreString("Prompt(\\"New File\\",\\"Save Old File?\\",\\"Yes^JSave Files\\",\
\\"No^JDon't Save File\\",\\"Cancel\\",$7,$5,\\"Abort()\\");",8);\
If($2,"!=",1,"Warning(\\"Too many files dropped\\")",$8)
*startupCommands:	GetWindowSize(1,2);SetEnv("LINES",$1);\
SetEnv("COLUMNS",$2);
@EOF
set `wc -lwc <xcontrol/XVi.ad`
if test $1$2$3 != 571822493
then
	echo ERROR: wc results of xcontrol/XVi.ad are $* should be 57 182 2493
fi

chmod 644 xcontrol/XVi.ad

echo x - MANIFEST
cat >MANIFEST <<'@EOF'
File Name                 Kit Number
--------------            ----------
GenTerm/GenTerm.c            1
GenTerm/GenTerm.h            1
GenTerm/GenTerm.man          2
GenTerm/GenTermEm.c          2
GenTerm/GenTermEm.h          1
GenTerm/GenTermEm.man        2
GenTerm/GenTermEmP.h         1
GenTerm/GenTermP.h           1
GenTerm/LoadParser.c         2
GenTerm/Makefile             2
GenTerm/Parse.c              3
GenTerm/Parser.h             2
GenTerm/Pty.c                3
GenTerm/Pty.h                2
GenTerm/Pty.man              3
GenTerm/PtyP.h               2
GenTerm/TAGS                 3
GenTerm/Xmu.h                2
GenTerm/ctest.c              3
GenTerm/hpterm.par           3
GenTerm/test.c               3
GenTerm/translators          4
GenTerm/xterm.par            4
MANIFEST                     4
Makefile                     1
README                       1
xcontrol/Command.c           4
xcontrol/Makefile            2
xcontrol/ParseString.c       3
xcontrol/TAGS                3
xcontrol/XControl.ad         3
xcontrol/XControl.c          4
xcontrol/XControl.h          4
xcontrol/XControl.man        4
xcontrol/XVi.ad              4
@EOF
set `wc -lwc <MANIFEST`
if test $1$2$3 != 37761159
then
	echo ERROR: wc results of MANIFEST are $* should be 37 76 1159
fi

chmod 644 MANIFEST

rm -f /tmp/unpack$$
exit 0
Newsgroups: comp.sys.hp