result = (char *)lwalloc(128+offset);
- sprintf(result, "%*.s%s[%s]\n",
+ sprintf(result, "%*.s%s[%s]",
offset, pad, lwtype_name(point->type),
zmflags);
return result;
result = (char *)lwalloc(128+offset);
- sprintf(result, "%*.s%s[%s] with %d points\n",
+ sprintf(result, "%*.s%s[%s] with %d points",
offset, pad, lwtype_name(line->type),
zmflags,
line->points->npoints);
char *result;
char *tmp;
int i;
+ static char *nl = "\n";
char *pad="";
char *zmflags = lwtype_flagchars(col->flags);
result = lwrealloc(result, size);
LWDEBUGF(4, "Reallocated %d bytes for result", size);
+ if ( i > 0 ) strcat(result,nl);
strcat(result, tmp);
lwfree(tmp);
char *result;
int i;
char *pad="";
+ static char *nl = "\n";
char *zmflags = lwtype_flagchars(poly->flags);
LWDEBUG(2, "lwpoly_summary called");
for (i=0; i<poly->nrings; i++)
{
- sprintf(tmp,"%s ring %i has %i points\n",
+ sprintf(tmp,"%s ring %i has %i points",
pad, i, poly->rings[i]->npoints);
+ if ( i > 0 ) strcat(result,nl);
strcat(result,tmp);
}