void tsFreePhoneImplementation::put_mbrola_data(CONFIG *config, SPN *ps) { int i; int dur; int j = 0; /* pointer to where in targets */ char *converted_phon; PKEY *ptmp; for(i=0;i<ps->p_sz;i++) { dur = ps->duration[i]/10.0; if((ptmp=pbinary(ps->phons[i],edin2sampa0,config->edin2sampa0_num))!=NULL) { converted_phon = ptmp->keyvalue; } else { converted_phon = "_"; fprintf(stderr,"Unrecognized phoneme: %s\n",ps->phons[i]); } fprintf(config->ofd,"%s\t%d",converted_phon,dur); while(i == ps->targ_phon[j]) { fprintf(config->ofd,"\t%d %d",ps->pc_targs[j],ps->targ_freq[j]); j++; } fprintf(config->ofd,"\n"); } fprintf(config->ofd,"#\n"); fflush(config->ofd); }
static void *salt(char *ciphertext) { static phpass_salt salt; salt.rounds = 1 << atoi64[ARCH_INDEX(ciphertext[3])]; memcpy(salt.salt, &ciphertext[4], 8); pbinary(ciphertext, (unsigned char*)salt.hash); return &salt; }
static void *binary(char *ciphertext) { static unsigned char b[BINARY_SIZE]; pbinary(ciphertext, b); return (void *) b; }