draw_dial(int bnr, int ret, int st) { char bbb[5]; switch(st) { case ACK: strcpy((char *)transfer[STATUS].ob_spec,"ACK"); break; case NAK: strcpy((char *)transfer[STATUS].ob_spec,"NAK"); break; case CHK: strcpy((char *)transfer[STATUS].ob_spec,"CHK"); break; case -1: strcpy((char *)transfer[STATUS].ob_spec,"TIMOUT"); break; default: strcpy((char *)transfer[STATUS].ob_spec,"???"); } if ((!_AccFlag) || (para.multi==MULTINE)) { strcpy((char *)transfer[BLOCKNUM].ob_spec,itoas(bnr,4,bbb,0)); strcpy((char *)transfer[RETRIES].ob_spec,itoas(ret,4,bbb,0)); objc_draw(transfer,REDRAWTF,2,x,y,w,h); } else { itoas(bnr,4,msg,1); itoas(ret,2,&msg[5],1); strcpy(&msg[8],(char *)transfer[STATUS].ob_spec); msg[12]=0; v_gtext(handle,640-12*8,13,msg); } }
M2MFstAligner::M2MFstAligner(bool _seq1_del, bool _seq2_del, int _seq1_max, int _seq2_max, string _seq1_sep, string _seq2_sep, string _s1s2_sep, string _eps, string _skip, bool _penalize) { //Base constructor. Determine whether or not to allow deletions in seq1 and seq2 // as well as the maximum allowable subsequence size. seq1_del = _seq1_del; seq2_del = _seq2_del; seq1_max = _seq1_max; seq2_max = _seq2_max; seq1_sep = _seq1_sep; seq2_sep = _seq2_sep; s1s2_sep = _s1s2_sep; penalize = _penalize; eps = _eps; skip = _skip; skipSeqs.insert(eps); isyms = new SymbolTable("syms"); //Add all the important symbols to the table. We can store these // in the model that we train and then attach them to the fst model // if we want to use it later on. //Thus, in addition to eps->0, we reserve symbol ids 1-4 as well. isyms->AddSymbol(eps); isyms->AddSymbol(skip); //The '_' as a separator here is dangerous isyms->AddSymbol(seq1_sep + "_" + seq2_sep); isyms->AddSymbol(s1s2_sep); string s1_del_str = seq1_del ? "true" : "false"; string s2_del_str = seq2_del ? "true" : "false"; string s1_max_str = itoas(seq1_max); string s2_max_str = itoas(seq2_max); string model_params = s1_del_str + "_" + s2_del_str + "_" + s1_max_str + "_" + s2_max_str; isyms->AddSymbol(model_params); total = LogWeight::Zero(); prevTotal = LogWeight::Zero(); }
int firstcall(char *uname, char *str) { char *tp; char buf[32]; memset(buf,0x00,32); tp=strstr(uname,"\t"); strncpy(buf,uname,tp-uname); uname=buf; memset(str, 0x00, MAXBUF+1); int count=0; int n=-1; free(servquery(aserv, NUSER, uname, 1, &count)); if (count==1) { str=strzcpy(str, "1", -1); } else { str=strzcpy(str, "0", -1); } free(servquery(aserv, NMIDWARE, "weblogic813", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "weblogic920", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "websphere51", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "websphere61", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "tomcat5", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "tomcat6", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); free(servquery(aserv, NMIDWARE, "weblogic816", n, &count)); str=strzcpy(str, itoas(count, "00"), -1); str[strlen(str)]='\0'; return 1; }