Lines Matching refs:precision

5303 /* Only come in here if spec->type is CFFormatLongType or CFFormatDoubleType. Pass in 0 for width or precision if not specified. Returns false if couldn't do the format (with the assumption the caller falls back to unlocalized).
5305 static Boolean __CFStringFormatLocalizedNumber(CFMutableStringRef output, CFLocaleRef locale, const CFPrintValue *values, const CFFormatSpec *spec, SInt32 width, SInt32 precision, Boolean hasPrecision) {
5358 SInt32 prec = hasPrecision ? precision : ((spec->type == CFFormatLongType) ? 0 : 6); // default precision of printf is 6
5371 targetValue = values[spec->mainArgNum].value.longDoubleValue; // losing precision
5404 if (hasPrecision && spec->type == CFFormatLongType) { // if we have precision and %d or %u, we pad 0
5452 if (hasPrecision && spec->type == CFFormatLongType) { // if we have precision and %d or %u, we pad 0 according to precision first
5461 prec++; // for %e, precision+1 is the number of sig fig
5477 double doubleValue = values[spec->mainArgNum].value.longDoubleValue; // losing precision
5561 if (seenDot) { // after we see '.' and then we see '0', it is 0 precision. We should not see '.' after '0' if '0' is the zero padding flag
5624 if (seenDot && spec->precArg == -1 && spec->precArgNum == -1) { // for the cases that we have '.' but no precision followed, not even '*'
5682 } else if (seenDot) { /* else it's either precision or width */
5721 snprintf_l(buffer, BUFFER_LEN-1, NULL, formatBuffer, width, precision, value); \
5727 snprintf_l(buffer, BUFFER_LEN-1, NULL, formatBuffer, precision, value); \
5737 sprintf(buffer, formatBuffer, width, precision, value); \
5743 sprintf(buffer, formatBuffer, precision, value); \
5966 SInt32 width = 0, precision = 0;
5976 precision = (SInt32)values[specs[curSpec].precArgNum].value.int64Value;
5984 precision = specs[curSpec].precArg;
5993 if (__CFStringFormatLocalizedNumber(outputString, (CFLocaleRef)formatOptions, values, &specs[curSpec], width, precision, hasPrecision)) break;
6000 char buffer[BUFFER_LEN + width + precision];
6005 if (256+width+precision > BUFFER_LEN) {
6006 dynamicBuffer = (char *)CFAllocatorAllocate(kCFAllocatorSystemDefault, 256+width+precision, 0);
6103 if (hasPrecision && precision < len) len = precision;
6105 if (!hasPrecision) { // No precision, so rely on the terminating null character
6107 } else { // Don't blindly call strlen() if there is a precision; the string might not have a terminating null (3131988)
6108 const char *terminatingNull = (const char *)memchr(str, 0, precision); // Basically strlen() on only the first precision characters of str
6109 if (terminatingNull) { // There was a null in the first precision characters
6112 len = precision;
6139 //??? need to handle width, precision, and padding arguments
6149 if (hasPrecision && precision < len) len = precision;
6179 double aValue = values[specs[curSpec].mainArgNum].value.longDoubleValue; // losing precision
6202 if (hasPrecision && precision < len) len = precision;
6204 if (!hasPrecision) { // No precision, so rely on the terminating null character
6206 } else { // Don't blindly call strlen() if there is a precision; the string might not have a terminating null (3131988)
6207 const char *terminatingNull = (const char *)memchr(str, 0, precision); // Basically strlen() on only the first precision characters of str
6208 if (terminatingNull) { // There was a null in the first precision characters
6211 len = precision;
6242 //??? need to handle width, precision, and padding arguments
6251 if (hasPrecision && precision < len) len = precision;