Lines Matching refs:str

92 int BUF_MEM_grow(BUF_MEM *str, int len)  in BUF_MEM_grow()  argument
97 if (str->length >= len) in BUF_MEM_grow()
99 str->length=len; in BUF_MEM_grow()
102 if (str->max >= len) in BUF_MEM_grow()
104 memset(&str->data[str->length],0,len-str->length); in BUF_MEM_grow()
105 str->length=len; in BUF_MEM_grow()
109 if (str->data == NULL) in BUF_MEM_grow()
112 ret=OPENSSL_realloc(str->data,n); in BUF_MEM_grow()
120 str->data=ret; in BUF_MEM_grow()
121 str->max=n; in BUF_MEM_grow()
122 memset(&str->data[str->length],0,len-str->length); in BUF_MEM_grow()
123 str->length=len; in BUF_MEM_grow()
128 int BUF_MEM_grow_clean(BUF_MEM *str, int len) in BUF_MEM_grow_clean() argument
133 if (str->length >= len) in BUF_MEM_grow_clean()
135 memset(&str->data[len],0,str->length-len); in BUF_MEM_grow_clean()
136 str->length=len; in BUF_MEM_grow_clean()
139 if (str->max >= len) in BUF_MEM_grow_clean()
141 memset(&str->data[str->length],0,len-str->length); in BUF_MEM_grow_clean()
142 str->length=len; in BUF_MEM_grow_clean()
146 if (str->data == NULL) in BUF_MEM_grow_clean()
149 ret=OPENSSL_realloc_clean(str->data,str->max,n); in BUF_MEM_grow_clean()
157 str->data=ret; in BUF_MEM_grow_clean()
158 str->max=n; in BUF_MEM_grow_clean()
159 memset(&str->data[str->length],0,len-str->length); in BUF_MEM_grow_clean()
160 str->length=len; in BUF_MEM_grow_clean()
165 char *BUF_strdup(const char *str) in BUF_strdup() argument
167 if (str == NULL) return(NULL); in BUF_strdup()
168 return BUF_strndup(str, strlen(str)); in BUF_strdup()
171 char *BUF_strndup(const char *str, size_t siz) in BUF_strndup() argument
175 if (str == NULL) return(NULL); in BUF_strndup()
183 BUF_strlcpy(ret,str,siz+1); in BUF_strndup()