Lines Matching refs:width
79 // Show width many columns, negative means from right edge.
83 // Returns width in columns, moves *str to end of data consumed.
84 int crunch_str(char **str, int width, FILE *out,
97 if (width-columns<col) break;
99 } else if (!escout || 0>(col = escout(out, width-columns, &end))) {
111 if (width-columns<col) buf[col = width-columns] = 0;
123 // Write width chars at start of string to strdout with standard escapes
125 int draw_str(char *start, int width)
127 return crunch_str(&start, width, stdout, 0);
137 int utf8skip(char *str, int width)
141 crunch_str(&s, width, 0, 0);
146 // Print utf8 to stdout with standard escapes,trimmed to width and padded
148 int draw_trim(char *str, int padto, int width)
152 if (padto<0 && len>width) str += utf8skip(str, len-width);
153 if (len>width) len = width;