bulia byak wrote:
I applied your first three patches, thanks.
You are my boy ;-)
Please resend this patch in diff -u format as were the previous ones.
see attached file
Adib.
--- sp-polygon.cpp 2004-03-27 11:07:45.000000000 +0100 +++ sp-polygon.adib.cpp 2004-03-26 18:39:11.000000000 +0100 @@ -17,8 +17,9 @@ #include <stdlib.h> #include "attributes.h" #include "sp-polygon.h" #include "helper/sp-intl.h" +#include "stringstream.h"
static void sp_polygon_class_init (SPPolygonClass *klass); static void sp_polygon_init (SPPolygon *polygon);
@@ -95,33 +96,28 @@ */ static gchar * sp_svg_write_polygon (const ArtBpath * bpath) { - GString *result; + Inkscape::SVGOStringStream os; int i; - char *res; g_return_val_if_fail (bpath != NULL, NULL);
- result = g_string_sized_new (40); - for (i = 0; bpath[i].code != ART_END; i++){ switch (bpath [i].code){ case ART_LINETO: case ART_MOVETO: case ART_MOVETO_OPEN: - g_string_sprintfa (result, "%g,%g ", bpath [i].x3, bpath [i].y3); + os << bpath [i].x3 << "," << bpath [i].y3 << " "; break;
case ART_CURVETO: default: g_assert_not_reached (); } } - res = result->str; - g_string_free (result, FALSE); - - return res; + + return g_strdup (os.str().c_str()); }
static SPRepr * sp_polygon_write (SPObject *object, SPRepr *repr, guint flags)