Lines Matching refs:len
11 if (pos > catch->len) error_exit("linestack_addstack past end."); in linestack_addstack()
14 if (catch->len+throw->len >= catch->max) { in linestack_addstack()
16 catch->max = ((catch->len+throw->len)|63)+1; in linestack_addstack()
22 if (pos != catch->len) in linestack_addstack()
23 memmove((*lls)->idx+pos+throw->len, catch->idx+pos, in linestack_addstack()
24 (catch->len-pos)*sizeof(struct ptr_len)); in linestack_addstack()
32 memcpy(catch->idx+pos, throw->idx, throw->len*sizeof(struct ptr_len)); in linestack_addstack()
33 catch->len += throw->len; in linestack_addstack()
36 void linestack_insert(struct linestack **lls, long pos, char *line, long len) in linestack_insert() argument
46 ls.ls.len = ls.ls.max = 1; in linestack_insert()
48 ls.ls.idx[0].len = len; in linestack_insert()
54 linestack_insert(lls, (*lls)->len, line, strlen(line)); in linestack_append()
68 ssize_t len; in linestack_load() local
70 if ((len = getline(&line, (void *)&len, fp))<1) break; in linestack_load()
71 if (line[len-1]=='\n') len--; in linestack_load()
72 linestack_insert(&ls, ls->len, line, len); in linestack_load()
150 int apad = abs(padto), len = utf8len(str); in draw_trim() local
152 if (padto<0 && len>width) str += utf8skip(str, len-width); in draw_trim()
153 if (len>width) len = width; in draw_trim()
156 if (padto>0 && apad>len) printf("%*s", apad-len, ""); in draw_trim()
157 crunch_str(&str, len, stdout, 0); in draw_trim()
158 if (padto<0 && apad>len) printf("%*s", apad-len, ""); in draw_trim()
160 return (apad > len) ? apad : len; in draw_trim()