Lines Matching refs:capacity
42 size_t capacity; member
71 if (static_cast<size_t>(n) + space_for_null > ck->capacity - ck->offset) { in fmemopen_write()
72 n = ck->capacity - ck->offset - space_for_null; in fmemopen_write()
95 if (whence == SEEK_SET && (offset >= 0 && static_cast<size_t>(offset) <= ck->capacity)) { in fmemopen_seek()
97 } else if (whence == SEEK_CUR && (ck->offset + offset <= ck->capacity)) { in fmemopen_seek()
113 FILE* fmemopen(void* buf, size_t capacity, const char* mode) { in fmemopen() argument
124 ck->capacity = capacity; in fmemopen()
126 if (ck->buf == nullptr) ck->buf = ck->allocation = static_cast<char*>(calloc(capacity, 1)); in fmemopen()
143 ck->size = strnlen(ck->buf, ck->capacity); in fmemopen()
147 ck->size = capacity; in fmemopen()
152 if (capacity > 0) { in fmemopen()