/* * my_delay - set delay for auth requests */ static void my_delay( struct parse *pcmd, FILE *fp ) { int isneg; u_long val; if (pcmd->nargs == 0) { val = delay_time.l_ui * 1000 + delay_time.l_uf / 4294967; (void) fprintf(fp, "delay %lu ms\n", val); } else { if (pcmd->argval[0].ival < 0) { isneg = 1; val = (u_long)(-pcmd->argval[0].ival); } else { isneg = 0; val = (u_long)pcmd->argval[0].ival; } delay_time.l_ui = val / 1000; val %= 1000; delay_time.l_uf = val * 4294967; /* 2**32/1000 */ if (isneg) L_NEG(&delay_time); } }
LFP LFP::neg() const { LFP tmp(*this); L_NEG(&tmp._v); return tmp; }
LFP LFP::abs() const { LFP tmp(*this); if (L_ISNEG(&tmp._v)) L_NEG(&tmp._v); return tmp; }
l_fp l_fp_abs(const l_fp first) { l_fp temp = first; if (L_ISNEG(&temp)) L_NEG(&temp); return temp; }
l_fp l_fp_negate(const l_fp first) { l_fp temp = first; L_NEG(&temp); return temp; }
LFP LFP::operator-() const { LFP tmp(*this); L_NEG(&tmp._v); return tmp; }