diff options
Diffstat (limited to 'toys')
-rw-r--r-- | toys/net/ftpget.c | 2 | ||||
-rw-r--r-- | toys/net/ifconfig.c | 2 | ||||
-rw-r--r-- | toys/other/acpi.c | 2 | ||||
-rw-r--r-- | toys/posix/cp.c | 2 | ||||
-rw-r--r-- | toys/posix/cpio.c | 2 | ||||
-rw-r--r-- | toys/posix/ls.c | 11 | ||||
-rw-r--r-- | toys/posix/ps.c | 2 |
7 files changed, 9 insertions, 14 deletions
diff --git a/toys/net/ftpget.c b/toys/net/ftpget.c index 6ead05ef..94e5caed 100644 --- a/toys/net/ftpget.c +++ b/toys/net/ftpget.c @@ -54,7 +54,7 @@ GLOBALS( ) // we should get one line of data, but it may be in multiple chunks -int xread2line(int fd, char *buf, int len) +static int xread2line(int fd, char *buf, int len) { int i, total = 0; diff --git a/toys/net/ifconfig.c b/toys/net/ifconfig.c index 174369fe..fe58b653 100644 --- a/toys/net/ifconfig.c +++ b/toys/net/ifconfig.c @@ -58,7 +58,7 @@ GLOBALS( // Convert hostname to binary address for AF_INET or AF_INET6 // return /prefix (or range max if none) -int get_addrinfo(char *host, sa_family_t af, void *addr) +static int get_addrinfo(char *host, sa_family_t af, void *addr) { struct addrinfo hints, *result, *rp = 0; int status, len; diff --git a/toys/other/acpi.c b/toys/other/acpi.c index 2f856c8d..b73cff95 100644 --- a/toys/other/acpi.c +++ b/toys/other/acpi.c @@ -29,7 +29,7 @@ GLOBALS( char *cpath; ) -int read_int_at(int dirfd, char *name) +static int read_int_at(int dirfd, char *name) { int fd, ret=0; FILE *fil; diff --git a/toys/posix/cp.c b/toys/posix/cp.c index 0dd63a7d..d4475a02 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -123,7 +123,7 @@ struct cp_preserve { // Callback from dirtree_read() for each file/directory under a source dir. -int cp_node(struct dirtree *try) +static int cp_node(struct dirtree *try) { int fdout = -1, cfd = try->parent ? try->parent->extra : AT_FDCWD, tfd = dirtree_parentfd(try); diff --git a/toys/posix/cpio.c b/toys/posix/cpio.c index 3bd40f47..5524dba2 100644 --- a/toys/posix/cpio.c +++ b/toys/posix/cpio.c @@ -61,7 +61,7 @@ static char *strpad(int fd, unsigned len, unsigned align) } //convert hex to uint; mostly to allow using bits of non-terminated strings -unsigned x8u(char *hex) +static unsigned x8u(char *hex) { unsigned val, inpos = 8, outpos; char pattern[6]; 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; diff --git a/toys/posix/ps.c b/toys/posix/ps.c index 35763509..76bd2e48 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -975,7 +975,7 @@ static char *parse_ko(void *data, char *type, int length) return 0; } -long long get_headers(struct strawberry *fields, char *buf, int blen) +static long long get_headers(struct strawberry *fields, char *buf, int blen) { long long bits = 0; int len = 0; |