Added "u" as a recognized suffix to dimensions, meaning the same

thing as "micron" or "um", since it is regularly used that way.
This commit is contained in:
Tim Edwards 2023-11-10 09:45:32 -05:00
parent 67d68717ca
commit 1131085d0f
1 changed files with 5 additions and 0 deletions

View File

@ -190,6 +190,11 @@ cmdScaleCoord(w, arg, is_relative, is_x, scale)
return round(dval);
}
}
else if (!strcmp(endptr, "u"))
/* Maybe "u" is too ambiguous but it is very commonly used as
* an abbreviation for "micron".
*/
mscale = 1000;
else if (!strncmp(endptr, "micron", 6))
mscale = 1000;
else if (!strncmp(endptr, "centimicron", 11) || !strcmp(endptr, "cu"))