1
0
Fork 0

Melchior FRANZ:

The previous message wasn't totally correct. Strings are now allowed, too. And
the pattern is now '[ -+#]?\d*(\.\d*)?l?[fs]' and *may* be embedded in a string.
There may only be one %s or %f, though. %% is allowed in the preamble/postamble.
(Yes, %ls is allowed, too, and treated as %s.)

Also, "end" is superfluous now.
This commit is contained in:
ehofman 2005-03-26 10:45:00 +00:00
parent db989269b8
commit 71dd0f8f96

View file

@ -141,13 +141,11 @@ format_callback(puObject *obj, int dx, int dy, void *n)
}
}
char buf[256], *end;
char buf[256];
const char *src = obj->getLabel();
if (number) {
float value = atof(src);
if (end == src)
return; // not a number
snprintf(buf, 256, format, value);
} else {
snprintf(buf, 256, format, src);