Lines Matching refs:buf
63 static unsigned int sp_svg_number_write_ui(gchar *buf, unsigned int val)
72 memcpy(buf, &c[16u - i], i);
73 buf[i] = 0;
80 static unsigned int sp_svg_number_write_i(gchar *buf, int bufLen, int val)
85 buf[p++] = '-';
91 p += sp_svg_number_write_ui(buf+p, uval);
98 static unsigned sp_svg_number_write_d(gchar *buf, int bufLen, double val, unsigned int tprec, unsigned int fprec)
103 buf[i++] = '-';
122 i += sp_svg_number_write_ui(buf + i, (unsigned int)floor(dival/pow(10.0, idigits-tprec) + .5));
124 buf[i+j] = '0';
128 i += sp_svg_number_write_ui(buf + i, (unsigned int)dival);
132 buf[i++] = '.';
138 buf[i++] = '0' + int_dival;
145 buf[end_i] = 0;
149 unsigned int sp_svg_number_write_de(gchar *buf, int bufLen, double val, unsigned int tprec, int min_exp)
153 return sp_svg_number_write_ui(buf, 0);
161 return sp_svg_number_write_d(buf, bufLen, val, tprec, 0);
164 int p = sp_svg_number_write_d(buf, bufLen, val, tprec, 0);
165 buf[p++] = 'e';
166 p += sp_svg_number_write_i(buf + p, bufLen - p, eval);