From: mmcc Date: Mon, 19 Oct 2015 02:15:45 +0000 (+0000) Subject: Apply style(9) to header includes. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b608f594c7a79ab9c9a8aa47be909a64618dc514;p=openbsd Apply style(9) to header includes. ok nicm@ --- diff --git a/bin/ksh/alloc.c b/bin/ksh/alloc.c index e6eee0e0ff8..e1523d2643f 100644 --- a/bin/ksh/alloc.c +++ b/bin/ksh/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.12 2015/10/17 13:32:46 mmcc Exp $ */ +/* $OpenBSD: alloc.c,v 1.13 2015/10/19 02:15:45 mmcc Exp $ */ /* * Copyright (c) 2002 Marc Espie. * @@ -29,6 +29,7 @@ */ #include + #include "sh.h" struct link { diff --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c index efc7eadb64d..ff61292f20c 100644 --- a/bin/ksh/c_ksh.c +++ b/bin/ksh/c_ksh.c @@ -1,13 +1,14 @@ -/* $OpenBSD: c_ksh.c,v 1.43 2015/10/09 19:36:27 tedu Exp $ */ +/* $OpenBSD: c_ksh.c,v 1.44 2015/10/19 02:15:45 mmcc Exp $ */ /* * built-in Korn commands: c_* */ -#include "sh.h" #include + #include +#include "sh.h" int c_cd(char **wp) diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index 25ce11696b9..de3b6b3bdac 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,13 +1,14 @@ -/* $OpenBSD: c_sh.c,v 1.50 2015/10/10 00:10:07 deraadt Exp $ */ +/* $OpenBSD: c_sh.c,v 1.51 2015/10/19 02:15:45 mmcc Exp $ */ /* * built-in Bourne commands */ -#include "sh.h" +#include #include #include -#include + +#include "sh.h" static void p_time(struct shf *, int, struct timeval *, int, char *, char *); diff --git a/bin/ksh/c_test.c b/bin/ksh/c_test.c index de9cdff20f7..e252638c6a2 100644 --- a/bin/ksh/c_test.c +++ b/bin/ksh/c_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_test.c,v 1.20 2015/09/18 07:28:24 nicm Exp $ */ +/* $OpenBSD: c_test.c,v 1.21 2015/10/19 02:15:45 mmcc Exp $ */ /* * test(1); version 7-like -- author Erik Baalbergen @@ -9,8 +9,9 @@ * modified by J.T. Conklin to add POSIX compatibility. */ -#include "sh.h" #include + +#include "sh.h" #include "c_test.h" /* test(1) accepts the following grammar: diff --git a/bin/ksh/c_ulimit.c b/bin/ksh/c_ulimit.c index 7335efba2ab..0e8278d1717 100644 --- a/bin/ksh/c_ulimit.c +++ b/bin/ksh/c_ulimit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ulimit.c,v 1.20 2015/09/15 18:15:05 tedu Exp $ */ +/* $OpenBSD: c_ulimit.c,v 1.21 2015/10/19 02:15:45 mmcc Exp $ */ /* ulimit -- handle "ulimit" builtin @@ -18,9 +18,10 @@ that was originally under case SYSULIMIT in source file "xec.c". */ -#include "sh.h" #include +#include "sh.h" + #define SOFT 0x1 #define HARD 0x2 diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index 89f229aa99e..54952e91f7e 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.46 2015/10/09 19:36:27 tedu Exp $ */ +/* $OpenBSD: edit.c,v 1.47 2015/10/19 02:15:45 mmcc Exp $ */ /* * Command line editing - common code @@ -8,13 +8,15 @@ #include "config.h" #ifdef EDIT -#include "sh.h" -#include "tty.h" -#include "edit.h" #include +#include + #include #include -#include + +#include "sh.h" +#include "edit.h" +#include "tty.h" X_chars edchars; diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 0045b698cce..2663051740b 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.58 2015/10/16 23:18:59 mmcc Exp $ */ +/* $OpenBSD: emacs.c,v 1.59 2015/10/19 02:15:45 mmcc Exp $ */ /* * Emacs-like command line editing and history @@ -14,11 +14,13 @@ #include "config.h" #ifdef EMACS -#include "sh.h" -#include #include +#include + #include #include + +#include "sh.h" #include "edit.h" static Area aedit; diff --git a/bin/ksh/eval.c b/bin/ksh/eval.c index 37c42e676ea..d03ed7a168a 100644 --- a/bin/ksh/eval.c +++ b/bin/ksh/eval.c @@ -1,14 +1,16 @@ -/* $OpenBSD: eval.c,v 1.43 2015/09/18 07:28:24 nicm Exp $ */ +/* $OpenBSD: eval.c,v 1.44 2015/10/19 02:15:45 mmcc Exp $ */ /* * Expansion - quoting, separation, substitution, globbing */ -#include "sh.h" -#include -#include #include +#include +#include + +#include "sh.h" + /* * string expansion * diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 3f933ac55c2..bc8945eaa7e 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,15 +1,17 @@ -/* $OpenBSD: exec.c,v 1.59 2015/10/17 18:43:22 mmcc Exp $ */ +/* $OpenBSD: exec.c,v 1.60 2015/10/19 02:15:45 mmcc Exp $ */ /* * execute command tree */ -#include "sh.h" -#include "c_test.h" -#include #include + +#include #include +#include "sh.h" +#include "c_test.h" + /* Does ps4 get parameter substitutions done? */ # define PS4_SUBSTITUTE(s) substitute((s), 0) diff --git a/bin/ksh/expr.c b/bin/ksh/expr.c index effc20d42ce..52e9965fb70 100644 --- a/bin/ksh/expr.c +++ b/bin/ksh/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.28 2015/09/22 21:50:40 millert Exp $ */ +/* $OpenBSD: expr.c,v 1.29 2015/10/19 02:15:45 mmcc Exp $ */ /* * Korn expression evaluation @@ -7,9 +7,9 @@ * todo: better error handling: if in builtin, should be builtin error, etc. */ -#include "sh.h" #include +#include "sh.h" /* The order of these enums is constrained by the order of opinfo[] */ enum token { diff --git a/bin/ksh/history.c b/bin/ksh/history.c index 6207d26369e..d43cda9f480 100644 --- a/bin/ksh/history.c +++ b/bin/ksh/history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: history.c,v 1.47 2015/10/09 19:36:27 tedu Exp $ */ +/* $OpenBSD: history.c,v 1.48 2015/10/19 02:15:45 mmcc Exp $ */ /* * command history @@ -13,9 +13,10 @@ * to work on your system */ -#include "sh.h" #include +#include "sh.h" + #ifdef HISTORY # include diff --git a/bin/ksh/io.c b/bin/ksh/io.c index 736b0857826..4d220555acd 100644 --- a/bin/ksh/io.c +++ b/bin/ksh/io.c @@ -1,12 +1,14 @@ -/* $OpenBSD: io.c,v 1.30 2015/09/22 21:50:40 millert Exp $ */ +/* $OpenBSD: io.c,v 1.31 2015/10/19 02:15:45 mmcc Exp $ */ /* * shell buffered IO and formatted output */ +#include + #include + #include "sh.h" -#include static int initio_done; diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c index 76664b7bfcd..15900b58d76 100644 --- a/bin/ksh/jobs.c +++ b/bin/ksh/jobs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jobs.c,v 1.47 2015/09/17 21:39:54 nicm Exp $ */ +/* $OpenBSD: jobs.c,v 1.48 2015/10/19 02:15:45 mmcc Exp $ */ /* * Process and job control @@ -15,11 +15,12 @@ * */ -#include "sh.h" +#include #include -#include #include -#include +#include + +#include "sh.h" #include "tty.h" /* Order important! */ diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c index 568aec98d88..e08eae18322 100644 --- a/bin/ksh/lex.c +++ b/bin/ksh/lex.c @@ -1,13 +1,13 @@ -/* $OpenBSD: lex.c,v 1.59 2015/10/10 22:09:23 nicm Exp $ */ +/* $OpenBSD: lex.c,v 1.60 2015/10/19 02:15:45 mmcc Exp $ */ /* * lexical analysis and source input */ -#include "sh.h" -#include #include +#include +#include "sh.h" /* * states while lexing word diff --git a/bin/ksh/mail.c b/bin/ksh/mail.c index bfd6f90cf6f..7c592dbfbdf 100644 --- a/bin/ksh/mail.c +++ b/bin/ksh/mail.c @@ -1,16 +1,17 @@ -/* $OpenBSD: mail.c,v 1.20 2015/10/09 19:36:27 tedu Exp $ */ +/* $OpenBSD: mail.c,v 1.21 2015/10/19 02:15:45 mmcc Exp $ */ /* * Mailbox checking code by Robert J. Gibson, adapted for PD ksh by * John R. MacMillan */ -#include "config.h" - -#include "sh.h" #include + #include +#include "config.h" +#include "sh.h" + #define MBMESSAGE "you have mail in $_" typedef struct mbox { diff --git a/bin/ksh/main.c b/bin/ksh/main.c index e85d38f4032..707f2eea150 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.66 2015/10/18 18:05:35 mmcc Exp $ */ +/* $OpenBSD: main.c,v 1.67 2015/10/19 02:15:45 mmcc Exp $ */ /* * startup, main loop, environments and error handling @@ -6,10 +6,12 @@ #define EXTERN /* define EXTERNs in sh.h */ -#include "sh.h" #include -#include + #include +#include + +#include "sh.h" extern char **environ; diff --git a/bin/ksh/misc.c b/bin/ksh/misc.c index 5e8472771be..a9eecde9c63 100644 --- a/bin/ksh/misc.c +++ b/bin/ksh/misc.c @@ -1,11 +1,12 @@ -/* $OpenBSD: misc.c,v 1.46 2015/09/22 21:50:40 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.47 2015/10/19 02:15:45 mmcc Exp $ */ /* * Miscellaneous functions */ -#include "sh.h" #include + +#include "sh.h" #include "charclass.h" short ctypes [UCHAR_MAX+1]; /* type bits for unsigned char */ diff --git a/bin/ksh/mknod.c b/bin/ksh/mknod.c index 2e336a7ad13..b802c44a068 100644 --- a/bin/ksh/mknod.c +++ b/bin/ksh/mknod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknod.c,v 1.2 2009/10/27 23:59:21 deraadt Exp $ */ +/* $OpenBSD: mknod.c,v 1.3 2015/10/19 02:15:45 mmcc Exp $ */ /* $NetBSD: mknod.c,v 1.8 1995/08/11 00:08:18 jtc Exp $ */ /* @@ -35,6 +35,7 @@ #include #include + #include #include "sh.h" diff --git a/bin/ksh/path.c b/bin/ksh/path.c index f48f8d47974..e7afe0c2fbc 100644 --- a/bin/ksh/path.c +++ b/bin/ksh/path.c @@ -1,8 +1,9 @@ -/* $OpenBSD: path.c,v 1.15 2015/10/06 21:35:16 nicm Exp $ */ +/* $OpenBSD: path.c,v 1.16 2015/10/19 02:15:45 mmcc Exp $ */ -#include "sh.h" #include +#include "sh.h" + /* * Contains a routine to search a : separated list of * paths (a la CDPATH) and make appropriate file names. diff --git a/bin/ksh/shf.c b/bin/ksh/shf.c index a0b98ba2bca..f7d228596a3 100644 --- a/bin/ksh/shf.c +++ b/bin/ksh/shf.c @@ -1,12 +1,12 @@ -/* $OpenBSD: shf.c,v 1.22 2015/09/18 07:28:24 nicm Exp $ */ +/* $OpenBSD: shf.c,v 1.23 2015/10/19 02:15:45 mmcc Exp $ */ /* * Shell file I/O routines */ -#include "sh.h" #include +#include "sh.h" /* flags to shf_emptybuf() */ #define EB_READSW 0x01 /* about to switch to reading */ diff --git a/bin/ksh/var.c b/bin/ksh/var.c index f0ee491444d..36853af83a2 100644 --- a/bin/ksh/var.c +++ b/bin/ksh/var.c @@ -1,9 +1,11 @@ -/* $OpenBSD: var.c,v 1.50 2015/09/22 21:50:40 millert Exp $ */ +/* $OpenBSD: var.c,v 1.51 2015/10/19 02:15:45 mmcc Exp $ */ -#include "sh.h" -#include #include + #include +#include + +#include "sh.h" /* * Variables diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c index 8c6c98ec2d4..fa62e2d26b1 100644 --- a/bin/ksh/vi.c +++ b/bin/ksh/vi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vi.c,v 1.34 2015/10/15 19:36:50 mmcc Exp $ */ +/* $OpenBSD: vi.c,v 1.35 2015/10/19 02:15:45 mmcc Exp $ */ /* * vi command editing @@ -9,9 +9,11 @@ #include "config.h" #ifdef VI -#include "sh.h" -#include #include /* completion */ + +#include + +#include "sh.h" #include "edit.h" #define CMDLEN 2048