#include <devices/tpt.h>
#include <stdio.h>
#include <proto/dlg.h>
#include <proto/dos.h>
#include <dialog/user.h>


extern char            **SA;
extern struct Ram_File   RStruct;
extern struct USER_DATA  StUser;


long GetHandFlags(long def, char hot)

{long flags = 0;

 AFPrintf(&StUser, Output(), SA[3434]);

 if (finput(SA[3435], (char)((def & T_BREAK)/T_BREAK)))              flags |= T_BREAK;
 if (finput(SA[3436], (char)((def & T_CTLD)/T_CTLD)))                flags |= T_CTLD;
 if (finput(SA[3437], (char)((def & T_CRLF)/T_CRLF)))                flags |= T_CRLF;
 if (finput(SA[3438], (char)((def & T_ECHO)/T_ECHO)))                flags |= T_ECHO;
 if (finput(SA[3439], (char)((def & T_KILL_ENABLE)/T_KILL_ENABLE)))  flags |= T_KILL_ENABLE;
 if (finput(SA[3440], (char)((def & T_DO_PEND)/T_DO_PEND)))          flags |= T_DO_PEND;
 if (finput(SA[3441], (char)((def & T_PASS_THRU)/T_PASS_THRU)))      flags |= T_PASS_THRU;
 if (finput(SA[3442], (char)((def & T_PAUSE)/T_PAUSE)))              flags |= T_PAUSE;
 if (finput(SA[3443], (char)((def & T_RAW)/T_RAW)))                  flags |= T_RAW;
 if (finput(SA[3444], (char)((def & T_DO_TIMEOUT)/T_DO_TIMEOUT)))    flags |= T_DO_TIMEOUT;
 if (finput(SA[3445], (char)((def & T_VERB_PAUSE)/T_VERB_PAUSE)))    flags |= T_VERB_PAUSE;
 if (finput(SA[3446], (char)((def & T_LINEFREEZE)/T_LINEFREEZE)))    flags |= T_LINEFREEZE;

 AFPrintf(&StUser,Output(),"\n\n");
 return(flags);
}
