summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-util.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2013-03-18 00:36:01 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2013-03-18 00:36:01 +0000
commit6753a094002684a8f14232934c9cdeba13e00e8e (patch)
tree89a64604fcee875bc79d899e21a2547af3965e60 /src/xml/repr-util.cpp
parentextensions. hpgl output. further patch 2 by TimeWaster (Bug 1118663) (diff)
downloadinkscape-6753a094002684a8f14232934c9cdeba13e00e8e.tar.gz
inkscape-6753a094002684a8f14232934c9cdeba13e00e8e.zip
Fix -Wunused-function warnings
(bzr r12221)
Diffstat (limited to 'src/xml/repr-util.cpp')
-rw-r--r--src/xml/repr-util.cpp65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 7e9f9c484..6ea20b87a 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -69,71 +69,6 @@ static void sp_xml_ns_register_defaults();
static char *sp_xml_ns_auto_prefix(char const *uri);
/*#####################
-# UTILITY
-#####################*/
-
-/**
- * Locale-independent double to string conversion
- */
-static unsigned int sp_xml_dtoa(gchar *buf, double val, unsigned int tprec, unsigned int fprec, unsigned int padf)
-{
- double dival, fval, epsilon;
- int idigits, ival, i;
- i = 0;
- if (val < 0.0) {
- buf[i++] = '-';
- val = -val;
- }
- /* Determine number of integral digits */
- if (val >= 1.0) {
- idigits = (int) floor(log10(val));
- } else {
- idigits = 0;
- }
- /* Determine the actual number of fractional digits */
- fprec = MAX(fprec, tprec - idigits);
- /* Find epsilon */
- epsilon = 0.5 * pow(10.0, - (double) fprec);
- /* Round value */
- val += epsilon;
- /* Extract integral and fractional parts */
- dival = floor(val);
- ival = (int) dival;
- fval = val - dival;
- /* Write integra */
- if (ival > 0) {
- char c[32];
- int j;
- j = 0;
- while (ival > 0) {
- c[32 - (++j)] = '0' + (ival % 10);
- ival /= 10;
- }
- memcpy(buf + i, &c[32 - j], j);
- i += j;
- tprec -= j;
- } else {
- buf[i++] = '0';
- tprec -= 1;
- }
- if ((fprec > 0) && (padf || (fval > epsilon))) {
- buf[i++] = '.';
- while ((fprec > 0) && (padf || (fval > epsilon))) {
- fval *= 10.0;
- dival = floor(fval);
- fval -= dival;
- buf[i++] = '0' + (int) dival;
- fprec -= 1;
- }
-
- }
- buf[i] = 0;
- return i;
-}
-
-
-
-/*#####################
# MAIN
#####################*/