pike.git / src / modules / Gmp / mpq.cmod

version» Context lines:

pike.git/src/modules/Gmp/mpq.cmod:532:    if (len < 1) len = 1;    while(s->str[len]) len++;    memmove(s->str, s->str+1, len-prec);    }else{    /* Shift the fractional part backward to make room for the dot. */    mpz_get_str(s->str, 10, num);    /* Find NULL character */    len-=5;    if (len < 0) len = 0;    while(s->str[len]) len++; -  memmove(s->str+len-prec+1, -  s->str+len-prec, -  prec+1); +  memmove(s->str+len-prec+2, +  s->str+len-prec+1, +  prec);    len++;    }    /* Make sure numbers start with a digit */    if ((len == prec) || ((unsigned)(s->str[len-prec-1] - '0') > 9)) {    memmove(s->str+len-prec+1, s->str+len-prec, prec);    s->str[len++ -prec] = '0';    }    s->str[len-prec]='.';    push_string (end_and_resize_shared_string (s, len));    }