static void insertTimer ( sTimer *tp ) { LstLink(sTimer) *tl; sTimer *tip; if (LstEmp(&timer_lh)) { (void)LstIns(LstEnd(&timer_lh), tp, ll); return; } for (tl = LstLas(&timer_lh); tl != LstEnd(&timer_lh); tl = LstPre(tl)) { tip = LstObj(tl); if (tp->wrapped) { if (!tip->wrapped || tip->clock < tp->clock) break; } else if (!tip->wrapped && tip->clock < tp->clock) break; } tl = LstNex(tl); (void)LstIns(tl, tp, ll); }
void lex_MsgName(const char *MsgName) { sMsgCB *msgp = (sMsgCB *)calloc(1, sizeof(sMsgCB)); int i; int len = strlen(MsgName); msgp->m.MsgName = malloc(len + 1); for (i = 0; i < len; i++) msgp->m.MsgName[i] = toupper(MsgName[i]); msgp->m.MsgName[i] = '\0'; (void) LstIns(&LstObj(LstLas(&lFacH))->MsgH, msgp, MsgL); }
void lex_MsgSeverity(msg_eSeverity Severity) { LstLink(sMsgCB) *ml = LstLas(&LstObj(LstLas(&lFacH))->MsgH); LstObj(ml)->Severity = Severity; }
void lex_MsgText(const char *Text) { LstLink(sMsgCB) *ml = LstLas(&LstObj(LstLas(&lFacH))->MsgH); TranslateFormatSpec(Text, &LstObj(ml)->m.MsgTxt); /* convert any VMS-style form spec */ }
void lex_FacPrefix(const char *Prefix) { LstObj(LstLas(&lFacH))->f.Prefix = MSG_NEW_STRING(Prefix); }
void lex_FacNum(int FacNum) { LstObj(LstLas(&lFacH))->f.FacNum = FacNum; }