Lines Matching full:size_t
1 /* xsize.h -- Checked size_t computations.
23 /* Get size_t. */
33 type size_t. Example:
44 size_t size = xsum (header_size, xtimes (n, element_size));
48 /* Convert an arbitrary value >= 0 to type size_t. */
50 ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
53 static inline size_t
57 xsum (size_t size1, size_t size2)
59 size_t sum = size1 + size2;
64 static inline size_t
68 xsum3 (size_t size1, size_t size2, size_t size3)
74 static inline size_t
78 xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
84 static inline size_t
88 xmax (size_t size1, size_t size2)
100 ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)