/*=============================================================================

 TSC header file

=============================================================================*/
#ifndef TSC_H
#define TSC_H

#ifdef TSC_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif

#define TSCID_X      0
#define TSCTASK_X    4
#define TSCCMDS_X   17
#define TSCSCAN_X   30
#define TSCRANG_X   35
#define TSCDATA_X   40
#define TSCSTART_X  52
#define TSCSTOP_X   62
#define TSCREPT_X   72
#define TSCRUN_X    82
#define TSCFLAG_X   92

struct TCF_SUMA_LLST_STRUCT
{
  SINT2                  icnt;
  struct TCF_SUMA_STRUC *root;
};
typedef struct TCF_SUMA_LLST_STRUCT TCFSUMALLST;

/* Scheduler name */

EXTERN char stscname_c[80];

/*The default width and height are set after first XtManagedChild call*/
EXTERN SINT2 itsc_defl_width_c;
EXTERN SINT2 itsc_defl_height_c;

/*  Memory allocation for the hot tcf ( which is the highlighed item in the
    list ) and equivalent text, and the corresponding xmstring.
*/
EXTERN TCFSUMALLST tcfsumallst_c;
EXTERN TCF_SUM     hottcfsuma_c, tcfsuma_c;

/* Widgets & Function Prototypes */

EXTERN Widget tsc_mainbar;
EXTERN Widget tsc_filebtn, tsc_filepdw;
EXTERN Widget tsc_menubtn, tsc_menupdw;
EXTERN Widget tsc_cmdsbtn, tsc_cmdspdw;
EXTERN Widget tsc_actpsvbtn, tsc_actpsvpdw;
EXTERN Widget tsc_helpbtn, tsc_helppdw;
EXTERN Widget tsc_printpdw;

void   tsc_file_cbf();
EXTERN XsFLB* tsc_open;
void   tsc_openflb_cbf();   
EXTERN Widget tsc_svaspop, tsc_svashelppop;
void   tsc_svasbtn_cbf();
void   tsc_svaspop_ok_cbf();   
void   tsc_svaspop_help_cbf();   
EXTERN Widget tschelp_fnampop;
EXTERN XsFLB* tsc_dele;
void   tsc_deleflb_cbf();   

void   tsc_menu_cbf();
void   tsc_cmds_cbf();
void   tsc_actpsv_cbf();

EXTERN Widget tsc_legendlab;
EXTERN Widget tsc_mainlst;
void   tsc_mainlst_cbf();
void   tsc_postit();
void   tsc_start_cbf();
void   tsc_stop_cbf();
void   tsc_rept_cbf();
void   tsc_rqstbtn_cbf();
void   tsc_flagbtn_cbf();

EXTERN Widget tsc_taskshl, tsc_taskpop;
void   tsc_taskbtn_cbf();
EXTERN XsFLB* tsc_addt;
void   tsc_addtflb_cbf();

EXTERN Widget tsc_nullshl;  /* Give Message: Status Only Field */
EXTERN Widget tsc_minorshl; /* Give Message: Minor Task Entry  */
EXTERN Widget tsc_rqstshl;
EXTERN Widget tsc_dumshl;

EXTERN Widget tsc_nametxt;
EXTERN Widget tsc_startshl, tsc_starttxt;
EXTERN Widget tsc_stopshl,  tsc_stoptxt;
EXTERN Widget tsc_reptshl,  tsc_repttxt;

EXTERN Widget tsc_flagshl;

void   tsc_addtlist( char *sdata, UINT4 ilength );
void   tsc_delelist( char *sdata, UINT4 ilength );
void   tsc_openlist( char *sdata, UINT4 ilength );
void   tsc_updateall( char *stokens, char *sdata, UINT4 ilength );

char*  stcf_suma_txt_f( TCF_SUM *suma_a );
char*  stcfsch_stat_f( SINT2 istat_a, SINT2 iflag_a );
void   TcfSumaLLstDeleteAll ( TCFSUMALLST *sumalst_a );
void   TcfSumaLLstAdd       ( TCFSUMALLST *sumalst_a, TCF_SUM *suma_a );
TCF_SUM* TcfSumaLLstSearch( TCFSUMALLST *sumalst_a, SINT2 id_a );
 
#undef EXTERN
#endif
