Home | History | Annotate | Download | only in mDNSShared

Lines Matching refs:precision

1166 //	Added %S   - UTF-16 string. Host order if no BOM. Precision is UTF-16 char count. BOM counts in any precision. Arg=ptr.
1201 unsigned int precision;
1255 if (c == '.') // decode precision
1258 { F.precision = va_arg(arg, unsigned int); c = *++fmt; }
1260 F.precision = (10 * F.precision) + (c - '0');
1290 F.precision = (sizeof(uintptr_t) == 4) ? 8 : 16;
1335 F.precision = F.fieldWidth;
1336 if (F.altForm) F.precision -= 2;
1337 if (F.sign) --F.precision;
1339 if (F.precision < 1) F.precision = 1;
1341 if (F.precision > mDNS_VACB_Size - 1)
1342 F.precision = mDNS_VACB_Size - 1;
1344 for (; i < F.precision; i++) *--s = '0';
1363 case mDNSAddrType_IPv4: F.precision = 4; a = (unsigned char *)&ip->ip.v4; break;
1364 case mDNSAddrType_IPv6: F.precision = 16; a = (unsigned char *)&ip->ip.v6; break;
1365 default: F.precision = 0; break;
1368 F.precision = 0; // mDNSEmbeddedAPI.h not included so no mDNSAddr support
1379 case AF_INET: F.precision = 4; a = (unsigned char*)&((const struct sockaddr_in *)a)->sin_addr;
1383 case AF_INET6: F.precision = 16; a = (unsigned char*)&((const struct sockaddr_in6 *)a)->sin6_addr;
1390 default: F.precision = 0; break;
1393 F.precision = 0; // socket interfaces not included so no sockaddr support
1396 switch (F.precision)
1447 while((i < F.precision) && s[i]) i++;
1480 if (F.havePrecision && i > F.precision) // Make sure we don't truncate in the middle of a UTF-8 character
1481 { i = F.precision; while (i>0 && (s[i] & 0xC0) == 0x80) i--; }
1488 if ((!F.havePrecision || F.precision))
1490 if ((a[0] == 0xFE) && (a[1] == 0xFF)) { F.altForm = 1; u += 1; a += 2; F.precision--; } // Big Endian
1491 else if ((a[0] == 0xFF) && (a[1] == 0xFE)) { F.altForm = 2; u += 1; a += 2; F.precision--; } // Little Endian
1496 case 0: while ((!F.havePrecision || (i < F.precision)) && u[i] && mDNS_VACB_Remain(s)) // Host Endian
1499 case 1: while ((!F.havePrecision || (i < F.precision)) && u[i] && mDNS_VACB_Remain(s)) // Big Endian
1502 case 2: while ((!F.havePrecision || (i < F.precision)) && u[i] && mDNS_VACB_Remain(s)) // Little Endian
1532 if (F.havePrecision && i > F.precision) // Make sure we don't truncate in the middle of a UTF-8 character
1533 { i = F.precision; while (i>0 && (s[i] & 0xC0) == 0x80) i--; }