From 70f7f10476311288049565573338a4a821cef8a5 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 27 Jan 2017 15:55:28 -0800 Subject: Add missing `static`s and remove an unused function. --- toys/posix/ls.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'toys/posix/ls.c') diff --git a/toys/posix/ls.c b/toys/posix/ls.c index b306dc91..d2a2e466 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -65,7 +65,7 @@ GLOBALS( ) // Callback from crunch_str to represent unprintable chars -int crunch_qb(FILE *out, int cols, int wc) +static int crunch_qb(FILE *out, int cols, int wc) { unsigned len = 1; char buf[32]; @@ -98,16 +98,11 @@ int crunch_qb(FILE *out, int cols, int wc) } // Returns wcwidth(utf8) version of strlen with -qb escapes -int strwidth(char *s) +static int strwidth(char *s) { return crunch_str(&s, INT_MAX, 0, TT.escmore, crunch_qb); } -void qbstr(char *s, int width) -{ - draw_trim_esc(s, width, abs(width), TT.escmore, crunch_qb); -} - static char endtype(struct stat *st) { mode_t mode = st->st_mode; @@ -272,7 +267,7 @@ static unsigned long next_column(unsigned long ul, unsigned long dtlen, return (*xpos*height) + widecols + (ul/(columns-1)); } -int color_from_mode(mode_t mode) +static int color_from_mode(mode_t mode) { int color = 0; -- cgit v1.2.3