Lines Matching defs:width
88 // Show width many columns, negative means from right edge, out=0 just measure
90 // Returns width in columns, moves *str to end of data consumed.
91 int crunch_str(char **str, int width, FILE *out, char *escmore,
101 if (width-columns<col) break;
112 col = width-columns;
152 // Write width chars at start of string to strdout with standard escapes
154 int draw_str(char *start, int width)
156 return crunch_str(&start, width, stdout, 0, crunch_rev_escape);
166 int utf8skip(char *str, int width)
170 crunch_str(&s, width, 0, 0, crunch_rev_escape);
175 // Print utf8 to stdout with standard escapes, trimmed to width and padded
177 int draw_trim_esc(char *str, int padto, int width, char *escmore,
182 if (padto>=0 && len>width) str += utf8skip(str, len-width);
183 if (len>width) len = width;
194 int draw_trim(char *str, int padto, int width)
196 return draw_trim_esc(str, padto, width, 0, 0);