From aa28590647251cfd8f4f2b805a56c1b741aca565 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 9 Sep 2020 20:32:37 +0100 Subject: Make functions static --- test_gen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test_gen.c') diff --git a/test_gen.c b/test_gen.c index f5ec5c0..d7c4cef 100644 --- a/test_gen.c +++ b/test_gen.c @@ -19,14 +19,14 @@ struct { { LITTLE, "<" }, }; -char cchar(char c) +static char cchar(char c) { if (c == '\0') return c; if (isalnum(c)) return c; return '_'; } -const char *cname(const char *s) +static const char *cname(const char *s) { static char ret[100]; for (int i = 0; i < 99; i++) { @@ -36,7 +36,7 @@ const char *cname(const char *s) return ret; } -const char *u2bytes(enum endian e, int n, uintmax_t v) +static const char *u2bytes(enum endian e, int n, uintmax_t v) { static char b[100]; char *p = b; @@ -52,7 +52,7 @@ const char *u2bytes(enum endian e, int n, uintmax_t v) return b; } -uintmax_t i2u(int n, intmax_t v) +static uintmax_t i2u(int n, intmax_t v) { if (v >= 0) return v; @@ -60,12 +60,12 @@ uintmax_t i2u(int n, intmax_t v) return (UINTMAX_MAX >> (sizeof (uintmax_t) * CHAR_BIT - n * 8)) + v + 1; } -const char *i2bytes(enum endian e, int n, intmax_t v) +static const char *i2bytes(enum endian e, int n, intmax_t v) { return u2bytes(e, n, i2u(n, v)); } -void generate_simple(FILE *out, char fmt, const char *type, intmax_t min, uintmax_t max, int size) +static void generate_simple(FILE *out, char fmt, const char *type, intmax_t min, uintmax_t max, int size) { unsigned char data[8]; char *prefix; -- cgit v1.2.3-54-g00ecf