#include #include #include #include #include "UDFCDF_Str.h" #include "UDFCDF_Ansi.h" void MenuMain (ByTe_4 PN) { extern struct MeNuS Ms; extern struct UserDefs InFo; struct PaGe *Pg; struct QuEsTiOnS *Qs, *QsEnd; ByTe_4 B, H, M, S; /*****************************************************************************/ /* MAIN MENU */ /* */ /* ID[00] BEGINNING TIME */ /* ID[01] ENDING TIME */ /* ID[02] DEFINE IDFS SOURCE */ /* ID[03] CDF META DATA */ /* */ /*****************************************************************************/ Pg = (struct PaGe *) Ms.page; Qs = (struct QuEsTiOnS *) Pg->Ques; QsEnd = Qs + Pg->NumQ; for ( ; Qs < QsEnd; ++Qs) { switch (Qs->ID) { case 0: BreaKOuT (Qs->CReply, (ByTe_1 *)0, 0, 0); sscanf (Qs->CReply, Qs->Fmt, &InFo.TB.Yr, &InFo.TB.Dy, &H, &M, &S); InFo.TB.Ms = (H * 3600 + M * 60 + S) * 1000; InFo.TB.Ns = 0; break; case 1: BreaKOuT (Qs->CReply, (ByTe_1 *)0, 0, 0); sscanf (Qs->CReply, Qs->Fmt, &InFo.TE.Yr, &InFo.TE.Dy, &H, &M, &S); InFo.TE.Ms = (H * 3600 + M * 60 + S) * 1000; InFo.TE.Ns = 0; break; case 2: InFo.EmptySrc = 0; InFo.NSrcs = Qs->NWins; if (Qs->NWins > 0) strcpy (InFo.SrcWns, Qs->Wins); B = InFo.NSrcs * sizeof (struct SrcInfo); if ((InFo.Src = malloc (B)) == 0) exit(-1); break; case 3: if (Qs->NWins == 1) { sscanf (Qs->Wins, "%hd", &PN); MenuCDFMeta (Pd, PN); } break; } } }