summaryrefslogtreecommitdiff
path: root/usr.bin/less
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/less')
-rw-r--r--usr.bin/less/ch.c3
-rw-r--r--usr.bin/less/charset.c4
-rw-r--r--usr.bin/less/cmdbuf.c7
-rw-r--r--usr.bin/less/command.c4
-rw-r--r--usr.bin/less/cvt.c2
-rw-r--r--usr.bin/less/decode.c2
-rw-r--r--usr.bin/less/edit.c3
-rw-r--r--usr.bin/less/filename.c5
-rw-r--r--usr.bin/less/lesskey.c6
-rw-r--r--usr.bin/less/line.c2
-rw-r--r--usr.bin/less/lsystem.c3
-rw-r--r--usr.bin/less/main.c4
-rw-r--r--usr.bin/less/os.c5
-rw-r--r--usr.bin/less/screen.c9
-rw-r--r--usr.bin/less/search.c2
-rw-r--r--usr.bin/less/signal.c3
16 files changed, 37 insertions, 27 deletions
diff --git a/usr.bin/less/ch.c b/usr.bin/less/ch.c
index 7262ca87932..4b360e230dd 100644
--- a/usr.bin/less/ch.c
+++ b/usr.bin/less/ch.c
@@ -15,9 +15,10 @@
* both forward and backward from the current read pointer.
*/
+#include <sys/stat.h>
+
#include "less.h"
-#include <sys/stat.h>
extern dev_t curr_dev;
extern ino_t curr_ino;
extern int less_is_more;
diff --git a/usr.bin/less/charset.c b/usr.bin/less/charset.c
index 406d7878d4e..5d99e136efd 100644
--- a/usr.bin/less/charset.c
+++ b/usr.bin/less/charset.c
@@ -14,12 +14,12 @@
* and do things specific to the character set.
*/
-#include "less.h"
-#include <locale.h>
#include <ctype.h>
#include <langinfo.h>
+#include <locale.h>
#include "charset.h"
+#include "less.h"
int utf_mode = 0;
diff --git a/usr.bin/less/cmdbuf.c b/usr.bin/less/cmdbuf.c
index 638db93375e..9c85e10f453 100644
--- a/usr.bin/less/cmdbuf.c
+++ b/usr.bin/less/cmdbuf.c
@@ -14,11 +14,12 @@
* Used only by command() and related functions.
*/
-#include "less.h"
-#include "cmd.h"
-#include "charset.h"
#include <sys/stat.h>
+#include "charset.h"
+#include "cmd.h"
+#include "less.h"
+
extern int sc_width;
extern int utf_mode;
diff --git a/usr.bin/less/command.c b/usr.bin/less/command.c
index e6326ad1fb5..62bae8dd555 100644
--- a/usr.bin/less/command.c
+++ b/usr.bin/less/command.c
@@ -13,10 +13,10 @@
* User-level command processor.
*/
+#include "cmd.h"
#include "less.h"
-#include "position.h"
#include "option.h"
-#include "cmd.h"
+#include "position.h"
extern int erase_char, erase2_char, kill_char;
extern volatile sig_atomic_t sigs;
diff --git a/usr.bin/less/cvt.c b/usr.bin/less/cvt.c
index 6422a5274c5..5d961961326 100644
--- a/usr.bin/less/cvt.c
+++ b/usr.bin/less/cvt.c
@@ -13,8 +13,8 @@
* Routines to convert text in various ways. Used by search.
*/
-#include "less.h"
#include "charset.h"
+#include "less.h"
extern int utf_mode;
diff --git a/usr.bin/less/decode.c b/usr.bin/less/decode.c
index 0a9025bc2a8..422a62a518b 100644
--- a/usr.bin/less/decode.c
+++ b/usr.bin/less/decode.c
@@ -30,8 +30,8 @@
* All the tables are linked together and are searched in order.
*/
-#include "less.h"
#include "cmd.h"
+#include "less.h"
#include "lesskey.h"
extern int erase_char, erase2_char, kill_char;
diff --git a/usr.bin/less/edit.c b/usr.bin/less/edit.c
index be10461aad5..6f30d045490 100644
--- a/usr.bin/less/edit.c
+++ b/usr.bin/less/edit.c
@@ -9,9 +9,10 @@
* For more information, see the README file.
*/
-#include "less.h"
#include <sys/stat.h>
+#include "less.h"
+
static int fd0 = 0;
extern int new_file;
diff --git a/usr.bin/less/filename.c b/usr.bin/less/filename.c
index 9c5deee706e..7b04b7dd7b7 100644
--- a/usr.bin/less/filename.c
+++ b/usr.bin/less/filename.c
@@ -17,12 +17,13 @@
* popen to a shell to perform the expansion.
*/
-#include "less.h"
-
#include <sys/stat.h>
+
#include <glob.h>
#include <stdarg.h>
+#include "less.h"
+
extern int force_open;
extern int secure;
extern int use_lessopen;
diff --git a/usr.bin/less/lesskey.c b/usr.bin/less/lesskey.c
index 869b3f4a767..76336fd3ceb 100644
--- a/usr.bin/less/lesskey.c
+++ b/usr.bin/less/lesskey.c
@@ -81,11 +81,11 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
+#include <err.h>
+
+#include "cmd.h"
#include "less.h"
#include "lesskey.h"
-#include "cmd.h"
-
-#include <err.h>
struct cmdname {
char *cn_name;
diff --git a/usr.bin/less/line.c b/usr.bin/less/line.c
index 757ec904627..fe2fe9ff1f5 100644
--- a/usr.bin/less/line.c
+++ b/usr.bin/less/line.c
@@ -15,8 +15,8 @@
* in preparation for output to the screen.
*/
-#include "less.h"
#include "charset.h"
+#include "less.h"
static char *linebuf = NULL; /* Buffer which holds the current output line */
static char *attr = NULL; /* Extension of linebuf to hold attributes */
diff --git a/usr.bin/less/lsystem.c b/usr.bin/less/lsystem.c
index 6745b487d7d..f53a5e45e9d 100644
--- a/usr.bin/less/lsystem.c
+++ b/usr.bin/less/lsystem.c
@@ -14,8 +14,9 @@
* Necessarily very OS dependent.
*/
-#include "less.h"
#include <signal.h>
+
+#include "less.h"
#include "position.h"
extern int screen_trashed;
diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c
index c218dab2c30..73e651b92d9 100644
--- a/usr.bin/less/main.c
+++ b/usr.bin/less/main.c
@@ -13,9 +13,11 @@
* Entry point, initialization, miscellaneous routines.
*/
+#include <sys/types.h>
+
#include <libgen.h>
#include <stdarg.h>
-#include <sys/types.h>
+
#include "less.h"
char *every_first_cmd = NULL;
diff --git a/usr.bin/less/os.c b/usr.bin/less/os.c
index e10135c2813..bb8b483a2d4 100644
--- a/usr.bin/less/os.c
+++ b/usr.bin/less/os.c
@@ -21,10 +21,11 @@
* Unix features are present.
*/
-#include "less.h"
+#include <errno.h>
#include <signal.h>
#include <time.h>
-#include <errno.h>
+
+#include "less.h"
extern volatile sig_atomic_t sigs;
diff --git a/usr.bin/less/screen.c b/usr.bin/less/screen.c
index c3c846bc542..5063250badd 100644
--- a/usr.bin/less/screen.c
+++ b/usr.bin/less/screen.c
@@ -14,12 +14,13 @@
* Uses termcap to be as terminal-independent as possible.
*/
-#include "less.h"
-#include "cmd.h"
-
#include <sys/ioctl.h>
-#include <termios.h>
+
#include <term.h>
+#include <termios.h>
+
+#include "cmd.h"
+#include "less.h"
#define DEFAULT_TERM "unknown"
diff --git a/usr.bin/less/search.c b/usr.bin/less/search.c
index e9aa840f176..f7ff820a1d8 100644
--- a/usr.bin/less/search.c
+++ b/usr.bin/less/search.c
@@ -13,10 +13,10 @@
* Routines to search a file for a pattern.
*/
+#include "charset.h"
#include "less.h"
#include "pattern.h"
#include "position.h"
-#include "charset.h"
#define MINPOS(a, b) (((a) < (b)) ? (a) : (b))
#define MAXPOS(a, b) (((a) > (b)) ? (a) : (b))
diff --git a/usr.bin/less/signal.c b/usr.bin/less/signal.c
index 726484b7fad..3ddce407b83 100644
--- a/usr.bin/less/signal.c
+++ b/usr.bin/less/signal.c
@@ -17,9 +17,10 @@
* signals need processing by calling psignal().
*/
-#include "less.h"
#include <signal.h>
+#include "less.h"
+
/*
* "sigs" contains bits indicating signals which need to be processed.
*/