Lines Matching +full:cs +full:- +full:number
1 /* SPDX-License-Identifier: GPL-2.0 */
44 #define TF_INMDT 0xc1 /* Visible, Set-MDT */
55 /* Extended-Highlighting Bytes */
80 #define RAW3270_FIRSTMINOR 1 /* First minor number */
81 #define RAW3270_MAXDEVS 255 /* Max number of 3270 devices */
123 return list_empty(&rq->list); in raw3270_request_final()
159 unsigned char *ascebc; /* ascii -> ebcdic table */
179 atomic_inc(&view->ref_count); in raw3270_get_view()
187 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
219 struct string *cs, *tmp; in alloc_string() local
222 size = (len + 7L) & -8L; in alloc_string()
223 list_for_each_entry(cs, free_list, list) { in alloc_string()
224 if (cs->size < size) in alloc_string()
226 if (cs->size > size + sizeof(struct string)) { in alloc_string()
227 char *endaddr = (char *) (cs + 1) + cs->size; in alloc_string()
228 tmp = (struct string *) (endaddr - size) - 1; in alloc_string()
229 tmp->size = size; in alloc_string()
230 cs->size -= size + sizeof(struct string); in alloc_string()
231 cs = tmp; in alloc_string()
233 list_del(&cs->list); in alloc_string()
234 cs->len = len; in alloc_string()
235 INIT_LIST_HEAD(&cs->list); in alloc_string()
236 INIT_LIST_HEAD(&cs->update); in alloc_string()
237 return cs; in alloc_string()
243 free_string(struct list_head *free_list, struct string *cs) in free_string() argument
251 if (list_entry(p, struct string, list) > cs) in free_string()
256 if (left->next != free_list) { in free_string()
257 tmp = list_entry(left->next, struct string, list); in free_string()
258 if ((char *) (cs + 1) + cs->size == (char *) tmp) { in free_string()
259 list_del(&tmp->list); in free_string()
260 cs->size += tmp->size + sizeof(struct string); in free_string()
266 if ((char *) (tmp + 1) + tmp->size == (char *) cs) { in free_string()
267 tmp->size += cs->size + sizeof(struct string); in free_string()
268 return tmp->size; in free_string()
271 __list_add(&cs->list, left, left->next); in free_string()
272 return cs->size; in free_string()
278 struct string *cs; in add_string_memory() local
280 cs = (struct string *) mem; in add_string_memory()
281 cs->size = size - sizeof(struct string); in add_string_memory()
282 free_string(free_list, cs); in add_string_memory()