summaryrefslogtreecommitdiffstats
path: root/text-utils/pg.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/pg.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/pg.c')
-rw-r--r--text-utils/pg.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/text-utils/pg.c b/text-utils/pg.c
index ed62adcfd..b05ec3d70 100644
--- a/text-utils/pg.c
+++ b/text-utils/pg.c
@@ -96,7 +96,7 @@ enum {
};
/* Current command */
-struct {
+static struct {
char cmdline[CMDBUF];
size_t cmdlen;
int count;
@@ -106,42 +106,42 @@ struct {
} cmd;
/* Position of file arguments on argv[] to main() */
-struct {
+static struct {
int first;
int current;
int last;
} files;
-void (*oldint) (int); /* old SIGINT handler */
-void (*oldquit) (int); /* old SIGQUIT handler */
-void (*oldterm) (int); /* old SIGTERM handler */
-char *tty; /* result of ttyname(1) */
-unsigned ontty; /* whether running on tty device */
-unsigned exitstatus; /* exit status */
-int pagelen = 23; /* lines on a single screen page */
-int ttycols = 79; /* screen columns (starting at 0) */
-struct termios otio; /* old termios settings */
-int tinfostat = -1; /* terminfo routines initialized */
-int searchdisplay = TOP; /* matching line position */
-regex_t re; /* regular expression to search for */
-int remembered; /* have a remembered search string */
-int cflag; /* clear screen before each page */
-int eflag; /* suppress (EOF) */
-int fflag; /* do not split lines */
-int nflag; /* no newline for commands required */
-int rflag; /* "restricted" pg */
-int sflag; /* use standout mode */
-const char *pstring = ":"; /* prompt string */
-char *searchfor; /* search pattern from argv[] */
-int havepagelen; /* page length is manually defined */
-long startline; /* start line from argv[] */
-int nextfile = 1; /* files to advance */
-jmp_buf jmpenv; /* jump from signal handlers */
-int canjump; /* jmpenv is valid */
-wchar_t wbuf[READBUF]; /* used in several widechar routines */
-
-char *copyright;
-const char *helpscreen = N_("\
+static void (*oldint) (int); /* old SIGINT handler */
+static void (*oldquit) (int); /* old SIGQUIT handler */
+static void (*oldterm) (int); /* old SIGTERM handler */
+static char *tty; /* result of ttyname(1) */
+static unsigned ontty; /* whether running on tty device */
+static unsigned exitstatus; /* exit status */
+static int pagelen = 23; /* lines on a single screen page */
+static int ttycols = 79; /* screen columns (starting at 0) */
+static struct termios otio; /* old termios settings */
+static int tinfostat = -1; /* terminfo routines initialized */
+static int searchdisplay = TOP; /* matching line position */
+static regex_t re; /* regular expression to search for */
+static int remembered; /* have a remembered search string */
+static int cflag; /* clear screen before each page */
+static int eflag; /* suppress (EOF) */
+static int fflag; /* do not split lines */
+static int nflag; /* no newline for commands required */
+static int rflag; /* "restricted" pg */
+static int sflag; /* use standout mode */
+static const char *pstring = ":"; /* prompt string */
+static char *searchfor; /* search pattern from argv[] */
+static int havepagelen; /* page length is manually defined */
+static long startline; /* start line from argv[] */
+static int nextfile = 1; /* files to advance */
+static jmp_buf jmpenv; /* jump from signal handlers */
+static int canjump; /* jmpenv is valid */
+static wchar_t wbuf[READBUF]; /* used in several widechar routines */
+
+static char *copyright;
+static const char *helpscreen = N_("\
-------------------------------------------------------\n\
h this screen\n\
q or Q quit program\n\