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

#include <link/io.h>

#include <pragmas/dlg.h>

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


long GetHandFlags(long def, char hot)

{long flags = 0;

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

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

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