static void apply_vbr_preset(lame_global_flags * gfp, int a, int enforce) { vbr_presets_t const *vbr_preset = get_vbr_preset(lame_get_VBR(gfp)); float x = gfp->VBR_q_frac; vbr_presets_t p = vbr_preset[a]; vbr_presets_t q = vbr_preset[a + 1]; vbr_presets_t const *set = &p; NOOP(vbr_q); NOOP(quant_comp); NOOP(quant_comp_s); NOOP(expY); LERP(st_lrm); LERP(st_s); LERP(masking_adj); LERP(masking_adj_short); LERP(ath_lower); LERP(ath_curve); LERP(ath_sensitivity); LERP(interch); NOOP(safejoint); LERP(sfb21mod); LERP(msfix); LERP(minval); LERP(ath_fixpoint); (void) lame_set_VBR_q(gfp, set->vbr_q); SET_OPTION(quant_comp, set->quant_comp, -1); SET_OPTION(quant_comp_short, set->quant_comp_s, -1); if (set->expY) { (void) lame_set_experimentalY(gfp, set->expY); } SET_OPTION(short_threshold_lrm, set->st_lrm, -1); SET_OPTION(short_threshold_s, set->st_s, -1); SET_OPTION(maskingadjust, set->masking_adj, 0); SET_OPTION(maskingadjust_short, set->masking_adj_short, 0); if (lame_get_VBR(gfp) == vbr_mt || lame_get_VBR(gfp) == vbr_mtrh) { lame_set_ATHtype(gfp, 5); } SET_OPTION(ATHlower, set->ath_lower, 0); SET_OPTION(ATHcurve, set->ath_curve, -1); SET_OPTION(athaa_sensitivity, set->ath_sensitivity, 0); if (set->interch > 0) { SET_OPTION(interChRatio, set->interch, -1); } /* parameters for which there is no proper set/get interface */ if (set->safejoint > 0) { (void) lame_set_exp_nspsytune(gfp, lame_get_exp_nspsytune(gfp) | 2); } if (set->sfb21mod > 0) { int const nsp = lame_get_exp_nspsytune(gfp); int const val = (nsp >> 20) & 63; if (val == 0) { int const sf21mod = (set->sfb21mod << 20) | nsp; (void) lame_set_exp_nspsytune(gfp, sf21mod); } }
void RedisApi::updateAutoCompletionList(const QStringList& context, QStringList& list) { for(QStringList::const_iterator it = context.begin(); it != context.end(); ++it){ QString val = *it; for(std::vector<QString>::const_iterator jt = redisCommandsKeywords.begin(); jt != redisCommandsKeywords.end(); ++jt){ QString jval = *jt; if(jval.startsWith(val, Qt::CaseInsensitive) || (val == ALL_COMMANDS && context.size() == 1) ){ list.append(jval + "?1"); } } for(std::vector<QString>::const_iterator jt = redisTypesKeywords.begin(); jt != redisTypesKeywords.end(); ++jt){ QString jval = *jt; if(jval.startsWith(val, Qt::CaseInsensitive) || (val == ALL_COMMANDS && context.size() == 1) ){ list.append(jval + "?2"); } } for(std::vector<QString>::const_iterator jt = redisSentinelKeywords.begin(); jt != redisSentinelKeywords.end(); ++jt){ QString jval = *jt; if(jval.startsWith(val, Qt::CaseInsensitive) || (val == ALL_COMMANDS && context.size() == 1) ){ list.append(jval + "?3"); } } if(help.startsWith(val, Qt::CaseInsensitive) || (val == ALL_COMMANDS && context.size() == 1) ){ list.append(help + "?4"); } } NOOP(); }
void poweron_channel_check(static_config *jtpz,dynamic_config *dtpz) { MTqueued = 0; MTMSN = 0; MTLENGTH = 0; MO = 0; MT = 0; MOMSN = 0; NOOP(jtpz,dtpz); AT_test(); if ((OpenPort_state == Error) && (Modem_state == OK)) Comm_Channel = MODEM; printf("+++++++++ poweron_channel_check ++++++++++++++++++\n"); printf("OpenPort_state = %d\n",OpenPort_state); printf("Modem_state = %d\n",Modem_state); printf("Comm_channel=%d\n",Comm_Channel); printf("+++++++++++++++++++++++++++++++++++++++++++++++++++\n"); time_t start; time(&start); // start time ; OpenPort_last_time = start; Modem_last_time = start; //= 600 }
fuse suffocate(fuse_arg *arg) { NOOP(arg); death(D_SUFFOCATION); }
fuse unstink(fuse_arg *arg) { NOOP(arg); turn_off(player, HASSTINK); }
void tstp(int ignored) { int y, x; int oy, ox; NOOP(ignored); /* * leave nicely */ getyx(curscr, oy, ox); mvcur(0, COLS - 1, LINES - 1, 0); endwin(); resetltchars(); fflush(stdout); md_tstpsignal(); /* * start back up again */ md_tstpresume(); raw(); noecho(); keypad(stdscr,1); playltchars(); clearok(curscr, TRUE); wrefresh(curscr); getyx(curscr, y, x); mvcur(y, x, oy, ox); fflush(stdout); curscr->_cury = oy; curscr->_curx = ox; }
fuse noslow(fuse_arg *arg) { NOOP(arg); turn_off(player, ISSLOW); msg("You feel yourself speeding up."); }
fuse nohaste(fuse_arg *arg) { NOOP(arg); turn_off(player, ISHASTE); msg("You feel yourself slowing down."); }
fuse unclrhead(fuse_arg *arg) { NOOP(arg); turn_off(player, ISCLEAR); msg("The blue aura about your head fades away."); }
fuse hear(fuse_arg *arg) { NOOP(arg); turn_off(player, ISDEAF); msg("You can hear again."); }
fuse unhear(fuse_arg *arg) { NOOP(arg); turn_off(player, CANHEAR); msg("The sounds of monsters fades away."); }
fuse scent(fuse_arg *arg) { NOOP(arg); turn_off(player, ISUNSMELL); msg("You begin to smell the damp dungeon air again."); }
fuse unscent(fuse_arg *arg) { NOOP(arg); turn_off(player, CANSCENT); msg("The smell of monsters goes away."); }
fuse swander(fuse_arg *arg) { NOOP(arg); start_daemon(DAEMON_ROLLWAND, 0, BEFORE); return; }
fuse ungaze(fuse_arg *arg) { NOOP(arg); msg("The shiny particles swirl to the floor."); turn_off(player, CANREFLECT); }
fuse unmshield(fuse_arg *arg) { NOOP(arg); turn_off(player, HASMSHIELD); msg("The fog dissapates."); }
fuse unsupereat(fuse_arg *arg) { NOOP(arg); turn_off(player, SUPEREAT); msg("You stop feeling so hungry."); }
void nothing_message(int flags) { int adverb = rnd(sizeof(nothings) / sizeof(char *)); NOOP(flags); msg("Nothing %shappens.", nothings[adverb]); }
fuse unconfuse(fuse_arg *arg) { NOOP(arg); turn_off(player, ISHUH); msg("You feel less confused now."); return; }
fuse unelectrify(fuse_arg *arg) { NOOP(arg); turn_off(player, ISELECTRIC); msg("The sparks and violet glow from your body fade away."); light(&hero); }
fuse unshield(fuse_arg *arg) { NOOP(arg); turn_off(player, HASSHIELD); pstats.s_arm -= pstats.s_acmod; pstats.s_acmod = 0; msg("Your skin feels normal."); }
fuse unregen(fuse_arg *arg) { NOOP(arg); turn_off(player, ISREGEN); if (!is_wearing(R_REGEN)) msg("Your metabolism slows down."); }
fuse unbreathe(fuse_arg *arg) { NOOP(arg); turn_off(player, HASOXYGEN); if (!is_wearing(R_BREATHE)) msg("You start huffing and puffing."); }
fuse unfly(fuse_arg *arg) { NOOP(arg); turn_off(player, CANFLY); if (!is_wearing(R_LEVITATION)) msg("You float gently to the ground."); }
fuse unhot(fuse_arg *arg) { NOOP(arg); turn_off(player, NOFIRE); if (!is_wearing(R_FIRERESIST)) msg("You feel a flush of warmth."); }
fuse uncold(fuse_arg *arg) { NOOP(arg); turn_off(player, NOCOLD); if (!is_wearing(R_COLDRESIST)) msg("You feel a slight chill in the air."); }
fuse shero(fuse_arg *arg) { NOOP(arg); msg("You feel normal again."); chg_str(2, FALSE, TRUE); chg_dext(2, FALSE, TRUE); turn_off(player, ISUNHERO); }
fuse appear(fuse_arg *arg) { NOOP(arg); turn_off(player, ISINVIS); PLAYER = VPLAYER; msg("The tingling feeling leaves your body."); light(&hero); }
fuse unbhero(fuse_arg *arg) { NOOP(arg); msg("Your feeling of invincibility goes away."); turn_off(player, SUPERHERO); chg_str(-10, FALSE, FALSE); chg_dext(-5, FALSE, FALSE); }
fuse undisguise(fuse_arg *arg) { NOOP(arg); msg("Your skin feels itchy for a moment."); turn_off(player, ISDISGUISE); PLAYER = VPLAYER; light(&hero); }