Lines Matching defs:unit
107 scale_t *scale, char *unit, int flags) {
127 * hex letters cannot be disserned from modifier or unit letters
132 /* unit cannot be required on hex values */
133 if ((unit && *unit != '\0') &&
222 /* if unit is present when no unit is allowed, fail */
223 if ((unit == NULL || *unit == '\0') && (*endptr != '\0'))
226 /* check for missing unit when unit is required */
227 if ((unit && *unit != '\0') &&
232 /* validate unit */
233 if (unit && *unit != '\0') {
235 /* allow for missing unit if it is optional */
241 cmp = strncasecmp(unit, endptr, strlen(unit));
243 cmp = strncmp(unit, endptr, strlen(unit));
248 if (*(endptr + strlen(unit)) != '\0')
252 *unitout = unit;
261 scale_t *scale, char *unit, int flags) {
282 if (unit && *unit != '\0')
283 (void) strcat(scaledout, unit);
336 if (unit && *unit != '\0')
337 (void) strcat(scaledout, unit);
348 scale_t *scale, char *unit, int flags) {
354 scale, unit, flags);
360 scale, unit, flags);
367 scale_t *scale, char *unit, int flags) {
390 scale, unit, flags);
395 scale, unit, flags);
433 * 3. The first number is missing an optional unit string.
434 * 4. Fix casing of modifier and unit.
438 scaledA, NULL, NULL, scale, unit, flags);
444 scaledB, NULL, NULL, scale, unit, flags);
456 scale_t *scale, char *unit, int flags) {
468 scale, unit, flags);
482 * 3. The first number is missing an optional unit string.
483 * 4. Fix casing of modifier and unit.
487 scaledA, NULL, NULL, scale, unit, flags);
493 scaledB, NULL, NULL, scale, unit, flags);