summaryrefslogtreecommitdiffstats
path: root/text-utils/ul.c
diff options
context:
space:
mode:
authorSami Kerola2017-02-12 01:19:33 +0100
committerKarel Zak2017-02-20 12:58:49 +0100
commit2ba641e5f3879593e36fa84872289872a4060d03 (patch)
tree4381e82a91b01343555d803c8afe772e1d15826d /text-utils/ul.c
parentmisc: do not use plain 0 as NULL [smatch scan] (diff)
downloadkernel-qcow2-util-linux-2ba641e5f3879593e36fa84872289872a4060d03.tar.gz
kernel-qcow2-util-linux-2ba641e5f3879593e36fa84872289872a4060d03.tar.xz
kernel-qcow2-util-linux-2ba641e5f3879593e36fa84872289872a4060d03.zip
misc: add static keyword to where needed [smatch scan]
text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/ul.c')
-rw-r--r--text-utils/ul.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/text-utils/ul.c b/text-utils/ul.c
index de6da8178..178d5cb7f 100644
--- a/text-utils/ul.c
+++ b/text-utils/ul.c
@@ -70,7 +70,6 @@ static int put1wc(int c)
#define putwp(s) putp(s)
#endif
-static void usage(FILE *out);
static int handle_escape(FILE * f);
static void filter(FILE *f);
static void flushln(void);
@@ -101,33 +100,33 @@ static void print_out(char *line);
#define UNDERL 010 /* Ul */
#define BOLD 020 /* Bold */
-int must_use_uc, must_overstrike;
-char *CURS_UP,
- *CURS_RIGHT,
- *CURS_LEFT,
- *ENTER_STANDOUT,
- *EXIT_STANDOUT,
- *ENTER_UNDERLINE,
- *EXIT_UNDERLINE,
- *ENTER_DIM,
- *ENTER_BOLD,
- *ENTER_REVERSE,
- *UNDER_CHAR,
- *EXIT_ATTRIBUTES;
-
-struct CHAR {
+static int must_use_uc, must_overstrike;
+static char *CURS_UP,
+ *CURS_RIGHT,
+ *CURS_LEFT,
+ *ENTER_STANDOUT,
+ *EXIT_STANDOUT,
+ *ENTER_UNDERLINE,
+ *EXIT_UNDERLINE,
+ *ENTER_DIM,
+ *ENTER_BOLD,
+ *ENTER_REVERSE,
+ *UNDER_CHAR,
+ *EXIT_ATTRIBUTES;
+
+struct CHAR {
char c_mode;
wchar_t c_char;
int c_width;
};
-struct CHAR *obuf;
-int obuflen;
-int col, maxcol;
-int mode;
-int halfpos;
-int upln;
-int iflag;
+static struct CHAR *obuf;
+static int obuflen;
+static int col, maxcol;
+static int mode;
+static int halfpos;
+static int upln;
+static int iflag;
static void __attribute__((__noreturn__))
usage(FILE *out)